diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.html b/apps/red-ui/src/app/common/file-actions/file-actions.component.html index a2179d019..eb2505a8b 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.html @@ -4,9 +4,9 @@ (action)="openDeleteFileDialog($event, fileStatus)" *ngIf="permissionsService.canDeleteFile(fileStatus)" [tooltipPosition]="tooltipPosition" - tooltip="project-overview.delete.action" - icon="red:trash" [type]="buttonType" + icon="red:trash" + tooltip="project-overview.delete.action" > @@ -14,50 +14,9 @@ - - - - - - - - - - - - - @@ -66,12 +25,12 @@ @@ -80,9 +39,55 @@ (action)="downloadFile($event, fileStatus)" *ngIf="permissionsService.canDownloadRedactedFile(fileStatus)" [tooltipPosition]="tooltipPosition" - tooltip="project-overview.download-redacted-file" - icon="red:download" [type]="buttonType" + icon="red:download" + tooltip="project-overview.download-redacted-file" + > + + + + + + + + + + + + + + + + + + @@ -91,10 +96,10 @@ (action)="reanalyseFile($event, fileStatus)" *ngIf="permissionsService.canReanalyseFile(fileStatus) && screen === 'file-preview'" [tooltipPosition]="'before'" - tooltip="file-preview.reanalyse-notification" - type="warn" - tooltipClass="warn small" icon="red:refresh" + tooltip="file-preview.reanalyse-notification" + tooltipClass="warn small" + type="warn" > @@ -103,8 +108,8 @@ (action)="reanalyseFile($event, fileStatus)" *ngIf="permissionsService.canReanalyseFile(fileStatus) && screen === 'project-overview'" [tooltipPosition]="tooltipPosition" - tooltip="project-overview.reanalyse.action" icon="red:refresh" + tooltip="project-overview.reanalyse.action" type="dark-bg" > diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.ts b/apps/red-ui/src/app/common/file-actions/file-actions.component.ts index 6dca70ad1..1d7918d17 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.ts @@ -85,12 +85,12 @@ export class FileActionsComponent implements OnInit { }); } - setFileUnderReview($event: MouseEvent, fileStatus: FileStatusWrapper) { + setFileUnderReview($event: MouseEvent, fileStatus: FileStatusWrapper, ignoreDialogChanges = false) { $event.stopPropagation(); // this._fileActionService.setFileUnderReview(fileStatus).subscribe(() => { // this.reloadProjects('set-review'); // }); - this._fileActionService.assignProjectReviewer(fileStatus, () => this.actionPerformed.emit('assign-reviewer')); + this._fileActionService.assignProjectReviewer(fileStatus, () => this.actionPerformed.emit('assign-reviewer'), ignoreDialogChanges); } reloadProjects(action: string) { diff --git a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.html b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.html index 25c33a2a0..838dddd18 100644 --- a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.html +++ b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.html @@ -2,7 +2,7 @@
-
+
{{ 'assign-' + data.type + '-owner.dialog.single-user' | translate }} diff --git a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.scss b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.scss index 250f30687..ff164192c 100644 --- a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.scss +++ b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.scss @@ -1,6 +1,6 @@ @import '../../../assets/styles/red-mixins'; -.dialog-content { +.no-padding-bottom { padding-bottom: 0; } diff --git a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.ts b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.ts index f486f9186..2a2ffa7f1 100644 --- a/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.ts +++ b/apps/red-ui/src/app/dialogs/assign-owner-dialog/assign-owner-dialog.component.ts @@ -12,6 +12,7 @@ class DialogData { type: 'file' | 'project'; project?: ProjectWrapper; files?: FileStatusWrapper[]; + ignoreChanged?: boolean; } @Component({ @@ -132,6 +133,10 @@ export class AssignOwnerDialogComponent { } public get changed(): boolean { + if (this.data.ignoreChanged) { + return true; + } + if (this.data.type === 'project') { if (this.data.project.ownerId !== this.selectedSingleUser) { return true; diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index bbdd81c2d..b95f6f3b4 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -204,10 +204,10 @@ export class DialogService { return ref; } - public openAssignFileReviewerDialog(file: FileStatus, cb?: Function): MatDialogRef { + public openAssignFileReviewerDialog(file: FileStatus, cb?: Function, ignoreDialogChanges = false): MatDialogRef { const ref = this._dialog.open(AssignOwnerDialogComponent, { ...dialogConfig, - data: { type: 'file', files: [file] } + data: { type: 'file', files: [file], ignoreChanged: ignoreDialogChanges } }); ref.afterClosed().subscribe(() => { diff --git a/apps/red-ui/src/app/icons/icons.module.ts b/apps/red-ui/src/app/icons/icons.module.ts index 5c91fccf8..bfc4b3585 100644 --- a/apps/red-ui/src/app/icons/icons.module.ts +++ b/apps/red-ui/src/app/icons/icons.module.ts @@ -13,6 +13,7 @@ export class IconsModule { const icons = [ 'add', 'analyse', + 'approved', 'arrow-down', 'arrow-up', 'arrow-right', @@ -49,6 +50,7 @@ export class IconsModule { 'preview', 'radio-indeterminate', 'radio-selected', + 'ready-for-approval', 'refresh', 'report', 'search', diff --git a/apps/red-ui/src/app/screens/file/service/file-action.service.ts b/apps/red-ui/src/app/screens/file/service/file-action.service.ts index 6c1833727..7d3c938cb 100644 --- a/apps/red-ui/src/app/screens/file/service/file-action.service.ts +++ b/apps/red-ui/src/app/screens/file/service/file-action.service.ts @@ -44,13 +44,17 @@ export class FileActionService { }); } - public assignProjectReviewer(file?: FileStatus, callback?: Function) { - this._dialogService.openAssignFileReviewerDialog(file ? file : this._appStateService.activeFile, async () => { - await this._appStateService.reloadActiveProjectFiles(); - if (callback) { - callback(); - } - }); + public assignProjectReviewer(file?: FileStatus, callback?: Function, ignoreDialogChanges = false) { + this._dialogService.openAssignFileReviewerDialog( + file ? file : this._appStateService.activeFile, + async () => { + await this._appStateService.reloadActiveProjectFiles(); + if (callback) { + callback(); + } + }, + ignoreDialogChanges + ); } public async assignToMe(file?: FileStatus, callback?: Function) { diff --git a/apps/red-ui/src/assets/icons/general/approved.svg b/apps/red-ui/src/assets/icons/general/approved.svg new file mode 100644 index 000000000..0240a82e8 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/approved.svg @@ -0,0 +1,13 @@ + + + 163F9A92-B60D-42FF-80C8-1135F4B95ECC + + + + + + + + + + diff --git a/apps/red-ui/src/assets/icons/general/ready-for-approval.svg b/apps/red-ui/src/assets/icons/general/ready-for-approval.svg new file mode 100644 index 000000000..24be62ca8 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/ready-for-approval.svg @@ -0,0 +1,7 @@ + + + ready_for_approval + + + + diff --git a/apps/red-ui/src/assets/icons/general/undo.svg b/apps/red-ui/src/assets/icons/general/undo.svg index 82bf73bef..13567f137 100644 --- a/apps/red-ui/src/assets/icons/general/undo.svg +++ b/apps/red-ui/src/assets/icons/general/undo.svg @@ -1,20 +1,15 @@ - - - - + + + B3EA3E95-AC5D-4F73-ACEB-7F071103E161 + + + + + + + + + + +