diff --git a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html index 47c452ef9..fbdfadff9 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html @@ -3,7 +3,6 @@
{{ translations[file.workflowStatus] | translate }} - {{ 'by' | translate }}:
- {{ 'file-preview.last-assignee' | translate : { status: file.workflowStatus } }} + {{ 'file-preview.last-assignee' | translate }}
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index f7450a28c..64844499f 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -2,6 +2,7 @@ import { AfterViewInit, ChangeDetectorRef, Component, + computed, effect, ElementRef, HostListener, @@ -21,6 +22,7 @@ import { HelpModeService, IConfirmationDialogData, IqserDialog, + IqserPermissionsService, LoadingService, Toaster, } from '@iqser/common-ui'; @@ -92,6 +94,7 @@ export class FilePreviewScreenComponent fullScreen = false; readonly fileId = this.state.fileId; readonly dossierId = this.state.dossierId; + readonly lastAssignee = computed(() => this.getLastAssignee()); width: number; constructor( @@ -101,6 +104,7 @@ export class FilePreviewScreenComponent readonly userPreferenceService: UserPreferenceService, readonly pdfProxyService: PdfProxyService, readonly configService: ConfigService, + private readonly _iqserPermissionsService: IqserPermissionsService, private readonly _listingService: AnnotationsListingService, private readonly _router: Router, private readonly _ngZone: NgZone, @@ -195,6 +199,12 @@ export class FilePreviewScreenComponent ); } + getLastAssignee() { + const { isApproved, lastReviewer, lastApprover } = this.state.file(); + const isRss = this._iqserPermissionsService.has(this.roles.getRss); + return isApproved ? (isRss ? lastReviewer : lastApprover) : lastReviewer; + } + deleteEarmarksOnViewChange$() { const isChangingFromEarmarksViewMode$ = this._viewModeService.viewMode$.pipe( pairwise(), diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index ab2ec6995..c6a6af459 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -841,7 +841,7 @@ } }, "dossier-overview": { - "approve": "Done", + "approve": "Move to Done", "approve-disabled": "File can only be approved once it has been analysed with the latest dictionaries and all suggestions have been processed.", "assign-approver": "Assign Approver", "assign-me": "Assign To Me", @@ -1364,7 +1364,7 @@ "convert": "Convert earmarks", "remove": "Remove earmarks" }, - "last-assignee": "{status, select, APPROVED{Approved} UNDER_APPROVAL{Reviewed} other{Last reviewed}} by:", + "last-assignee": "Last Assignee", "no-data": { "title": "There have been no changes to this page." },