Skip to content

Commit

Permalink
Merge pull request #413 from sunbird-cb/dev-portal
Browse files Browse the repository at this point in the history
Task #58402: Display of rating stars fix in summary
  • Loading branch information
christyfernandes authored May 18, 2022
2 parents 24d7e95 + b9bdbb7 commit 6508495
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div class="margin-top-s mat-body-1 ws-mat-black60-text">
{{ ratingSummary?.total_number_of_ratings | pipeCountTransform }} ratings</div>
</div>
<div class="flex items-center margin-bottom-xs" *ngFor="let rating of ratingSummary?.breakDownReverse">
<div class="flex items-center margin-bottom-xs" *ngFor="let rating of ratingSummary?.breakDown.slice().reverse()">
<div class="mat-body-2 bold-imp margin-right-m">{{rating.key}} star</div>
<div class="flex items-center rating-progress">
<mat-progress-bar [mode]="'determinate'" [matTooltip]="rating?.percent + ' %'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export class RatingSummaryComponent implements OnInit, OnChanges {
}

ngOnChanges() {
if (this.ratingSummary && this.ratingSummary.breakDown) {
this.ratingSummary.breakDownReverse = this.ratingSummary.breakDown.reverse()
// console.log('this.ratingSummary.breakDown', this.ratingSummary.breakDown)
}
// if (this.ratingSummary && this.ratingSummary.breakDown) {
// this.ratingSummary.breakDownReverse = this.ratingSummary.breakDown.reverse()
// console.log('this.ratingSummary.breakDownReverse', this.ratingSummary.breakDownReverse)
// }
}

getRatingIcon(ratingIndex: number, avg: number): 'star' | 'star_border' | 'star_half' {
Expand Down

0 comments on commit 6508495

Please sign in to comment.