refactor(FE-62): update layout and remove unused delete confirmation in MovementForm

This commit is contained in:
rstubryan
2025-10-20 12:03:58 +07:00
parent c8db992b17
commit f27e34128e
@@ -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,
}}
/>
)}
</> </>
); );
}; };