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 3e7268583..1f0d7f0f5 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -528,7 +528,7 @@ export class AnnotationWrapper implements IListable, Record { switch (lastManualChange.annotationStatus) { case LogEntryStatus.APPROVED: case LogEntryStatus.DECLINED: - return redactionLogEntry.type === 'manual' ? SuperTypes.ManualRedaction : SuperTypes.Redaction; + return redactionLogEntry.type === SuperTypes.ManualRedaction ? SuperTypes.ManualRedaction : SuperTypes.Redaction; case LogEntryStatus.REQUESTED: return SuperTypes.SuggestionChangeLegalBasis; } @@ -540,7 +540,9 @@ export class AnnotationWrapper implements IListable, Record { if (redactionLogEntry.recommendation) { return SuperTypes.Recommendation; } else if (redactionLogEntry.redacted) { - return redactionLogEntry.type === 'manual' ? SuperTypes.ManualRedaction : SuperTypes.Redaction; + return redactionLogEntry.type === SuperTypes.ManualRedaction + ? SuperTypes.ManualRedaction + : SuperTypes.Redaction; } else if (redactionLogEntry.hint) { return SuperTypes.Hint; } diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts index d423487e1..7f3292dc0 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts @@ -3,7 +3,7 @@ import { UntypedFormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper'; import { JustificationsService } from '@services/entity-services/justifications.service'; -import { Dictionary, Dossier, File, IAddRedactionRequest } from '@red/domain'; +import { Dictionary, Dossier, File, IAddRedactionRequest, SuperTypes } from '@red/domain'; import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service'; import { DictionaryService } from '@services/entity-services/dictionary.service'; import { BaseDialogComponent, CircleButtonTypes } from '@iqser/common-ui'; @@ -151,7 +151,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme reason: this.isDictionaryRequest ? [null] : [null, Validators.required], dictionary: this.isDictionaryRequest ? [this.isFalsePositiveRequest ? 'false_positive' : null, Validators.required] - : [this.manualRedactionTypeExists ? 'manual' : null, Validators.required], + : [this.manualRedactionTypeExists ? SuperTypes.ManualRedaction : null, Validators.required], comment: [null], classification: ['non-readable content'], multiplePages: '', diff --git a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts index c7151e5a3..6de688213 100644 --- a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts @@ -144,7 +144,7 @@ export class DictionaryService extends EntitiesService } hasManualType(dossierTemplateId: string): boolean { - return !!this._dictionariesMapService.get(dossierTemplateId).find(e => e.type === 'manual'); + return !!this._dictionariesMapService.get(dossierTemplateId).find(e => e.type === SuperTypes.ManualRedaction && !e.virtual); } getRedactionTypes(dossierTemplateId: string): Dictionary[] {