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 daf99d2d5..c2bb7923d 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -64,6 +64,7 @@ export class AnnotationWrapper implements IListable { hasBeenRemovedByManualOverride: boolean; isRemoved = false; isRemovedLocally = false; + hiddenInWorkload = false; lastManualChange: ManualRedactionType; get isRuleBased() { @@ -222,7 +223,8 @@ export class AnnotationWrapper implements IListable { ) { const annotationWrapper = new AnnotationWrapper(); - annotationWrapper.id = logEntry.id; + annotationWrapper.pending = logEntry.state === EntryStates.PENDING; + annotationWrapper.id = logEntry.id + (annotationWrapper.pending ? '-pending' : ''); annotationWrapper.isChangeLogEntry = logEntry.state === EntryStates.REMOVED || !!changeLogType; annotationWrapper.type = logEntry.type; annotationWrapper.value = logEntry.value; @@ -273,7 +275,6 @@ export class AnnotationWrapper implements IListable { const lastRelevantManualChange = logEntry.manualChanges?.at(-1); annotationWrapper.lastManualChange = lastRelevantManualChange?.manualRedactionType; - annotationWrapper.pending = logEntry.state === EntryStates.PENDING; if (annotationWrapper.pending) { const removedEntry = allLogEntries.find((e: IEntityLogEntry) => e.id === annotationWrapper.id); logEntry.oldState = removedEntry?.state; @@ -286,14 +287,14 @@ export class AnnotationWrapper implements IListable { annotationWrapper.typeLabel = dictionary?.virtual ? undefined : dictionary?.label; - let colorKey = annotationEntityColorConfig[annotationWrapper.superType]; - if (annotationWrapper.pending && lastRelevantManualChange.manualRedactionType === ManualRedactionTypes.REMOVE_FROM_DICTIONARY) { - colorKey = annotationWrapper.isHint - ? annotationEntityColorConfig[SuperTypes.IgnoredHint] - : annotationEntityColorConfig[SuperTypes.Skipped]; + if (annotationWrapper.pending) { + annotationWrapper.color = defaultColors[annotationDefaultColorConfig.analysis] as string; + } else { + const colorKey = annotationEntityColorConfig[annotationWrapper.superType]; + const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType]; + annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); } - const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType]; - annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string); + annotationWrapper['entry'] = logEntry; return annotationWrapper; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts index 4ab551813..014cee3d9 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.ts @@ -171,6 +171,10 @@ export class AnnotationActionsComponent implements OnChanges { } get #annotationChangesAllowed() { - return !this.#isDocumine || !this._state.file().excludedFromAutomaticAnalysis; + return (!this.#isDocumine || !this._state.file().excludedFromAutomaticAnalysis) && !this.#somePending; + } + + get #somePending() { + return this.#annotations.some(a => a.pending); } } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html index 962c48416..887105917 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html @@ -10,6 +10,7 @@