diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 6e5963e1f..41bd46e73 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -296,7 +296,7 @@ export class AnnotationWrapper { } private static _setSuperType(annotationWrapper: AnnotationWrapper, redactionLogEntryWrapper: RedactionLogEntry) { - if (redactionLogEntryWrapper.recommendation) { + if (redactionLogEntryWrapper.recommendation && !redactionLogEntryWrapper.redacted) { annotationWrapper.superType = 'recommendation'; return; } diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts index 7929f42e0..edfe8b159 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts @@ -38,8 +38,6 @@ import { tap } from 'rxjs/operators'; import { DocumentInfoService } from '../../../screens/file-preview-screen/services/document-info.service'; import { ExpandableFileActionsComponent } from '@shared/components/expandable-file-actions/expandable-file-actions.component'; import { firstValueFrom } from 'rxjs'; -import { environment } from '../../../../../../environments/environment'; -import { loadCompareDocumentWrapper } from '../../../utils/compare-mode.utils'; import { RedactionImportService } from '../../services/redaction-import.service'; @Component({ @@ -153,7 +151,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy, action: $event => this._triggerImportRedactions($event), tooltip: _('dossier-overview.import-redactions'), icon: 'iqser:upload', - show: false, // this.showImportRedactions, + show: this.showImportRedactions, }, { type: ActionTypes.downloadBtn, @@ -296,12 +294,14 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy, const fileToImport = files[0]; if (!fileToImport) { - console.error('No file to compare!'); + console.error('No file to import!'); return; } await firstValueFrom(this._redactionImportService.importRedactions(this.file.dossierId, this.file.fileId, fileToImport)).catch( - exception => {}, + error => { + this._toaster.error(_('error.http.generic'), { params: error }); + }, ); // reload file } @@ -417,9 +417,10 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy, this.showImportRedactions = this._permissionsService.canImportRedactions(this.file); - this.showReanalyseFilePreview = this.canReanalyse && this.isFilePreview && (this.analysisForced || this.canEnableAutoAnalysis); - this.showReanalyseDossierOverview = - this.canReanalyse && this.isDossierOverview && (this.analysisForced || this.canEnableAutoAnalysis); + const showReanalyse = (this.canReanalyse && this.file.excludedFromAutomaticAnalysis) || this.analysisForced; + + this.showReanalyseFilePreview = showReanalyse && this.isFilePreview; + this.showReanalyseDossierOverview = showReanalyse && this.isDossierOverview; this.buttons = this._buttons; diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index 58dfeedbb..361e96385 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -173,7 +173,7 @@ export class PermissionsService { } private _canReanalyseFile(file: File): boolean { - return this.isReviewerOrApprover(file) || file.isNew || (file.isError && file.isNew); + return this.isReviewerOrApprover(file) && file.analysisRequired; } private _canEnableAutoAnalysis(file: File): boolean { diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 4b275311e..bf72886ff 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-05.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -17,7 +17,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction", + "OAUTH_URL": "https://dev-05.iqser.cloud/auth/realms/redaction", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com" diff --git a/libs/common-ui b/libs/common-ui index a9cddbf19..f54374859 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit a9cddbf19b985c887bc772aec6fdd862d1dc848a +Subproject commit f54374859ec75ea73921b9e6a934bd3747f9721d