fix karung view data and sync only sync with the current date
This commit is contained in:
1 parent
b3556c6ef4
commit
5ae477a99d
8 files changed
+396
-32
No files matched your search
@@ -20,7 +20,7 @@ const StatItem: React.FC<{
|
||||
className="text-xl sm:text-2xl font-bold leading-none"
|
||||
style={{ color: colorOverride ?? '#374151' }}
|
||||
>
|
||||
{value == null ? 'N/A' : formatNumber(value)}
|
||||
{value == null ? formatNumber(0) : formatNumber(value)}
|
||||
</p>
|
||||
<p className="text-xs text-gray-400 mt-0.5">karung</p>
|
||||
</div>
|
||||
@@ -68,30 +68,30 @@ const FeedStats: React.FC<FeedStatsProps> = ({
|
||||
title: 'Karung Masuk',
|
||||
color: '#2563eb',
|
||||
icon: <i className="fa-solid fa-arrow-down text-blue-600"></i>,
|
||||
iotToday: latest?.in_today ?? null,
|
||||
iotTotal: latest?.in_total ?? null,
|
||||
manualToday: latestManual?.feed_in_manual ?? null,
|
||||
manualTotal: latestManual?.feed_in_manual_total ?? null,
|
||||
iotToday: latest?.in_today ?? 0,
|
||||
iotTotal: latest?.in_total ?? 0,
|
||||
manualToday: latestManual?.feed_in_manual ?? 0,
|
||||
manualTotal: latestManual?.feed_in_manual_total ?? 0,
|
||||
},
|
||||
{
|
||||
key: 'dituang',
|
||||
title: 'Karung Dituang',
|
||||
color: '#ea580c',
|
||||
icon: <i className="fa-solid fa-arrow-up text-orange-600"></i>,
|
||||
iotToday: latest?.feed_use_today ?? null,
|
||||
iotTotal: latest?.feed_use_total ?? null,
|
||||
manualToday: latestManual?.feed_use_manual ?? null,
|
||||
manualTotal: latestManual?.feed_use_manual_total ?? null,
|
||||
iotToday: latest?.feed_use_today ?? 0,
|
||||
iotTotal: latest?.feed_use_total ?? 0,
|
||||
manualToday: latestManual?.feed_use_manual ?? 0,
|
||||
manualTotal: latestManual?.feed_use_manual_total ?? 0,
|
||||
},
|
||||
{
|
||||
key: 'keluar',
|
||||
title: 'Karung Keluar',
|
||||
color: '#dc2626',
|
||||
icon: <i className="fa-solid fa-arrow-right text-red-600"></i>,
|
||||
iotToday: latest?.out_today ?? null,
|
||||
iotTotal: latest?.out_total ?? null,
|
||||
manualToday: latestManual?.feed_out_manual ?? null,
|
||||
manualTotal: latestManual?.feed_out_manual_total ?? null,
|
||||
iotToday: latest?.out_today ?? 0,
|
||||
iotTotal: latest?.out_total ?? 0,
|
||||
manualToday: latestManual?.feed_out_manual ?? 0,
|
||||
manualTotal: latestManual?.feed_out_manual_total ?? 0,
|
||||
},
|
||||
],
|
||||
[latest, latestManual]
|
||||
|
||||
Reference in new issue
Block a user