fixed the skip issue in the filter

pull/1097/head
smit95tpatel 2021-12-20 15:45:24 +05:30
parent d0f427f436
commit cc92b03dec
1 changed files with 12 additions and 5 deletions

View File

@ -101,8 +101,15 @@ export default {
return; return;
} }
const startSec = convertToSec(start); let startSec = ''; let endSec = '';
const endSec = convertToSec(end) + (60 * 60 * 23 + 59 * 60 + 59); // adding end of time for that particular date.
if (start) {
startSec = convertToSec(start);
}
if (end) {
endSec = convertToSec(end) + (60 * 60 * 23 + 59 * 60 + 59); // adding end of time for that particular date.
}
this.isLoading = true; this.isLoading = true;
@ -110,11 +117,11 @@ export default {
this.isLoading = false; this.isLoading = false;
}, },
getNextDowntimes: function () { getNextDowntimes: function () {
this.params = { ...this.params, skip: this.params.skip + 1 }; this.params = { ...this.params, skip: this.params.skip + this.params.count };
this.getDowntimes(this.params); this.getDowntimes();
}, },
getPrevDowntimes: function () { getPrevDowntimes: function () {
this.params = { ...this.params, skip: this.params.skip - 1 }; this.params = { ...this.params, skip: this.params.skip - this.params.count };
this.getDowntimes(this.params); this.getDowntimes(this.params);
}, },
handleClearFilters: function () { handleClearFilters: function () {