Pull request #282: RED-2063
Merge in RED/ui from RED-2063 to master * commit '4b33df59028e7e36dd9849077f584e259893fa1b': fix secondary filters add filterception
This commit is contained in:
commit
07777fa8b1
@ -1,8 +1,5 @@
|
||||
<section>
|
||||
<redaction-page-header
|
||||
[buttonConfigs]="buttonConfigs"
|
||||
[searchPlaceholder]="'dossier-listing.search' | translate"
|
||||
></redaction-page-header>
|
||||
<redaction-page-header [buttonConfigs]="buttonConfigs"></redaction-page-header>
|
||||
|
||||
<div class="overlay-shadow"></div>
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ import { DossiersDialogService } from '../../services/dossiers-dialog.service';
|
||||
import { OnAttach, OnDetach } from '@utils/custom-route-reuse.strategy';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { ButtonConfig } from '@shared/components/page-header/models/button-config.model';
|
||||
import { DefaultListingServices, ListingComponent, NestedFilter, TableColumnConfig } from '@iqser/common-ui';
|
||||
import { DefaultListingServices, keyChecker, ListingComponent, NestedFilter, TableColumnConfig } from '@iqser/common-ui';
|
||||
import { workloadTranslations } from '../../translations/workload-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { fileStatusTranslations } from '../../translations/file-status-translations';
|
||||
@ -247,7 +247,7 @@ export class DossierListingScreenComponent
|
||||
slug: 'dossierTemplateFilters',
|
||||
label: this._translateService.instant('filters.dossier-templates'),
|
||||
icon: 'red:template',
|
||||
hide: this.filterService.getGroup('dossierTemplateFilters')?.filters?.length <= 1,
|
||||
hide: dossierTemplateFilters.length <= 1,
|
||||
filters: dossierTemplateFilters,
|
||||
checker: dossierTemplateChecker
|
||||
});
|
||||
@ -258,6 +258,19 @@ export class DossierListingScreenComponent
|
||||
filters: quickFilters,
|
||||
checker: (dw: DossierWrapper) => quickFilters.reduce((acc, f) => acc || (f.checked && f.checker(dw)), false)
|
||||
});
|
||||
|
||||
const dossierFilters = this.entitiesService.all.map<NestedFilter>(dossier => ({
|
||||
key: dossier.dossierName,
|
||||
label: dossier.dossierName
|
||||
}));
|
||||
this.filterService.addFilterGroup({
|
||||
slug: 'dossierNameFilter',
|
||||
label: this._translateService.instant('dossier-listing.filters.label'),
|
||||
icon: 'red:folder',
|
||||
filters: dossierFilters,
|
||||
filterceptionPlaceholder: this._translateService.instant('dossier-listing.filters.search'),
|
||||
checker: keyChecker('dossierName')
|
||||
});
|
||||
}
|
||||
|
||||
private _createQuickFilters() {
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
(closeAction)="routerHistoryService.navigateToLastDossiersScreen()"
|
||||
[actionConfigs]="actionConfigs"
|
||||
[fileAttributeConfigs]="fileAttributeConfigs"
|
||||
[searchPlaceholder]="'dossier-overview.search' | translate"
|
||||
[showCloseButton]="true"
|
||||
>
|
||||
<redaction-file-download-btn
|
||||
|
||||
@ -1,15 +1,4 @@
|
||||
import {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
ElementRef,
|
||||
HostListener,
|
||||
Injector,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
Renderer2,
|
||||
TemplateRef,
|
||||
ViewChild
|
||||
} from '@angular/core';
|
||||
import { ChangeDetectorRef, Component, ElementRef, HostListener, Injector, OnDestroy, OnInit, TemplateRef, ViewChild } from '@angular/core';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { FileDropOverlayService } from '@upload-download/services/file-drop-overlay.service';
|
||||
import { FileUploadModel } from '@upload-download/model/file-upload.model';
|
||||
@ -128,9 +117,7 @@ export class DossierOverviewScreenComponent extends ListingComponent<FileStatusW
|
||||
private readonly _statusOverlayService: StatusOverlayService,
|
||||
private readonly _userPreferenceService: UserPreferenceService,
|
||||
private readonly _fileDropOverlayService: FileDropOverlayService,
|
||||
private readonly _dossierAttributesService: DossierAttributesService,
|
||||
private readonly _renderer: Renderer2,
|
||||
private readonly _elementRef: ElementRef
|
||||
private readonly _dossierAttributesService: DossierAttributesService
|
||||
) {
|
||||
super(_injector);
|
||||
this._loadEntitiesFromState();
|
||||
@ -446,6 +433,20 @@ export class DossierOverviewScreenComponent extends ListingComponent<FileStatusW
|
||||
(this.checkedNotRequiredFilters.length === 0 ||
|
||||
this.checkedNotRequiredFilters.reduce((acc, f) => acc || f.checker(file), false))
|
||||
});
|
||||
|
||||
const filesNamesFilters = this.entitiesService.all.map<NestedFilter>(file => ({
|
||||
key: file.filename,
|
||||
label: file.filename
|
||||
}));
|
||||
|
||||
this.filterService.addFilterGroup({
|
||||
slug: 'filesNamesFilter',
|
||||
label: this._translateService.instant('dossier-overview.filters.label'),
|
||||
icon: 'red:document',
|
||||
filters: filesNamesFilters,
|
||||
checker: keyChecker('filename'),
|
||||
filterceptionPlaceholder: this._translateService.instant('dossier-overview.filters.search')
|
||||
});
|
||||
}
|
||||
|
||||
private _createQuickFilters() {
|
||||
|
||||
@ -10,7 +10,8 @@ import {
|
||||
FilterService,
|
||||
LoadingService,
|
||||
NestedFilter,
|
||||
processFilters
|
||||
processFilters,
|
||||
Toaster
|
||||
} from '@iqser/common-ui';
|
||||
import { MatDialogRef, MatDialogState } from '@angular/material/dialog';
|
||||
import { ManualRedactionEntryWrapper } from '@models/file/manual-redaction-entry.wrapper';
|
||||
@ -20,7 +21,6 @@ import { AnnotationData, FileDataModel } from '@models/file/file-data.model';
|
||||
import { FileActionService } from '../../services/file-action.service';
|
||||
import { AnnotationDrawService } from '../../services/annotation-draw.service';
|
||||
import { AnnotationProcessingService } from '../../services/annotation-processing.service';
|
||||
import { Toaster } from '@iqser/common-ui';
|
||||
import { FileStatusWrapper } from '@models/file/file-status.wrapper';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { timer } from 'rxjs';
|
||||
@ -295,6 +295,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
||||
const secondaryFilters = this._filterService.getGroup('secondaryFilters')?.filters;
|
||||
this._filterService.addFilterGroup({
|
||||
slug: 'secondaryFilters',
|
||||
filterTemplate: this._filterTemplate,
|
||||
filters: processFilters(secondaryFilters, AnnotationProcessingService.secondaryAnnotationFilters)
|
||||
});
|
||||
console.log('[REDACTION] Process time: ' + (new Date().getTime() - processStartTime) + 'ms');
|
||||
|
||||
@ -565,7 +565,10 @@
|
||||
"reanalyse": {
|
||||
"action": "Analysieren Sie das gesamte Dossier"
|
||||
},
|
||||
"search": "Dossiername ...",
|
||||
"filters": {
|
||||
"label": "Dossiername",
|
||||
"search": "Dossiername..."
|
||||
},
|
||||
"stats": {
|
||||
"analyzed-pages": "Seiten",
|
||||
"charts": {
|
||||
@ -658,7 +661,10 @@
|
||||
"reanalyse": {
|
||||
"action": "Datei analysieren"
|
||||
},
|
||||
"search": "Dokumentname...",
|
||||
"filters": {
|
||||
"label": "Dokumentname",
|
||||
"search": "Dokumentname..."
|
||||
},
|
||||
"table-col-names": {
|
||||
"added-on": "Hinzugefügt",
|
||||
"assigned-to": "Zugewiesen an",
|
||||
|
||||
@ -589,7 +589,10 @@
|
||||
"reanalyse": {
|
||||
"action": "Analyze entire dossier"
|
||||
},
|
||||
"search": "Dossier name...",
|
||||
"filters": {
|
||||
"label": "Dossier Name",
|
||||
"search": "Dossier name..."
|
||||
},
|
||||
"stats": {
|
||||
"analyzed-pages": "Pages",
|
||||
"charts": {
|
||||
@ -682,7 +685,10 @@
|
||||
"reanalyse": {
|
||||
"action": "Analyze File"
|
||||
},
|
||||
"search": "Document name...",
|
||||
"filters": {
|
||||
"label": "Document Name",
|
||||
"search": "Document name..."
|
||||
},
|
||||
"table-col-names": {
|
||||
"added-on": "Added",
|
||||
"assigned-to": "Assigned to",
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 45f90be54be458341052ee11b2df85c6d8897af4
|
||||
Subproject commit 67bde73b9c115f7d5636e034b82083f02b3da0a7
|
||||
Loading…
x
Reference in New Issue
Block a user