[SI-1168] - insert button "update" while missing them. (Probably lost while merging ?!)
Signed-off-by: dtheinert <dietmar.theinert@pta.de>
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.component.html b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.component.html
index 73c251e..5090964 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.component.html
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-details/grid-failure-details.component.html
@@ -51,14 +51,26 @@
{{ 'CreatedBtn' | translate }}
</button>
</ng-container>
- <button
- *ngIf="gridFailureDetailsSandbox.currentFormState.isEnabled"
- type="button"
- class="btn btn-success button"
- (click)="gridFailureDetailsSandbox.saveGridFailure()"
- >
- {{ 'SaveBtn' | translate }}
- </button>
+ <ng-container *ngIf="gridFailureDetailsSandbox.showUpdateButton; else saveBtn">
+ <button
+ *visibleByRight="[RolesEnum.QUALIFIER, RolesEnum.CREATOR]"
+ type="button"
+ class="btn btn-success button"
+ (click)="gridFailureDetailsSandbox.setState(StateEnum.UPDATED)"
+ >
+ {{ 'UpdateBtn' | translate }}
+ </button>
+ </ng-container>
+ <ng-template #saveBtn>
+ <button
+ *ngIf="gridFailureDetailsSandbox.currentFormState.isEnabled"
+ type="button"
+ class="btn btn-success button"
+ (click)="gridFailureDetailsSandbox.saveGridFailure()"
+ >
+ {{ 'SaveBtn' | translate }}
+ </button>
+ </ng-template>
</div>
</div>
</div>