Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop

This commit is contained in:
a.bouhuolia
2021-11-11 11:27:06 +02:00
3 changed files with 12 additions and 3 deletions

View File

@@ -27,6 +27,8 @@ function NotifyEstimateViaSMSForm({
createNotifyEstimateBySMSMutate,
} = useEstimateViaSMSContext();
const [calloutCode, setCalloutCode] = React.useState([]);
// Handles the form submit.
const handleFormSubmit = (values, { setSubmitting, setErrors }) => {
setSubmitting(true);
@@ -47,7 +49,7 @@ function NotifyEstimateViaSMSForm({
},
}) => {
if (errors) {
transformErrors(errors, { setErrors });
transformErrors(errors, { setErrors, setCalloutCode });
}
setSubmitting(false);
};
@@ -70,6 +72,7 @@ function NotifyEstimateViaSMSForm({
notificationTypes={notificationType}
onCancel={handleFormCancel}
onSubmit={handleFormSubmit}
calloutCodes={calloutCode}
/>
);
}

View File

@@ -30,6 +30,8 @@ function NotifyPaymentReceiveViaSMSForm({
createNotifyPaymentReceivetBySMSMutate,
} = useNotifyPaymentReceiveViaSMSContext();
const [calloutCode, setCalloutCode] = React.useState([]);
// Handles the form submit.
const handleFormSubmit = (values, { setSubmitting, setErrors }) => {
// Handle request response success.
@@ -50,7 +52,7 @@ function NotifyPaymentReceiveViaSMSForm({
},
}) => {
if (errors) {
transformErrors(errors, { setErrors });
transformErrors(errors, { setErrors, setCalloutCode });
}
setSubmitting(false);
};
@@ -75,6 +77,7 @@ function NotifyPaymentReceiveViaSMSForm({
notificationTypes={notificationType}
onSubmit={handleFormSubmit}
onCancel={handleFormCancel}
calloutCodes={calloutCode}
/>
);
}

View File

@@ -30,6 +30,8 @@ function NotifyReceiptViaSMSForm({
createNotifyReceiptBySMSMutate,
} = useNotifyReceiptViaSMSContext();
const [calloutCode, setCalloutCode] = React.useState([]);
// Handles the form submit.
const handleFormSubmit = (values, { setSubmitting, setErrors }) => {
// Handle request response success.
@@ -48,7 +50,7 @@ function NotifyReceiptViaSMSForm({
},
}) => {
if (errors) {
transformErrors(errors, { setErrors });
transformErrors(errors, { setErrors, setCalloutCode });
}
setSubmitting(false);
};
@@ -74,6 +76,7 @@ function NotifyReceiptViaSMSForm({
notificationTypes={notificationType}
onSubmit={handleFormSubmit}
onCancel={handleFormCancel}
calloutCodes={calloutCode}
/>
);
}