Skip to content

Commit

Permalink
Merge pull request #411 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 928254a + 702d072 commit 24d7e95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 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?.breakDown">
<div class="flex items-center margin-bottom-xs" *ngFor="let rating of ratingSummary?.breakDownReverse">
<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 @@ -19,7 +19,7 @@ export class RatingSummaryComponent implements OnInit, OnChanges {

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

0 comments on commit 24d7e95

Please sign in to comment.