fix: dashboard
This commit is contained in:
		| @@ -31,6 +31,8 @@ export class Transaction { | ||||
|   dataHistoryTopUp = []; | ||||
|   total_dataHistoryTopUp = 0; | ||||
|   dataTransaction = []; | ||||
|   dataTransactionB2B = []; | ||||
|   dataTransactionPartner = []; | ||||
|   dataDetailHistoryTransaction = []; | ||||
|   total_dataDetailHistoryTransaction=0; | ||||
|  | ||||
| @@ -59,8 +61,27 @@ export class Transaction { | ||||
|     try { | ||||
|       const response = await http.get(`/transaction/total-order`); | ||||
|       //console.log(response) | ||||
|       this.dataTransaction = response.body.data ?? []; | ||||
|       this.total_data = response?.body?.count ?? 0; | ||||
|       this.dataTransaction = response.body.data; | ||||
|     } catch (e) { | ||||
|       console.error(e); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   async getDataTransactionB2B() { | ||||
|     try { | ||||
|       const response = await http.get(`/transaction/total-order-b2b`); | ||||
|       //console.log(response) | ||||
|       this.dataTransactionB2B = response.body.data; | ||||
|     } catch (e) { | ||||
|       console.error(e); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   async getDataTransactionPartner() { | ||||
|     try { | ||||
|       const response = await http.get(`/transaction/total-order-partner`); | ||||
|       //console.log(response) | ||||
|       this.dataTransactionPartner = response.body.data; | ||||
|     } catch (e) { | ||||
|       console.error(e); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user