From cd9fa31ad71415fb109284080dcf7a18502b4ed8 Mon Sep 17 00:00:00 2001 From: rstubryan Date: Sat, 17 Jan 2026 12:11:30 +0700 Subject: [PATCH] refactor(FE): Disable form fields in edit mode --- .../pages/production/recording/form/RecordingForm.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index 3e40b404..106fc220 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -1660,6 +1660,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { Boolean(formik.errors.record_date) } errorMessage={formik.errors.record_date as string} + disabled={type === 'edit'} /> { placeholder='Pilih Lokasi' isClearable isSearchable + isDisabled={type === 'edit'} /> { onInputChange={setProjectFlockSearchValue} isLoading={isLoadingProjectFlocks} onMenuScrollToBottom={loadMoreProjectFlocks} - isDisabled={!selectedLocation} + isDisabled={!selectedLocation || type === 'edit'} placeholder={ selectedLocation ? 'Pilih Project Flock' @@ -1704,7 +1706,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { onChange={kandangChangeHandler} options={kandangOptions} isLoading={false} - isDisabled={!selectedProjectFlock} + isDisabled={!selectedProjectFlock || type === 'edit'} placeholder={ selectedProjectFlock ? 'Pilih Kandang'