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

RED-8638 - check if annotation has redaction changes

Closes RED-8638

See merge request redactmanager/red-ui!392
This commit is contained in:
Dan Percic 2024-04-12 11:31:48 +02:00
commit a27807b046
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',