Pull request #357: RED-3494

Merge in RED/ui from VM/RED-3494 to master

* commit 'de121f2e01da9f598163d3223e48a1d49f4291ad':
  RED-3494 -> shown suggestions in preview as redactions
This commit is contained in:
Valentin-Gabriel Mihai 2022-02-28 17:45:00 +01:00 committed by Timo Bejan
commit a29060ee38
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));