handling of imported redactions
This commit is contained in:
parent
7cafb93543
commit
67d44969d3
@ -34,13 +34,13 @@ export class AnnotationPermissions {
|
|||||||
permissions.canForceRedaction = annotation.isSkipped && !annotation.isFalsePositive;
|
permissions.canForceRedaction = annotation.isSkipped && !annotation.isFalsePositive;
|
||||||
permissions.canAcceptRecommendation = annotation.isRecommendation;
|
permissions.canAcceptRecommendation = annotation.isRecommendation;
|
||||||
|
|
||||||
permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive;
|
permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive && !annotation.imported;
|
||||||
|
|
||||||
permissions.canRemoveOrSuggestToRemoveOnlyHere = annotation.isRedacted || annotation.isHint;
|
permissions.canRemoveOrSuggestToRemoveOnlyHere = annotation.isRedacted || annotation.isHint;
|
||||||
permissions.canRemoveOrSuggestToRemoveFromDictionary =
|
permissions.canRemoveOrSuggestToRemoveFromDictionary =
|
||||||
annotation.isModifyDictionary && (annotation.isRedacted || annotation.isSkipped || annotation.isHint);
|
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.canRecategorizeImage = (annotation.isImage && !annotation.isSuggestion) || annotation.isSuggestionRecategorizeImage;
|
||||||
permissions.canResizeAnnotation =
|
permissions.canResizeAnnotation =
|
||||||
|
|||||||
@ -48,6 +48,7 @@ export class AnnotationWrapper {
|
|||||||
section?: string;
|
section?: string;
|
||||||
reference: Array<string>;
|
reference: Array<string>;
|
||||||
|
|
||||||
|
imported?: boolean;
|
||||||
image?: boolean;
|
image?: boolean;
|
||||||
manual?: boolean;
|
manual?: boolean;
|
||||||
hidden?: boolean;
|
hidden?: boolean;
|
||||||
@ -251,6 +252,7 @@ export class AnnotationWrapper {
|
|||||||
annotationWrapper.textAfter = redactionLogEntry.textAfter;
|
annotationWrapper.textAfter = redactionLogEntry.textAfter;
|
||||||
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
|
annotationWrapper.dictionaryOperation = redactionLogEntry.dictionaryEntry;
|
||||||
annotationWrapper.image = redactionLogEntry.image;
|
annotationWrapper.image = redactionLogEntry.image;
|
||||||
|
annotationWrapper.imported = redactionLogEntry.imported;
|
||||||
annotationWrapper.legalBasisValue = redactionLogEntry.legalBasis;
|
annotationWrapper.legalBasisValue = redactionLogEntry.legalBasis;
|
||||||
annotationWrapper.comments = redactionLogEntry.comments || [];
|
annotationWrapper.comments = redactionLogEntry.comments || [];
|
||||||
annotationWrapper.manual = redactionLogEntry.manualChanges?.length > 0;
|
annotationWrapper.manual = redactionLogEntry.manualChanges?.length > 0;
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { IChange, IComment, ILegalBasis, IManualChange, IRectangle, IRedactionLo
|
|||||||
|
|
||||||
export class RedactionLogEntry implements IRedactionLogEntry {
|
export class RedactionLogEntry implements IRedactionLogEntry {
|
||||||
readonly changes?: IChange[];
|
readonly changes?: IChange[];
|
||||||
|
readonly imported?: boolean;
|
||||||
readonly manualChanges?: IManualChange[];
|
readonly manualChanges?: IManualChange[];
|
||||||
readonly color?: number[];
|
readonly color?: number[];
|
||||||
readonly comments?: IComment[];
|
readonly comments?: IComment[];
|
||||||
@ -67,5 +68,6 @@ export class RedactionLogEntry implements IRedactionLogEntry {
|
|||||||
this.textBefore = redactionLogEntry.textBefore;
|
this.textBefore = redactionLogEntry.textBefore;
|
||||||
this.type = redactionLogEntry.type;
|
this.type = redactionLogEntry.type;
|
||||||
this.value = redactionLogEntry.value;
|
this.value = redactionLogEntry.value;
|
||||||
|
this.imported = redactionLogEntry.imported;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -208,7 +208,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
|||||||
this._subscribeToFileUpdates();
|
this._subscribeToFileUpdates();
|
||||||
|
|
||||||
const file = await this.stateService.file;
|
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 });
|
const reanalyzeFiles = this._reanalysisService.reanalyzeFilesForDossier([this.fileId], this.dossierId, { force: true });
|
||||||
await firstValueFrom(reanalyzeFiles);
|
await firstValueFrom(reanalyzeFiles);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,4 +7,5 @@ export const downloadTypesTranslations: { [key in DownloadFileType]: string } =
|
|||||||
REDACTED: _('download-type.redacted'),
|
REDACTED: _('download-type.redacted'),
|
||||||
ANNOTATED: _('download-type.annotated'),
|
ANNOTATED: _('download-type.annotated'),
|
||||||
FLATTEN: _('download-type.flatten'),
|
FLATTEN: _('download-type.flatten'),
|
||||||
|
DELTA_PREVIEW: _('download-type.delta-preview'),
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@ -863,7 +863,8 @@
|
|||||||
"label": "{length} document {length, plural, one{version} other{versions}}",
|
"label": "{length} document {length, plural, one{version} other{versions}}",
|
||||||
"original": "Optimized PDF",
|
"original": "Optimized PDF",
|
||||||
"preview": "Preview PDF",
|
"preview": "Preview PDF",
|
||||||
"redacted": "Redacted PDF"
|
"redacted": "Redacted PDF",
|
||||||
|
"delta-preview": "Delta PDF"
|
||||||
},
|
},
|
||||||
"downloads-list": {
|
"downloads-list": {
|
||||||
"actions": {
|
"actions": {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import { IManualChange } from './manual-change';
|
|||||||
|
|
||||||
export interface IRedactionLogEntry {
|
export interface IRedactionLogEntry {
|
||||||
changes?: IChange[];
|
changes?: IChange[];
|
||||||
|
imported?: boolean;
|
||||||
manualChanges?: IManualChange[];
|
manualChanges?: IManualChange[];
|
||||||
color?: number[];
|
color?: number[];
|
||||||
comments?: IComment[];
|
comments?: IComment[];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user