fix doc weight to show real doc instead of forcing 35-51 range and also fixed bug target weight using total days as reference for target weight instead of doc weight
This commit is contained in:
1 parent
4439e3b7b1
commit
75eb218558
8 files changed
+76
-34
No files matched your search
@@ -90,7 +90,7 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
}
|
||||
};
|
||||
|
||||
const totalDays = selectedCycle?.total_days ?? 35;
|
||||
const docWeight = selectedCycle?.chick_in_weight ?? 35;
|
||||
|
||||
const selectedRow = useMemo(
|
||||
() => rows.find((row) => row.date === selectedDate) ?? null,
|
||||
@@ -206,13 +206,13 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
<div className="space-y-8">
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
||||
<div className="lg:col-span-1">
|
||||
<WeightStats latest={kpiLatest} totalDays={totalDays} />
|
||||
<WeightStats latest={kpiLatest} docWeight={docWeight} />
|
||||
</div>
|
||||
<div className="lg:col-span-2">
|
||||
<DailyWeightProgressionChart rows={chartRows} totalDays={totalDays} />
|
||||
<DailyWeightProgressionChart rows={chartRows} docWeight={docWeight} />
|
||||
</div>
|
||||
</div>
|
||||
<DailyWeightGainChart rows={chartRows} totalDays={totalDays} />
|
||||
<DailyWeightGainChart rows={chartRows} docWeight={docWeight} />
|
||||
</div>
|
||||
|
||||
{/* ===== SEPARATOR: DATA PER HARI ===== */}
|
||||
@@ -243,7 +243,7 @@ const WeightMonitoringPage: React.FC<{ onSettings: () => void }> = ({ onSettings
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DailyDetailPanel row={selectedRow} totalDays={totalDays} />
|
||||
<DailyDetailPanel row={selectedRow} docWeight={docWeight} />
|
||||
|
||||
{/* Riwayat lengkap */}
|
||||
<div className="mt-6">
|
||||
|
||||
Reference in new issue
Block a user