add check to see if status is failed. and print status to user
This commit is contained in:
@@ -1,9 +1,17 @@
|
|||||||
<msfa-layout>
|
<msfa-layout>
|
||||||
<msfa-report-layout *ngIf="avrop$ | async as avrop; else skeletonRef" reportTitle="Slutredovisning" [avrop]="avrop">
|
<msfa-report-layout *ngIf="avrop$ | async as avrop; else skeletonRef" reportTitle="Slutredovisning" [avrop]="avrop">
|
||||||
<div class="slutredovisning-view" *ngIf="slutredovisning$ | async as slutredovisning; else loadingRef">
|
<div class="slutredovisning-view" *ngIf="slutredovisning$ | async as slutredovisning; else loadingRef">
|
||||||
<digi-notification-alert *ngIf="slutredovisning.motivation" af-variation="danger">
|
<digi-notification-alert
|
||||||
|
*ngIf="slutredovisning.motivation && statusIsFailed(slutredovisning.status)"
|
||||||
|
af-variation="danger"
|
||||||
|
>
|
||||||
|
<h3>Status: {{slutredovisning.status}}</h3>
|
||||||
<p>{{slutredovisning.motivation}}</p>
|
<p>{{slutredovisning.motivation}}</p>
|
||||||
</digi-notification-alert>
|
</digi-notification-alert>
|
||||||
|
<digi-notification-alert *ngIf="!statusIsFailed(slutredovisning.status)" af-variation="info">
|
||||||
|
<h3>Status: {{slutredovisning.status}}</h3>
|
||||||
|
<p *ngIf="slutredovisning.motivation">{{slutredovisning.motivation}}</p>
|
||||||
|
</digi-notification-alert>
|
||||||
<msfa-slutredovisning-view-description-list
|
<msfa-slutredovisning-view-description-list
|
||||||
[slutredovisning]="slutredovisning"
|
[slutredovisning]="slutredovisning"
|
||||||
></msfa-slutredovisning-view-description-list>
|
></msfa-slutredovisning-view-description-list>
|
||||||
|
|||||||
@@ -32,5 +32,9 @@ export class SlutredovisningViewComponent {
|
|||||||
shareReplay(1)
|
shareReplay(1)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
statusIsFailed(status: string) {
|
||||||
|
return status === 'Ej godkänd';
|
||||||
|
}
|
||||||
|
|
||||||
constructor(private slutredovisningViewService: SlutredovisningViewService, private activatedRoute: ActivatedRoute) {}
|
constructor(private slutredovisningViewService: SlutredovisningViewService, private activatedRoute: ActivatedRoute) {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user