Skip to content

Commit

Permalink
loading for steps exams/survey
Browse files Browse the repository at this point in the history
  • Loading branch information
RheuX committed Nov 14, 2024
1 parent a1f970e commit f927237
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/exams/exams-view.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
</ng-container>
</ng-container>
</div>
<div *ngIf="isLoading" i18n>
Loading content...
</div>
<div class="v-align-center action-buttons">
<button
*ngIf="mode !== 'view'"
Expand Down
3 changes: 3 additions & 0 deletions src/app/exams/exams-view.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class ExamsViewComponent implements OnInit, OnDestroy {
unansweredQuestions: number[];
isComplete = false;
comment: string;
isLoading = true;

constructor(
private router: Router,
Expand All @@ -68,6 +69,7 @@ export class ExamsViewComponent implements OnInit, OnDestroy {
this.exam = this.exam || res;
this.examType = params.get('type') || this.previewExamType;
this.setExamPreview();
this.isLoading = false;
},
(err) => {
this.planetMessageService.showAlert($localize`Preview is not available for this test`);
Expand All @@ -77,6 +79,7 @@ export class ExamsViewComponent implements OnInit, OnDestroy {
return;
}
this.setExam(params);
this.isLoading = false;
});
}

Expand Down

0 comments on commit f927237

Please sign in to comment.