Merge branch 'VM/RED-7980' into 'master'

RED-7980 - Not all unprocessed annotations are displayed correctly

Closes RED-7980

See merge request redactmanager/red-ui!218
This commit is contained in:
Dan Percic 2023-12-06 16:20:07 +01:00
commit 1ed6c956eb
3 changed files with 9 additions and 3 deletions

View File

@ -60,6 +60,7 @@ export class AnnotationWrapper implements IListable {
hasBeenForcedRedaction: boolean;
hasBeenRemovedByManualOverride: boolean;
isRemoved = false;
isRemovedLocally = false;
get isRuleBased() {
return this.engines.includes(LogEntryEngines.RULE);
@ -236,8 +237,6 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.AREA = logEntry.entryType === EntityTypes.AREA;
annotationWrapper.IMAGE_HINT = logEntry.entryType === EntityTypes.IMAGE_HINT;
annotationWrapper.isRemoved = logEntry.state === EntryStates.REMOVED;
annotationWrapper.numberOfComments = logEntry.numberOfComments;
annotationWrapper.imported = logEntry.imported;
annotationWrapper.legalBasisValue = logEntry.legalBasis;
@ -271,6 +270,9 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.superType = SuperTypeMapper[logEntry.entryType][logEntry.state](logEntry);
annotationWrapper.superTypeLabel = annotationTypesTranslations[annotationWrapper.superType];
annotationWrapper.isRemoved = logEntry.state === EntryStates.REMOVED;
annotationWrapper.isRemovedLocally = lastRelevantManualChange?.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY;
annotationWrapper.typeLabel = dictionary.virtual ? undefined : dictionary.label;
const colorKey = annotationEntityColorConfig[annotationWrapper.superType];

View File

@ -10,7 +10,7 @@
<div>
<strong>{{ annotation.superTypeLabel | translate }}</strong>
&nbsp;
<strong *ngIf="annotation.pending" class="pending-analysis">
<strong *ngIf="pending" class="pending-analysis">
{{ 'annotation.pending' | translate }}
</strong>
</div>

View File

@ -16,4 +16,8 @@ export class AnnotationCardComponent {
@Input() isSelected = false;
constructor(readonly multiSelectService: MultiSelectService) {}
get pending() {
return this.annotation.pending && this.annotation.isModifyDictionary && !this.annotation.isRemovedLocally;
}
}