diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 1431b3e0c..71328d94c 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -34,13 +34,13 @@ export class AnnotationPermissions { permissions.canForceRedaction = annotation.isSkipped && !annotation.isFalsePositive; permissions.canAcceptRecommendation = annotation.isRecommendation; - permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive; + permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive && !annotation.imported; permissions.canRemoveOrSuggestToRemoveOnlyHere = annotation.isRedacted || annotation.isHint; permissions.canRemoveOrSuggestToRemoveFromDictionary = annotation.isModifyDictionary && (annotation.isRedacted || annotation.isSkipped || annotation.isHint); - permissions.canChangeLegalBasis = annotation.isRedacted; + permissions.canChangeLegalBasis = annotation.isRedacted && !annotation.imported; permissions.canRecategorizeImage = (annotation.isImage && !annotation.isSuggestion) || annotation.isSuggestionRecategorizeImage; permissions.canResizeAnnotation = 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 b228ec9f2..aaac10fa3 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -48,6 +48,7 @@ export class AnnotationWrapper { section?: string; reference: Array; + imported?: boolean; image?: boolean; manual?: boolean; hidden?: boolean; @@ -251,6 +252,7 @@ export class AnnotationWrapper { annotationWrapper.textAfter = redactionLogEntry.textAfter; annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry; annotationWrapper.image = redactionLogEntry.image; + annotationWrapper.imported = redactionLogEntry.imported; annotationWrapper.legalBasisValue = redactionLogEntry.legalBasis; annotationWrapper.comments = redactionLogEntry.comments || []; annotationWrapper.manual = redactionLogEntry.manualChanges?.length > 0; diff --git a/apps/red-ui/src/app/models/file/redaction-log.entry.ts b/apps/red-ui/src/app/models/file/redaction-log.entry.ts index 84028c8b2..e0b358d78 100644 --- a/apps/red-ui/src/app/models/file/redaction-log.entry.ts +++ b/apps/red-ui/src/app/models/file/redaction-log.entry.ts @@ -2,6 +2,7 @@ import { IChange, IComment, ILegalBasis, IManualChange, IRectangle, IRedactionLo export class RedactionLogEntry implements IRedactionLogEntry { readonly changes?: IChange[]; + readonly imported?: boolean; readonly manualChanges?: IManualChange[]; readonly color?: number[]; readonly comments?: IComment[]; @@ -67,5 +68,6 @@ export class RedactionLogEntry implements IRedactionLogEntry { this.textBefore = redactionLogEntry.textBefore; this.type = redactionLogEntry.type; this.value = redactionLogEntry.value; + this.imported = redactionLogEntry.imported; } } 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 c01c905ed..3cee01987 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 @@ -208,7 +208,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this._subscribeToFileUpdates(); const file = await this.stateService.file; - if (file?.analysisRequired) { + if (file?.analysisRequired && !file.excludedFromAutomaticAnalysis) { const reanalyzeFiles = this._reanalysisService.reanalyzeFilesForDossier([this.fileId], this.dossierId, { force: true }); await firstValueFrom(reanalyzeFiles); } diff --git a/apps/red-ui/src/app/translations/download-types-translations.ts b/apps/red-ui/src/app/translations/download-types-translations.ts index 527b53cf3..ae98277c7 100644 --- a/apps/red-ui/src/app/translations/download-types-translations.ts +++ b/apps/red-ui/src/app/translations/download-types-translations.ts @@ -7,4 +7,5 @@ export const downloadTypesTranslations: { [key in DownloadFileType]: string } = REDACTED: _('download-type.redacted'), ANNOTATED: _('download-type.annotated'), FLATTEN: _('download-type.flatten'), + DELTA_PREVIEW: _('download-type.delta-preview'), } as const; diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index b62b6d63e..a3ec96b1e 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -863,7 +863,8 @@ "label": "{length} document {length, plural, one{version} other{versions}}", "original": "Optimized PDF", "preview": "Preview PDF", - "redacted": "Redacted PDF" + "redacted": "Redacted PDF", + "delta-preview": "Delta PDF" }, "downloads-list": { "actions": { diff --git a/libs/red-domain/src/lib/redaction-log/redaction-log-entry.ts b/libs/red-domain/src/lib/redaction-log/redaction-log-entry.ts index 7317ef109..04774547b 100644 --- a/libs/red-domain/src/lib/redaction-log/redaction-log-entry.ts +++ b/libs/red-domain/src/lib/redaction-log/redaction-log-entry.ts @@ -6,6 +6,7 @@ import { IManualChange } from './manual-change'; export interface IRedactionLogEntry { changes?: IChange[]; + imported?: boolean; manualChanges?: IManualChange[]; color?: number[]; comments?: IComment[];