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