RED-8638 - check if annotation has redaction changes

This commit is contained in:
Valentin Mihai 2024-04-12 12:34:13 +03:00
parent 1d2351dba1
commit cc215aed12
2 changed files with 5 additions and 4 deletions

View File

@ -52,12 +52,12 @@ export class AnnotationDetailsComponent implements OnChanges {
noSelection: boolean; noSelection: boolean;
getChangesTooltip(): string | undefined { getChangesTooltip(): string | undefined {
if (!this.annotation.item.engines?.includes(Engines.MANUAL)) { const changes = changesProperties.filter(key => this.annotation.item[key]);
if (!changes.length || !this.annotation.item.engines?.includes(Engines.MANUAL)) {
return; return;
} }
const changes = changesProperties.filter(key => this.annotation.item[key]);
const header = this._translateService.instant(_('annotation-changes.header')); const header = this._translateService.instant(_('annotation-changes.header'));
const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change])); const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change]));
return [header, ...details.map(change => `${change}`)].join('\n'); return [header, ...details.map(change => `${change}`)].join('\n');

View File

@ -51,7 +51,8 @@ export class AnnotationProcessingService {
label: _('filter-menu.redaction-changes'), label: _('filter-menu.redaction-changes'),
checked: false, checked: false,
topLevelFilter: true, topLevelFilter: true,
checker: (annotation: AnnotationWrapper) => annotation?.engines?.includes(Engines.MANUAL), checker: (annotation: AnnotationWrapper) =>
annotation?.hasRedactionChanges && annotation?.engines?.includes(Engines.MANUAL),
}, },
{ {
id: 'unseen-pages', id: 'unseen-pages',