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
|
||||
onSubmit={handleFormSubmit}
|
||||
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 */}
|
||||
<SelectInput
|
||||
required
|
||||
@@ -564,7 +565,8 @@ const InventoryAdjustmentForm = ({
|
||||
onMenuScrollToBottom={loadMoreLocations}
|
||||
isLoading={isLoadingLocationOptions}
|
||||
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}
|
||||
isDisabled={type === 'detail'}
|
||||
@@ -621,6 +623,7 @@ const InventoryAdjustmentForm = ({
|
||||
isClearable
|
||||
isSearchable
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Select Input Product */}
|
||||
<SelectInput
|
||||
@@ -667,7 +670,7 @@ const InventoryAdjustmentForm = ({
|
||||
{/* Select Input Transaction Subtype */}
|
||||
<SelectInput
|
||||
required
|
||||
label='Sub Tipe Transaksi'
|
||||
label='Jenis Transaksi'
|
||||
value={selectedTransactionSubtype}
|
||||
onChange={transactionSubtypeChangeHandler}
|
||||
options={transactionSubtypeOptions}
|
||||
@@ -719,6 +722,7 @@ const InventoryAdjustmentForm = ({
|
||||
isError={formik.touched.price && Boolean(formik.errors.price)}
|
||||
errorMessage={formik.errors.price as string}
|
||||
readOnly={type === 'detail'}
|
||||
inputPrefix={'Rp'}
|
||||
/>
|
||||
|
||||
{/* Text Area Input Notes */}
|
||||
@@ -735,13 +739,13 @@ const InventoryAdjustmentForm = ({
|
||||
/>
|
||||
</div>
|
||||
<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' && (
|
||||
<div className='flex flex-row justify-end gap-2'>
|
||||
<>
|
||||
<Button
|
||||
type='button'
|
||||
color='warning'
|
||||
className='px-4'
|
||||
className='px-4 w-full sm:w-auto'
|
||||
onClick={resetHandler}
|
||||
>
|
||||
Reset
|
||||
@@ -751,11 +755,11 @@ const InventoryAdjustmentForm = ({
|
||||
color='primary'
|
||||
isLoading={formik.isSubmitting}
|
||||
disabled={formik.isSubmitting}
|
||||
className='px-4'
|
||||
className='px-4 w-full sm:w-auto'
|
||||
>
|
||||
Submit
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
{InventoryAdjustmentFormErrorMessage && (
|
||||
|
||||
Reference in New Issue
Block a user