From 028ce16bb971a9bf6388fc7c9b5d056ea7eb65b1 Mon Sep 17 00:00:00 2001 From: GabrielMeyer Date: Tue, 10 Sep 2019 17:05:24 +0200 Subject: [PATCH] Changes the order of states in filter - 'Done' and 'undone' are moved up to top. --- .../motions/services/motion-filter-list.service.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/client/src/app/site/motions/services/motion-filter-list.service.ts b/client/src/app/site/motions/services/motion-filter-list.service.ts index 28da12fce..895b5f48a 100644 --- a/client/src/app/site/motions/services/motion-filter-list.service.ts +++ b/client/src/app/site/motions/services/motion-filter-list.service.ts @@ -283,22 +283,21 @@ export class MotionFilterListService extends BaseFilterListService { // convert to filter options if (workflowFilters && workflowFilters.length) { let workflowOptions: OsFilterOptions = []; - for (const filterDef of workflowFilters) { - workflowOptions.push(filterDef.name); - workflowOptions = workflowOptions.concat(filterDef.filter); - } - // add "done" and "undone" - workflowOptions.push('-'); workflowOptions.push({ label: 'Done', condition: finalStates }); - workflowOptions.push({ label: this.translate.instant('Undone'), condition: nonFinalStates }); + workflowOptions.push('-'); + + for (const filterDef of workflowFilters) { + workflowOptions.push(filterDef.name); + workflowOptions = workflowOptions.concat(filterDef.filter); + } this.stateFilterOptions.options = workflowOptions; }