diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index f83e9286..eec9156c 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -1540,7 +1540,13 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { {/* FCR & Mortality Metrics - Detail View Only */} {type === 'detail' && initialValues && ( -
+
{/* FCR Section */}
@@ -1557,24 +1563,9 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { STANDAR - - TOTAL PEMAKAIAN PAKAN (KG) - - - Bobot - - - {initialValues.avg_daily_gain?.toFixed(2) || '-'} - - - - - - {formatNumber(initialValues.cum_intake || 0)} - - FCR @@ -1583,7 +1574,17 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { - - + + + Feed Intake (KG) + + + {formatNumber(initialValues.feed_intake || 0)} + + + + {formatNumber(initialValues.feed_intake_std || 0)} + @@ -1601,12 +1602,6 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { - - - @@ -1645,19 +1634,13 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { - -
- JUMLAH AYAM - { Total - (%) - - Total - (%)
- {formatNumber(initialValues.total_chick_qty || 0)} + {formatNumber(initialValues.hand_day || 0)} - - - - - {formatNumber(initialValues.daily_gain || 0)} - - - - + {initialValues.hand_day_std !== undefined + ? `${initialValues.hand_day_std}%` + : '-'} @@ -1674,6 +1657,60 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
+ + {/* Egg Production Section - Only for LAYING category */} + {type === 'detail' && + initialValues && + initialValues.project_flock_category === 'LAYING' && ( +
+
+ + Produksi Telur + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ AKTUAL + + STANDAR +
Egg Mesh + + {formatNumber(initialValues.egg_mesh || 0)} + + + {formatNumber(initialValues.egg_mesh_std || 0)} +
+ Egg Weight (KG) + + + {formatNumber(initialValues.egg_weight || 0)} + + + {formatNumber(initialValues.egg_weight_std || 0)} +
+
+
+ )}
)} diff --git a/src/types/api/production/recording.d.ts b/src/types/api/production/recording.d.ts index cda76e47..83bdf3f2 100644 --- a/src/types/api/production/recording.d.ts +++ b/src/types/api/production/recording.d.ts @@ -4,12 +4,22 @@ import { ProductWarehouse } from '@/types/api/inventory/product-warehouse'; export type ProductionMetrics = { total_depletion_qty: number; cum_depletion_rate: number; - daily_gain: number; - avg_daily_gain: number; cum_intake: number; fcr_value: number; total_chick_qty: number; - cum_depletion: number; + hand_day?: number; + hand_house?: number; + feed_intake?: number; + egg_mesh?: number; + egg_weight?: number; + hand_day_std?: number; + hand_house_std?: number; + feed_intake_std?: number; + egg_mesh_std?: number; + egg_weight_std?: number; + daily_gain?: number; + avg_daily_gain?: number; + cum_depletion?: number; }; export type BaseRecording = {