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