-
-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #742 from bigcapitalhq/fix-send-invoice-addresses
fix: send invoice receipt addresses
- Loading branch information
Showing
6 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ export function InvoiceSendMailHeaderPreview() { | |
const mailSubject = useSendInvoiceMailSubject(); | ||
const { invoiceMailState } = useInvoiceSendMailBoot(); | ||
const toAddresses = useMailHeaderToAddresses(); | ||
const fromAddresses = useMailHeaderFromAddresses(); | ||
|
||
return ( | ||
<Stack | ||
|
@@ -44,14 +45,12 @@ export function InvoiceSendMailHeaderPreview() { | |
|
||
<Stack spacing={2}> | ||
<Group spacing={2}> | ||
<Box fontWeight={600}>Ahmed </Box> | ||
<Box color={'#738091'}> | ||
<[email protected]> | ||
</Box> | ||
<Box fontWeight={600}>{invoiceMailState?.companyName} </Box> | ||
<Box color={'#738091'}>{fromAddresses}</Box> | ||
</Group> | ||
|
||
<Box fontSize={'sm'} color={'#738091'}> | ||
Reply to: {invoiceMailState?.companyName} {toAddresses}; | ||
Send to: {invoiceMailState?.customerName} {toAddresses}; | ||
</Box> | ||
</Stack> | ||
</Group> | ||
|
@@ -80,3 +79,13 @@ export const useMailHeaderToAddresses = () => { | |
|
||
return useMemo(() => to?.map((email) => '<' + email + '>').join(' '), [to]); | ||
}; | ||
|
||
export const useMailHeaderFromAddresses = () => { | ||
const { invoiceMailState } = useInvoiceSendMailBoot(); | ||
const from = invoiceMailState?.from; | ||
|
||
return useMemo( | ||
() => from?.map((email) => '<' + email + '>').join(', '), | ||
[from], | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters