change applyFilters
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
c42b38c5cc
commit
88e845b511
|
@ -37,6 +37,16 @@ class Controller extends SearchPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
applyFilters(param) {
|
applyFilters(param) {
|
||||||
|
if (typeof this.filter.scopeDays === 'number') {
|
||||||
|
const shippedFrom = Date.vnNew();
|
||||||
|
shippedFrom.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
|
const shippedTo = new Date(shippedFrom.getTime());
|
||||||
|
shippedTo.setDate(shippedTo.getDate() + this.filter.scopeDays);
|
||||||
|
shippedTo.setHours(23, 59, 59, 999);
|
||||||
|
Object.assign(this.filter, {shippedFrom, shippedTo});
|
||||||
|
}
|
||||||
|
|
||||||
this.model.applyFilter({}, this.filter)
|
this.model.applyFilter({}, this.filter)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
if (param && this.model._orgData.length === 1)
|
if (param && this.model._orgData.length === 1)
|
||||||
|
|
Loading…
Reference in New Issue