fix: payment page

This commit is contained in:
Ahmed Bouhuolia
2024-09-25 12:21:26 +02:00
parent 2f9adfd908
commit 946872204b
8 changed files with 59 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
.rootBodyPage {
background: #0c103f;
background: #1c1d29;
}
.root {

View File

@@ -83,6 +83,13 @@ export function PaymentPortal() {
</Text>
</Group>
{sharableLinkMeta?.taxes?.map((tax, key) => (
<Group key={key} position={'apart'} className={styles.totalItem}>
<Text>{tax?.name}</Text>
<Text>{tax?.taxRateAmountFormatted}</Text>
</Group>
))}
<Group
position={'apart'}
className={clsx(styles.totalItem, styles.borderBottomGray)}

View File

@@ -30,6 +30,10 @@ export function PaymentInvoicePreviewContent() {
rate: entry.rateFormatted,
total: entry.totalFormatted,
}))}
taxes={sharableLinkMeta?.taxes?.map((tax) => ({
label: tax.name,
amount: tax.taxRateAmountFormatted,
}))}
/>
</Box>
</DrawerBody>

View File

@@ -50,7 +50,6 @@ export function useCreatePaymentLink(
);
}
// Get Invoice Payment Link
// -----------------------------------------
export interface GetInvoicePaymentLinkResponse {
@@ -82,6 +81,12 @@ export interface GetInvoicePaymentLinkResponse {
total: number;
totalFormatted: string;
}>;
taxes: Array<{
name: string;
taxRateAmount: number;
taxRateAmountFormatted: string;
taxRateCode: string;
}>;
}
/**
* Fetches the sharable invoice link metadata for a given link ID.