This commit is contained in:
Raja Oktafrianto
2025-05-11 13:31:49 +07:00
2 changed files with 10 additions and 3 deletions

View File

@ -234,6 +234,12 @@ const DashboardHomePage = () => {
</div> </div>
); );
const number: number = responseStatisticCard?.data.total_cash_in ?? 0;
const formattedNumber: number = parseFloat(number.toFixed(2));
const numbercashout: number = responseStatisticCard?.data.total_cash_out ?? 0;
const formattedNumbercashout: number = parseFloat(numbercashout.toFixed(2));
return ( return (
<> <>
<Helmet> <Helmet>
@ -266,14 +272,14 @@ const DashboardHomePage = () => {
/> />
<Card <Card
title="Total Cash-in" title="Total Cash-in"
total={responseStatisticCard?.data.total_cash_in ?? 0} total={formattedNumber.toFixed(2)} // now a number: 972.80
growth={parseFloat((responseStatisticCard?.data?.cash_in_last_week.percent ?? 0).toFixed(2)) ?? 0} growth={parseFloat((responseStatisticCard?.data?.cash_in_last_week.percent ?? 0).toFixed(2)) ?? 0}
surplus={responseStatisticCard?.data.cash_in_last_week.surplus ?? false} surplus={responseStatisticCard?.data.cash_in_last_week.surplus ?? false}
icon="test" icon="test"
/> />
<Card <Card
title="Total Cash-out" title="Total Cash-out"
total={responseStatisticCard?.data.total_cash_out ?? 0} total={formattedNumbercashout.toFixed(2)} // now a number: 972.80
growth={parseFloat((responseStatisticCard?.data?.cash_out_last_week.percent ?? 0).toFixed(2)) ?? 0} growth={parseFloat((responseStatisticCard?.data?.cash_out_last_week.percent ?? 0).toFixed(2)) ?? 0}
surplus={responseStatisticCard?.data.cash_out_last_week.surplus ?? false} surplus={responseStatisticCard?.data.cash_out_last_week.surplus ?? false}
icon="test" icon="test"

View File

@ -109,7 +109,8 @@ const TransactionWithdraw = () => {
pin: form.pin, pin: form.pin,
purpose: form.purpose, purpose: form.purpose,
id_transaction_type: "20c8a690-dc02-463d-b391-324184d1fefa", id_transaction_type: "20c8a690-dc02-463d-b391-324184d1fefa",
id_origin_customer: getAuth()?.id id_origin_customer: getAuth()?.id,
type:"R"
}); });
if (response?.status == true) { if (response?.status == true) {
await fetchWallets(); await fetchWallets();