mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Disable product select until kandang chosen
This commit is contained in:
@@ -2444,7 +2444,11 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
);
|
||||
}}
|
||||
options={unifiedStockProducts}
|
||||
placeholder='Pilih Produk'
|
||||
placeholder={
|
||||
!formik.values.project_flock_kandang_id
|
||||
? 'Pilih kandang terlebih dahulu'
|
||||
: 'Pilih Produk'
|
||||
}
|
||||
isLoading={isLoadingStockProducts}
|
||||
onMenuScrollToBottom={loadMoreStockProducts}
|
||||
isError={
|
||||
@@ -2465,7 +2469,10 @@ const RecordingForm = ({ type = 'add', initialValues }: RecordingFormProps) => {
|
||||
wrapper: 'w-full min-w-48',
|
||||
}}
|
||||
isSearchable
|
||||
isDisabled={type === 'detail'}
|
||||
isDisabled={
|
||||
type === 'detail' ||
|
||||
!formik.values.project_flock_kandang_id
|
||||
}
|
||||
isClearable={type !== 'detail'}
|
||||
startAdornment={
|
||||
stock.product_warehouse_id
|
||||
|
||||
Reference in New Issue
Block a user