mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
fix: mail services
This commit is contained in:
@@ -32,7 +32,7 @@ function EstimateMailDialogFormRoot({
|
||||
closeDialog,
|
||||
}) {
|
||||
const { mutateAsync: sendEstimateMail } = useSendSaleEstimateMail();
|
||||
const { mailOptions, saleEstimateId, redirectToEstimatesList } =
|
||||
const { mailOptions, saleEstimateId, } =
|
||||
useEstimateMailDialogBoot();
|
||||
|
||||
const initialValues = transformMailFormToInitialValues(
|
||||
|
||||
@@ -25,8 +25,8 @@ export function EstimateMailDialogFormContent({
|
||||
<Form>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<MailNotificationForm
|
||||
fromAddresses={mailOptions.from_addresses}
|
||||
toAddresses={mailOptions.to_addresses}
|
||||
fromAddresses={mailOptions.from_options}
|
||||
toAddresses={mailOptions.to_options}
|
||||
/>
|
||||
<AttachFormGroup name={'attachEstimate'} inline>
|
||||
<FSwitch name={'attachEstimate'} label={'Attach Estimate'} />
|
||||
|
||||
@@ -22,6 +22,7 @@ interface PaymentMailDialogBootProps {
|
||||
*/
|
||||
function PaymentMailDialogBoot({
|
||||
paymentReceiveId,
|
||||
redirectToPaymentsList,
|
||||
...props
|
||||
}: PaymentMailDialogBootProps) {
|
||||
const { data: mailOptions, isLoading: isMailOptionsLoading } =
|
||||
|
||||
@@ -25,8 +25,8 @@ export function PaymentMailDialogFormContent({
|
||||
<Form>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<MailNotificationForm
|
||||
fromAddresses={mailOptions.from_addresses}
|
||||
toAddresses={mailOptions.to_addresses}
|
||||
fromAddresses={mailOptions.from_options}
|
||||
toAddresses={mailOptions.to_options}
|
||||
/>
|
||||
<AttachFormGroup name={'attachPayment'} inline>
|
||||
<FSwitch name={'attachPayment'} label={'Attach Payment'} />
|
||||
|
||||
@@ -25,8 +25,8 @@ export function ReceiptMailDialogFormContent({
|
||||
<Form>
|
||||
<div className={Classes.DIALOG_BODY}>
|
||||
<MailNotificationForm
|
||||
fromAddresses={mailOptions.from_addresses}
|
||||
toAddresses={mailOptions.to_addresses}
|
||||
fromAddresses={mailOptions.from_options}
|
||||
toAddresses={mailOptions.to_options}
|
||||
/>
|
||||
<AttachFormGroup name={'attachReceipt:'} inline>
|
||||
<FSwitch name={'attachReceipt:'} label={'Attach Receipt'} />
|
||||
|
||||
@@ -66,7 +66,7 @@ export function MailNotificationForm({
|
||||
</FFormGroup>
|
||||
</HeaderBox>
|
||||
|
||||
<MailMessageEditor name={'body'} />
|
||||
<MailMessageEditor name={'message'} />
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ export const initialMailNotificationValues = {
|
||||
from: [],
|
||||
to: [],
|
||||
subject: '',
|
||||
body: '',
|
||||
message: '',
|
||||
};
|
||||
|
||||
export interface MailNotificationFormValues {
|
||||
@@ -26,7 +26,7 @@ export const transformMailFormToRequest = (
|
||||
};
|
||||
|
||||
/**
|
||||
* Transformes the mail options response values to form initial values.
|
||||
* Transforms the mail options response values to form initial values.
|
||||
* @param {any} mailOptions
|
||||
* @param {MailNotificationFormValues} initialValues
|
||||
* @returns {MailNotificationFormValues}
|
||||
|
||||
Reference in New Issue
Block a user