mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
refactor(FE-62): update layout and remove unused delete confirmation in MovementForm
This commit is contained in:
@@ -914,6 +914,10 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
'product',
|
'product',
|
||||||
idx
|
idx
|
||||||
)}
|
)}
|
||||||
|
className={{
|
||||||
|
wrapper:
|
||||||
|
'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -943,7 +947,8 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
}
|
}
|
||||||
readOnly={type === 'detail'}
|
readOnly={type === 'detail'}
|
||||||
className={{
|
className={{
|
||||||
wrapper: 'w-full min-w-48',
|
wrapper:
|
||||||
|
'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
@@ -1315,12 +1320,6 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
<FormActions<MovementFormValues>
|
<FormActions<MovementFormValues>
|
||||||
type={type}
|
type={type}
|
||||||
formik={formik}
|
formik={formik}
|
||||||
editUrl={
|
|
||||||
initialValues
|
|
||||||
? `/inventory/movement/detail/edit/?movementId=${initialValues.id}`
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
onDelete={deleteMovementClickHandler}
|
|
||||||
disableSubmit={hasInvalidQty || hasExceededStock}
|
disableSubmit={hasInvalidQty || hasExceededStock}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -1336,23 +1335,6 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
|||||||
)}
|
)}
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{type !== 'add' && (
|
|
||||||
<ConfirmationModal
|
|
||||||
ref={deleteModal.ref}
|
|
||||||
type='error'
|
|
||||||
text={`Apakah anda yakin ingin menghapus data Movement ini?`}
|
|
||||||
secondaryButton={{
|
|
||||||
text: 'Tidak',
|
|
||||||
}}
|
|
||||||
primaryButton={{
|
|
||||||
text: 'Ya',
|
|
||||||
color: 'error',
|
|
||||||
isLoading: isDeleteLoading,
|
|
||||||
onClick: confirmationModalDeleteClickHandler,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user