From d786b7b5ba8795565aedad172554419f4f0c3160 Mon Sep 17 00:00:00 2001
From: rstubryan
Date: Thu, 15 Jan 2026 15:41:11 +0700
Subject: [PATCH] feat(FE): Add warehouse display and standard detail modals
---
.../recording/form/RecordingForm.tsx | 198 +++++++++++++++++-
1 file changed, 196 insertions(+), 2 deletions(-)
diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx
index 46fba9af..13267c22 100644
--- a/src/components/pages/production/recording/form/RecordingForm.tsx
+++ b/src/components/pages/production/recording/form/RecordingForm.tsx
@@ -20,7 +20,7 @@ import SelectInput, {
import CheckboxInput from '@/components/input/CheckboxInput';
import ConfirmationModal from '@/components/modal/ConfirmationModal';
import ConfirmationModalWithNotes from '@/components/modal/ConfirmationModalWithNotes';
-import { useModal } from '@/components/Modal';
+import Modal, { useModal } from '@/components/Modal';
import AlertErrorList from '@/components/helper/form/FormErrors';
import {
@@ -121,6 +121,8 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
const approveModal = useModal();
const rejectModal = useModal();
const deleteModal = useModal();
+ const fcrStandardModal = useModal();
+ const productionStandardModal = useModal();
const isRecordingApproved = useCallback((recording?: Recording) => {
return (
@@ -1565,9 +1567,20 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
: '-'}
+
+
Gudang
+
+ {initialValues.warehouse?.name || '-'}
+
+
Hari
-
Hari ke-{initialValues.day}
+
+ Hari ke-{initialValues.day} (Minggu ke-
+ {initialValues.project_flock?.production_standart?.week ||
+ '-'}
+ )
+
Kategori
@@ -1604,6 +1617,41 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
+
+
Standard FCR
+
+ fcrStandardModal.openModal()}
+ >
+ {initialValues.project_flock?.fcr?.name || '-'}
+
+
+
+
+
+ Standard Produksi
+
+
+ productionStandardModal.openModal()}
+ >
+ {initialValues.project_flock?.production_standart
+ ?.name || '-'}
+
+
+
)}
@@ -2663,6 +2711,152 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
)}
>
)}
+
+ {/* FCR Standard Modal */}
+
+
+ {/* Modal Header */}
+
+
+
+
Detail Standard FCR
+
+
+
+
+
+
Nama Standard
+
+ {initialValues?.project_flock?.fcr?.name || '-'}
+
+
+
+
FCR Standard
+
+ {initialValues?.project_flock?.fcr?.fcr_std != null
+ ? formatNumber(
+ initialValues?.project_flock?.fcr?.fcr_std || 0
+ )
+ : '-'}
+
+
+
+
+
+
+ {/* Production Standard Modal */}
+
+
+ {/* Modal Header */}
+
+
+
+
Detail Standard Produksi
+
+
+
+
+
+
Nama Standard
+
+ {initialValues?.project_flock?.production_standart?.name || '-'}
+
+
+
+
Minggu
+
+ {initialValues?.project_flock?.production_standart?.week || '-'}
+
+
+
+
+ Hen Day Standard (%)
+
+
+ {initialValues?.project_flock?.production_standart
+ ?.hen_day_std != null
+ ? `${initialValues?.project_flock?.production_standart?.hen_day_std}%`
+ : '-'}
+
+
+
+
+ Hen House Standard (%)
+
+
+ {initialValues?.project_flock?.production_standart
+ ?.hen_house_std != null
+ ? `${initialValues?.project_flock?.production_standart?.hen_house_std}%`
+ : '-'}
+
+
+
+
+ Feed Intake Standard (KG)
+
+
+ {initialValues?.project_flock?.production_standart
+ ?.feed_intake_std != null
+ ? formatNumber(
+ initialValues?.project_flock?.production_standart
+ ?.feed_intake_std || 0
+ )
+ : '-'}
+
+
+
+
Egg Mass Standard
+
+ {initialValues?.project_flock?.production_standart
+ ?.egg_mass_std != null
+ ? formatNumber(
+ initialValues?.project_flock?.production_standart
+ ?.egg_mass_std || 0
+ )
+ : '-'}
+
+
+
+
+ Egg Weight Standard (KG)
+
+
+ {initialValues?.project_flock?.production_standart
+ ?.egg_weight_std != null
+ ? formatNumber(
+ initialValues?.project_flock?.production_standart
+ ?.egg_weight_std || 0
+ )
+ : '-'}
+
+
+
+
+
>
);
};