bulk add filter groups
This commit is contained in:
parent
1ffdfce0a1
commit
51699fe1ea
@ -293,9 +293,6 @@ export class DossierOverviewScreenComponent extends ListingComponent<File> imple
|
||||
() => this.checkedRequiredFilters,
|
||||
() => this.checkedNotRequiredFilters,
|
||||
);
|
||||
|
||||
for (const filterGroup of filterGroups) {
|
||||
this.filterService.addFilterGroup(filterGroup);
|
||||
}
|
||||
this.filterService.addFilterGroups(filterGroups);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,10 +48,7 @@ export class ConfigService {
|
||||
{
|
||||
id: 'my-dossiers',
|
||||
label: myDossiersLabel,
|
||||
checker: (dw: Dossier) => {
|
||||
console.log(dw.ownerId, this._currentUser.id);
|
||||
return dw.ownerId === this._currentUser.id;
|
||||
},
|
||||
checker: (dw: Dossier) => dw.ownerId === this._currentUser.id,
|
||||
},
|
||||
{
|
||||
id: 'to-approve',
|
||||
@ -190,7 +187,7 @@ export class ConfigService {
|
||||
filterGroups.push({
|
||||
slug: 'quickFilters',
|
||||
filters: quickFilters,
|
||||
checker: (dw: Dossier) => quickFilters.reduce((acc, f) => acc || (f.checked && f.checker(dw)), false),
|
||||
checker: (dw: Dossier, filter: NestedFilter) => filter.checked && filter.checker(dw),
|
||||
});
|
||||
|
||||
const dossierFilters = entities.map(
|
||||
|
||||
@ -39,7 +39,8 @@ import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
})
|
||||
export class DossiersListingScreenComponent
|
||||
extends ListingComponent<Dossier>
|
||||
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach {
|
||||
implements OnInit, AfterViewInit, OnDestroy, OnAttach, OnDetach
|
||||
{
|
||||
readonly currentUser = this._userService.currentUser;
|
||||
readonly tableColumnConfigs = this._configService.tableConfig;
|
||||
readonly tableHeaderLabel = _('dossier-listing.table-header.title');
|
||||
@ -143,8 +144,6 @@ export class DossiersListingScreenComponent
|
||||
|
||||
private _computeAllFilters() {
|
||||
const filterGroups = this._configService.filterGroups(this.entitiesService.all, this._needsWorkFilterTemplate);
|
||||
for (const filterGroup of filterGroups) {
|
||||
this.filterService.addFilterGroup(filterGroup);
|
||||
}
|
||||
this.filterService.addFilterGroups(filterGroups);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { GeneralConfigurationModel } from '@redaction/red-ui-http';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -12,7 +11,7 @@ export class GeneralSettingsService extends GenericService<GeneralConfigurationM
|
||||
}
|
||||
|
||||
getGeneralConfigurations() {
|
||||
return this._getOne(['general']).pipe(tap(console.log));
|
||||
return this._getOne(['general']);
|
||||
}
|
||||
|
||||
@Validate()
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit fdbcb36565f18a4e1ed9530125aff7c92c9b8a9e
|
||||
Subproject commit 5a232048f2569fdc265b5e253c76e983f51d25b5
|
||||
Loading…
x
Reference in New Issue
Block a user