Hit Api Total Transaksi
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user