fix hitung ayam dan karung data yang ditampilkan melebihi estimasi panen
CI / lint-and-test (push) Canceled after 0s

This commit is contained in:
Alberto-Audrix committed 2026-07-29 10:48:03 +07:00
1 parent 32a36cceff
commit b6117ae7d5
8 files changed
+105 -49

No files matched your search

+5 -1
View File
@@ -83,7 +83,11 @@ const CombinedTrendChart: React.FC<CombinedTrendChartProps> = ({
today.setHours(0, 0, 0, 0);
startDate.setHours(0, 0, 0, 0);
const startDateMs = startDate.getTime();
const currentDayOfCycle = Math.floor((today.getTime() - startDateMs) / (1000 * 60 * 60 * 24));
const lastCycleDay = Math.max(0, (cycleData.totalDays || 1) - 1);
const currentDayOfCycle = Math.min(
Math.floor((today.getTime() - startDateMs) / (1000 * 60 * 60 * 24)),
lastCycleDay
);
const recordMap = new Map();
sortedRecords.forEach((record: any) => {