mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE-208,212): enhance product selection and quantity input handling in PurchaseRequestForm based on supplier selection
This commit is contained in:
@@ -712,9 +712,17 @@ const PurchaseRequestForm = ({
|
|||||||
errorMessage={
|
errorMessage={
|
||||||
isRepeaterInputError(idx, 'product_id').errorMessage
|
isRepeaterInputError(idx, 'product_id').errorMessage
|
||||||
}
|
}
|
||||||
isDisabled={type === 'detail'}
|
isDisabled={
|
||||||
isClearable={type !== 'detail'}
|
type === 'detail' || !formik.values.supplier_id
|
||||||
placeholder='Pilih Produk'
|
}
|
||||||
|
isClearable={
|
||||||
|
type !== 'detail' && !!formik.values.supplier_id
|
||||||
|
}
|
||||||
|
placeholder={
|
||||||
|
!formik.values.supplier_id
|
||||||
|
? 'Pilih Vendor terlebih dahulu'
|
||||||
|
: 'Pilih Produk'
|
||||||
|
}
|
||||||
className={{
|
className={{
|
||||||
wrapper: 'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
wrapper: 'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
||||||
}}
|
}}
|
||||||
@@ -729,8 +737,17 @@ const PurchaseRequestForm = ({
|
|||||||
handlePurchaseItemChange(idx, 'qty', e.target.value)
|
handlePurchaseItemChange(idx, 'qty', e.target.value)
|
||||||
}
|
}
|
||||||
onBlur={formik.handleBlur}
|
onBlur={formik.handleBlur}
|
||||||
placeholder='Masukkan kuantitas'
|
placeholder={
|
||||||
readOnly={type === 'detail'}
|
!formik.values.supplier_id
|
||||||
|
? 'Pilih Vendor terlebih dahulu'
|
||||||
|
: 'Masukkan kuantitas'
|
||||||
|
}
|
||||||
|
readOnly={
|
||||||
|
type === 'detail' || !formik.values.supplier_id
|
||||||
|
}
|
||||||
|
disabled={
|
||||||
|
type === 'detail' || !formik.values.supplier_id
|
||||||
|
}
|
||||||
allowNegative={false}
|
allowNegative={false}
|
||||||
decimalScale={0}
|
decimalScale={0}
|
||||||
isError={isRepeaterInputError(idx, 'qty').isError}
|
isError={isRepeaterInputError(idx, 'qty').isError}
|
||||||
|
|||||||
Reference in New Issue
Block a user