RED-3494 -> shown suggestions in preview as redactions

This commit is contained in:
Valentin Mihai 2022-02-28 17:51:57 +02:00
parent 5ffb1baff6
commit de121f2e01
4 changed files with 9 additions and 3 deletions

View File

@ -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();

View File

@ -46,7 +46,7 @@ export class FileDataModel {
} else if (viewMode === 'DELTA') {
return annotation.isChangeLogEntry;
} else {
return annotation.isRedacted;
return annotation.previewAnnotation;
}
});
}

View File

@ -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;
});
}
}

View File

@ -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));