diff --git a/src/frontend/app/attachments/attachments-page/attachment-page.component.ts b/src/frontend/app/attachments/attachments-page/attachment-page.component.ts index 529502ef874330af7af9d09b20c29d85ce7d812e..08737820c21504ab523738e99a9f528784bd7b18 100644 --- a/src/frontend/app/attachments/attachments-page/attachment-page.component.ts +++ b/src/frontend/app/attachments/attachments-page/attachment-page.component.ts @@ -119,7 +119,7 @@ export class AttachmentPageComponent implements OnInit { modifiedBy: new FormControl({ value: data.modifiedBy, disabled: true }), signatory: new FormControl({ value: data.signatory, disabled: true }), signatoryId: new FormControl({ value: data.signatoryId, disabled: true }), - signDate: new FormControl({ value: data.signDate !== null ? new Date(data.signDate) : null, disabled: true }), + signDate: new FormControl({ value: data.signDate, disabled: true }), resId: new FormControl({ value: this.data.resId, disabled: true }, [Validators.required]), chrono: new FormControl({ value: data.chrono, disabled: true }), originId: new FormControl({ value: data.originId, disabled: true }), diff --git a/src/frontend/app/signature-book.component.html b/src/frontend/app/signature-book.component.html index 264b3c7a55676678a70f013b786929463edeb03b..7c3494119b2985c572eb4815d63cde233ce52b0f 100755 --- a/src/frontend/app/signature-book.component.html +++ b/src/frontend/app/signature-book.component.html @@ -11,7 +11,8 @@ </div> <div *ngFor="let module of processTool" title="{{module.label}}" class="item" [ngClass]="{'activeTabSignatureBook': headerTab == module.id}" - (click)="changeSignatureBookLeftContent(module.id)"> + [class.tool-disabled]="!isToolEnabled(module.id)" + (click)="isToolEnabled(module.id) ? changeSignatureBookLeftContent(module.id) : false"> <i [class]="module.icon"></i> <i *ngIf="module.count > 0" class="fas fa-circle haveContent"></i> </div> diff --git a/src/frontend/app/signature-book.component.scss b/src/frontend/app/signature-book.component.scss index 0c9e83a96528d28474b00b170a848fda3586b96d..919789e99384778d6b132394e06b64f93a65d0d7 100755 --- a/src/frontend/app/signature-book.component.scss +++ b/src/frontend/app/signature-book.component.scss @@ -1110,4 +1110,12 @@ img:hover.panelSelectedThumbnail { margin-top: 2px; color: black; font-weight: normal; +} + +.tool-disabled { + cursor: not-allowed !important; + + i { + opacity: 0.3; + } } \ No newline at end of file diff --git a/src/frontend/app/signature-book.component.ts b/src/frontend/app/signature-book.component.ts index f429230b221112fb604a879b4f02746035a457c1..528bf242e7e858b93353d1aa287103bbfb3ceed2 100755 --- a/src/frontend/app/signature-book.component.ts +++ b/src/frontend/app/signature-book.component.ts @@ -596,4 +596,16 @@ export class SignatureBookComponent implements OnInit, OnDestroy { }) ).subscribe(); } + + isToolEnabled(id: string) { + if (id === 'history') { + if (!this.privilegeService.hasCurrentUserPrivilege('view_full_history') && !this.privilegeService.hasCurrentUserPrivilege('view_doc_history')) { + return false; + } else { + return true; + } + } else { + return true; + } + } }