From 18a76431956b5c88645162d4af15e4b77267150c Mon Sep 17 00:00:00 2001 From: Valentin Date: Thu, 19 Aug 2021 15:51:14 +0300 Subject: [PATCH] renamed 'isHidden' property to 'hidden' --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 +- .../file-preview-screen/file-preview-screen.component.ts | 8 ++++---- .../dossier/services/annotation-actions.service.ts | 4 ++-- .../modules/dossier/services/annotation-draw.service.ts | 2 +- 4 files changed, 8 insertions(+), 8 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 168ee1bc9..d47b034d3 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -49,7 +49,7 @@ export class AnnotationWrapper { manual?: boolean; image?: boolean; - isHidden?: boolean; + hidden?: boolean; force?: boolean; textAfter?: string; 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 3db1dcf57..630093728 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 @@ -274,8 +274,8 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this.userPreferenceService.areDevFeaturesEnabled ); if (this.annotationData) { - this._setIsHiddenPropertyToNewAnnotations(newAnnotationsData.visibleAnnotations, this.annotationData.visibleAnnotations); - this._setIsHiddenPropertyToNewAnnotations(newAnnotationsData.allAnnotations, this.annotationData.allAnnotations); + this._setHiddenPropertyToNewAnnotations(newAnnotationsData.visibleAnnotations, this.annotationData.visibleAnnotations); + this._setHiddenPropertyToNewAnnotations(newAnnotationsData.allAnnotations, this.annotationData.allAnnotations); } this.annotationData = newAnnotationsData; const annotationFilters = this._annotationProcessingService.getAnnotationFilter(this.annotations); @@ -531,11 +531,11 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni window.open(`/html-debug/${this.dossierId}/${this.fileId}`, '_blank'); } - private _setIsHiddenPropertyToNewAnnotations(newAnnotations: AnnotationWrapper[], oldAnnotations: AnnotationWrapper[]) { + private _setHiddenPropertyToNewAnnotations(newAnnotations: AnnotationWrapper[], oldAnnotations: AnnotationWrapper[]) { newAnnotations.map((newAnnotation: AnnotationWrapper) => { const oldAnnotation = oldAnnotations.find((a: AnnotationWrapper) => a.annotationId === newAnnotation.annotationId); if (oldAnnotation) { - newAnnotation.isHidden = oldAnnotation.isHidden; + newAnnotation.hidden = oldAnnotation.hidden; } }); } diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts index dab69a479..2427e3873 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts @@ -281,10 +281,10 @@ export class AnnotationActionsService { return availableActions; } - updateHiddenAnnotation(annotations: AnnotationWrapper[], viewerAnnotations: Annotations.Annotation[], isHidden: boolean) { + updateHiddenAnnotation(annotations: AnnotationWrapper[], viewerAnnotations: Annotations.Annotation[], hidden: boolean) { const annotationId = (viewerAnnotations[0] as any).Tw; const annotationToBeUpdated = annotations.find((a: AnnotationWrapper) => a.annotationId === annotationId); - annotationToBeUpdated.isHidden = isHidden; + annotationToBeUpdated.hidden = hidden; } private _processObsAndEmit(obs: Observable, annotation: AnnotationWrapper, annotationsChanged: EventEmitter) { diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts index 18368bbc9..9e094ef3b 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts @@ -95,7 +95,7 @@ export class AnnotationDrawService { annotationWrapper.isChangeLogRemoved || (hideSkipped && annotationWrapper.isSkipped) || annotationWrapper.isOCR || - annotationWrapper.isHidden; + annotationWrapper.hidden; highlight.setCustomData('redacto-manager', true); highlight.setCustomData('redaction', annotationWrapper.isRedacted); highlight.setCustomData('skipped', annotationWrapper.isSkipped);