diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.html index a1f3b72e2..b343383f7 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/bulk-actions/dossier-overview-bulk-actions.component.html @@ -1,4 +1,4 @@ - + , + private readonly _userPreferenceService: UserPreferenceService, ) {} get selectedFiles(): File[] { @@ -115,6 +120,10 @@ export class DossierOverviewBulkActionsComponent { : this._translateService.instant('dossier-overview.assign-reviewer'); } + forceReanalysisAction($event: LongPressEvent) { + this.analysisForced = !$event.touchEnd && this._userPreferenceService.areDevFeaturesEnabled; + } + delete() { this._dialogService.openDialog( 'confirm', diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.html index 473f6c3c1..ebd7395a1 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.html @@ -1,4 +1,4 @@ -
+
imple readonly listingModes = ListingModes; readonly circleButtonTypes = CircleButtonTypes; readonly currentUser = this._userService.currentUser; - currentDossier = this._dossiersService.activeDossier; readonly tableHeaderLabel = _('dossier-overview.table-header.title'); + + currentDossier = this._dossiersService.activeDossier; collapsedDetails = false; dossierAttributes: DossierAttributeWithValue[] = []; fileAttributeConfigs: IFileAttributeConfig[]; tableColumnConfigs: readonly TableColumnConfig[]; + analysisForced: boolean; + readonly workflowConfig: WorkflowConfig = this._configService.workflowConfig(() => this.reloadDossiers()); readonly actionConfigs: readonly ActionConfig[] = this._configService.actionConfig; @ViewChild(DossierDetailsComponent, { static: false }) private readonly _dossierDetailsComponent: DossierDetailsComponent; @@ -100,6 +105,7 @@ export class DossierOverviewScreenComponent extends ListingComponent imple private readonly _dossierAttributesService: DossierAttributesService, private readonly _fileAttributesService: FileAttributesService, private readonly _configService: ConfigService, + private readonly _userPreferenceService: UserPreferenceService, ) { super(_injector); } @@ -191,6 +197,10 @@ export class DossierOverviewScreenComponent extends ListingComponent imple this.ngOnDestroy(); } + forceReanalysisAction($event: LongPressEvent) { + this.analysisForced = !$event.touchEnd && this._userPreferenceService.areDevFeaturesEnabled; + } + async reanalyseDossier() { try { await this._appStateService.reanalyzeDossier(); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html index 78eac82af..204ab224f 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html @@ -1,5 +1,5 @@ -
+
(); @@ -25,6 +29,7 @@ export class DossiersListingActionsComponent { readonly appStateService: AppStateService, private readonly _dialogService: DossiersDialogService, private readonly _userService: UserService, + private readonly _userPreferenceService: UserPreferenceService, ) {} get statusConfig(): readonly StatusBarConfig[] { @@ -47,6 +52,10 @@ export class DossiersListingActionsComponent { .map(status => ({ length: obj[status], color: status })); } + forceReanalysisAction($event: LongPressEvent) { + this.analysisForced = !$event.touchEnd && this._userPreferenceService.areDevFeaturesEnabled; + } + openEditDossierDialog($event: MouseEvent, dossier: Dossier): void { this._dialogService.openDialog('editDossier', $event, { dossier, diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html index 101abe03b..90a51c1e5 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html @@ -126,7 +126,7 @@ { this.reloadDossiers('set-approved'); }); } + forceReanalysisAction($event: LongPressEvent) { + this.analysisForced = !$event.touchEnd && this._userPreferenceService.areDevFeaturesEnabled; + } + private _setup() { this.statusBarConfig = [{ color: this.file.status, length: 1 }]; this.tooltipPosition = this.isFilePreview ? 'below' : 'above'; diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index 435b6adf9..fa38d423e 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -29,7 +29,7 @@ export class PermissionsService { } displayReanalyseBtn(dossier: Dossier): boolean { - return this.isApprover(dossier) && dossier.files.filter(file => file.analysisRequired).length > 0; + return this.isApprover(dossier); } canToggleAnalysis(file: File): boolean { @@ -37,7 +37,7 @@ export class PermissionsService { } canReanalyseFile(file = this._activeFile): boolean { - return (file.analysisRequired && (this.isReviewerOrApprover(file) || file.isUnassigned)) || (file.isError && file.isUnassigned); + return this.isReviewerOrApprover(file) || file.isUnassigned || (file.isError && file.isUnassigned); } isFileReviewer(file = this._activeFile): boolean {