fix: pagination on all page

This commit is contained in:
caturbgs
2021-12-22 22:15:04 +07:00
parent 3bce86ea5f
commit 1e92eee5b5
7 changed files with 60 additions and 68 deletions

View File

@@ -23,7 +23,7 @@ export class Transaction {
pageHistoryTransaction = 0;
pageHistoryTopUp = 0;
// pageSizeHistoryTransaction = 10
pageSizeHistoryTransaction = 10
dataHistoryTransaction = [];
total_dataHistoryTransaction = 0;
@@ -71,7 +71,7 @@ export class Transaction {
async getDataHistoryTransaction() {
try {
const response = await http.get(`/transaction/history?page=${this.pageHistoryTransaction}`);
const response = await http.get(`/transaction/history?page=${this.pageHistoryTransaction}&pageSize=${this.pageSizeHistoryTransaction}`);
this.dataHistoryTransaction = response.body.data ?? []
this.total_dataHistoryTransaction = response?.body?.count ?? 0