diff --git a/src/frontend/app/viewer/document-viewer.component.html b/src/frontend/app/viewer/document-viewer.component.html index 8a1379f3cbf6c0f679bfd7682c0cecc9749946d7..8d2dd45bb5c494a59c43c4e2ed96d2890a4f748d 100644 --- a/src/frontend/app/viewer/document-viewer.component.html +++ b/src/frontend/app/viewer/document-viewer.component.html @@ -132,7 +132,7 @@ <mat-icon style="height:auto;font-size:20px;" class="fas fa-check"></mat-icon> </button> <button mat-raised-button - *ngIf="(!isDocModified && mode === 'mainDocument' && resId !== null && !functions.empty(file.subinfos) && file.subinfos.signedDocVersions && (privilegeService.hasCurrentUserPrivilege('sign_document') || this.headerService.user.id == file.creatorId)) && !hideTools" + *ngIf="(!isDocModified && mode === 'mainDocument' && resId !== null && !functions.empty(file.subinfos) && file.subinfos.signedDocVersions && this.headerService.user.id == file.signatoryId) && !hideTools && editMode" color="warn" [title]="this.translate.instant('lang.unsign')" style="position: fixed;z-index: 1;bottom: 100px;right: 150px;" (click)="unsignMainDocument()"> diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts index a44e3dfb118837143b47bafad412d295819f818e..17d254ab886b5965f0cff8087f7049a4cd8bd1bb 100755 --- a/src/frontend/app/viewer/document-viewer.component.ts +++ b/src/frontend/app/viewer/document-viewer.component.ts @@ -605,6 +605,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy { this.file.name = `${resId}.${data.originalFormat}`; this.file.format = data.originalFormat; this.file.creatorId = data.originalCreatorId; + this.file.signatoryId = data.signatoryId; this.file.content = `../rest/attachments/${resId}/originalContent?mode=base64`; this.file.contentView = `../rest/attachments/${resId}/content?mode=base64`; this.file.src = this.base64ToArrayBuffer(data.encodedDocument); @@ -645,6 +646,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy { this.file.contentMode = 'route'; this.file.name = `${resId}.${data.originalFormat}`; this.file.format = data.originalFormat; + this.file.signatoryId = data.signatoryId; this.file.content = `../rest/resources/${resId}/originalContent?mode=base64`; this.file.contentView = `../rest/resources/${resId}/content?mode=base64`; this.file.src = this.base64ToArrayBuffer(data.encodedDocument);