diff --git a/components/FeedSackCountingPage.tsx b/components/FeedSackCountingPage.tsx
index 5eb468c..c02d32b 100644
--- a/components/FeedSackCountingPage.tsx
+++ b/components/FeedSackCountingPage.tsx
@@ -62,7 +62,7 @@ const FeedSackCountingPage: React.FC<{ onSettings: () => void }> = ({ onSettings
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));
+ return Math.min(rawDay, Math.max(0, (selectedCycle.total_days || 1) - 1));
}, [selectedCycle, displayDate]);
const sortedCycles = useMemo(() => {
@@ -101,8 +101,8 @@ const FeedSackCountingPage: React.FC<{ onSettings: () => void }> = ({ onSettings
masuk: r.in_today,
dituang: r.feed_use_today,
keluar: r.out_today,
- masukManual: manual?.feed_in_manual ?? 0,
- dituangManual: manual?.feed_use_manual ?? 0,
+ masukManual: manual?.feed_in_manual ?? null,
+ dituangManual: manual?.feed_use_manual ?? null,
};
});
return buildFeedSackInsightContext({
@@ -161,6 +161,11 @@ const FeedSackCountingPage: React.FC<{ onSettings: () => void }> = ({ onSettings
Aktif
)}
+ {cycleStatus === 'pending_close' && (
+
+ Menunggu GM
+
+ )}
{cycleStatus === 'closed' && (
Selesai
@@ -201,6 +206,11 @@ const FeedSackCountingPage: React.FC<{ onSettings: () => void }> = ({ onSettings
Aktif
)}
+ {itemStatus === 'pending_close' && (
+
+ Menunggu GM
+
+ )}
{itemStatus === 'closed' && (
Selesai