diff --git a/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts b/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts index 08dd486eb..3b9492258 100644 --- a/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts +++ b/apps/red-ui/src/app/modules/dossiers-listing/config.service.ts @@ -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) => { diff --git a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html index f9b9c24fb..821e8634f 100644 --- a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html +++ b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html @@ -54,7 +54,7 @@ > -