From ac8f192248e7a98a70215a9f03306ff4a2a86c07 Mon Sep 17 00:00:00 2001 From: Alex ORLUC <alex.orluc@maarch.org> Date: Wed, 2 Jun 2021 18:29:08 +0200 Subject: [PATCH] FIX #16982 TIME 0:45 disable note if document certified --- .../app/document/document.component.html | 4 ++-- .../app/document/document.component.ts | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/frontend/app/document/document.component.html b/src/frontend/app/document/document.component.html index 73f3c437c7..c2f3726183 100755 --- a/src/frontend/app/document/document.component.html +++ b/src/frontend/app/document/document.component.html @@ -34,7 +34,7 @@ </ion-segment-button> </ion-segment> <ion-buttons slot="end" *ngIf="!detailMode"> - <ion-button color="primary" (click)="openAction($event)"> + <ion-button color="primary" (click)="openAction($event)" [disabled]="!canShowActions()"> <ion-icon slot="icon-only" name="settings-sharp"></ion-icon> </ion-button> </ion-buttons> @@ -87,7 +87,7 @@ <drag-scroll style="overflow:auto;height: 100%;width: 100%;margin: auto;" [drag-scroll-disabled]="(signaturesService.dragging || signaturesService.resizing) && signaturesService.mobileMode" [drag-disabled]="(signaturesService.dragging || signaturesService.resizing) && !signaturesService.mobileMode" - [style.maxWidth.px]="signaturesService.workingAreaWidth" #nav (click)="currentDoc == 0 && !detailMode ? openAction($event) : false"> + [style.maxWidth.px]="signaturesService.workingAreaWidth" #nav (click)="canShowActions() ? openAction($event) : false"> <div style="position:relative;cursor: grab;" [style.width.px]="signaturesService.workingAreaWidth" [style.height.px]="signaturesService.workingAreaHeight" id="myBounds" #myBounds> <app-document-note-list *ngIf="currentDoc == 0 && !loadingImage"> diff --git a/src/frontend/app/document/document.component.ts b/src/frontend/app/document/document.component.ts index e4b2d384bb..58a6dbf809 100755 --- a/src/frontend/app/document/document.component.ts +++ b/src/frontend/app/document/document.component.ts @@ -200,14 +200,14 @@ export class DocumentComponent implements OnInit { this.openSignatures(); } }); + buttons.push({ + text: this.translate.instant('lang.annotateDocument'), + icon: 'receipt-outline', + handler: () => { + this.openNoteEditor(); + } + }); } - buttons.push({ - text: this.translate.instant('lang.annotateDocument'), - icon: 'receipt-outline', - handler: () => { - this.openNoteEditor(); - } - }); /* if (this.originalSize) { buttons.push({ text: 'Zoom taille écran', @@ -804,4 +804,8 @@ export class DocumentComponent implements OnInit { } return res.buffer; } + + canShowActions() { + return this.currentDoc == 0 && !this.detailMode && !this.signaturesService.stampLock; + } } -- GitLab