@@ -90,7 +136,6 @@ const withInvoicePreviewTemplateProps = (
...brandingState,
...values,
};
-
return ;
};
};
diff --git a/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeTabs.tsx b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeTabs.tsx
new file mode 100644
index 000000000..5e694d637
--- /dev/null
+++ b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeTabs.tsx
@@ -0,0 +1,28 @@
+import { css } from '@emotion/css';
+import { Tabs, TabsProps } from '@blueprintjs/core';
+
+interface InvoiceCustomizeTabsProps extends TabsProps { }
+
+export function InvoiceCustomizeTabs(props: InvoiceCustomizeTabsProps) {
+ return (
+
+ );
+}
diff --git a/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceipt.tsx b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceipt.tsx
new file mode 100644
index 000000000..2c1c91a51
--- /dev/null
+++ b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceipt.tsx
@@ -0,0 +1,137 @@
+import { Button, Intent } from '@blueprintjs/core';
+import { css } from '@emotion/css';
+import { x } from '@xstyled/emotion';
+import { Group, Stack, StackProps } from '@/components';
+
+export interface InvoiceMailReceiptProps extends StackProps {
+ companyLogoUri?: string;
+ message: string;
+ companyName: string;
+ invoiceNumber: string;
+ dueDate: string;
+ items?: Array<{ label: string; total: string; quantity: string | number }>;
+ total: string;
+ dueAmount: string;
+ totalLabel?: string;
+ dueAmountLabel?: string;
+ viewInvoiceButtonLabel?: string;
+ viewInvoiceButtonOnClick?: () => void;
+ invoiceNumberLabel?: string;
+}
+
+export function InvoiceMailReceipt({
+ companyLogoUri,
+ message,
+ companyName,
+ total,
+ invoiceNumber,
+ dueDate,
+ dueAmount,
+ items,
+ viewInvoiceButtonLabel = 'View Invoice',
+ viewInvoiceButtonOnClick,
+ totalLabel = 'Total',
+ dueAmountLabel = 'Due Amount',
+ invoiceNumberLabel = 'Invoice #',
+ ...restProps
+}: InvoiceMailReceiptProps) {
+ return (
+
+
+ {companyLogoUri && (
+
+ )}
+
+
+ {companyName}
+
+
+
+ {total}
+
+
+
+ {invoiceNumberLabel} {invoiceNumber}
+
+
+
+ Due {dueDate}
+
+
+
+
+
+ {message}
+
+
+
+
+
+ {items?.map((item, key) => (
+
+ {item.label}
+
+ {item.quantity} x {item.total}
+
+
+ ))}
+
+
+ {totalLabel}
+
+ {total}
+
+
+
+
+ {dueAmountLabel}
+
+ {dueAmount}
+
+
+
+
+ );
+}
diff --git a/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceiptPreview.tsx b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceiptPreview.tsx
new file mode 100644
index 000000000..57758679e
--- /dev/null
+++ b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceMailReceiptPreview.tsx
@@ -0,0 +1,38 @@
+import {
+ InvoiceMailReceipt,
+ InvoiceMailReceiptProps,
+} from './InvoiceMailReceipt';
+
+export interface InvoiceMailReceiptPreviewProps
+ extends Partial { }
+
+const receiptMessage = `Hi Ahmed,
+
+Here’s invoice INV-0002 for AED 0.00
+
+The amount outstanding of AED $100,00 is due on 2 October 2024
+
+View your bill online From your online you can print a PDF or pay your outstanding bills,
+
+If you have any questions, please let us know,
+
+Thanks,
+Mohamed
+`;
+
+export function InvoiceMailReceiptPreview(
+ props: InvoiceMailReceiptPreviewProps,
+) {
+ const propsWithDefaults = {
+ message: receiptMessage,
+ companyName: 'Bigcapital Technology, Inc.',
+ total: '$1,000.00',
+ invoiceNumber: 'INV-0001',
+ dueDate: '2 Oct 2024',
+ dueAmount: '$1,000.00',
+ items: [{ label: 'Line Item #1', total: '$1000.00', quantity: 1 }],
+ companyLogoUri: ' ',
+ ...props,
+ };
+ return ;
+}