mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +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={
|
||||
isRepeaterInputError(idx, 'product_id').errorMessage
|
||||
}
|
||||
isDisabled={type === 'detail'}
|
||||
isClearable={type !== 'detail'}
|
||||
placeholder='Pilih Produk'
|
||||
isDisabled={
|
||||
type === 'detail' || !formik.values.supplier_id
|
||||
}
|
||||
isClearable={
|
||||
type !== 'detail' && !!formik.values.supplier_id
|
||||
}
|
||||
placeholder={
|
||||
!formik.values.supplier_id
|
||||
? 'Pilih Vendor terlebih dahulu'
|
||||
: 'Pilih Produk'
|
||||
}
|
||||
className={{
|
||||
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)
|
||||
}
|
||||
onBlur={formik.handleBlur}
|
||||
placeholder='Masukkan kuantitas'
|
||||
readOnly={type === 'detail'}
|
||||
placeholder={
|
||||
!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}
|
||||
decimalScale={0}
|
||||
isError={isRepeaterInputError(idx, 'qty').isError}
|
||||
|
||||
Reference in New Issue
Block a user