Merge branch 'develop' into 'devops-production'
Bug Fix See merge request empatnusabangsa/ppob/ppob-frontend!152
This commit is contained in:
commit
c3681ebb53
|
@ -1,4 +1,4 @@
|
|||
import React, { useState,useEffect ,useContext} from "react";
|
||||
import React, { useState, useEffect, useContext } from "react";
|
||||
import { Button, Drawer, Layout, Menu, Popover, Typography, Card } from "antd";
|
||||
import { MenuList } from "./MenuList";
|
||||
import { Link, useHistory } from "react-router-dom";
|
||||
|
@ -47,14 +47,7 @@ export const DesktopLayout = observer(() => {
|
|||
useEffect(() => {
|
||||
(async () => {
|
||||
modalLoader.setLoading(true);
|
||||
|
||||
await Promise.allSettled([
|
||||
store.authentication.getProfile(),
|
||||
store.transaction.getDataHistoryTransaction(),
|
||||
]);
|
||||
await store.transaction.getDataHistoryTopUpProfile(
|
||||
store.authentication.profileData?.id
|
||||
);
|
||||
await Promise.allSettled([store.authentication.getProfile()]);
|
||||
modalLoader.setLoading(false);
|
||||
})();
|
||||
}, []);
|
||||
|
@ -387,7 +380,6 @@ export const DesktopLayout = observer(() => {
|
|||
>
|
||||
{store.ui.mediaQuery.isMobile && (
|
||||
<div
|
||||
className={store.ui.mediaQuery.isMobile ? "shadow" : null}
|
||||
style={{
|
||||
top: 0,
|
||||
left: 0,
|
||||
|
@ -513,10 +505,12 @@ export const DesktopLayout = observer(() => {
|
|||
visible={clicked}
|
||||
onVisibleChange={() => setClicked(!clicked)}
|
||||
>
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.authentication.profileData?.wallet || 0)}
|
||||
{store.authentication.userData.role !== "Admin" &&
|
||||
new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.authentication.profileData?.wallet || 0)}
|
||||
|
||||
<Button
|
||||
size={"default"}
|
||||
type={store.ui.mediaQuery.isDesktop ? "" : "link"}
|
||||
|
@ -570,28 +564,30 @@ export const DesktopLayout = observer(() => {
|
|||
width: "100%",
|
||||
}}
|
||||
></div>
|
||||
<Card
|
||||
size="small"
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
Saldo :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.authentication.profileData?.wallet || 0)}
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginRight: 10,
|
||||
width: 210,
|
||||
height: 31,
|
||||
}}
|
||||
></Card>
|
||||
{store.authentication.userData.role !== "Admin" && (
|
||||
<Card
|
||||
size="small"
|
||||
title={
|
||||
<span
|
||||
style={{
|
||||
fontStyle: "bold",
|
||||
textAlign: "center",
|
||||
}}
|
||||
>
|
||||
Saldo :{" "}
|
||||
{new Intl.NumberFormat("id-ID", {
|
||||
style: "currency",
|
||||
currency: "IDR",
|
||||
}).format(store.authentication.profileData?.wallet || 0)}
|
||||
</span>
|
||||
}
|
||||
style={{
|
||||
marginRight: 10,
|
||||
width: 210,
|
||||
height: 31,
|
||||
}}
|
||||
></Card>
|
||||
)}
|
||||
<Popover
|
||||
className={store.ui.mediaQuery.isDesktop ? "shadow" : null}
|
||||
autoAdjustOverflow={true}
|
||||
|
|
Loading…
Reference in New Issue
Block a user