@voyant-travel/finance-react 0.119.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +75 -0
- package/dist/admin/booking-invoices-widget.d.ts +19 -0
- package/dist/admin/booking-invoices-widget.d.ts.map +1 -0
- package/dist/admin/booking-invoices-widget.js +204 -0
- package/dist/admin/booking-payment-policy-widget.d.ts +21 -0
- package/dist/admin/booking-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/booking-payment-policy-widget.js +128 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts +24 -0
- package/dist/admin/booking-pending-payment-sessions-widget.d.ts.map +1 -0
- package/dist/admin/booking-pending-payment-sessions-widget.js +139 -0
- package/dist/admin/credit-note-dialog.d.ts +9 -0
- package/dist/admin/credit-note-dialog.d.ts.map +1 -0
- package/dist/admin/credit-note-dialog.js +70 -0
- package/dist/admin/finance-shared.d.ts +7 -0
- package/dist/admin/finance-shared.d.ts.map +1 -0
- package/dist/admin/finance-shared.js +30 -0
- package/dist/admin/index.d.ts +99 -0
- package/dist/admin/index.d.ts.map +1 -0
- package/dist/admin/index.js +286 -0
- package/dist/admin/invoice-detail-host.d.ts +19 -0
- package/dist/admin/invoice-detail-host.d.ts.map +1 -0
- package/dist/admin/invoice-detail-host.js +147 -0
- package/dist/admin/invoice-detail-sections.d.ts +31 -0
- package/dist/admin/invoice-detail-sections.d.ts.map +1 -0
- package/dist/admin/invoice-detail-sections.js +109 -0
- package/dist/admin/invoice-detail-skeleton.d.ts +11 -0
- package/dist/admin/invoice-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/invoice-detail-skeleton.js +33 -0
- package/dist/admin/line-item-dialog.d.ts +10 -0
- package/dist/admin/line-item-dialog.d.ts.map +1 -0
- package/dist/admin/line-item-dialog.js +91 -0
- package/dist/admin/pages/invoice-detail.d.ts +8 -0
- package/dist/admin/pages/invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/invoice-detail.js +11 -0
- package/dist/admin/pages/invoices-index.d.ts +8 -0
- package/dist/admin/pages/invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/invoices-index.js +14 -0
- package/dist/admin/pages/payment-detail.d.ts +8 -0
- package/dist/admin/pages/payment-detail.d.ts.map +1 -0
- package/dist/admin/pages/payment-detail.js +11 -0
- package/dist/admin/pages/payments-index.d.ts +9 -0
- package/dist/admin/pages/payments-index.d.ts.map +1 -0
- package/dist/admin/pages/payments-index.js +21 -0
- package/dist/admin/pages/profitability.d.ts +10 -0
- package/dist/admin/pages/profitability.d.ts.map +1 -0
- package/dist/admin/pages/profitability.js +32 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts +20 -0
- package/dist/admin/pages/supplier-invoice-detail.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoice-detail.js +102 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts +9 -0
- package/dist/admin/pages/supplier-invoices-index.d.ts.map +1 -0
- package/dist/admin/pages/supplier-invoices-index.js +16 -0
- package/dist/admin/payment-detail-host.d.ts +12 -0
- package/dist/admin/payment-detail-host.d.ts.map +1 -0
- package/dist/admin/payment-detail-host.js +108 -0
- package/dist/admin/payment-detail-skeleton.d.ts +8 -0
- package/dist/admin/payment-detail-skeleton.d.ts.map +1 -0
- package/dist/admin/payment-detail-skeleton.js +15 -0
- package/dist/admin/payment-dialog.d.ts +9 -0
- package/dist/admin/payment-dialog.d.ts.map +1 -0
- package/dist/admin/payment-dialog.js +99 -0
- package/dist/admin/record-payment-dialog.d.ts +16 -0
- package/dist/admin/record-payment-dialog.d.ts.map +1 -0
- package/dist/admin/record-payment-dialog.js +219 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts +18 -0
- package/dist/admin/supplier-payment-policy-widget.d.ts.map +1 -0
- package/dist/admin/supplier-payment-policy-widget.js +31 -0
- package/dist/admin/use-supplier-picker.d.ts +19 -0
- package/dist/admin/use-supplier-picker.d.ts.map +1 -0
- package/dist/admin/use-supplier-picker.js +30 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts +45 -0
- package/dist/checkout-components/collect-payment-dialog.d.ts.map +1 -0
- package/dist/checkout-components/collect-payment-dialog.js +121 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts +76 -0
- package/dist/checkout-components/payment-link-landing-page.d.ts.map +1 -0
- package/dist/checkout-components/payment-link-landing-page.js +173 -0
- package/dist/checkout-components/payment-step.d.ts +42 -0
- package/dist/checkout-components/payment-step.d.ts.map +1 -0
- package/dist/checkout-components/payment-step.js +113 -0
- package/dist/checkout-hooks/index.d.ts +5 -0
- package/dist/checkout-hooks/index.d.ts.map +1 -0
- package/dist/checkout-hooks/index.js +4 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts +20 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.d.ts.map +1 -0
- package/dist/checkout-hooks/use-checkout-payment-link-config.js +26 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts +227 -0
- package/dist/checkout-hooks/use-collect-payment.d.ts.map +1 -0
- package/dist/checkout-hooks/use-collect-payment.js +80 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts +308 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-initiate-checkout-collection.js +35 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts +65 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.d.ts.map +1 -0
- package/dist/checkout-hooks/use-preview-checkout-collection.js +27 -0
- package/dist/checkout-i18n/en.d.ts +3 -0
- package/dist/checkout-i18n/en.d.ts.map +1 -0
- package/dist/checkout-i18n/en.js +127 -0
- package/dist/checkout-i18n/index.d.ts +5 -0
- package/dist/checkout-i18n/index.d.ts.map +1 -0
- package/dist/checkout-i18n/index.js +3 -0
- package/dist/checkout-i18n/messages.d.ts +121 -0
- package/dist/checkout-i18n/messages.d.ts.map +1 -0
- package/dist/checkout-i18n/messages.js +1 -0
- package/dist/checkout-i18n/provider.d.ts +26 -0
- package/dist/checkout-i18n/provider.d.ts.map +1 -0
- package/dist/checkout-i18n/provider.js +41 -0
- package/dist/checkout-i18n/ro.d.ts +3 -0
- package/dist/checkout-i18n/ro.d.ts.map +1 -0
- package/dist/checkout-i18n/ro.js +127 -0
- package/dist/checkout-types.d.ts +53 -0
- package/dist/checkout-types.d.ts.map +1 -0
- package/dist/checkout-types.js +1 -0
- package/dist/checkout-ui.d.ts +7 -0
- package/dist/checkout-ui.d.ts.map +1 -0
- package/dist/checkout-ui.js +4 -0
- package/dist/checkout.d.ts +5 -0
- package/dist/checkout.d.ts.map +1 -0
- package/dist/checkout.js +3 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +79 -0
- package/dist/components/accountant-portal/body.d.ts +8 -0
- package/dist/components/accountant-portal/body.d.ts.map +1 -0
- package/dist/components/accountant-portal/body.js +114 -0
- package/dist/components/accountant-portal/widgets.d.ts +13 -0
- package/dist/components/accountant-portal/widgets.d.ts.map +1 -0
- package/dist/components/accountant-portal/widgets.js +27 -0
- package/dist/components/accountant-portal.d.ts +10 -0
- package/dist/components/accountant-portal.d.ts.map +1 -0
- package/dist/components/accountant-portal.js +22 -0
- package/dist/components/accountant-share-dialog.d.ts +6 -0
- package/dist/components/accountant-share-dialog.d.ts.map +1 -0
- package/dist/components/accountant-share-dialog.js +53 -0
- package/dist/components/async-combobox.d.ts +33 -0
- package/dist/components/async-combobox.d.ts.map +1 -0
- package/dist/components/async-combobox.js +100 -0
- package/dist/components/booking-invoice-dialog.d.ts +63 -0
- package/dist/components/booking-invoice-dialog.d.ts.map +1 -0
- package/dist/components/booking-invoice-dialog.js +383 -0
- package/dist/components/cost-categories-page.d.ts +5 -0
- package/dist/components/cost-categories-page.d.ts.map +1 -0
- package/dist/components/cost-categories-page.js +30 -0
- package/dist/components/invoice-action-ledger-card.d.ts +15 -0
- package/dist/components/invoice-action-ledger-card.d.ts.map +1 -0
- package/dist/components/invoice-action-ledger-card.js +76 -0
- package/dist/components/invoice-bulk-actions.d.ts +10 -0
- package/dist/components/invoice-bulk-actions.d.ts.map +1 -0
- package/dist/components/invoice-bulk-actions.js +19 -0
- package/dist/components/invoice-detail-page/cards.d.ts +44 -0
- package/dist/components/invoice-detail-page/cards.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/cards.js +43 -0
- package/dist/components/invoice-detail-page/header.d.ts +15 -0
- package/dist/components/invoice-detail-page/header.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/header.js +30 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts +28 -0
- package/dist/components/invoice-detail-page/notes-dialogs.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/notes-dialogs.js +104 -0
- package/dist/components/invoice-detail-page/primitives.d.ts +47 -0
- package/dist/components/invoice-detail-page/primitives.d.ts.map +1 -0
- package/dist/components/invoice-detail-page/primitives.js +76 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts +7 -0
- package/dist/components/invoice-detail-page-with-action-ledger.d.ts.map +1 -0
- package/dist/components/invoice-detail-page-with-action-ledger.js +11 -0
- package/dist/components/invoice-detail-page.d.ts +46 -0
- package/dist/components/invoice-detail-page.d.ts.map +1 -0
- package/dist/components/invoice-detail-page.js +134 -0
- package/dist/components/invoice-dialog.d.ts +9 -0
- package/dist/components/invoice-dialog.d.ts.map +1 -0
- package/dist/components/invoice-dialog.js +145 -0
- package/dist/components/invoice-number-series-dialog.d.ts +9 -0
- package/dist/components/invoice-number-series-dialog.d.ts.map +1 -0
- package/dist/components/invoice-number-series-dialog.js +134 -0
- package/dist/components/invoice-number-series-format.d.ts +3 -0
- package/dist/components/invoice-number-series-format.d.ts.map +1 -0
- package/dist/components/invoice-number-series-format.js +4 -0
- package/dist/components/invoice-number-series-page.d.ts +5 -0
- package/dist/components/invoice-number-series-page.d.ts.map +1 -0
- package/dist/components/invoice-number-series-page.js +55 -0
- package/dist/components/invoice-table-parts.d.ts +25 -0
- package/dist/components/invoice-table-parts.d.ts.map +1 -0
- package/dist/components/invoice-table-parts.js +32 -0
- package/dist/components/invoices-page-skeleton.d.ts +5 -0
- package/dist/components/invoices-page-skeleton.d.ts.map +1 -0
- package/dist/components/invoices-page-skeleton.js +13 -0
- package/dist/components/invoices-page.d.ts +6 -0
- package/dist/components/invoices-page.d.ts.map +1 -0
- package/dist/components/invoices-page.js +145 -0
- package/dist/components/payment-detail-page.d.ts +47 -0
- package/dist/components/payment-detail-page.d.ts.map +1 -0
- package/dist/components/payment-detail-page.js +90 -0
- package/dist/components/payment-policy-form.d.ts +49 -0
- package/dist/components/payment-policy-form.d.ts.map +1 -0
- package/dist/components/payment-policy-form.js +82 -0
- package/dist/components/payments-page/controls.d.ts +23 -0
- package/dist/components/payments-page/controls.d.ts.map +1 -0
- package/dist/components/payments-page/controls.js +20 -0
- package/dist/components/payments-page-skeleton.d.ts +5 -0
- package/dist/components/payments-page-skeleton.d.ts.map +1 -0
- package/dist/components/payments-page-skeleton.js +13 -0
- package/dist/components/payments-page.d.ts +20 -0
- package/dist/components/payments-page.d.ts.map +1 -0
- package/dist/components/payments-page.js +143 -0
- package/dist/components/profitability-page/sections.d.ts +24 -0
- package/dist/components/profitability-page/sections.d.ts.map +1 -0
- package/dist/components/profitability-page/sections.js +43 -0
- package/dist/components/profitability-page.d.ts +13 -0
- package/dist/components/profitability-page.d.ts.map +1 -0
- package/dist/components/profitability-page.js +175 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts +54 -0
- package/dist/components/record-booking-payment-dialog/shared.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog/shared.js +47 -0
- package/dist/components/record-booking-payment-dialog.d.ts +4 -0
- package/dist/components/record-booking-payment-dialog.d.ts.map +1 -0
- package/dist/components/record-booking-payment-dialog.js +256 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts +34 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/dialogs.js +119 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts +64 -0
- package/dist/components/supplier-invoice-detail-page/shared.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page/shared.js +70 -0
- package/dist/components/supplier-invoice-detail-page.d.ts +4 -0
- package/dist/components/supplier-invoice-detail-page.d.ts.map +1 -0
- package/dist/components/supplier-invoice-detail-page.js +101 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts +45 -0
- package/dist/components/supplier-invoice-form-dialog.d.ts.map +1 -0
- package/dist/components/supplier-invoice-form-dialog.js +102 -0
- package/dist/components/supplier-invoices-page.d.ts +14 -0
- package/dist/components/supplier-invoices-page.d.ts.map +1 -0
- package/dist/components/supplier-invoices-page.js +69 -0
- package/dist/components/supplier-payment-dialog.d.ts +7 -0
- package/dist/components/supplier-payment-dialog.d.ts.map +1 -0
- package/dist/components/supplier-payment-dialog.js +103 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts +8 -0
- package/dist/components/taxes-page/policy-profile-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-profile-sheet.js +52 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts +10 -0
- package/dist/components/taxes-page/policy-rule-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/policy-rule-sheet.js +137 -0
- package/dist/components/taxes-page/shared.d.ts +128 -0
- package/dist/components/taxes-page/shared.d.ts.map +1 -0
- package/dist/components/taxes-page/shared.js +288 -0
- package/dist/components/taxes-page/sheets.d.ts +4 -0
- package/dist/components/taxes-page/sheets.d.ts.map +1 -0
- package/dist/components/taxes-page/sheets.js +3 -0
- package/dist/components/taxes-page/tax-sheet.d.ts +9 -0
- package/dist/components/taxes-page/tax-sheet.d.ts.map +1 -0
- package/dist/components/taxes-page/tax-sheet.js +108 -0
- package/dist/components/taxes-page.d.ts +4 -0
- package/dist/components/taxes-page.d.ts.map +1 -0
- package/dist/components/taxes-page.js +165 -0
- package/dist/hooks/index.d.ts +53 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +52 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts +20 -0
- package/dist/hooks/use-accountant-share-mutation.d.ts.map +1 -0
- package/dist/hooks/use-accountant-share-mutation.js +27 -0
- package/dist/hooks/use-accountant-shares.d.ts +13 -0
- package/dist/hooks/use-accountant-shares.d.ts.map +1 -0
- package/dist/hooks/use-accountant-shares.js +8 -0
- package/dist/hooks/use-admin-booking-payments.d.ts +30 -0
- package/dist/hooks/use-admin-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-admin-booking-payments.js +18 -0
- package/dist/hooks/use-all-payments.d.ts +35 -0
- package/dist/hooks/use-all-payments.d.ts.map +1 -0
- package/dist/hooks/use-all-payments.js +12 -0
- package/dist/hooks/use-booking-guarantees.d.ts +82 -0
- package/dist/hooks/use-booking-guarantees.d.ts.map +1 -0
- package/dist/hooks/use-booking-guarantees.js +46 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts +44 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedule-regenerate-mutation.js +27 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts +63 -0
- package/dist/hooks/use-booking-payment-schedules.d.ts.map +1 -0
- package/dist/hooks/use-booking-payment-schedules.js +47 -0
- package/dist/hooks/use-cost-categories.d.ts +14 -0
- package/dist/hooks/use-cost-categories.d.ts.map +1 -0
- package/dist/hooks/use-cost-categories.js +9 -0
- package/dist/hooks/use-cost-category-mutation.d.ts +31 -0
- package/dist/hooks/use-cost-category-mutation.d.ts.map +1 -0
- package/dist/hooks/use-cost-category-mutation.js +27 -0
- package/dist/hooks/use-departure-profitability.d.ts +56 -0
- package/dist/hooks/use-departure-profitability.d.ts.map +1 -0
- package/dist/hooks/use-departure-profitability.js +12 -0
- package/dist/hooks/use-finance-action-ledger.d.ts +94 -0
- package/dist/hooks/use-finance-action-ledger.d.ts.map +1 -0
- package/dist/hooks/use-finance-action-ledger.js +20 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts +43 -0
- package/dist/hooks/use-invoice-attachment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachment-mutation.js +39 -0
- package/dist/hooks/use-invoice-attachments.d.ts +18 -0
- package/dist/hooks/use-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-attachments.js +12 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts +51 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-bulk-status-mutation.js +66 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts +38 -0
- package/dist/hooks/use-invoice-credit-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-note-mutation.js +35 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts +17 -0
- package/dist/hooks/use-invoice-credit-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-credit-notes.js +12 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts +19 -0
- package/dist/hooks/use-invoice-fx-rate.d.ts.map +1 -0
- package/dist/hooks/use-invoice-fx-rate.js +13 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts +40 -0
- package/dist/hooks/use-invoice-line-item-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-item-mutation.js +42 -0
- package/dist/hooks/use-invoice-line-items.d.ts +17 -0
- package/dist/hooks/use-invoice-line-items.d.ts.map +1 -0
- package/dist/hooks/use-invoice-line-items.js +12 -0
- package/dist/hooks/use-invoice-mutation.d.ts +225 -0
- package/dist/hooks/use-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-mutation.js +121 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts +11 -0
- package/dist/hooks/use-invoice-note-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-note-mutation.js +23 -0
- package/dist/hooks/use-invoice-notes.d.ts +13 -0
- package/dist/hooks/use-invoice-notes.d.ts.map +1 -0
- package/dist/hooks/use-invoice-notes.js +12 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts +62 -0
- package/dist/hooks/use-invoice-number-series-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series-mutation.js +39 -0
- package/dist/hooks/use-invoice-number-series.d.ts +28 -0
- package/dist/hooks/use-invoice-number-series.d.ts.map +1 -0
- package/dist/hooks/use-invoice-number-series.js +12 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts +29 -0
- package/dist/hooks/use-invoice-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payment-mutation.js +35 -0
- package/dist/hooks/use-invoice-payments.d.ts +21 -0
- package/dist/hooks/use-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-invoice-payments.js +12 -0
- package/dist/hooks/use-invoice.d.ts +32 -0
- package/dist/hooks/use-invoice.d.ts.map +1 -0
- package/dist/hooks/use-invoice.js +12 -0
- package/dist/hooks/use-invoices.d.ts +36 -0
- package/dist/hooks/use-invoices.d.ts.map +1 -0
- package/dist/hooks/use-invoices.js +12 -0
- package/dist/hooks/use-payment-mutation.d.ts +57 -0
- package/dist/hooks/use-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-mutation.js +59 -0
- package/dist/hooks/use-payment-session-mutation.d.ts +205 -0
- package/dist/hooks/use-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-payment-session-mutation.js +38 -0
- package/dist/hooks/use-payment-sessions.d.ts +97 -0
- package/dist/hooks/use-payment-sessions.d.ts.map +1 -0
- package/dist/hooks/use-payment-sessions.js +17 -0
- package/dist/hooks/use-payment.d.ts +31 -0
- package/dist/hooks/use-payment.d.ts.map +1 -0
- package/dist/hooks/use-payment.js +12 -0
- package/dist/hooks/use-product-profitability.d.ts +52 -0
- package/dist/hooks/use-product-profitability.d.ts.map +1 -0
- package/dist/hooks/use-product-profitability.js +12 -0
- package/dist/hooks/use-public-booking-documents.d.ts +29 -0
- package/dist/hooks/use-public-booking-documents.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-documents.js +12 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts +47 -0
- package/dist/hooks/use-public-booking-payment-options.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payment-options.js +12 -0
- package/dist/hooks/use-public-booking-payments.d.ts +24 -0
- package/dist/hooks/use-public-booking-payments.d.ts.map +1 -0
- package/dist/hooks/use-public-booking-payments.js +12 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts +27 -0
- package/dist/hooks/use-public-finance-document-by-reference.d.ts.map +1 -0
- package/dist/hooks/use-public-finance-document-by-reference.js +12 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts +82 -0
- package/dist/hooks/use-public-payment-session-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session-mutation.js +33 -0
- package/dist/hooks/use-public-payment-session.d.ts +73 -0
- package/dist/hooks/use-public-payment-session.d.ts.map +1 -0
- package/dist/hooks/use-public-payment-session.js +12 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts +23 -0
- package/dist/hooks/use-public-voucher-validation-mutation.d.ts.map +1 -0
- package/dist/hooks/use-public-voucher-validation-mutation.js +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts +17 -0
- package/dist/hooks/use-supplier-invoice-attachments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-attachments.js +12 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts +353 -0
- package/dist/hooks/use-supplier-invoice-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-mutation.js +81 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts +26 -0
- package/dist/hooks/use-supplier-invoice-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice-payments.js +12 -0
- package/dist/hooks/use-supplier-invoice.d.ts +65 -0
- package/dist/hooks/use-supplier-invoice.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoice.js +12 -0
- package/dist/hooks/use-supplier-invoices.d.ts +36 -0
- package/dist/hooks/use-supplier-invoices.d.ts.map +1 -0
- package/dist/hooks/use-supplier-invoices.js +12 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts +55 -0
- package/dist/hooks/use-supplier-payment-mutation.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payment-mutation.js +35 -0
- package/dist/hooks/use-supplier-payments.d.ts +27 -0
- package/dist/hooks/use-supplier-payments.d.ts.map +1 -0
- package/dist/hooks/use-supplier-payments.js +12 -0
- package/dist/hooks/use-traveler-profitability.d.ts +24 -0
- package/dist/hooks/use-traveler-profitability.d.ts.map +1 -0
- package/dist/hooks/use-traveler-profitability.js +11 -0
- package/dist/hooks/use-voucher-mutation.d.ts +105 -0
- package/dist/hooks/use-voucher-mutation.d.ts.map +1 -0
- package/dist/hooks/use-voucher-mutation.js +50 -0
- package/dist/hooks/use-voucher.d.ts +38 -0
- package/dist/hooks/use-voucher.d.ts.map +1 -0
- package/dist/hooks/use-voucher.js +17 -0
- package/dist/hooks/use-vouchers.d.ts +34 -0
- package/dist/hooks/use-vouchers.d.ts.map +1 -0
- package/dist/hooks/use-vouchers.js +18 -0
- package/dist/i18n/en/invoices.d.ts +278 -0
- package/dist/i18n/en/invoices.d.ts.map +1 -0
- package/dist/i18n/en/invoices.js +277 -0
- package/dist/i18n/en/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/en/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/en/numberingAndPayments.js +386 -0
- package/dist/i18n/en/profitability.d.ts +147 -0
- package/dist/i18n/en/profitability.d.ts.map +1 -0
- package/dist/i18n/en/profitability.js +146 -0
- package/dist/i18n/en/suppliers.d.ts +187 -0
- package/dist/i18n/en/suppliers.d.ts.map +1 -0
- package/dist/i18n/en/suppliers.js +186 -0
- package/dist/i18n/en.d.ts +998 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +22 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages/core.d.ts +18 -0
- package/dist/i18n/messages/core.d.ts.map +1 -0
- package/dist/i18n/messages/core.js +30 -0
- package/dist/i18n/messages/invoices.d.ts +252 -0
- package/dist/i18n/messages/invoices.d.ts.map +1 -0
- package/dist/i18n/messages/invoices.js +1 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts +277 -0
- package/dist/i18n/messages/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/messages/numberingAndPayments.js +1 -0
- package/dist/i18n/messages/profitability.d.ts +151 -0
- package/dist/i18n/messages/profitability.d.ts.map +1 -0
- package/dist/i18n/messages/profitability.js +1 -0
- package/dist/i18n/messages/suppliers.d.ts +167 -0
- package/dist/i18n/messages/suppliers.d.ts.map +1 -0
- package/dist/i18n/messages/suppliers.js +1 -0
- package/dist/i18n/messages.d.ts +29 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +2018 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro/invoices.d.ts +278 -0
- package/dist/i18n/ro/invoices.d.ts.map +1 -0
- package/dist/i18n/ro/invoices.js +277 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts +387 -0
- package/dist/i18n/ro/numberingAndPayments.d.ts.map +1 -0
- package/dist/i18n/ro/numberingAndPayments.js +386 -0
- package/dist/i18n/ro/profitability.d.ts +147 -0
- package/dist/i18n/ro/profitability.d.ts.map +1 -0
- package/dist/i18n/ro/profitability.js +146 -0
- package/dist/i18n/ro/suppliers.d.ts +187 -0
- package/dist/i18n/ro/suppliers.d.ts.map +1 -0
- package/dist/i18n/ro/suppliers.js +186 -0
- package/dist/i18n/ro.d.ts +998 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +22 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/operations.d.ts +484 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +52 -0
- package/dist/provider.d.ts +2 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +1 -0
- package/dist/query-keys.d.ts +195 -0
- package/dist/query-keys.d.ts.map +1 -0
- package/dist/query-keys.js +49 -0
- package/dist/query-options/public-reporting.d.ts +2129 -0
- package/dist/query-options/public-reporting.d.ts.map +1 -0
- package/dist/query-options/public-reporting.js +193 -0
- package/dist/query-options-action-ledger.d.ts +382 -0
- package/dist/query-options-action-ledger.d.ts.map +1 -0
- package/dist/query-options-action-ledger.js +36 -0
- package/dist/query-options.d.ts +2057 -0
- package/dist/query-options.d.ts.map +1 -0
- package/dist/query-options.js +328 -0
- package/dist/schemas/accountant.d.ts +168 -0
- package/dist/schemas/accountant.d.ts.map +1 -0
- package/dist/schemas/accountant.js +53 -0
- package/dist/schemas/action-ledger.d.ts +206 -0
- package/dist/schemas/action-ledger.d.ts.map +1 -0
- package/dist/schemas/action-ledger.js +83 -0
- package/dist/schemas/common.d.ts +17 -0
- package/dist/schemas/common.d.ts.map +1 -0
- package/dist/schemas/common.js +10 -0
- package/dist/schemas/invoice.d.ts +1451 -0
- package/dist/schemas/invoice.d.ts.map +1 -0
- package/dist/schemas/invoice.js +438 -0
- package/dist/schemas/profitability.d.ts +333 -0
- package/dist/schemas/profitability.d.ts.map +1 -0
- package/dist/schemas/profitability.js +84 -0
- package/dist/schemas/public.d.ts +481 -0
- package/dist/schemas/public.d.ts.map +1 -0
- package/dist/schemas/public.js +9 -0
- package/dist/schemas/responses.d.ts +632 -0
- package/dist/schemas/responses.d.ts.map +1 -0
- package/dist/schemas/responses.js +27 -0
- package/dist/schemas/supplier.d.ts +226 -0
- package/dist/schemas/supplier.d.ts.map +1 -0
- package/dist/schemas/supplier.js +103 -0
- package/dist/schemas/vouchers.d.ts +283 -0
- package/dist/schemas/vouchers.d.ts.map +1 -0
- package/dist/schemas/vouchers.js +49 -0
- package/dist/schemas.d.ts +10 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +9 -0
- package/dist/ui.d.ts +27 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +26 -0
- package/package.json +181 -0
- package/src/styles.css +12 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Badge, Button, Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyant-travel/ui/components";
|
|
3
|
+
import { AsyncCombobox } from "@voyant-travel/ui/components/async-combobox";
|
|
4
|
+
import { CurrencyCombobox } from "@voyant-travel/ui/components/currency-combobox";
|
|
5
|
+
import { DateRangePicker } from "@voyant-travel/ui/components/date-picker";
|
|
6
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@voyant-travel/ui/components/popover";
|
|
7
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
|
|
8
|
+
import { cn } from "@voyant-travel/ui/lib/utils";
|
|
9
|
+
import { ListFilter, Plus, Search, X } from "lucide-react";
|
|
10
|
+
import { useState } from "react";
|
|
11
|
+
import { useFinanceUiMessagesOrDefault } from "../i18n/index.js";
|
|
12
|
+
import { paymentMethods, supplierPaymentStatuses } from "../i18n/messages.js";
|
|
13
|
+
import { useAllPayments, } from "../index.js";
|
|
14
|
+
const PAGE_SIZE = 25;
|
|
15
|
+
const KIND_ALL = "__all__";
|
|
16
|
+
const STATUS_ALL = "__all__";
|
|
17
|
+
const METHOD_ALL = "__all__";
|
|
18
|
+
const PAYMENT_KINDS = ["customer", "supplier"];
|
|
19
|
+
const paymentStatusVariant = {
|
|
20
|
+
pending: "outline",
|
|
21
|
+
completed: "default",
|
|
22
|
+
failed: "destructive",
|
|
23
|
+
refunded: "secondary",
|
|
24
|
+
};
|
|
25
|
+
function formatAmount(cents, currency) {
|
|
26
|
+
return `${(cents / 100).toFixed(2)} ${currency}`;
|
|
27
|
+
}
|
|
28
|
+
export function PaymentsPage({ className, onOpenPayment, supplierOptions = [], onSupplierSearchChange, renderRecordPaymentDialog, } = {}) {
|
|
29
|
+
const messages = useFinanceUiMessagesOrDefault();
|
|
30
|
+
const [recordDialogOpen, setRecordDialogOpen] = useState(false);
|
|
31
|
+
const [search, setSearch] = useState("");
|
|
32
|
+
const [kind, setKind] = useState(KIND_ALL);
|
|
33
|
+
const [status, setStatus] = useState(STATUS_ALL);
|
|
34
|
+
const [method, setMethod] = useState(METHOD_ALL);
|
|
35
|
+
const [currency, setCurrency] = useState(null);
|
|
36
|
+
const [supplierId, setSupplierId] = useState(null);
|
|
37
|
+
const [selectedSupplier, setSelectedSupplier] = useState(null);
|
|
38
|
+
const [paymentDateRange, setPaymentDateRange] = useState(null);
|
|
39
|
+
const [sortBy, setSortBy] = useState("createdAt");
|
|
40
|
+
const [sortDir, setSortDir] = useState("desc");
|
|
41
|
+
const [pageIndex, setPageIndex] = useState(0);
|
|
42
|
+
const [filterPopoverOpen, setFilterPopoverOpen] = useState(false);
|
|
43
|
+
const { data, isPending, isFetching, isError } = useAllPayments({
|
|
44
|
+
search: search || undefined,
|
|
45
|
+
kind: kind === KIND_ALL ? undefined : kind,
|
|
46
|
+
status: status === STATUS_ALL ? undefined : status,
|
|
47
|
+
paymentMethod: method === METHOD_ALL ? undefined : method,
|
|
48
|
+
currency: currency ?? undefined,
|
|
49
|
+
supplierId: supplierId ?? undefined,
|
|
50
|
+
paymentDateFrom: paymentDateRange?.from ?? undefined,
|
|
51
|
+
paymentDateTo: paymentDateRange?.to ?? undefined,
|
|
52
|
+
sortBy,
|
|
53
|
+
sortDir,
|
|
54
|
+
limit: PAGE_SIZE,
|
|
55
|
+
offset: pageIndex * PAGE_SIZE,
|
|
56
|
+
});
|
|
57
|
+
const payments = data?.data ?? [];
|
|
58
|
+
const total = data?.total ?? 0;
|
|
59
|
+
const page = pageIndex + 1;
|
|
60
|
+
const pageCount = Math.max(1, Math.ceil(total / PAGE_SIZE));
|
|
61
|
+
const showSkeleton = isPending || (isFetching && payments.length === 0);
|
|
62
|
+
const resetPage = () => setPageIndex(0);
|
|
63
|
+
const handleSort = (field) => {
|
|
64
|
+
resetPage();
|
|
65
|
+
if (sortBy !== field) {
|
|
66
|
+
setSortBy(field);
|
|
67
|
+
setSortDir("asc");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (sortDir === "asc") {
|
|
71
|
+
setSortDir("desc");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
setSortBy("createdAt");
|
|
75
|
+
setSortDir("desc");
|
|
76
|
+
};
|
|
77
|
+
const activeFilterCount = (kind !== KIND_ALL ? 1 : 0) +
|
|
78
|
+
(status !== STATUS_ALL ? 1 : 0) +
|
|
79
|
+
(method !== METHOD_ALL ? 1 : 0) +
|
|
80
|
+
(currency !== null ? 1 : 0) +
|
|
81
|
+
(supplierId !== null ? 1 : 0) +
|
|
82
|
+
(paymentDateRange?.from || paymentDateRange?.to ? 1 : 0);
|
|
83
|
+
const hasActiveFilters = activeFilterCount > 0 || search !== "";
|
|
84
|
+
const clearFilters = () => {
|
|
85
|
+
setSearch("");
|
|
86
|
+
setKind(KIND_ALL);
|
|
87
|
+
setStatus(STATUS_ALL);
|
|
88
|
+
setMethod(METHOD_ALL);
|
|
89
|
+
setCurrency(null);
|
|
90
|
+
setSupplierId(null);
|
|
91
|
+
setSelectedSupplier(null);
|
|
92
|
+
setPaymentDateRange(null);
|
|
93
|
+
onSupplierSearchChange?.("");
|
|
94
|
+
resetPage();
|
|
95
|
+
};
|
|
96
|
+
const f = messages.paymentsPage;
|
|
97
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-6 p-6", className), children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: f.title }), _jsx("p", { className: "text-sm text-muted-foreground", children: f.description })] }) }), _jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsxs("div", { className: "relative min-w-[14rem] flex-1", children: [_jsx(Label, { htmlFor: "payments-search", className: "sr-only", children: f.searchPlaceholder }), _jsx(Search, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground", "aria-hidden": "true" }), _jsx(Input, { id: "payments-search", placeholder: f.searchPlaceholder, value: search, onChange: (event) => {
|
|
98
|
+
setSearch(event.target.value);
|
|
99
|
+
resetPage();
|
|
100
|
+
}, className: "pl-9" })] }), _jsxs(Popover, { open: filterPopoverOpen, onOpenChange: setFilterPopoverOpen, children: [_jsx(PopoverTrigger, { render: _jsxs(Button, { variant: "outline", size: "default", children: [_jsx(ListFilter, { className: "mr-2 size-4", "aria-hidden": "true" }), f.filters.button, activeFilterCount > 0 && (_jsx(Badge, { variant: "secondary", className: "ml-2 px-1.5", children: activeFilterCount }))] }) }), _jsx(PopoverContent, { align: "start", className: "w-[24rem] p-4", children: _jsxs("div", { className: "flex flex-col gap-4", children: [_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "payments-filter-kind", children: f.filters.kindLabel }), _jsxs(Select, { value: kind, onValueChange: (value) => {
|
|
101
|
+
setKind(value ?? KIND_ALL);
|
|
102
|
+
resetPage();
|
|
103
|
+
}, children: [_jsx(SelectTrigger, { id: "payments-filter-kind", className: "w-full", children: _jsx(SelectValue, { children: (value) => value === KIND_ALL
|
|
104
|
+
? f.filters.kindAll
|
|
105
|
+
: (f.kindLabels[value] ?? value) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: KIND_ALL, children: f.filters.kindAll }), PAYMENT_KINDS.map((value) => (_jsx(SelectItem, { value: value, children: f.kindLabels[value] }, value)))] })] })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "payments-filter-status", children: f.filters.statusLabel }), _jsxs(Select, { value: status, onValueChange: (value) => {
|
|
106
|
+
setStatus(value ?? STATUS_ALL);
|
|
107
|
+
resetPage();
|
|
108
|
+
}, children: [_jsx(SelectTrigger, { id: "payments-filter-status", className: "w-full", children: _jsx(SelectValue, { children: (value) => value === STATUS_ALL
|
|
109
|
+
? f.filters.statusAll
|
|
110
|
+
: (messages.common.supplierPaymentStatusLabels[value] ?? value) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: STATUS_ALL, children: f.filters.statusAll }), supplierPaymentStatuses.map((value) => (_jsx(SelectItem, { value: value, children: messages.common.supplierPaymentStatusLabels[value] }, value)))] })] })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "payments-filter-method", children: f.filters.methodLabel }), _jsxs(Select, { value: method, onValueChange: (value) => {
|
|
111
|
+
setMethod(value ?? METHOD_ALL);
|
|
112
|
+
resetPage();
|
|
113
|
+
}, children: [_jsx(SelectTrigger, { id: "payments-filter-method", className: "w-full", children: _jsx(SelectValue, { children: (value) => value === METHOD_ALL
|
|
114
|
+
? f.filters.methodAll
|
|
115
|
+
: (messages.common.paymentMethodLabels[value] ?? value) }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: METHOD_ALL, children: f.filters.methodAll }), paymentMethods.map((value) => (_jsx(SelectItem, { value: value, children: messages.common.paymentMethodLabels[value] }, value)))] })] })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: f.filters.supplierLabel }), _jsx(AsyncCombobox, { value: supplierId, onChange: (value) => {
|
|
116
|
+
setSupplierId(value);
|
|
117
|
+
if (!value)
|
|
118
|
+
setSelectedSupplier(null);
|
|
119
|
+
else {
|
|
120
|
+
const match = supplierOptions.find((supplier) => supplier.id === value);
|
|
121
|
+
if (match)
|
|
122
|
+
setSelectedSupplier(match);
|
|
123
|
+
}
|
|
124
|
+
resetPage();
|
|
125
|
+
}, items: supplierOptions, selectedItem: selectedSupplier, getKey: (supplier) => supplier.id, getLabel: (supplier) => supplier.name, onSearchChange: onSupplierSearchChange, placeholder: f.filters.supplierAny, emptyText: f.filters.supplierEmpty })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: f.filters.currencyLabel }), _jsx(CurrencyCombobox, { value: currency, onChange: (value) => {
|
|
126
|
+
setCurrency(value);
|
|
127
|
+
resetPage();
|
|
128
|
+
}, placeholder: f.filters.currencyAny })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { children: f.filters.paymentDateLabel }), _jsx(DateRangePicker, { value: paymentDateRange, onChange: (value) => {
|
|
129
|
+
setPaymentDateRange(value);
|
|
130
|
+
resetPage();
|
|
131
|
+
}, placeholder: f.filters.dateAny, clearable: true, className: "w-full" })] })] }) })] }), hasActiveFilters && (_jsxs(Button, { variant: "ghost", size: "sm", onClick: clearFilters, children: [_jsx(X, { className: "mr-1 size-4", "aria-hidden": "true" }), f.filters.clear] })), renderRecordPaymentDialog ? (_jsx("div", { className: "ml-auto", children: _jsxs(Button, { onClick: () => setRecordDialogOpen(true), children: [_jsx(Plus, { className: "mr-2 size-4", "aria-hidden": "true" }), f.actions.recordPayment] }) })) : null] }), _jsx("div", { className: "rounded-md border", children: _jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: f.columns.kind }), _jsx(TableHead, { children: f.columns.reference }), _jsx(TableHead, { children: f.columns.party }), _jsx(TableHead, { children: _jsx(SortHeader, { label: f.columns.amount, field: "amountCents", sortBy: sortBy, sortDir: sortDir, onSort: handleSort }) }), _jsx(TableHead, { children: _jsx(SortHeader, { label: f.columns.status, field: "status", sortBy: sortBy, sortDir: sortDir, onSort: handleSort }) }), _jsx(TableHead, { children: _jsx(SortHeader, { label: f.columns.date, field: "paymentDate", sortBy: sortBy, sortDir: sortDir, onSort: handleSort }) }), _jsx(TableHead, { children: f.columns.method })] }) }), _jsx(TableBody, { children: showSkeleton ? (_jsx(PaymentRowSkeleton, { rows: 6 })) : isError ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 7, className: "h-24 text-center text-sm text-destructive", children: f.loadFailed }) })) : payments.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 7, className: "h-24 text-center text-sm text-muted-foreground", children: f.empty }) })) : (payments.map((row) => {
|
|
132
|
+
const reference = row.kind === "customer" ? row.invoiceNumber : row.bookingNumber;
|
|
133
|
+
const party = row.kind === "supplier"
|
|
134
|
+
? (row.supplierName ?? f.noValue)
|
|
135
|
+
: (row.personName ?? row.organizationName ?? f.noValue);
|
|
136
|
+
return (_jsxs(TableRow, { onClick: () => onOpenPayment?.(row.id), className: cn(onOpenPayment && "cursor-pointer"), children: [_jsx(TableCell, { children: _jsx(Badge, { variant: "outline", className: "capitalize", children: f.kindLabels[row.kind] }) }), _jsx(TableCell, { children: _jsxs("div", { className: "flex flex-col", children: [_jsx("span", { className: "font-medium", children: reference ?? f.noValue }), row.referenceNumber ? (_jsx("span", { className: "text-xs text-muted-foreground", children: row.referenceNumber })) : null] }) }), _jsx(TableCell, { children: party }), _jsx(TableCell, { className: "font-mono", children: formatAmount(row.amountCents, row.currency) }), _jsx(TableCell, { children: _jsx(Badge, { variant: paymentStatusVariant[row.status] ?? "secondary", className: "capitalize", children: messages.common.supplierPaymentStatusLabels[row.status] }) }), _jsx(TableCell, { children: row.paymentDate }), _jsx(TableCell, { className: "capitalize", children: messages.common.paymentMethodLabels[row.paymentMethod] ?? row.paymentMethod })] }, `${row.kind}-${row.id}`));
|
|
137
|
+
})) })] }) }), _jsx(PaginationBar, { shown: payments.length, total: total, page: page, pageCount: pageCount, onPrevious: () => setPageIndex((prev) => Math.max(0, prev - 1)), onNext: () => setPageIndex((prev) => prev + 1), canGoBack: pageIndex > 0, canGoForward: (pageIndex + 1) * PAGE_SIZE < total })] }), renderRecordPaymentDialog?.({
|
|
138
|
+
open: recordDialogOpen,
|
|
139
|
+
onOpenChange: setRecordDialogOpen,
|
|
140
|
+
defaultKind: kind === KIND_ALL ? "customer" : kind,
|
|
141
|
+
})] }));
|
|
142
|
+
}
|
|
143
|
+
import { PaginationBar, PaymentRowSkeleton, SortHeader } from "./payments-page/controls.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { DepartureProfitabilityRow, ProductProfitabilityRow } from "../../index.js";
|
|
2
|
+
export declare function TravelerBreakdownDialog({ departure, currency, onClose, }: {
|
|
3
|
+
departure: {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
} | null;
|
|
7
|
+
currency: string;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function KpiCard({ label, value, accent, }: {
|
|
11
|
+
label: string;
|
|
12
|
+
value: string;
|
|
13
|
+
accent?: "positive" | "negative";
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function DepartureTable({ rows, currency, onSelect, }: {
|
|
16
|
+
rows: DepartureProfitabilityRow[];
|
|
17
|
+
currency: string;
|
|
18
|
+
onSelect?: (row: DepartureProfitabilityRow) => void;
|
|
19
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function ProductTable({ rows, currency, }: {
|
|
21
|
+
rows: ProductProfitabilityRow[];
|
|
22
|
+
currency: string;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=sections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sections.d.ts","sourceRoot":"","sources":["../../../src/components/profitability-page/sections.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAA;AAgBxF,wBAAgB,uBAAuB,CAAC,EACtC,SAAS,EACT,QAAQ,EACR,OAAO,GACR,EAAE;IACD,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC/C,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,2CAgFA;AAED,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAM,GACP,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;CACjC,2CAiBA;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,yBAAyB,EAAE,CAAA;IACjC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,yBAAyB,KAAK,IAAI,CAAA;CACpD,2CAqEA;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,uBAAuB,EAAE,CAAA;IAC/B,QAAQ,EAAE,MAAM,CAAA;CACjB,2CA2DA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { formatMessage } from "@voyant-travel/i18n";
|
|
3
|
+
import { Card, CardDescription, CardHeader, CardTitle, Dialog, DialogBody, DialogContent, DialogHeader, DialogTitle, } from "@voyant-travel/ui/components";
|
|
4
|
+
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@voyant-travel/ui/components/table";
|
|
5
|
+
import { cn } from "@voyant-travel/ui/lib/utils";
|
|
6
|
+
import { useFinanceUiI18nOrDefault } from "../../i18n/index.js";
|
|
7
|
+
import { useTravelerProfitability } from "../../index.js";
|
|
8
|
+
function marginText(value) {
|
|
9
|
+
return value == null ? "—" : `${value.toFixed(1)}%`;
|
|
10
|
+
}
|
|
11
|
+
function formatMoneyCents(cents, currency, formatCurrency) {
|
|
12
|
+
return formatCurrency(cents / 100, currency, { maximumFractionDigits: 0 });
|
|
13
|
+
}
|
|
14
|
+
export function TravelerBreakdownDialog({ departure, currency, onClose, }) {
|
|
15
|
+
const i18n = useFinanceUiI18nOrDefault();
|
|
16
|
+
const t = i18n.messages.profitability;
|
|
17
|
+
const { data, isError, isPending } = useTravelerProfitability({
|
|
18
|
+
departureId: departure?.id ?? "",
|
|
19
|
+
currency,
|
|
20
|
+
enabled: Boolean(departure),
|
|
21
|
+
});
|
|
22
|
+
const rows = data?.data?.rows ?? [];
|
|
23
|
+
const money = (cents) => formatMoneyCents(cents, currency, i18n.formatCurrency);
|
|
24
|
+
return (_jsx(Dialog, { open: Boolean(departure), onOpenChange: (open) => {
|
|
25
|
+
if (!open)
|
|
26
|
+
onClose();
|
|
27
|
+
}, children: _jsxs(DialogContent, { className: "sm:max-w-3xl", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: formatMessage(t.travelers.title, { departure: departure?.label ?? "" }) }) }), _jsx(DialogBody, { children: isError ? (_jsx("p", { className: "py-6 text-center text-sm text-destructive", children: t.travelers.loadFailed })) : (_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t.travelers.columns.traveler }), _jsx(TableHead, { className: "text-right", children: t.travelers.columns.revenue }), _jsx(TableHead, { className: "text-right", children: t.travelers.columns.actualCost }), _jsx(TableHead, { className: "text-right", children: t.travelers.columns.plannedCost }), _jsx(TableHead, { className: "text-right", children: t.travelers.columns.profit }), _jsx(TableHead, { className: "text-right", children: t.travelers.columns.margin })] }) }), _jsx(TableBody, { children: isPending && departure ? null : rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 6, className: "text-center text-muted-foreground", children: t.travelers.none }) })) : (rows.map((row) => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-medium", children: row.travelerName }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.revenueCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.actualCostCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.plannedCostCents) }), _jsx(TableCell, { className: cn("text-right tabular-nums", row.profitCents < 0 && "text-destructive"), children: money(row.profitCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: marginText(row.marginPercent) })] }, row.travelerId)))) })] })) })] }) }));
|
|
28
|
+
}
|
|
29
|
+
export function KpiCard({ label, value, accent, }) {
|
|
30
|
+
return (_jsx(Card, { className: "min-w-0", children: _jsxs(CardHeader, { className: "pb-2", children: [_jsx(CardDescription, { children: label }), _jsx(CardTitle, { className: cn("break-words text-2xl tabular-nums", accent === "positive" && "text-emerald-600 dark:text-emerald-500", accent === "negative" && "text-destructive"), children: value })] }) }));
|
|
31
|
+
}
|
|
32
|
+
export function DepartureTable({ rows, currency, onSelect, }) {
|
|
33
|
+
const i18n = useFinanceUiI18nOrDefault();
|
|
34
|
+
const t = i18n.messages.profitability;
|
|
35
|
+
const money = (cents) => formatMoneyCents(cents, currency, i18n.formatCurrency);
|
|
36
|
+
return (_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t.departures.columns.departure }), _jsx(TableHead, { children: t.departures.columns.date }), _jsx(TableHead, { children: t.departures.columns.product }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.revenue }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.actualCost }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.plannedCost }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.profit }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.margin }), _jsx(TableHead, { className: "text-right", children: t.departures.columns.variance })] }) }), _jsx(TableBody, { children: rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 9, className: "text-center text-muted-foreground", children: t.departures.none }) })) : (rows.map((row) => (_jsxs(TableRow, { className: onSelect ? "cursor-pointer" : undefined, onClick: onSelect ? () => onSelect(row) : undefined, children: [_jsx(TableCell, { className: "font-medium", children: row.departureLabel ?? row.departureId }), _jsx(TableCell, { className: "text-muted-foreground", children: row.departureDate ?? t.noDate }), _jsx(TableCell, { className: "text-muted-foreground", children: row.productName ?? t.noProduct }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.revenueCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.actualCostCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.plannedCostCents) }), _jsx(TableCell, { className: cn("text-right tabular-nums", row.profitCents < 0 && "text-destructive"), children: money(row.profitCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: marginText(row.marginPercent) }), _jsx(TableCell, { className: cn("text-right tabular-nums", row.varianceCents < 0 && "text-destructive"), children: money(row.varianceCents) })] }, `${row.departureId}:${row.currency}`)))) })] }));
|
|
37
|
+
}
|
|
38
|
+
export function ProductTable({ rows, currency, }) {
|
|
39
|
+
const i18n = useFinanceUiI18nOrDefault();
|
|
40
|
+
const t = i18n.messages.profitability;
|
|
41
|
+
const money = (cents) => formatMoneyCents(cents, currency, i18n.formatCurrency);
|
|
42
|
+
return (_jsxs(Table, { children: [_jsx(TableHeader, { children: _jsxs(TableRow, { children: [_jsx(TableHead, { children: t.products.columns.product }), _jsx(TableHead, { className: "text-right", children: t.products.columns.departures }), _jsx(TableHead, { className: "text-right", children: t.products.columns.revenue }), _jsx(TableHead, { className: "text-right", children: t.products.columns.actualCost }), _jsx(TableHead, { className: "text-right", children: t.products.columns.plannedCost }), _jsx(TableHead, { className: "text-right", children: t.products.columns.profit }), _jsx(TableHead, { className: "text-right", children: t.products.columns.margin }), _jsx(TableHead, { className: "text-right", children: t.products.columns.variance })] }) }), _jsx(TableBody, { children: rows.length === 0 ? (_jsx(TableRow, { children: _jsx(TableCell, { colSpan: 8, className: "text-center text-muted-foreground", children: t.products.none }) })) : (rows.map((row) => (_jsxs(TableRow, { children: [_jsx(TableCell, { className: "font-medium", children: row.productName ?? row.productId }), _jsx(TableCell, { className: "text-right tabular-nums", children: row.departureCount }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.revenueCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.actualCostCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: money(row.plannedCostCents) }), _jsx(TableCell, { className: cn("text-right tabular-nums", row.profitCents < 0 && "text-destructive"), children: money(row.profitCents) }), _jsx(TableCell, { className: "text-right tabular-nums", children: marginText(row.marginPercent) }), _jsx(TableCell, { className: cn("text-right tabular-nums", row.varianceCents < 0 && "text-destructive"), children: money(row.varianceCents) })] }, `${row.productId}:${row.currency}`)))) })] }));
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ProfitabilityExportFilters {
|
|
2
|
+
from?: string;
|
|
3
|
+
to?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ProfitabilityPageProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Wire to download the departure CSV for the active date range (accountant sharing). */
|
|
8
|
+
onExportDepartures?: (filters: ProfitabilityExportFilters) => void;
|
|
9
|
+
/** Wire to download the product CSV for the active date range. */
|
|
10
|
+
onExportProducts?: (filters: ProfitabilityExportFilters) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function ProfitabilityPage({ className, onExportDepartures, onExportProducts, }?: ProfitabilityPageProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=profitability-page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profitability-page.d.ts","sourceRoot":"","sources":["../../src/components/profitability-page.tsx"],"names":[],"mappings":"AAwDA,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,yFAAyF;IACzF,kBAAkB,CAAC,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAA;IAClE,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAA;CACjE;AA2CD,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,kBAAkB,EAClB,gBAAgB,GACjB,GAAE,sBAA2B,2CAwc7B"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// agent-quality: file-size exception -- owner: finance-react; existing UI surface stays co-located until a dedicated split preserves behavior and tests.
|
|
2
|
+
"use client";
|
|
3
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
4
|
+
import { formatMessage } from "@voyant-travel/i18n";
|
|
5
|
+
import { Button, Card, CardContent, CardHeader, CardTitle, Checkbox, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyant-travel/ui/components";
|
|
6
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartTooltip, ChartTooltipContent, } from "@voyant-travel/ui/components/chart";
|
|
7
|
+
import { DatePicker } from "@voyant-travel/ui/components/date-picker";
|
|
8
|
+
import { cn } from "@voyant-travel/ui/lib/utils";
|
|
9
|
+
import { Download, Share2 } from "lucide-react";
|
|
10
|
+
import { useMemo, useState } from "react";
|
|
11
|
+
import { Bar, BarChart, CartesianGrid, Cell, Pie, PieChart, XAxis, YAxis } from "recharts";
|
|
12
|
+
import { useFinanceUiI18nOrDefault } from "../i18n/index.js";
|
|
13
|
+
import { useDepartureProfitability, useProductProfitability } from "../index.js";
|
|
14
|
+
import { AccountantShareDialog } from "./accountant-share-dialog.js";
|
|
15
|
+
import { AsyncCombobox, localOptionSearch } from "./async-combobox.js";
|
|
16
|
+
import { DepartureTable, KpiCard, ProductTable, TravelerBreakdownDialog, } from "./profitability-page/sections.js";
|
|
17
|
+
const CHART_DEPARTURE_LIMIT = 12;
|
|
18
|
+
const PIE_COLORS = [
|
|
19
|
+
"hsl(221 83% 53%)",
|
|
20
|
+
"hsl(142 71% 45%)",
|
|
21
|
+
"hsl(38 92% 50%)",
|
|
22
|
+
"hsl(0 72% 51%)",
|
|
23
|
+
"hsl(199 89% 48%)",
|
|
24
|
+
"hsl(280 65% 60%)",
|
|
25
|
+
"hsl(160 60% 45%)",
|
|
26
|
+
"hsl(28 80% 52%)",
|
|
27
|
+
];
|
|
28
|
+
function marginText(value) {
|
|
29
|
+
return value == null ? "—" : `${value.toFixed(1)}%`;
|
|
30
|
+
}
|
|
31
|
+
function formatMoneyCents(cents, currency, formatCurrency) {
|
|
32
|
+
if (!currency)
|
|
33
|
+
return "—";
|
|
34
|
+
return formatCurrency(cents / 100, currency);
|
|
35
|
+
}
|
|
36
|
+
function chartTooltipLabel(name, config) {
|
|
37
|
+
const key = String(name);
|
|
38
|
+
return config[key]?.label ?? key;
|
|
39
|
+
}
|
|
40
|
+
function ChartTooltipAmountRow({ color, label, value, }) {
|
|
41
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "size-2.5 shrink-0 rounded-[2px] border", style: { backgroundColor: color, borderColor: color } }), _jsxs("div", { className: "flex flex-1 items-center justify-between gap-4 leading-none", children: [_jsx("span", { className: "text-muted-foreground", children: label }), _jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: value })] })] }));
|
|
42
|
+
}
|
|
43
|
+
export function ProfitabilityPage({ className, onExportDepartures, onExportProducts, } = {}) {
|
|
44
|
+
const i18n = useFinanceUiI18nOrDefault();
|
|
45
|
+
const t = i18n.messages.profitability;
|
|
46
|
+
const [from, setFrom] = useState("");
|
|
47
|
+
const [to, setTo] = useState("");
|
|
48
|
+
const [currency, setCurrency] = useState("");
|
|
49
|
+
// Consolidated view = the accounting-base rollup (snapshotted FX). Default on;
|
|
50
|
+
// the base currency itself is fixed by the operator, so there is no picker.
|
|
51
|
+
const [consolidate, setConsolidate] = useState(true);
|
|
52
|
+
const [travelerDeparture, setTravelerDeparture] = useState(null);
|
|
53
|
+
const [shareOpen, setShareOpen] = useState(false);
|
|
54
|
+
const [productId, setProductId] = useState("");
|
|
55
|
+
const [departureId, setDepartureId] = useState("");
|
|
56
|
+
const filters = {
|
|
57
|
+
from: from || undefined,
|
|
58
|
+
to: to || undefined,
|
|
59
|
+
};
|
|
60
|
+
const departures = useDepartureProfitability(filters);
|
|
61
|
+
const products = useProductProfitability(filters);
|
|
62
|
+
const departureReport = departures.data?.data;
|
|
63
|
+
const productReport = products.data?.data;
|
|
64
|
+
const isError = departures.isError || products.isError;
|
|
65
|
+
// The accounting base currency the server snapshots/rolls up into.
|
|
66
|
+
const baseCurrencyCode = departureReport?.base?.currency ?? productReport?.base?.currency ?? "";
|
|
67
|
+
// Consolidated rollup view is active when toggled on and the server returned a
|
|
68
|
+
// `base` block (always does now, but guard for loading/empty states).
|
|
69
|
+
const baseMode = consolidate && Boolean(departureReport?.base);
|
|
70
|
+
// Currencies present across per-currency rows; default to the first.
|
|
71
|
+
const currencies = useMemo(() => {
|
|
72
|
+
const set = new Set();
|
|
73
|
+
for (const row of departureReport?.rows ?? [])
|
|
74
|
+
set.add(row.currency);
|
|
75
|
+
for (const row of productReport?.rows ?? [])
|
|
76
|
+
set.add(row.currency);
|
|
77
|
+
return [...set].sort();
|
|
78
|
+
}, [departureReport, productReport]);
|
|
79
|
+
const activeCurrency = baseMode
|
|
80
|
+
? (departureReport?.base?.currency ?? baseCurrencyCode)
|
|
81
|
+
: currency && currencies.includes(currency)
|
|
82
|
+
? currency
|
|
83
|
+
: (currencies[0] ?? "");
|
|
84
|
+
const currencyDepartureRows = useMemo(() => baseMode
|
|
85
|
+
? (departureReport?.base?.rows ?? [])
|
|
86
|
+
: (departureReport?.rows ?? []).filter((r) => r.currency === activeCurrency), [departureReport, baseMode, activeCurrency]);
|
|
87
|
+
const currencyProductRows = useMemo(() => baseMode
|
|
88
|
+
? (productReport?.base?.rows ?? [])
|
|
89
|
+
: (productReport?.rows ?? []).filter((r) => r.currency === activeCurrency), [productReport, baseMode, activeCurrency]);
|
|
90
|
+
// Product/departure filters (client-side over the loaded report).
|
|
91
|
+
const productOptions = useMemo(() => {
|
|
92
|
+
const map = new Map();
|
|
93
|
+
for (const r of currencyDepartureRows) {
|
|
94
|
+
if (r.productId)
|
|
95
|
+
map.set(r.productId, r.productName ?? r.productId);
|
|
96
|
+
}
|
|
97
|
+
return [...map.entries()]
|
|
98
|
+
.map(([id, name]) => ({ id, name }))
|
|
99
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
100
|
+
}, [currencyDepartureRows]);
|
|
101
|
+
const departureOptions = useMemo(() => currencyDepartureRows
|
|
102
|
+
.filter((r) => !productId || r.productId === productId)
|
|
103
|
+
.map((r) => ({ id: r.departureId, label: r.departureLabel ?? r.departureId })), [currencyDepartureRows, productId]);
|
|
104
|
+
const departureRows = useMemo(() => currencyDepartureRows.filter((r) => (!productId || r.productId === productId) &&
|
|
105
|
+
(!departureId || r.departureId === departureId)), [currencyDepartureRows, productId, departureId]);
|
|
106
|
+
const productRows = useMemo(() => currencyProductRows.filter((r) => !productId || r.productId === productId), [currencyProductRows, productId]);
|
|
107
|
+
const unconvertibleCurrencies = baseMode
|
|
108
|
+
? (departureReport?.base?.unconvertibleCurrencies ?? [])
|
|
109
|
+
: [];
|
|
110
|
+
const totals = useMemo(() => {
|
|
111
|
+
let revenue = 0;
|
|
112
|
+
let actual = 0;
|
|
113
|
+
let planned = 0;
|
|
114
|
+
for (const r of departureRows) {
|
|
115
|
+
revenue += r.revenueCents;
|
|
116
|
+
actual += r.actualCostCents;
|
|
117
|
+
planned += r.plannedCostCents;
|
|
118
|
+
}
|
|
119
|
+
const profit = revenue - actual;
|
|
120
|
+
return {
|
|
121
|
+
revenue,
|
|
122
|
+
actual,
|
|
123
|
+
planned,
|
|
124
|
+
profit,
|
|
125
|
+
variance: planned - actual,
|
|
126
|
+
margin: revenue > 0 ? Math.round((profit / revenue) * 1000) / 10 : null,
|
|
127
|
+
};
|
|
128
|
+
}, [departureRows]);
|
|
129
|
+
const unattributed = useMemo(() => {
|
|
130
|
+
if (baseMode)
|
|
131
|
+
return departureReport?.base?.unattributedCents ?? 0;
|
|
132
|
+
return ((departureReport?.unattributed ?? []).find((u) => u.currency === activeCurrency)
|
|
133
|
+
?.amountCents ?? 0);
|
|
134
|
+
}, [departureReport, baseMode, activeCurrency]);
|
|
135
|
+
const chartData = useMemo(() => [...departureRows]
|
|
136
|
+
.sort((a, b) => b.revenueCents - a.revenueCents)
|
|
137
|
+
.slice(0, CHART_DEPARTURE_LIMIT)
|
|
138
|
+
.map((r) => ({
|
|
139
|
+
name: r.departureLabel ?? r.departureId,
|
|
140
|
+
revenue: r.revenueCents / 100,
|
|
141
|
+
actualCost: r.actualCostCents / 100,
|
|
142
|
+
profit: r.profitCents / 100,
|
|
143
|
+
})), [departureRows]);
|
|
144
|
+
const serviceTypeData = useMemo(() => (baseMode
|
|
145
|
+
? (departureReport?.base?.costByServiceType ?? [])
|
|
146
|
+
: (departureReport?.costByServiceType ?? []).filter((c) => c.currency === activeCurrency)).map((c, index) => ({
|
|
147
|
+
serviceType: c.serviceType,
|
|
148
|
+
label: t.serviceTypeLabels[c.serviceType] ?? c.serviceType,
|
|
149
|
+
amount: c.amountCents / 100,
|
|
150
|
+
fill: PIE_COLORS[index % PIE_COLORS.length],
|
|
151
|
+
})), [departureReport, baseMode, activeCurrency, t.serviceTypeLabels]);
|
|
152
|
+
const barConfig = {
|
|
153
|
+
revenue: { label: t.charts.revenue, color: "hsl(221 83% 53%)" }, // i18n-literal-ok (chart color)
|
|
154
|
+
actualCost: { label: t.charts.actualCost, color: "hsl(0 72% 51%)" }, // i18n-literal-ok (chart color)
|
|
155
|
+
profit: { label: t.charts.profit, color: "hsl(142 71% 45%)" }, // i18n-literal-ok (chart color)
|
|
156
|
+
};
|
|
157
|
+
const pieConfig = Object.fromEntries(serviceTypeData.map((d) => [d.serviceType, { label: d.label, color: d.fill }]));
|
|
158
|
+
const money = (cents) => formatMoneyCents(cents, activeCurrency, i18n.formatCurrency);
|
|
159
|
+
const moneyAmount = (amount) => activeCurrency ? i18n.formatCurrency(amount, activeCurrency) : String(amount);
|
|
160
|
+
const compactMoneyAmount = (amount) => activeCurrency
|
|
161
|
+
? i18n.formatCurrency(amount, activeCurrency, {
|
|
162
|
+
maximumFractionDigits: 1,
|
|
163
|
+
notation: "compact",
|
|
164
|
+
})
|
|
165
|
+
: String(amount);
|
|
166
|
+
return (_jsxs("div", { className: cn("flex min-w-0 flex-col gap-6 overflow-hidden p-6", className), children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-end justify-between gap-3", children: [_jsxs("div", { className: "min-w-0", children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: t.title }), _jsx("p", { className: "text-sm text-muted-foreground", children: t.description })] }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-wrap items-end justify-end gap-3", children: [_jsxs(Button, { variant: "outline", onClick: () => setShareOpen(true), children: [_jsx(Share2, { className: "size-4" }), t.share.button] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: t.filters.from }), _jsx(DatePicker, { value: from || null, onChange: (v) => setFrom(v ?? ""), className: "w-40" })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: t.filters.to }), _jsx(DatePicker, { value: to || null, onChange: (v) => setTo(v ?? ""), className: "w-40" })] }), !baseMode ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: t.filters.currency }), _jsxs(Select, { value: activeCurrency, onValueChange: (v) => setCurrency(v ?? ""), disabled: !currencies.length, children: [_jsx(SelectTrigger, { className: "w-32 max-w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: currencies.map((c) => (_jsx(SelectItem, { value: c, children: c }, c))) })] })] })) : null, _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { htmlFor: "profitability-consolidate", children: t.filters.baseCurrency }), _jsxs("div", { className: "flex h-9 items-center gap-2", children: [_jsx(Checkbox, { id: "profitability-consolidate", checked: consolidate, onCheckedChange: (v) => setConsolidate(v === true) }), _jsx(Label, { htmlFor: "profitability-consolidate", className: "font-normal", children: baseCurrencyCode || t.filters.baseCurrency })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: t.filters.product }), _jsx(AsyncCombobox, { className: "w-56 max-w-full", placeholder: t.filters.allProducts, value: productId || null, onChange: (v) => {
|
|
167
|
+
setProductId(v ?? "");
|
|
168
|
+
setDepartureId("");
|
|
169
|
+
}, search: localOptionSearch(productOptions.map((p) => ({ value: p.id, label: p.name }))) })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: t.filters.departure }), _jsx(AsyncCombobox, { className: "w-56 max-w-full", placeholder: t.filters.allDepartures, value: departureId || null, onChange: (v) => setDepartureId(v ?? ""), search: localOptionSearch(departureOptions.map((d) => ({ value: d.id, label: d.label }))) })] })] })] }), baseMode && unconvertibleCurrencies.length ? (_jsx("p", { className: "text-sm text-amber-600 dark:text-amber-500", children: formatMessage(t.unconvertibleNote, { currencies: unconvertibleCurrencies.join(", ") }) })) : null, isError ? (_jsx(Card, { children: _jsx(CardContent, { className: "py-10 text-center text-destructive", children: t.loadFailed }) })) : !currencies.length ? (_jsx(Card, { children: _jsx(CardContent, { className: "py-10 text-center text-muted-foreground", children: t.empty }) })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "grid min-w-0 gap-4 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(KpiCard, { label: t.kpis.revenue, value: money(totals.revenue) }), _jsx(KpiCard, { label: t.kpis.actualCost, value: money(totals.actual) }), _jsx(KpiCard, { label: t.kpis.profit, value: money(totals.profit), accent: totals.profit >= 0 ? "positive" : "negative" }), _jsx(KpiCard, { label: t.kpis.margin, value: marginText(totals.margin) }), _jsx(KpiCard, { label: t.kpis.plannedCost, value: money(totals.planned) }), _jsx(KpiCard, { label: t.kpis.variance, value: money(totals.variance), accent: totals.variance >= 0 ? "positive" : "negative" }), _jsx(KpiCard, { label: t.kpis.unattributed, value: money(unattributed) })] }), _jsxs("div", { className: "grid min-w-0 gap-4 lg:grid-cols-2", children: [_jsxs(Card, { className: "min-w-0", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { className: "text-base", children: t.charts.departurePnl }) }), _jsx(CardContent, { children: chartData.length ? (_jsx(ChartContainer, { config: barConfig, className: "h-[300px] w-full", children: _jsxs(BarChart, { data: chartData, margin: { top: 10, right: 10, left: 0, bottom: 0 }, children: [_jsx(CartesianGrid, { vertical: false }), _jsx(XAxis, { dataKey: "name", tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => value.length > 14 ? `${value.slice(0, 13)}…` : value }), _jsx(YAxis, { tickLine: false, axisLine: false, tickMargin: 8, tickFormatter: (value) => compactMoneyAmount(value), width: 72 }), _jsx(ChartTooltip, { content: _jsx(ChartTooltipContent, { formatter: (value, name, item) => (_jsx(ChartTooltipAmountRow, { color: item.color, label: chartTooltipLabel(name, barConfig), value: moneyAmount(Number(value)) })) }) }), _jsx(ChartLegend, { content: _jsx(ChartLegendContent, {}) }), _jsx(Bar, { dataKey: "revenue", fill: "var(--color-revenue)", radius: 2 }), _jsx(Bar, { dataKey: "actualCost", fill: "var(--color-actualCost)", radius: 2 }), _jsx(Bar, { dataKey: "profit", fill: "var(--color-profit)", radius: 2 })] }) })) : (_jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: t.departures.none })) })] }), _jsxs(Card, { className: "min-w-0", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { className: "text-base", children: t.charts.costByServiceType }) }), _jsx(CardContent, { children: serviceTypeData.length ? (_jsx(ChartContainer, { config: pieConfig, className: "mx-auto h-[300px] w-full", children: _jsxs(PieChart, { children: [_jsx(ChartTooltip, { content: _jsx(ChartTooltipContent, { nameKey: "label", hideLabel: true, formatter: (value, name, item) => (_jsx(ChartTooltipAmountRow, { color: item.payload?.fill ?? item.color, label: name, value: moneyAmount(Number(value)) })) }) }), _jsx(Pie, { data: serviceTypeData, dataKey: "amount", nameKey: "label", cx: "50%", cy: "50%", innerRadius: 60, outerRadius: 100, paddingAngle: 2, children: serviceTypeData.map((entry) => (_jsx(Cell, { fill: entry.fill }, entry.serviceType))) }), _jsx(ChartLegend, { content: _jsx(ChartLegendContent, { nameKey: "label" }) })] }) })) : (_jsx("p", { className: "py-10 text-center text-sm text-muted-foreground", children: t.empty })) })] })] }), _jsxs(Card, { className: "min-w-0", children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { className: "text-base", children: t.departures.title }), onExportDepartures ? (_jsxs(Button, { variant: "outline", size: "sm", onClick: () => onExportDepartures({ from: from || undefined, to: to || undefined }), children: [_jsx(Download, { className: "size-4" }), t.exportCsv] })) : null] }), _jsx(CardContent, { className: "min-w-0", children: _jsx(DepartureTable, { rows: departureRows, currency: activeCurrency, onSelect: baseMode
|
|
170
|
+
? undefined
|
|
171
|
+
: (row) => setTravelerDeparture({
|
|
172
|
+
id: row.departureId,
|
|
173
|
+
label: row.departureLabel ?? row.departureId,
|
|
174
|
+
}) }) })] }), _jsxs(Card, { className: "min-w-0", children: [_jsxs(CardHeader, { className: "flex flex-row items-center justify-between", children: [_jsx(CardTitle, { className: "text-base", children: t.products.title }), onExportProducts ? (_jsxs(Button, { variant: "outline", size: "sm", onClick: () => onExportProducts({ from: from || undefined, to: to || undefined }), children: [_jsx(Download, { className: "size-4" }), t.exportCsv] })) : null] }), _jsx(CardContent, { className: "min-w-0", children: _jsx(ProductTable, { rows: productRows, currency: activeCurrency }) })] })] })), _jsx(TravelerBreakdownDialog, { departure: travelerDeparture, currency: activeCurrency, onClose: () => setTravelerDeparture(null) }), _jsx(AccountantShareDialog, { open: shareOpen, onOpenChange: setShareOpen })] }));
|
|
175
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type PaymentMethod, type PaymentStatus } from "../../index.js";
|
|
2
|
+
export declare const PAYMENT_METHODS: ("other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill")[];
|
|
3
|
+
export declare const PAYMENT_STATUSES: ("pending" | "completed" | "failed" | "refunded")[];
|
|
4
|
+
export interface EditingPaymentSnapshot {
|
|
5
|
+
id: string;
|
|
6
|
+
invoiceId: string;
|
|
7
|
+
amountCents: number;
|
|
8
|
+
currency: string;
|
|
9
|
+
baseCurrency: string | null;
|
|
10
|
+
baseAmountCents: number | null;
|
|
11
|
+
paymentMethod: PaymentMethod;
|
|
12
|
+
status: PaymentStatus;
|
|
13
|
+
paymentDate: string;
|
|
14
|
+
referenceNumber: string | null;
|
|
15
|
+
notes: string | null;
|
|
16
|
+
}
|
|
17
|
+
export interface RecordBookingPaymentDialogProps {
|
|
18
|
+
open: boolean;
|
|
19
|
+
onOpenChange: (open: boolean) => void;
|
|
20
|
+
bookingId: string;
|
|
21
|
+
/** Pre-fill currency when no invoices have loaded yet. */
|
|
22
|
+
defaultCurrency?: string;
|
|
23
|
+
onRecorded?: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* When set, the dialog runs in edit mode: it prefills from the
|
|
26
|
+
* snapshot and PATCHes `/v1/admin/finance/payments/:id` on submit instead
|
|
27
|
+
* of POSTing a new payment. The invoice selector is locked because
|
|
28
|
+
* reassigning a payment to a different invoice is out of scope for
|
|
29
|
+
* this dialog.
|
|
30
|
+
*/
|
|
31
|
+
editingPayment?: EditingPaymentSnapshot | null;
|
|
32
|
+
}
|
|
33
|
+
export interface FormState {
|
|
34
|
+
invoiceId: string;
|
|
35
|
+
amountCents: number;
|
|
36
|
+
currency: string;
|
|
37
|
+
fxRate: string;
|
|
38
|
+
fxOverride: boolean;
|
|
39
|
+
paymentMethod: PaymentMethod;
|
|
40
|
+
status: PaymentStatus;
|
|
41
|
+
paymentDate: string;
|
|
42
|
+
referenceNumber: string;
|
|
43
|
+
notes: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function todayIso(): string;
|
|
46
|
+
export declare function buildInitialFormState(currency: string): FormState;
|
|
47
|
+
export declare function formatAmount(cents: number): string;
|
|
48
|
+
export declare function normalizeCurrency(currency: string | null | undefined): string;
|
|
49
|
+
export declare function parseFxRate(raw: string): number | null;
|
|
50
|
+
export declare function deriveBaseAmountCents(amountCents: number, fxRate: number | null): number | null;
|
|
51
|
+
export declare function formatFxRateInput(rate: number): string;
|
|
52
|
+
export declare function formatRateDisplay(rate: number): string;
|
|
53
|
+
export declare function formatCommissionPercent(bps: number): string;
|
|
54
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/components/record-booking-payment-dialog/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,aAAa,EAGnB,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,eAAe,yHAA8B,CAAA;AAC1D,eAAO,MAAM,gBAAgB,qDAA8B,CAAA;AAE3D,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE,aAAa,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,SAAS,EAAE,MAAM,CAAA;IACjB,0DAA0D;IAC1D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,sBAAsB,GAAG,IAAI,CAAA;CAC/C;AAED,MAAM,WAAW,SAAS;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,EAAE,aAAa,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,MAAM,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,QAAQ,IAAI,MAAM,CAEjC;AAED,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAajE;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE7E;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKtD;AAED,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAG/F;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE3D"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { paymentMethodSchema, paymentStatusSchema, } from "../../index.js";
|
|
2
|
+
export const PAYMENT_METHODS = paymentMethodSchema.options;
|
|
3
|
+
export const PAYMENT_STATUSES = paymentStatusSchema.options;
|
|
4
|
+
export function todayIso() {
|
|
5
|
+
return new Date().toISOString().slice(0, 10);
|
|
6
|
+
}
|
|
7
|
+
export function buildInitialFormState(currency) {
|
|
8
|
+
return {
|
|
9
|
+
invoiceId: "",
|
|
10
|
+
amountCents: 0,
|
|
11
|
+
currency,
|
|
12
|
+
fxRate: "",
|
|
13
|
+
fxOverride: false,
|
|
14
|
+
paymentMethod: "bank_transfer",
|
|
15
|
+
status: "completed",
|
|
16
|
+
paymentDate: todayIso(),
|
|
17
|
+
referenceNumber: "",
|
|
18
|
+
notes: "",
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export function formatAmount(cents) {
|
|
22
|
+
return (cents / 100).toFixed(2);
|
|
23
|
+
}
|
|
24
|
+
export function normalizeCurrency(currency) {
|
|
25
|
+
return currency?.trim().toUpperCase() ?? "";
|
|
26
|
+
}
|
|
27
|
+
export function parseFxRate(raw) {
|
|
28
|
+
const normalized = raw.trim().replace(",", ".");
|
|
29
|
+
if (!normalized)
|
|
30
|
+
return null;
|
|
31
|
+
const value = Number.parseFloat(normalized);
|
|
32
|
+
return Number.isFinite(value) && value > 0 ? value : null;
|
|
33
|
+
}
|
|
34
|
+
export function deriveBaseAmountCents(amountCents, fxRate) {
|
|
35
|
+
if (!fxRate || amountCents <= 0)
|
|
36
|
+
return null;
|
|
37
|
+
return Math.round(amountCents / fxRate);
|
|
38
|
+
}
|
|
39
|
+
export function formatFxRateInput(rate) {
|
|
40
|
+
return rate.toFixed(4);
|
|
41
|
+
}
|
|
42
|
+
export function formatRateDisplay(rate) {
|
|
43
|
+
return rate.toFixed(4);
|
|
44
|
+
}
|
|
45
|
+
export function formatCommissionPercent(bps) {
|
|
46
|
+
return (bps / 100).toFixed(2);
|
|
47
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RecordBookingPaymentDialogProps } from "./record-booking-payment-dialog/shared.js";
|
|
2
|
+
export type { EditingPaymentSnapshot, RecordBookingPaymentDialogProps, } from "./record-booking-payment-dialog/shared.js";
|
|
3
|
+
export declare function RecordBookingPaymentDialog({ open, onOpenChange, bookingId, defaultCurrency, onRecorded, editingPayment, }: RecordBookingPaymentDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
//# sourceMappingURL=record-booking-payment-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-booking-payment-dialog.d.ts","sourceRoot":"","sources":["../../src/components/record-booking-payment-dialog.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAAK,EAEV,+BAA+B,EAChC,MAAM,2CAA2C,CAAA;AAclD,YAAY,EACV,sBAAsB,EACtB,+BAA+B,GAChC,MAAM,2CAA2C,CAAA;AAElD,wBAAgB,0BAA0B,CAAC,EACzC,IAAI,EACJ,YAAY,EACZ,SAAS,EACT,eAAuB,EACvB,UAAU,EACV,cAAqB,GACtB,EAAE,+BAA+B,2CAsfjC"}
|