From 37b6fb53045ebc03375cdc91cf0aaae7bc69ec1c Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Sun, 8 Nov 2020 23:06:13 +0200 Subject: [PATCH] allow reanalysis in case of requests --- .../project-listing-screen.component.ts | 4 ++-- apps/red-ui/src/app/state/app-state.service.ts | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts index 4a6fa89eb..04302f804 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts @@ -116,7 +116,7 @@ export class ProjectListingScreenComponent implements OnInit { } public downloadRedactionReport($event: MouseEvent, project: Project) { - $event.preventDefault(); + $event.stopPropagation(); this.appStateService.downloadRedactionReport(project); } @@ -145,7 +145,7 @@ export class ProjectListingScreenComponent implements OnInit { } public reanalyseProject($event: MouseEvent, project: Project) { - $event.preventDefault(); + $event.stopPropagation(); this.appStateService.reanalyseProject(project); } diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index 9464140cf..6a69cd0de 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -157,6 +157,10 @@ export class AppStateService { return this._appState.dictionaryVersion; } + get rulesVersion() { + return this._appState.ruleVersion; + } + get isActiveProjectOwner() { return this._appState.activeProject?.project?.ownerId === this._userService.userId; } @@ -583,7 +587,8 @@ export class AppStateService { } return ( (!fileStatus.isApproved && this.fileNotUpToDateWithDictionary(fileStatus)) || - fileStatus.isError + fileStatus.isError || + fileStatus.hasRequests ); } @@ -595,7 +600,8 @@ export class AppStateService { (fileStatus.status === 'UNASSIGNED' || fileStatus.status === 'UNDER_REVIEW' || fileStatus.status === 'UNDER_APPROVAL') && - (fileStatus.dictionaryVersion !== this.dictionaryVersion || fileStatus.hasRequests) + (fileStatus.dictionaryVersion !== this.dictionaryVersion || + fileStatus.rulesVersion !== this.rulesVersion) ); }