token n legacy
This commit is contained in:
@ -108,6 +108,7 @@ const AgentBalance = () => {
|
|||||||
const handleReload = async () => {
|
const handleReload = async () => {
|
||||||
setIsReloading(true);
|
setIsReloading(true);
|
||||||
await fetchAgentBalance(currentPage, pageSize, '','');
|
await fetchAgentBalance(currentPage, pageSize, '','');
|
||||||
|
closeDialog()
|
||||||
setIsReloading(false);
|
setIsReloading(false);
|
||||||
// fetchAgentBalance();
|
// fetchAgentBalance();
|
||||||
};
|
};
|
||||||
@ -192,6 +193,7 @@ const AgentBalance = () => {
|
|||||||
setToken_legacy={setToken_legacy}
|
setToken_legacy={setToken_legacy}
|
||||||
customerId={formData.id}
|
customerId={formData.id}
|
||||||
agent_name={formData.agent_name}
|
agent_name={formData.agent_name}
|
||||||
|
handleReload={handleReload}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
@ -202,7 +204,7 @@ const AgentBalance = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ====================
|
// ====================
|
||||||
const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_legacy }: any) => {
|
const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_legacy, handleReload }: any) => {
|
||||||
const cardRef: any = useRef(null);
|
const cardRef: any = useRef(null);
|
||||||
|
|
||||||
const waitForImageLoad = (img: HTMLImageElement): Promise<void> => {
|
const waitForImageLoad = (img: HTMLImageElement): Promise<void> => {
|
||||||
@ -248,6 +250,7 @@ const PaymentCard = ({ barcode, agent_name, customerId, token_legacy, setToken_l
|
|||||||
token_legacy
|
token_legacy
|
||||||
});
|
});
|
||||||
toast.success(`Success Update Token Legacy`);
|
toast.success(`Success Update Token Legacy`);
|
||||||
|
await handleReload();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
let err_msg = error?.response?.data?.error || error.message
|
let err_msg = error?.response?.data?.error || error.message
|
||||||
toast.error(err_msg);
|
toast.error(err_msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user