mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: estimate, receipt, credit note mail preview
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import {
|
||||
EstimatePaperTemplate,
|
||||
EstimatePaperTemplateProps,
|
||||
} from '../components/EstimatePaperTemplate';
|
||||
import { renderSSR } from './render-ssr';
|
||||
|
||||
/**
|
||||
* Renders estimate paper template html.
|
||||
* @param {EstimatePaperTemplateProps} props
|
||||
* @returns {string}
|
||||
*/
|
||||
export const renderEstimatePaperTemplateHtml = (
|
||||
props: EstimatePaperTemplateProps
|
||||
) => {
|
||||
return renderSSR(<EstimatePaperTemplate {...props} />);
|
||||
};
|
||||
@@ -1,13 +1,7 @@
|
||||
import { renderToString } from 'react-dom/server';
|
||||
import createCache from '@emotion/cache';
|
||||
import { css } from '@emotion/css';
|
||||
import {
|
||||
InvoicePaperTemplate,
|
||||
InvoicePaperTemplateProps,
|
||||
} from '../components/InvoicePaperTemplate';
|
||||
import { PaperTemplateLayout } from '../components/PaperTemplateLayout';
|
||||
import { extractCritical } from '@emotion/server';
|
||||
import { OpenSansFontLink } from '../constants';
|
||||
import { renderSSR } from './render-ssr';
|
||||
|
||||
export const renderInvoicePaperTemplateHtml = (
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import {
|
||||
PaymentReceivedPaperTemplateProps,
|
||||
PaymentReceivedPaperTemplate,
|
||||
} from '../components/PaymentReceivedPaperTemplate';
|
||||
import { renderSSR } from './render-ssr';
|
||||
|
||||
export const renderPaymentReceivedPaperTemplateHtml = (
|
||||
props: PaymentReceivedPaperTemplateProps
|
||||
) => {
|
||||
return renderSSR(<PaymentReceivedPaperTemplate {...props} />);
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
import {
|
||||
ReceiptPaperTemplate,
|
||||
ReceiptPaperTemplateProps,
|
||||
} from '../components/ReceiptPaperTemplate';
|
||||
import { renderSSR } from './render-ssr';
|
||||
|
||||
export const renderReceiptPaperTemplateHtml = (
|
||||
props: ReceiptPaperTemplateProps
|
||||
) => {
|
||||
return renderSSR(<ReceiptPaperTemplate {...props} />);
|
||||
};
|
||||
Reference in New Issue
Block a user