fix: resources table issues.

This commit is contained in:
a.bouhuolia
2021-02-21 16:03:17 +02:00
parent 350a148747
commit f96166514b
13 changed files with 68 additions and 29 deletions

View File

@@ -101,7 +101,9 @@ function PaymentMadeForm() {
const onError = ({
response: {
error: { data: errors },
error: {
data: { errors },
},
},
}) => {
const getError = (errorType) => errors.find((e) => e.type === errorType);
@@ -116,9 +118,7 @@ function PaymentMadeForm() {
};
if (!isNewMode) {
editPaymentMadeMutate([paymentMadeId, form])
.then(onSaved)
.catch(onError);
editPaymentMadeMutate([paymentMadeId, form]).then(onSaved).catch(onError);
} else {
createPaymentMadeMutate(form).then(onSaved).catch(onError);
}