Merge branch '2069-ticket_index_scope_days' of verdnatura/salix into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
1c6032a904
|
@ -51,14 +51,13 @@ export default class Controller {
|
||||||
|
|
||||||
onSearch(params) {
|
onSearch(params) {
|
||||||
if (params) {
|
if (params) {
|
||||||
let newParams = params;
|
if (typeof(params.scopeDays) === 'number')
|
||||||
if (params.scopeDays) {
|
Object.assign(params, this.getScopeDates(params.scopeDays));
|
||||||
const scopeDates = this.getScopeDates(params.scopeDays);
|
// Set default params to 1 scope days
|
||||||
Object.assign(newParams, scopeDates);
|
else if (Object.entries(params).length == 0)
|
||||||
} else if (Object.entries(params).length == 0)
|
params = this.getScopeDates(1);
|
||||||
newParams = this.getScopeDates(1);
|
|
||||||
|
|
||||||
this.$.model.applyFilter(null, newParams);
|
this.$.model.applyFilter(null, params);
|
||||||
} else
|
} else
|
||||||
this.$.model.clear();
|
this.$.model.clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue