diff --git a/src/components/pages/production/recording/form/RecordingForm.tsx b/src/components/pages/production/recording/form/RecordingForm.tsx
index 3b98ae3a..15f7fcdf 100644
--- a/src/components/pages/production/recording/form/RecordingForm.tsx
+++ b/src/components/pages/production/recording/form/RecordingForm.tsx
@@ -815,8 +815,14 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
*
-
Jumlah Pakai |
- Catatan |
+ Jumlah Pakai
+
+ *
+
+ |
{type !== 'detail' && Action | }
@@ -859,6 +865,18 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
`stocks.${idx}.product_warehouse_id`,
option?.value || 0
);
+ // Auto-populate notes with product name by finding it in stockProducts data
+ if (option?.value && isResponseSuccess(stockProducts)) {
+ const selectedProduct = stockProducts.data.find(
+ (product) => product.id === option.value
+ );
+ if (selectedProduct) {
+ formik.setFieldValue(
+ `stocks.${idx}.notes`,
+ selectedProduct.product.name
+ );
+ }
+ }
}}
options={unifiedStockProducts}
placeholder='Pilih Produk'
@@ -909,20 +927,7 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
placeholder='Jumlah Pakai'
/>
-
-
- |
- {type !== 'detail' && (
+ {type !== 'detail' && (
|