update
This commit is contained in:
@ -267,7 +267,7 @@ const DashboardHomePage = () => {
|
||||
<Card
|
||||
title="Total Cash-in"
|
||||
total={responseStatisticCard?.data.total_cash_in ?? 0}
|
||||
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}
|
||||
icon="test"
|
||||
/>
|
||||
@ -302,7 +302,14 @@ const DashboardHomePage = () => {
|
||||
type="date"
|
||||
name="from"
|
||||
value={moment(fromDate).format('YYYY-MM-DD')}
|
||||
onChange={(e) => setFromDate(new Date(e.target.value))}
|
||||
onChange={(e) => {
|
||||
if (e.target.value) {
|
||||
setFromDate(new Date(e.target.value));
|
||||
} else {
|
||||
// Reset to default value (e.g. first day of current month)
|
||||
setFromDate(getFirstDayOfMonth());
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
|
||||
@ -312,7 +319,14 @@ const DashboardHomePage = () => {
|
||||
type="date"
|
||||
name="to"
|
||||
value={moment(toDate).format('YYYY-MM-DD')}
|
||||
onChange={(e) => setToDate(new Date(e.target.value))}
|
||||
onChange={(e) => {
|
||||
if (e.target.value) {
|
||||
setToDate(new Date(e.target.value));
|
||||
} else {
|
||||
// Reset to default value (e.g. today)
|
||||
setToDate(getToday());
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user