update
This commit is contained in:
@ -234,6 +234,12 @@ const DashboardHomePage = () => {
|
||||
</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(number.toFixed(2));
|
||||
|
||||
return (
|
||||
<>
|
||||
<Helmet>
|
||||
@ -266,14 +272,14 @@ const DashboardHomePage = () => {
|
||||
/>
|
||||
<Card
|
||||
title="Total Cash-in"
|
||||
total={parseFloat((responseStatisticCard?.data.total_cash_in ?? 0).toFixed(2)) ?? 0}
|
||||
total={formattedNumber.toFixed(2)} // now a number: 972.80
|
||||
growth={parseFloat((responseStatisticCard?.data?.cash_in_last_week.percent ?? 0).toFixed(2)) ?? 0}
|
||||
surplus={responseStatisticCard?.data.cash_in_last_week.surplus ?? false}
|
||||
icon="test"
|
||||
/>
|
||||
<Card
|
||||
title="Total Cash-out"
|
||||
total={parseFloat((responseStatisticCard?.data.out ?? 0).toFixed(2)) ?? 0}
|
||||
total={formattedNumbercashout.toFixed(2)} // now a number: 972.80
|
||||
growth={parseFloat((responseStatisticCard?.data?.cash_out_last_week.percent ?? 0).toFixed(2)) ?? 0}
|
||||
surplus={responseStatisticCard?.data.cash_out_last_week.surplus ?? false}
|
||||
icon="test"
|
||||
|
||||
Reference in New Issue
Block a user