From de121f2e01da9f598163d3223e48a1d49f4291ad Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Mon, 28 Feb 2022 17:51:57 +0200 Subject: [PATCH] RED-3494 -> shown suggestions in preview as redactions --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 4 ++++ apps/red-ui/src/app/models/file/file-data.model.ts | 2 +- .../file-preview-screen/file-preview-screen.component.ts | 4 +++- .../file-preview-screen/services/annotation-draw.service.ts | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) 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 41bd46e73..46a9a584a 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -235,6 +235,10 @@ export class AnnotationWrapper { return this.legalBasisChangeValue || this.legalBasisValue; } + get previewAnnotation() { + return this.isRedacted || this.isSuggestionAdd; + } + static fromData(redactionLogEntry?: RedactionLogEntry) { const annotationWrapper = new AnnotationWrapper(); diff --git a/apps/red-ui/src/app/models/file/file-data.model.ts b/apps/red-ui/src/app/models/file/file-data.model.ts index 3356e3ce5..9aa33ccb8 100644 --- a/apps/red-ui/src/app/models/file/file-data.model.ts +++ b/apps/red-ui/src/app/models/file/file-data.model.ts @@ -46,7 +46,7 @@ export class FileDataModel { } else if (viewMode === 'DELTA') { return annotation.isChangeLogEntry; } else { - return annotation.isRedacted; + return annotation.previewAnnotation; } }); } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts index 785b034ce..dc7183e8f 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts @@ -722,7 +722,9 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni private _setAnnotationsColor(annotations: Annotation[], customData: string) { annotations.forEach(annotation => { - annotation['StrokeColor'] = this._annotationDrawService.convertColor(this._instance, annotation.getCustomData(customData)); + const color = this._annotationDrawService.convertColor(this._instance, annotation.getCustomData(customData)); + annotation['StrokeColor'] = color; + annotation['FillColor'] = color; }); } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts index 173a752c3..508bc4242 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/services/annotation-draw.service.ts @@ -204,7 +204,7 @@ export class AnnotationDrawService { annotationWrapper.isOCR || annotationWrapper.hidden; annotation.setCustomData('redact-manager', 'true'); - annotation.setCustomData('redaction', String(annotationWrapper.isRedacted)); + annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation)); annotation.setCustomData('skipped', String(annotationWrapper.isSkipped)); annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry)); annotation.setCustomData('changeLogRemoved', String(annotationWrapper.isChangeLogRemoved));