From 069ab98da155968b6be5a0f75320dbc0a31f8f8c Mon Sep 17 00:00:00 2001 From: rstubryan Date: Thu, 6 Nov 2025 15:19:01 +0700 Subject: [PATCH] refactor(FE-170): refactor RecordingForm navigation and action buttons for improved user experience --- .../recording/form/RecordingForm.tsx | 143 +++++++++--------- 1 file changed, 73 insertions(+), 70 deletions(-) diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx index 922f318e..4101d3d6 100644 --- a/src/components/pages/production/recording/form/RecordingForm.tsx +++ b/src/components/pages/production/recording/form/RecordingForm.tsx @@ -1350,23 +1350,6 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { ))} - - {/* Action buttons for multi-form navigation */} - {type === 'detail' && ( -
- -
- )} )} @@ -2303,7 +2286,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { product.value === egg.product_warehouse_id ) || null @@ -2458,66 +2441,86 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => { )} )} - {type !== 'detail' && ( -
- - - {isLayingCategory && ( +
+ {type !== 'detail' && ( + <> + - )} -
- )} + {isLayingCategory && ( + + )} + + )} + + {type === 'detail' && isLayingCategory && ( + + )} +
{recordingFormErrorMessage && (