mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +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',
|
||||
idx
|
||||
)}
|
||||
className={{
|
||||
wrapper:
|
||||
'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
@@ -943,7 +947,8 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
||||
}
|
||||
readOnly={type === 'detail'}
|
||||
className={{
|
||||
wrapper: 'w-full min-w-48',
|
||||
wrapper:
|
||||
'w-full min-w-52 md:min-w-72 lg:min-w-80',
|
||||
}}
|
||||
/>
|
||||
</td>
|
||||
@@ -1315,12 +1320,6 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
||||
<FormActions<MovementFormValues>
|
||||
type={type}
|
||||
formik={formik}
|
||||
editUrl={
|
||||
initialValues
|
||||
? `/inventory/movement/detail/edit/?movementId=${initialValues.id}`
|
||||
: undefined
|
||||
}
|
||||
onDelete={deleteMovementClickHandler}
|
||||
disableSubmit={hasInvalidQty || hasExceededStock}
|
||||
/>
|
||||
|
||||
@@ -1336,23 +1335,6 @@ const MovementForm = ({ type = 'add', initialValues }: MovementFormProps) => {
|
||||
)}
|
||||
</form>
|
||||
</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