mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE): Refactor InventoryAdjustmentForm layout for better
responsiveness
This commit is contained in:
@@ -550,9 +550,10 @@ const InventoryAdjustmentForm = ({
|
|||||||
<form
|
<form
|
||||||
onSubmit={handleFormSubmit}
|
onSubmit={handleFormSubmit}
|
||||||
onReset={formik.handleReset}
|
onReset={formik.handleReset}
|
||||||
className='w-full mt-8 flex flex-col gap-6'
|
className='mt-4'
|
||||||
>
|
>
|
||||||
<div className='flex flex-col gap-4'>
|
<div className=''>
|
||||||
|
<div className='grid sm:grid-cols-3 grid-cols-1 sm:gap-4'>
|
||||||
{/* Select Input Location */}
|
{/* Select Input Location */}
|
||||||
<SelectInput
|
<SelectInput
|
||||||
required
|
required
|
||||||
@@ -564,7 +565,8 @@ const InventoryAdjustmentForm = ({
|
|||||||
onMenuScrollToBottom={loadMoreLocations}
|
onMenuScrollToBottom={loadMoreLocations}
|
||||||
isLoading={isLoadingLocationOptions}
|
isLoading={isLoadingLocationOptions}
|
||||||
isError={
|
isError={
|
||||||
formik.touched.location_id && Boolean(formik.errors.location_id)
|
formik.touched.location_id &&
|
||||||
|
Boolean(formik.errors.location_id)
|
||||||
}
|
}
|
||||||
errorMessage={formik.errors.location_id as string}
|
errorMessage={formik.errors.location_id as string}
|
||||||
isDisabled={type === 'detail'}
|
isDisabled={type === 'detail'}
|
||||||
@@ -621,6 +623,7 @@ const InventoryAdjustmentForm = ({
|
|||||||
isClearable
|
isClearable
|
||||||
isSearchable
|
isSearchable
|
||||||
/>
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Select Input Product */}
|
{/* Select Input Product */}
|
||||||
<SelectInput
|
<SelectInput
|
||||||
@@ -667,7 +670,7 @@ const InventoryAdjustmentForm = ({
|
|||||||
{/* Select Input Transaction Subtype */}
|
{/* Select Input Transaction Subtype */}
|
||||||
<SelectInput
|
<SelectInput
|
||||||
required
|
required
|
||||||
label='Sub Tipe Transaksi'
|
label='Jenis Transaksi'
|
||||||
value={selectedTransactionSubtype}
|
value={selectedTransactionSubtype}
|
||||||
onChange={transactionSubtypeChangeHandler}
|
onChange={transactionSubtypeChangeHandler}
|
||||||
options={transactionSubtypeOptions}
|
options={transactionSubtypeOptions}
|
||||||
@@ -719,6 +722,7 @@ const InventoryAdjustmentForm = ({
|
|||||||
isError={formik.touched.price && Boolean(formik.errors.price)}
|
isError={formik.touched.price && Boolean(formik.errors.price)}
|
||||||
errorMessage={formik.errors.price as string}
|
errorMessage={formik.errors.price as string}
|
||||||
readOnly={type === 'detail'}
|
readOnly={type === 'detail'}
|
||||||
|
inputPrefix={'Rp'}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Text Area Input Notes */}
|
{/* Text Area Input Notes */}
|
||||||
@@ -735,13 +739,13 @@ const InventoryAdjustmentForm = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
<AlertErrorList formErrorList={formErrorList} onClose={close} />
|
||||||
<div className='flex flex-row justify-between gap-2 flex-wrap'>
|
<div className='flex flex-col sm:flex-row sm:justify-end gap-2 mt-4'>
|
||||||
{type !== 'detail' && (
|
{type !== 'detail' && (
|
||||||
<div className='flex flex-row justify-end gap-2'>
|
<>
|
||||||
<Button
|
<Button
|
||||||
type='button'
|
type='button'
|
||||||
color='warning'
|
color='warning'
|
||||||
className='px-4'
|
className='px-4 w-full sm:w-auto'
|
||||||
onClick={resetHandler}
|
onClick={resetHandler}
|
||||||
>
|
>
|
||||||
Reset
|
Reset
|
||||||
@@ -751,11 +755,11 @@ const InventoryAdjustmentForm = ({
|
|||||||
color='primary'
|
color='primary'
|
||||||
isLoading={formik.isSubmitting}
|
isLoading={formik.isSubmitting}
|
||||||
disabled={formik.isSubmitting}
|
disabled={formik.isSubmitting}
|
||||||
className='px-4'
|
className='px-4 w-full sm:w-auto'
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{InventoryAdjustmentFormErrorMessage && (
|
{InventoryAdjustmentFormErrorMessage && (
|
||||||
|
|||||||
Reference in New Issue
Block a user