handling of imported redactions

This commit is contained in:
Timo Bejan 2022-02-11 13:43:19 +02:00
parent 7cafb93543
commit 67d44969d3
7 changed files with 11 additions and 4 deletions

View File

@ -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 =

View File

@ -48,6 +48,7 @@ export class AnnotationWrapper {
section?: string;
reference: Array<string>;
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;

View File

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

View File

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

View File

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

View File

@ -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": {

View File

@ -6,6 +6,7 @@ import { IManualChange } from './manual-change';
export interface IRedactionLogEntry {
changes?: IChange[];
imported?: boolean;
manualChanges?: IManualChange[];
color?: number[];
comments?: IComment[];