fix weight ai insight target weight data using mr. mike instead of cp707
This commit is contained in:
1 parent
bc2b260065
commit
05465b0382
5 files changed
+83
-11
No files matched your search
@@ -365,6 +365,14 @@ export const AiInsightCard: React.FC<AiInsightCardProps> = ({
|
||||
contextPayload.uniformity_persen = scopedMetrics.uniformity_persen;
|
||||
contextPayload.pakan_kumulatif_karung = scopedMetrics.pakan_kumulatif_karung;
|
||||
|
||||
const currentTarget =
|
||||
scopedMetrics.weightSeries.find((row) => row.hari === contextPayload.hari_ke)?.target ??
|
||||
[...scopedMetrics.weightSeries].reverse().find((row) => row.target != null)?.target ??
|
||||
null;
|
||||
if (currentTarget != null && currentTarget > 0) {
|
||||
contextPayload.target_bw_gram = currentTarget;
|
||||
}
|
||||
|
||||
// EEF series for trend computation (eef, dashboard, end_cycle topics)
|
||||
if (topic === 'eef' || topic === 'dashboard' || reportType === 'end_cycle') {
|
||||
contextPayload.eef_seri = scopedMetrics.kpiSeries
|
||||
|
||||
Reference in new issue
Block a user