fix hitung karung page table data not showing
This commit is contained in:
1 parent
d9e04a2bd7
commit
7dcd7b74cb
1 file changed
+3
-3
@@ -69,9 +69,9 @@ const FeedSackCountingPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
const latestManual = sortedManualRows.find((row) => row.date === displayDate) ?? null;
|
||||
const currentDay = useMemo(() => {
|
||||
if (!selectedCycle) return 0;
|
||||
const rawDay = cycleDayForDate(selectedCycle.start_date, displayDate);
|
||||
return Math.min(rawDay, Math.max(0, selectedCycle.total_days - 1));
|
||||
}, [selectedCycle, displayDate]);
|
||||
const boundDate = selectedCycle.end_date ?? selectedCycle.visible_through_date ?? todayIso();
|
||||
return cycleDayForDate(selectedCycle.start_date, boundDate);
|
||||
}, [selectedCycle]);
|
||||
|
||||
const handleSync = useCallback(async () => {
|
||||
if (!selectedCycle) return;
|
||||
|
||||
Reference in new issue
Block a user