Merge branch 'develop' into 'devops-staging'
Perbaikan Project PPOB See merge request empatnusabangsa/ppob/ppob-frontend!37
This commit is contained in:
commit
dde18f89e8
|
@ -41,6 +41,7 @@ export const DetailUser = observer(() => {
|
|||
return () => {
|
||||
store.membership.dataDetail = {};
|
||||
store.transaction.dataHistoryTopUp = [];
|
||||
store.authentication.dataProfit = [];
|
||||
store.transaction.dataDetailHistoryTransaction = [];
|
||||
};
|
||||
}, []);
|
||||
|
@ -49,6 +50,7 @@ export const DetailUser = observer(() => {
|
|||
const isAdmin = store.authentication.userData.role === "Admin";
|
||||
await Promise.allSettled([
|
||||
store.transaction.getDataHistoryTopUp(id),
|
||||
store.authentication.getProfit(id),
|
||||
store.transaction.getDetailHistoryTransaction(id),
|
||||
store.membership.getDetail(id),
|
||||
store.role.getData(isAdmin),
|
||||
|
@ -313,26 +315,26 @@ export const DetailUser = observer(() => {
|
|||
<Text strong>Name</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>{store.membership.dataDetail.userDetail?.name}</Text>
|
||||
<Text>{store.authentication.dataProfit.userDetail?.name}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text strong>Username</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>{store.membership.dataDetail.username}</Text>
|
||||
<Text>{store.authentication.dataProfit.username}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text strong>Role</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>{store.membership.dataDetail.roles?.name}</Text>
|
||||
<Text>{store.authentication.dataProfit.roles?.name}</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text strong>Phone Number</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
{store.membership.dataDetail.userDetail?.phone_number}
|
||||
{store.authentication.dataProfit.userDetail?.phone_number}
|
||||
</Text>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
|
@ -340,7 +342,7 @@ export const DetailUser = observer(() => {
|
|||
</Col>
|
||||
<Col span={12}>
|
||||
<Text>
|
||||
{store.membership.dataDetail.isActive === true
|
||||
{store.authentication.dataProfit.isActive === true
|
||||
? "Aktif"
|
||||
: "Inaktif"}
|
||||
</Text>
|
||||
|
@ -364,7 +366,7 @@ export const DetailUser = observer(() => {
|
|||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(
|
||||
store.authentication.profileData?.wallet || 0
|
||||
store.authentication.dataProfit.wallet || 0
|
||||
)}
|
||||
</Text>
|
||||
</Col>
|
||||
|
|
|
@ -222,6 +222,7 @@ export const Membership = observer(() => {
|
|||
onClick={async () => {
|
||||
await store.transaction.getDataHistoryTopUp(record.id);
|
||||
await store.transaction.getDetailHistoryTransaction(record.id);
|
||||
await store.authentication.getProfit(record.id);
|
||||
//await store.transaction.getDataHistoryTransaction()
|
||||
history.push(LINKS.USER_DETAIL.replace(":id", record.id));
|
||||
console.log(record.id);
|
||||
|
|
|
@ -8,6 +8,7 @@ export class Authentication {
|
|||
isLoginLoading = false;
|
||||
ctx;
|
||||
profileData = {};
|
||||
dataProfit=[]
|
||||
|
||||
constructor(ctx) {
|
||||
this.ctx = ctx;
|
||||
|
@ -51,6 +52,17 @@ export class Authentication {
|
|||
}
|
||||
}
|
||||
|
||||
async getProfit(id) {
|
||||
try {
|
||||
const response = await http.get(`/auth/profile/${id}`);
|
||||
console.log(response)
|
||||
this.dataProfit = response.body ?? [];
|
||||
this.total_data = response?.body?.count ?? 0;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async getProfile() {
|
||||
try {
|
||||
const response = await http.get('/auth/profile');
|
||||
|
|
|
@ -40,6 +40,7 @@ export class Transaction {
|
|||
dataTransactionB2B = [];
|
||||
dataTransactionPartner = [];
|
||||
|
||||
|
||||
//filter
|
||||
visibleModalFilterTransaction = false;
|
||||
filterStart = null;
|
||||
|
@ -51,6 +52,7 @@ export class Transaction {
|
|||
makeAutoObservable(this);
|
||||
}
|
||||
|
||||
|
||||
async getData() {
|
||||
try {
|
||||
const response = await http.get(
|
||||
|
|
Loading…
Reference in New Issue
Block a user