fix: pdf templates server-side rendered

This commit is contained in:
Ahmed Bouhuolia
2024-09-30 11:15:05 +02:00
parent 863c7ad99f
commit 783387dce6
10 changed files with 46 additions and 42 deletions

View File

@@ -120,19 +120,18 @@ PaperTemplate.MutedText = () => {};
PaperTemplate.Text = () => {};
PaperTemplate.AddressesGroup = (props: GroupProps) => {
return <Group spacing={10} {...props} className={styles.addressRoot} />;
};
PaperTemplate.Address = ({
children,
}: {
children: React.ReactNode;
}) => {
return (
<Box>
{children}
</Box>
<Group
spacing={10}
align={'flex-start'}
{...props}
className={styles.addressRoot}
/>
);
};
PaperTemplate.Address = ({ children }: { children: React.ReactNode }) => {
return <Box>{children}</Box>;
};
PaperTemplate.Statement = ({
label,

View File

@@ -14,17 +14,19 @@ export const initialValues = {
showPaymentReceivedNumber: true,
paymentReceivedNumberLabel: 'Payment number',
// Payment number
showPaymentReceivedDate: true,
paymentReceivedDateLabel: 'Date of Issue',
// Company name
companyName: 'Bigcapital Technology, Inc.',
// Addresses
showCustomerAddress: true,
// Customer address
showCompanyAddress: true,
customerAddress: '',
companyAddress: '',
// Company address
showCustomerAddress: true,
billedToLabel: 'Billed To',
// Entries
@@ -33,10 +35,11 @@ export const initialValues = {
itemRateLabel: 'Rate',
itemTotalLabel: 'Total',
// Totals
// Subtotal
showSubtotal: true,
subtotalLabel: 'Subtotal',
// Total
showTotal: true,
totalLabel: 'Total',
};

View File

@@ -12,18 +12,23 @@ export interface PaymentReceivedCustomizeValues extends BrandingTemplateValues {
showInvoiceNumber?: boolean;
invoiceNumberLabel?: string;
// # Issue date
showDateIssue?: boolean;
dateIssueLabel?: string;
// # Due date
showDueDate?: boolean;
dueDateLabel?: string;
// Company name
// # Company name
companyName?: string;
// Addresses
showBilledFromAddress?: boolean;
showBillingToAddress?: boolean;
// # Customer address
showCustomerAddress?: boolean;
// # Company address
showCompanyAddress?: boolean;
companyAddress?: string;
billedToLabel?: string;
// Entries
@@ -54,6 +59,7 @@ export interface PaymentReceivedCustomizeValues extends BrandingTemplateValues {
termsConditionsLabel?: string;
showTermsConditions?: boolean;
// # Statement
statementLabel?: string;
showStatement?: boolean;
}