PMCORE-2548:Review pagination in the tables.

This commit is contained in:
fabio
2020-12-15 17:34:47 -04:00
parent 816d9e4cb1
commit 171cc32e16
8 changed files with 68 additions and 26 deletions

View File

@@ -107,7 +107,7 @@ export default {
programmatic: false,
},
requestFunction(data) {
return this.$parent.$parent.getCasesForVueTable();
return this.$parent.$parent.getCasesForVueTable(data);
},
},
translations: null,
@@ -156,13 +156,18 @@ export default {
/**
* Get cases data by header
*/
getCasesForVueTable() {
getCasesForVueTable(data) {
let that = this,
dt;
dt,
paged,
limit = data.limit,
start = data.page === 1 ? 0 : limit * (data.page - 1);
paged = start + ',' + limit;
return new Promise((resolutionFunc, rejectionFunc) => {
api.cases
.myCases({
filter: that.filterHeader,
paged: paged
})
.then((response) => {
dt = that.formatDataResponse(response.data.data);