diff --git a/packages/webapp/src/containers/BrandingTemplates/BrandingTemplateBoot.tsx b/packages/webapp/src/containers/BrandingTemplates/BrandingTemplateBoot.tsx index da653c4cf..5cb9d8441 100644 --- a/packages/webapp/src/containers/BrandingTemplates/BrandingTemplateBoot.tsx +++ b/packages/webapp/src/containers/BrandingTemplates/BrandingTemplateBoot.tsx @@ -11,7 +11,7 @@ interface PdfTemplateContextValue { templateId: number | string; // Pdf template. - pdfTemplate: GetPdfTemplateResponse; + pdfTemplate: GetPdfTemplateResponse | undefined; isPdfTemplateLoading: boolean; // Branding state. @@ -42,8 +42,7 @@ export const BrandingTemplateBoot = ({ const isLoading = isPdfTemplateLoading || isBrandingTemplateLoading || - !brandingTemplateState || - !pdfTemplate; + !brandingTemplateState; if (isLoading) { return ; diff --git a/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx index 8a8144e36..edea835e7 100644 --- a/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx +++ b/packages/webapp/src/containers/Sales/Estimates/EstimateCustomize/EstimateCustomizeContent.tsx @@ -49,7 +49,7 @@ function EstimatePaperTemplateFormConnected() { const { values } = useFormikContext(); const { brandingState } = useElementCustomizeContext() - const mergedProps: EstimatePaperTemplateProps = { ...values, ...brandingState } + const mergedProps: EstimatePaperTemplateProps = { ...brandingState, ...values, } return ; } diff --git a/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeContent.tsx b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeContent.tsx index 2b021b324..17b452265 100644 --- a/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeContent.tsx +++ b/packages/webapp/src/containers/Sales/Invoices/InvoiceCustomize/InvoiceCustomizeContent.tsx @@ -63,7 +63,7 @@ const withInvoicePreviewTemplateProps =

( const { values } = useFormikContext(); const { brandingState, } = useElementCustomizeContext(); - const mergedProps: InvoicePaperTemplateProps = { ...brandingState, ...values } + const mergedProps: InvoicePaperTemplateProps = { ...brandingState, ...values }; return ; };