fix: Add mising address in branding templates customize

This commit is contained in:
Ahmed Bouhuolia
2024-09-14 22:52:37 +02:00
parent 70551bee30
commit 8566422ce3
5 changed files with 49 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
showBilledFromAddress?: boolean;
billedFromAddress?: Array<string>;
billedToLabel?: string;
// Totals
total?: string;
@@ -77,6 +78,7 @@ export function EstimatePaperTemplate({
],
showBilledFromAddress = true,
showBilledToAddress = true,
billedToLabel = 'Billed To',
total = '$1000.00',
totalLabel = 'Total',
@@ -151,7 +153,9 @@ export function EstimatePaperTemplate({
/>
)}
{showBilledToAddress && (
<PaperTemplate.Address items={billedToAddress} />
<PaperTemplate.Address
items={[<strong>{billedToLabel}</strong>, ...billedToAddress]}
/>
)}
</Group>