RED-8638 - check if annotation has redaction changes

This commit is contained in:
Valentin Mihai 2024-04-12 12:28:59 +03:00
parent 873b5eebee
commit 17167978a2
2 changed files with 5 additions and 4 deletions

View File

@ -52,12 +52,12 @@ export class AnnotationDetailsComponent implements OnChanges {
noSelection: boolean;
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;
}
const changes = changesProperties.filter(key => this.annotation.item[key]);
const header = this._translateService.instant(_('annotation-changes.header'));
const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change]));
return [header, ...details.map(change => `${change}`)].join('\n');

View File

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