Merge pull request #4997 from GabrielInTheWorld/funWithState
Changes the order of states in filter
This commit is contained in:
commit
b949761404
@ -283,22 +283,21 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
|
|||||||
// convert to filter options
|
// convert to filter options
|
||||||
if (workflowFilters && workflowFilters.length) {
|
if (workflowFilters && workflowFilters.length) {
|
||||||
let workflowOptions: OsFilterOptions = [];
|
let workflowOptions: OsFilterOptions = [];
|
||||||
for (const filterDef of workflowFilters) {
|
|
||||||
workflowOptions.push(filterDef.name);
|
|
||||||
workflowOptions = workflowOptions.concat(filterDef.filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add "done" and "undone"
|
// add "done" and "undone"
|
||||||
workflowOptions.push('-');
|
|
||||||
workflowOptions.push({
|
workflowOptions.push({
|
||||||
label: 'Done',
|
label: 'Done',
|
||||||
condition: finalStates
|
condition: finalStates
|
||||||
});
|
});
|
||||||
|
|
||||||
workflowOptions.push({
|
workflowOptions.push({
|
||||||
label: this.translate.instant('Undone'),
|
label: this.translate.instant('Undone'),
|
||||||
condition: nonFinalStates
|
condition: nonFinalStates
|
||||||
});
|
});
|
||||||
|
workflowOptions.push('-');
|
||||||
|
|
||||||
|
for (const filterDef of workflowFilters) {
|
||||||
|
workflowOptions.push(filterDef.name);
|
||||||
|
workflowOptions = workflowOptions.concat(filterDef.filter);
|
||||||
|
}
|
||||||
|
|
||||||
this.stateFilterOptions.options = workflowOptions;
|
this.stateFilterOptions.options = workflowOptions;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user