Skip to content
Snippets Groups Projects
Commit f22ef383 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #15058 TIME 1 fix disable history tool in signature book

parent 34eedc54
No related branches found
No related tags found
No related merge requests found
......@@ -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 }),
......
......@@ -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>
......
......@@ -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
......@@ -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;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment