From 07a78fcc26569865de8cab5bdb88dbfd3b7cfe71 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 2 Jul 2024 10:59:46 +0300 Subject: [PATCH] RED-9401 - removed 'hasBeenAddedLocally' check --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 -- .../annotation-details/annotation-details.component.ts | 4 ++-- .../src/app/translations/annotation-changes-translations.ts | 1 - 3 files changed, 2 insertions(+), 5 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 6c8134233..96c3456c3 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -56,7 +56,6 @@ export class AnnotationWrapper implements IListable { textBefore?: string; isChangeLogEntry = false; engines: LogEntryEngine[] = []; - hasBeenAddedLocally: boolean; hasBeenResized: boolean; hasBeenResizedLocally: boolean; hasBeenRecategorized: boolean; @@ -258,7 +257,6 @@ export class AnnotationWrapper implements IListable { annotationWrapper.engines = logEntry.engines ?? []; annotationWrapper.section = logEntry.section; annotationWrapper.reference = logEntry.reference || []; - annotationWrapper.hasBeenAddedLocally = !!logEntry.manualChanges?.find(c => c.manualRedactionType === ManualRedactionTypes.ADD); annotationWrapper.hasBeenResized = !!logEntry.manualChanges?.find(c => c.manualRedactionType === ManualRedactionTypes.RESIZE); annotationWrapper.hasBeenResizedLocally = annotationWrapper.hasBeenResized && annotationWrapper.engines.includes(LogEntryEngines.MANUAL); diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts index d984d4eec..aa5d99769 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts @@ -24,7 +24,6 @@ function isBasedOn(annotation: AnnotationWrapper, engineName: LogEntryEngine) { } const changesProperties: KeysOf[] = [ - 'hasBeenAddedLocally', 'hasBeenResized', 'hasBeenRecategorized', 'hasLegalBasisChanged', @@ -57,7 +56,8 @@ export class AnnotationDetailsComponent implements OnChanges { } const header = this._translateService.instant(_('annotation-changes.header')); - const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change])); + const details = [this._translateService.instant(_('annotation-changes.added-locally'))]; + details.push(...changes.map(change => this._translateService.instant(annotationChangesTranslations[change]))); return [header, ...details.map(change => `• ${change}`)].join('\n'); } diff --git a/apps/red-ui/src/app/translations/annotation-changes-translations.ts b/apps/red-ui/src/app/translations/annotation-changes-translations.ts index a4ae444d1..cdc0a534f 100644 --- a/apps/red-ui/src/app/translations/annotation-changes-translations.ts +++ b/apps/red-ui/src/app/translations/annotation-changes-translations.ts @@ -3,7 +3,6 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { KeysOf } from '@iqser/common-ui/lib/utils'; export const annotationChangesTranslations: { [key in KeysOf]?: string } = { - hasBeenAddedLocally: _('annotation-changes.added-locally'), hasBeenResized: _('annotation-changes.resized'), hasBeenRecategorized: _('annotation-changes.recategorized'), hasLegalBasisChanged: _('annotation-changes.legal-basis'),