ai insight rework #2
This commit is contained in:
1 parent
9d76f54d33
commit
e1987d6999
39 files changed
+2311
-830
No files matched your search
@@ -228,7 +228,7 @@ const FcrDashboardPage: React.FC<{ onSettings: () => void }> = ({ onSettings })
|
||||
.map((row) => ({
|
||||
day: row.age,
|
||||
feedTotal: row.feed_total,
|
||||
iotWeight: row.iot_weight > 0 ? row.iot_weight : weightByAge.get(row.age) ?? null,
|
||||
iotWeight: row.iot_weight > 0 ? row.iot_weight : (weightByAge.get(row.age) ?? null),
|
||||
chickenLife: Math.max(row.chicken_life - row.harvest_total, 0),
|
||||
harvestWeightKg: row.harvest_weight_total / 1000,
|
||||
fcr: row.fcr > 0 ? row.fcr : null,
|
||||
@@ -323,10 +323,12 @@ const FcrDashboardPage: React.FC<{ onSettings: () => void }> = ({ onSettings })
|
||||
agg: 'lastValid',
|
||||
replaces: 'fcr_terakhir',
|
||||
},
|
||||
// Cumulative metrics: 0 is valid (not started yet), use 'last' with emptyAs: 0
|
||||
pakanTerakhir_karung: {
|
||||
field: 'pakan_karung',
|
||||
agg: 'lastValid',
|
||||
agg: 'last',
|
||||
replaces: 'pakan_karung_terakhir',
|
||||
emptyAs: 0,
|
||||
},
|
||||
bobotIotTerakhir_gram: {
|
||||
field: 'bobot_iot_gram',
|
||||
@@ -335,10 +337,17 @@ const FcrDashboardPage: React.FC<{ onSettings: () => void }> = ({ onSettings })
|
||||
},
|
||||
ayamHidupTerakhir_ekor: {
|
||||
field: 'ayam_hidup_ekor',
|
||||
agg: 'lastValid',
|
||||
agg: 'last',
|
||||
replaces: 'ayam_hidup_ekor',
|
||||
emptyAs: 0,
|
||||
},
|
||||
},
|
||||
drop: [
|
||||
'fcr_terakhir',
|
||||
'pakan_karung_terakhir',
|
||||
'bobot_iot_gram_terakhir',
|
||||
'ayam_hidup_ekor',
|
||||
],
|
||||
}}
|
||||
/>
|
||||
) : (
|
||||
|
||||
Reference in new issue
Block a user