RED-2653: Filter seen pages
This commit is contained in:
parent
26ca367e3f
commit
95cb723c06
@ -285,7 +285,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
this._filterService.addFilterGroup({
|
||||
slug: 'secondaryFilters',
|
||||
filterTemplate: this._filterTemplate,
|
||||
filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters),
|
||||
filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters(this.fileData?.viewedPages)),
|
||||
});
|
||||
console.log(`[REDACTION] Process time: ${new Date().getTime() - processStartTime} ms`);
|
||||
console.log(
|
||||
|
||||
@ -4,10 +4,11 @@ import { SuperTypeSorter } from '@utils/sorters/super-type-sorter';
|
||||
import { Filter, handleCheckedValue, IFilter, INestedFilter, NestedFilter } from '@iqser/common-ui';
|
||||
import { annotationTypesTranslations } from '../../../translations/annotation-types-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { IViewedPage } from '@red/domain';
|
||||
|
||||
@Injectable()
|
||||
export class AnnotationProcessingService {
|
||||
static get secondaryAnnotationFilters(): INestedFilter[] {
|
||||
static secondaryAnnotationFilters(viewedPages: IViewedPage[]): INestedFilter[] {
|
||||
return [
|
||||
{
|
||||
id: 'with-comments',
|
||||
@ -25,6 +26,14 @@ export class AnnotationProcessingService {
|
||||
topLevelFilter: true,
|
||||
checker: (annotation: AnnotationWrapper) => annotation?.legalBasisChangeValue?.length > 0,
|
||||
},
|
||||
{
|
||||
id: 'unseen-pages',
|
||||
icon: 'iqser:pages',
|
||||
label: _('filter-menu.unseen-pages'),
|
||||
checked: false,
|
||||
topLevelFilter: true,
|
||||
checker: (annotation: AnnotationWrapper) => !viewedPages.map(page => page.page).includes(annotation.pageNumber),
|
||||
},
|
||||
].map(item => new NestedFilter(item));
|
||||
}
|
||||
|
||||
|
||||
@ -876,8 +876,10 @@
|
||||
"display-name": {
|
||||
"cancel": "Cancel",
|
||||
"edit": "Edit Display Name",
|
||||
"error": "Failed to update dictionary display name.",
|
||||
"placeholder": "Enter Display Name",
|
||||
"save": "Save Display Name"
|
||||
"save": "Save Display Name",
|
||||
"success": "Successfully updated dictionary display name."
|
||||
},
|
||||
"entries": "{length} {length, plural, one{entry} other{entries}}"
|
||||
},
|
||||
@ -1105,6 +1107,7 @@
|
||||
"filter-options": "Filter options",
|
||||
"filter-types": "Filter",
|
||||
"label": "Filter",
|
||||
"unseen-pages": "Only annotations on unseen pages",
|
||||
"with-comments": "Only annotations with comments",
|
||||
"with-reason-changes": "Only redactions with reason changes"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user