RED-5067: Dossier list quick filters update
This commit is contained in:
parent
4e94dd6fd7
commit
25527aff7c
@ -201,49 +201,31 @@ export class ConfigService {
|
||||
return filterGroups;
|
||||
}
|
||||
|
||||
private _myDossiersChecker = (dw: Dossier) => dw.ownerId === this._currentUser.id;
|
||||
private _dossierOwnerChecker = (dw: Dossier) => dw.ownerId === this._currentUser.id;
|
||||
|
||||
private _toApproveChecker = (dw: Dossier) => dw.approverIds.includes(this._currentUser.id);
|
||||
|
||||
private _toReviewChecker = (dw: Dossier) => dw.memberIds.includes(this._currentUser.id);
|
||||
|
||||
private _otherChecker = (dw: Dossier) => !dw.memberIds.includes(this._currentUser.id);
|
||||
private _dossierMemberChecker = (dw: Dossier) =>
|
||||
dw.memberIds.includes(this._currentUser.id) || dw.approverIds.includes(this._currentUser.id);
|
||||
|
||||
private _openAddDossierDialog(dossierTemplateId: string): void {
|
||||
this._dialogService.openDialog('addDossier', null, { dossierTemplateId });
|
||||
}
|
||||
|
||||
private _quickFilters(entities: Dossier[]): NestedFilter[] {
|
||||
const myDossiersLabel = this._translateService.instant('dossier-listing.quick-filters.my-dossiers');
|
||||
const filters = [
|
||||
return [
|
||||
{
|
||||
id: 'my-dossiers',
|
||||
label: myDossiersLabel,
|
||||
checker: this._myDossiersChecker,
|
||||
disabled: entities.filter(this._myDossiersChecker).length === 0,
|
||||
id: 'owner',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.owner'),
|
||||
checker: this._dossierOwnerChecker,
|
||||
disabled: entities.filter(this._dossierOwnerChecker).length === 0,
|
||||
helpModeKey: 'filter_dossier_list',
|
||||
},
|
||||
{
|
||||
id: 'to-approve',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.to-approve'),
|
||||
checker: this._toApproveChecker,
|
||||
disabled: entities.filter(this._toApproveChecker).length === 0,
|
||||
},
|
||||
{
|
||||
id: 'to-review',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.to-review'),
|
||||
checker: this._toReviewChecker,
|
||||
disabled: entities.filter(this._toReviewChecker).length === 0,
|
||||
},
|
||||
{
|
||||
id: 'other',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.other'),
|
||||
checker: this._otherChecker,
|
||||
disabled: entities.filter(this._otherChecker).length === 0,
|
||||
id: 'member',
|
||||
label: this._translateService.instant('dossier-listing.quick-filters.member'),
|
||||
checker: this._dossierMemberChecker,
|
||||
disabled: entities.filter(this._dossierMemberChecker).length === 0,
|
||||
},
|
||||
].map(filter => new NestedFilter(filter));
|
||||
|
||||
return filters.filter(f => f.label === myDossiersLabel || this._userPreferenceService.areDevFeaturesEnabled);
|
||||
}
|
||||
|
||||
private _dossierStatusChecker = (dossier: Dossier, filter: INestedFilter) => {
|
||||
|
||||
@ -786,10 +786,9 @@
|
||||
"title": "Die ausgewählten Filter treffen auf kein Dossier zu."
|
||||
},
|
||||
"quick-filters": {
|
||||
"member": "",
|
||||
"my-dossiers": "Meine Dossiers",
|
||||
"other": "Sonstige",
|
||||
"to-approve": "Zu Genehmigen",
|
||||
"to-review": "Zu Überprüfen"
|
||||
"owner": ""
|
||||
},
|
||||
"reanalyse": {
|
||||
"action": "Gesamtes Dossier analysieren"
|
||||
|
||||
@ -786,10 +786,9 @@
|
||||
"title": "No dossiers match your current filters."
|
||||
},
|
||||
"quick-filters": {
|
||||
"member": "Dossier Member",
|
||||
"my-dossiers": "My Dossiers",
|
||||
"other": "Other",
|
||||
"to-approve": "To Approve",
|
||||
"to-review": "To Review"
|
||||
"owner": "Dossier Owner"
|
||||
},
|
||||
"reanalyse": {
|
||||
"action": "Analyze entire dossier"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user