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!265
This commit is contained in:
commit
d336f3f365
@ -18,12 +18,14 @@ import {
|
||||
LogEntryEngine,
|
||||
LogEntryEngines,
|
||||
LowLevelFilterTypes,
|
||||
ManualRedactionType,
|
||||
ManualRedactionTypes,
|
||||
SuperType,
|
||||
SuperTypeMapper,
|
||||
SuperTypes,
|
||||
} from '@red/domain';
|
||||
import { annotationTypesTranslations } from '@translations/annotation-types-translations';
|
||||
import { log } from '@common-ui/utils';
|
||||
|
||||
export class AnnotationWrapper implements IListable {
|
||||
id: string;
|
||||
@ -63,6 +65,7 @@ export class AnnotationWrapper implements IListable {
|
||||
hasBeenRemovedByManualOverride: boolean;
|
||||
isRemoved = false;
|
||||
isRemovedLocally = false;
|
||||
lastManualChange: ManualRedactionType;
|
||||
|
||||
get isRuleBased() {
|
||||
return this.engines.includes(LogEntryEngines.RULE);
|
||||
@ -269,6 +272,7 @@ export class AnnotationWrapper implements IListable {
|
||||
annotationWrapper.content = content;
|
||||
|
||||
const lastRelevantManualChange = logEntry.manualChanges?.at(-1);
|
||||
annotationWrapper.lastManualChange = lastRelevantManualChange?.manualRedactionType;
|
||||
annotationWrapper.pending = lastRelevantManualChange && !lastRelevantManualChange.processed;
|
||||
annotationWrapper.superType = SuperTypeMapper[logEntry.entryType][logEntry.state](logEntry);
|
||||
annotationWrapper.superTypeLabel = annotationTypesTranslations[annotationWrapper.superType];
|
||||
|
||||
@ -3,6 +3,8 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper';
|
||||
import { MultiSelectService } from '../../services/multi-select.service';
|
||||
import { annotationTypesTranslations } from '@translations/annotation-types-translations';
|
||||
import { Roles } from '@users/roles';
|
||||
import { ImageCategory } from '../../utils/constants';
|
||||
import { ManualRedactionTypes } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-annotation-card',
|
||||
@ -18,6 +20,13 @@ export class AnnotationCardComponent {
|
||||
constructor(readonly multiSelectService: MultiSelectService) {}
|
||||
|
||||
get pending() {
|
||||
return this.annotation.pending && this.annotation.isModifyDictionary && !this.annotation.isRemovedLocally;
|
||||
return (
|
||||
this.annotation.pending &&
|
||||
((this.annotation.isModifyDictionary &&
|
||||
!this.annotation.isRemovedLocally &&
|
||||
!this.annotation.hasBeenForcedHint &&
|
||||
this.annotation.lastManualChange !== ManualRedactionTypes.LEGAL_BASIS_CHANGE) ||
|
||||
this.annotation.type === ImageCategory.SIGNATURE)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
import { List, ValuesOf } from '@iqser/common-ui/lib/utils';
|
||||
|
||||
export const IMAGE_CATEGORIES: readonly string[] = ['signature', 'logo', 'formula', 'image'];
|
||||
export const ImageCategory = {
|
||||
SIGNATURE: 'signature',
|
||||
LOGO: 'logo',
|
||||
FORMULA: 'formula',
|
||||
IMAGE: 'image',
|
||||
} as const;
|
||||
|
||||
export const ActionsHelpModeKeys = {
|
||||
redaction: 'redaction',
|
||||
'manual-redaction': 'redaction',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user