Hit Api Total Transaksi

This commit is contained in:
2021-12-30 12:28:53 +07:00
parent 036cba0528
commit bf3e66b5b5
4 changed files with 259 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ import {makeAutoObservable, runInAction} from "mobx";
import {TokenUtil} from "../utils/token";
import {http} from "../utils/http";
export class Authentication {
isLoggedIn = false;
isLoginLoading = false;
@@ -53,6 +54,7 @@ export class Authentication {
async getProfile() {
try {
const response = await http.get('/auth/profile');
console.log(response)
this.profileData = response.body;
} catch (e) {
console.error(e);

View File

@@ -30,6 +30,7 @@ export class Transaction {
pageSizeHistoryTopUp = 10;
dataHistoryTopUp = [];
total_dataHistoryTopUp = 0;
dataTransaction=[]
//filter
visibleModalFilterTransaction = false;
@@ -52,6 +53,19 @@ export class Transaction {
}
}
async getDataTransaction() {
try {
const response = await http.get(
`/transaction/total-order`
);
//console.log(response)
this.dataTransaction = response.body.data ?? [];
this.total_data = response?.body?.count ?? 0;
} catch (e) {
console.error(e);
}
}
async getDataSubCategories() {
try {
const response = await http.get(