Skip to content

Commit 05d95a7

Browse files
committed
fix(page-profile): floor progressbar percentage
1 parent 5fa3976 commit 05d95a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/components/profile/page-profile/page-profile.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
</button>
3434
</div>
3535

36-
<div class="diploma" *ngIf="!user.$isOrg">
36+
<div class="diploma" *ngIf="user.successful && !user.$isOrg">
3737
<ng-container *ngIf="diplomaService.userHasDiploma(user) | async; else diplomaUpload">
3838
<button class="btn btn-ksi w-100" (click)="showDiploma()">{{'profile.diploma.show'|translate}}</button>
3939
</ng-container>

src/app/components/profile/page-profile/page-profile.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class PageProfileComponent implements OnInit {
201201
}
202202

203203
private static generateProgressBar(points: number, maxPoints: number, requiredPercentage = 60): BarValue[] {
204-
const currentPercentage = Math.round(100 * points / maxPoints);
204+
const currentPercentage = Math.floor(100 * points / maxPoints);
205205
const leftRequiredPercentage = Math.max(0, requiredPercentage - currentPercentage);
206206
const currentUserPercentageFloored = Math.floor(currentPercentage);
207207

0 commit comments

Comments
 (0)