Merge branch 'master' into VM/RED-6801

This commit is contained in:
Valentin Mihai 2023-07-18 22:18:43 +03:00
commit a23a3691cf
4 changed files with 14 additions and 8 deletions

View File

@ -3,7 +3,6 @@
<ng-container *ngIf="state.file() as file">
<div class="all-caps-label mr-16 ml-8 label">
{{ translations[file.workflowStatus] | translate }}
<span *ngIf="file.isUnderReview || file.isUnderApproval">{{ 'by' | translate }}:</span>
</div>
<iqser-initials-avatar

View File

@ -14,13 +14,10 @@
<div class="vertical-line"></div>
<div class="all-caps-label mr-16 ml-8 label">
{{ 'file-preview.last-assignee' | translate : { status: file.workflowStatus } }}
{{ 'file-preview.last-assignee' | translate }}
</div>
<iqser-initials-avatar
[user]="file.isApproved ? file.lastApprover : file.lastReviewer"
[withName]="true"
></iqser-initials-avatar>
<iqser-initials-avatar [user]="lastAssignee()" [withName]="true"></iqser-initials-avatar>
</ng-container>
<div class="vertical-line"></div>

View File

@ -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(),

View File

@ -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."
},