refactoring: expenses landing list.

refactoring: customers landing list.
refactoring: vendors landing list.
refactoring: manual journals landing list.
This commit is contained in:
a.bouhuolia
2021-02-10 18:35:19 +02:00
parent 6e10ed0721
commit c68b4ca9ba
170 changed files with 2835 additions and 4430 deletions

View File

@@ -105,10 +105,12 @@ function AccountFormDialogContent({
});
};
// Handle request error.
const handleError = (errors) => {
// const errorsTransformed = transformApiErrors(errors);
// setErrors({ ...errorsTransformed });
// setSubmitting(false);
const handleError = (error) => {
const { response: { data: { errors } } } = error;
const errorsTransformed = transformApiErrors(errors);
setErrors({ ...errorsTransformed });
setSubmitting(false);
};
if (accountId) {
editAccountMutate(accountId, form)