-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #1490 improve satisfaction stat query + show avg rating number
- Loading branch information
1 parent
077b5ca
commit a97253f
Showing
9 changed files
with
94 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 22 additions & 28 deletions
50
...b/src/app/analytics/satisfaction/satisfaction-details/satisfaction-details.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,30 @@ | ||
<nb-card *ngIf="satisfactionStat" | ||
class="stats" | ||
> | ||
<div class="space space-component3"> | ||
<h5 class="heading1 text-basic"> | ||
<nb-icon *ngFor="let _ of [].constructor(satisfactionStat.ratingBot)" icon="star-outline"></nb-icon> | ||
</h5> | ||
<span class="text text-hint caption"> | ||
|
||
{{satisfactionStat.nbUsersRated}} users</span | ||
> | ||
</div> | ||
</nb-card> | ||
|
||
<div style="display: flex" *ngIf="satisfactionStat"> | ||
<nb-card | ||
class="stats" *ngFor="let index of [1,2,3,4,5]" | ||
> | ||
<ng-container *ngIf="satisfactionStat"> | ||
<nb-card class="stats"> | ||
<div class="space space-component3"> | ||
<h5 class="heading1 text-basic"> | ||
<nb-icon *ngFor="let _ of [].constructor(index)" icon="star-outline"></nb-icon> | ||
<nb-icon *ngFor="let _ of getStarArray()" icon="star-outline"></nb-icon> | ||
</h5> | ||
<span class="text text-hint caption"> | ||
|
||
{{getNbUsersByNote(index)}} users</span | ||
> | ||
<span class="text text-hint caption">{{satisfactionStat.nbUsersRated}} users</span> | ||
</div> | ||
<div class="space icon-space"> | ||
<nb-toggle [value]="index" (change)="updateRatingFilter($event)" | ||
status="basic" | ||
></nb-toggle> | ||
<div class="space"> | ||
<div class="rating-circle" [ngStyle]="getStyles()"> | ||
<span>{{ satisfactionStat.ratingBot.toFixed(1) }}</span> | ||
</div> | ||
</div> | ||
</nb-card> | ||
</div> | ||
|
||
<div style="display: flex"> | ||
<nb-card class="stats" *ngFor="let index of [1,2,3,4,5]"> | ||
<div class="space space-component3"> | ||
<h5 class="heading1 text-basic"> | ||
<nb-icon *ngFor="let _ of [].constructor(index)" icon="star-outline"></nb-icon> | ||
</h5> | ||
<span class="text text-hint caption">{{getNbUsersByNote(index)}} users</span> | ||
</div> | ||
<div class="space icon-space"> | ||
<nb-toggle [value]="index" (change)="updateRatingFilter($event)" status="basic"></nb-toggle> | ||
</div> | ||
</nb-card> | ||
</div> | ||
</ng-container> | ||
<tock-dialogs [ratingFilter]="ratingFilter"></tock-dialogs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters