Merge pull request #4997 from GabrielInTheWorld/funWithState

Changes the order of states in filter
This commit is contained in:
Emanuel Schütze 2019-09-10 17:31:13 +02:00 committed by GitHub
commit b949761404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -283,22 +283,21 @@ export class MotionFilterListService extends BaseFilterListService<ViewMotion> {
// 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;
}