Perbaikan Menu

This commit is contained in:
2021-12-31 11:40:38 +07:00
parent b5e404c0c1
commit 7d3da68095
4 changed files with 355 additions and 76 deletions

View File

@@ -30,7 +30,9 @@ export class Transaction {
pageSizeHistoryTopUp = 10;
dataHistoryTopUp = [];
total_dataHistoryTopUp = 0;
dataTransaction=[]
dataTransaction = [];
dataDetailHistoryTransaction = [];
total_dataDetailHistoryTransaction=0;
//filter
visibleModalFilterTransaction = false;
@@ -55,9 +57,7 @@ export class Transaction {
async getDataTransaction() {
try {
const response = await http.get(
`/transaction/total-order`
);
const response = await http.get(`/transaction/total-order`);
//console.log(response)
this.dataTransaction = response.body.data ?? [];
this.total_data = response?.body?.count ?? 0;
@@ -106,11 +106,23 @@ export class Transaction {
}
}
async getDetailHistoryTransaction(id) {
try {
const response = await http.get(`/transaction/history-user/${id}`);
console.log(response,'Data Trans');
this.dataDetailHistoryTransaction = response.body.data ?? [];
this.total_dataDetailHistoryTransaction = response?.body?.count ?? 0;
} catch (e) {
console.error(e);
}
}
async getDataHistoryTopUp(id) {
try {
const response = await http.get(
`/transaction/history-deposit?page=${this.pageHistoryTopUp}&pageSize=${this.pageSizeHistoryTopUp}&user-destination=${id}`
);
console.log(response,'get data history')
this.dataHistoryTopUp = response.body.data ?? [];
this.total_dataHistoryTopUp = response?.body?.count ?? 0;
} catch (e) {