feat: create table in profile

This commit is contained in:
2022-05-24 21:06:34 +07:00
parent c330f65612
commit 5fea6f568d
2 changed files with 255 additions and 50 deletions

View File

@@ -11,8 +11,8 @@ export class Transaction {
filterSubCategory = null;
visibleModalProduct = false;
visibleModalTransaction = false;
pageSizeDetail=10;
pageDetail=0
pageSizeDetail = 10;
pageDetail = 0
pageCategories = 0;
pageSizeCategories = 10;
@@ -40,15 +40,18 @@ export class Transaction {
dataHistoryTopUp = [];
total_dataHistoryTopUp = 0;
dataHistorybillProfile = [];
total_dataHistorybillProfile = 0;
dataHistoryTopUpProfile = [];
total_dataHistoryTopUpProfile = 0;
dataTransaction = [];
dataTransactionB2B = [];
dataTransactionPartner = [];
total_dataDetailHistoryTransactionDetailUser=0;
total_dataDetailHistoryTransactionDetailUser = 0;
//filter
visibleModalFilterTransaction = false;
filterStart = null;
@@ -130,6 +133,23 @@ export class Transaction {
}
}
async getDataHistoryCheckBill() {
try {
const response = await http.get(
`/transaction/check-bill-history`
);
// const response = await http.get(
// `/transaction/check-bill-history?page=${this.page}&pageSize=${this.pageSize}&start=${this.filterStart}&end=${this.filterEnd}`
// );
console.log("bill", response);
this.dataHistorybillProfile = response.body.data ?? [];
this.total_dataHistorybillProfile = response?.body?.count ?? 0;
console.log(this.total_dataHistorybillProfile)
} catch (e) {
console.error(e);
}
}
async getDataHistoryTransaction() {
try {
const response = await http.get(
@@ -138,7 +158,6 @@ export class Transaction {
console.log(response);
this.dataHistoryTransaction = response.body.data ?? [];
this.total_dataHistoryTransaction = response?.body?.count ?? 0;
console.log(this.total_dataHistoryTransaction)
} catch (e) {
console.error(e);
}
@@ -147,7 +166,7 @@ export class Transaction {
async getDetailHistoryTransaction(id) {
try {
const response = await http.get(`/transaction/history-user/${id}?page=${this.page}&pageSize=${this.pageSize}&start=${this.filterStart}&end=${this.filterEnd}`);
console.log(response,'Data Trans');
console.log(response, 'Data Trans');
this.dataDetailHistoryTransactionDetailUser = response.body.data ?? [];
this.total_data = response?.body?.count ?? 0;
} catch (e) {
@@ -160,7 +179,7 @@ export class Transaction {
const response = await http.get(
`/transaction/history-deposit?page=${this.page}&pageSize=${this.pageSize}&user-destination=${id}&start=${this.filterStart}&end=${this.filterEnd}`
);
console.log(response,'get data history')
console.log(response, 'get data history')
this.dataHistoryTopUp = response.body.data ?? [];
this.total_dataHistoryTopUp = response?.body?.count ?? 0;
} catch (e) {
@@ -173,7 +192,7 @@ export class Transaction {
const response = await http.get(
`/transaction/history-deposit-profile?page=${this.page}&pageSize=${this.pageSize}&user-destination=${id}&start=${this.filterStart}&end=${this.filterEnd}`
);
console.log(response,'get data history Profile')
console.log(response, 'get data history Profile')
this.dataHistoryTopUpProfile = response.body.data ?? [];
this.total_dataHistoryTopUpProfile = response?.body?.count ?? 0;
} catch (e) {
@@ -192,9 +211,9 @@ export class Transaction {
}
async buyProduct(data) {
const response = await http.post("/transaction/order").send(data);
console.log(response,'dari store')
return response;
const response = await http.post("/transaction/order").send(data);
console.log(response, 'dari store')
return response;
}
async buyProd(data) {