feat: mail notifications of sales transactions

This commit is contained in:
Ahmed Bouhuolia
2023-12-30 17:49:02 +02:00
parent 0d15c16d40
commit ab7abfea35
25 changed files with 336 additions and 221 deletions

View File

@@ -29,6 +29,7 @@ function PaymentMailDialogBoot({
const provider = {
mailOptions,
isMailOptionsLoading,
paymentReceiveId
};
return (

View File

@@ -28,7 +28,7 @@ export function PaymentMailDialogFormRoot({
// #withDialogActions
closeDialog,
}) {
const { mailOptions, paymentId } = usePaymentMailDialogBoot();
const { mailOptions, paymentReceiveId } = usePaymentMailDialogBoot();
const { mutateAsync: sendPaymentMail } = useSendPaymentReceiveMail();
const initialValues = transformMailFormToInitialValues(
@@ -43,7 +43,7 @@ export function PaymentMailDialogFormRoot({
const reqValues = transformMailFormToRequest(values);
setSubmitting(true);
sendPaymentMail([paymentId, reqValues])
sendPaymentMail([paymentReceiveId, reqValues])
.then(() => {
AppToaster.show({
message: 'The mail notification has been sent successfully.',