@burdenoff/microfe-billing 2026.1108.1 → 2026.1109.1
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/dist/billing/BillingAdminRoutes.d.ts +1 -2
- package/dist/billing/BillingAdminRoutes.js +11 -12
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/BillingRoot.d.ts +0 -1
- package/dist/billing/BillingRoot.js +10 -9
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/BillingUserRoutes.d.ts +1 -2
- package/dist/billing/BillingUserRoutes.js +13 -14
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.js +7 -5
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.js +1 -2
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts +0 -1
- package/dist/billing/hooks/useBillingNavigate.js +1 -2
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts +0 -1
- package/dist/billing/hooks/useBillingPermissions.js +2 -3
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.js +1 -2
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
- package/dist/billing/hooks/useProducts.d.ts +0 -1
- package/dist/billing/hooks/useProducts.js +1 -2
- package/dist/billing/hooks/useProducts.js.map +1 -1
- package/dist/billing/index.d.ts +0 -1
- package/dist/billing/lib/native-purchases.d.ts +0 -1
- package/dist/billing/lib/native-purchases.js +1 -2
- package/dist/billing/lib/native-purchases.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js +4 -5
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/hooks/index.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/index.js +3 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.js.map +1 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.js +1 -2
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
- package/dist/billing/modules/addons/index.d.ts +0 -1
- package/dist/billing/modules/addons/index.js +10 -10
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +15 -16
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +11 -12
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +16 -17
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +111 -106
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +105 -100
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/index.d.ts +0 -1
- package/dist/billing/modules/addons/pages/index.js +7 -6
- package/dist/billing/modules/addons/store/addonCartStore.d.ts +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.js +2 -7
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
- package/dist/billing/modules/affiliate/api.d.ts +0 -1
- package/dist/billing/modules/affiliate/api.js +1 -2
- package/dist/billing/modules/affiliate/api.js.map +1 -1
- package/dist/billing/modules/affiliate/index.d.ts +0 -1
- package/dist/billing/modules/affiliate/index.js +1 -2
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +29 -28
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/index.d.ts +0 -1
- package/dist/billing/modules/analytics/index.js +1 -2
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +8 -9
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/index.d.ts +0 -1
- package/dist/billing/modules/analytics/pages/index.js +1 -1
- package/dist/billing/modules/billing/hooks/index.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/index.js +5 -4
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.js +1 -2
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js +1 -2
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.js.map +1 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js +1 -2
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.js +30 -31
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
- package/dist/billing/modules/billing/index.d.ts +0 -1
- package/dist/billing/modules/billing/index.js +15 -15
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +53 -59
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +81 -87
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +11 -12
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +51 -54
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +33 -34
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +92 -93
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +38 -39
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -30
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/index.d.ts +0 -1
- package/dist/billing/modules/billing/pages/index.js +10 -9
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -2
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -2
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js +1 -2
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js +1 -2
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js +35 -32
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js +1 -2
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js +1 -2
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js +1 -2
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js +5 -3
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js +35 -41
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -2
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js +1 -2
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js +5 -6
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +7 -8
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/index.d.ts +0 -1
- package/dist/billing/modules/checkout/components/index.js +12 -11
- package/dist/billing/modules/checkout/hooks/index.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/index.js +5 -4
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +182 -195
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js +33 -32
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js +1 -2
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts +4 -8
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js +1 -2
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
- package/dist/billing/modules/checkout/index.d.ts +0 -1
- package/dist/billing/modules/checkout/index.js +19 -19
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +730 -732
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/index.d.ts +0 -1
- package/dist/billing/modules/checkout/pages/index.js +1 -1
- package/dist/billing/modules/checkout/types/index.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
- package/dist/billing/modules/coupons/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +5 -6
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +15 -13
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +12 -10
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +7 -11
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/index.d.ts +0 -1
- package/dist/billing/modules/coupons/pages/index.js +5 -4
- package/dist/billing/modules/credits/hooks/index.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.js +20 -21
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
- package/dist/billing/modules/credits/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +19 -24
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +26 -27
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +54 -52
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +37 -38
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/index.d.ts +0 -1
- package/dist/billing/modules/credits/pages/index.js +5 -4
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -3
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +35 -43
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +1 -2
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +1 -2
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +2 -5
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -2
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/components/index.js +7 -6
- package/dist/billing/modules/dashboard/hooks/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/index.js +3 -2
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.js +2 -3
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
- package/dist/billing/modules/dashboard/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/index.js +11 -10
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +266 -264
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts +0 -1
- package/dist/billing/modules/dashboard/pages/index.js +1 -1
- package/dist/billing/modules/discounts/index.d.ts +0 -1
- package/dist/billing/modules/discounts/index.js +1 -2
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +169 -176
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/index.d.ts +0 -1
- package/dist/billing/modules/discounts/pages/index.js +1 -1
- package/dist/billing/modules/earnings/api.d.ts +0 -1
- package/dist/billing/modules/earnings/api.js +66 -67
- package/dist/billing/modules/earnings/api.js.map +1 -1
- package/dist/billing/modules/earnings/index.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +17 -17
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +188 -189
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +111 -111
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +29 -30
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +103 -104
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.js +1 -2
- package/dist/billing/modules/earnings/payoutAccountStatus.js.map +1 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts +0 -1
- package/dist/billing/modules/plans/constants/enterprise.js +1 -2
- package/dist/billing/modules/plans/constants/enterprise.js.map +1 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.js +1 -2
- package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
- package/dist/billing/modules/plans/hooks/index.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/index.js +3 -2
- package/dist/billing/modules/plans/hooks/usePlans.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.js +1 -2
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.js +1 -2
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
- package/dist/billing/modules/plans/index.d.ts +0 -1
- package/dist/billing/modules/plans/index.js +11 -11
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +12 -15
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +38 -39
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +10 -11
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +40 -41
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +15 -16
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +18 -19
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +100 -101
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/index.d.ts +0 -1
- package/dist/billing/modules/plans/pages/index.js +8 -7
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js +1 -2
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.js.map +1 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts +0 -1
- package/dist/billing/modules/plans/utils/planSelector.js +1 -2
- package/dist/billing/modules/plans/utils/planSelector.js.map +1 -1
- package/dist/billing/modules/promotions/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +5 -6
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +5 -6
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/index.d.ts +0 -1
- package/dist/billing/modules/promotions/pages/index.js +3 -2
- package/dist/billing/modules/quota/hooks/index.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/index.js +1 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js +1 -2
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
- package/dist/billing/modules/quota/index.d.ts +0 -1
- package/dist/billing/modules/quota/index.js +8 -8
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +12 -15
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +3 -3
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +13 -14
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +9 -10
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +12 -13
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +16 -17
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/index.d.ts +0 -1
- package/dist/billing/modules/quota/pages/index.js +6 -5
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.js +1 -2
- package/dist/billing/modules/quota/utils/quotaSelector.js.map +1 -1
- package/dist/billing/modules/settings/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +12 -13
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +32 -32
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/index.d.ts +0 -1
- package/dist/billing/modules/settings/pages/index.js +3 -2
- package/dist/billing/modules/store/graphql/index.d.ts +0 -1
- package/dist/billing/modules/store/index.d.ts +0 -1
- package/dist/billing/modules/store/index.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +1 -2
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +9 -11
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.js +1 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js +1 -2
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
- package/dist/billing/modules/subscriptions/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/index.js +6 -6
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +311 -312
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +61 -62
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +30 -31
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts +0 -1
- package/dist/billing/modules/subscriptions/pages/index.js +4 -3
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +17 -18
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
- package/dist/billing/modules/usage/hooks/index.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.js +72 -73
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js +12 -13
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.js.map +1 -1
- package/dist/billing/modules/usage/index.d.ts +0 -1
- package/dist/billing/modules/usage/index.js +1 -2
- package/dist/billing/modules/usage/pages/UsagePage.d.ts +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +229 -227
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/modules/usage/pages/index.d.ts +0 -1
- package/dist/billing/modules/usage/pages/index.js +1 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.js +2 -3
- package/dist/billing/modules/usage/utils/aiSpend.js.map +1 -1
- package/dist/billing/providers/BillingProvider.d.ts +0 -1
- package/dist/billing/providers/BillingProvider.js +3 -4
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.d.ts +0 -1
- package/dist/billing/shared/components/AccessDenied.js +1 -2
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts +0 -1
- package/dist/billing/shared/components/ActorIdentity.js +2 -3
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +1 -2
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/components/EmptyState.d.ts +0 -1
- package/dist/billing/shared/components/EmptyState.js +1 -2
- package/dist/billing/shared/components/EmptyState.js.map +1 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts +0 -1
- package/dist/billing/shared/components/PageHeader.js +1 -2
- package/dist/billing/shared/components/PageHeader.js.map +1 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.js +2 -3
- package/dist/billing/shared/components/PushPermissionNudge.js.map +1 -1
- package/dist/billing/shared/components/ServerError.d.ts +0 -1
- package/dist/billing/shared/components/ServerError.js +1 -2
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.d.ts +0 -1
- package/dist/billing/shared/components/StatCard.js +1 -2
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/components/index.d.ts +0 -1
- package/dist/billing/shared/components/index.js +8 -7
- package/dist/billing/shared/hooks/index.d.ts +0 -1
- package/dist/billing/shared/hooks/index.js +1 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.js +4 -8
- package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
- package/dist/billing/shared/hooks/useTr.d.ts +0 -1
- package/dist/billing/shared/hooks/useTr.js +1 -2
- package/dist/billing/shared/hooks/useTr.js.map +1 -1
- package/dist/billing/shared/index.d.ts +0 -1
- package/dist/billing/shared/types/graphql.d.ts +0 -1
- package/dist/billing/shared/types/graphql.js +1 -2
- package/dist/billing/shared/types/graphql.js.map +1 -1
- package/dist/billing/shared/types/index.d.ts +0 -1
- package/dist/billing/shared/ui/Card.d.ts +1 -2
- package/dist/billing/shared/ui/Card.js +1 -2
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.d.ts +1 -2
- package/dist/billing/shared/ui/MetricCard.js +1 -2
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts +1 -2
- package/dist/billing/shared/ui/ProgressBar.js +1 -2
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.d.ts +1 -2
- package/dist/billing/shared/ui/StatusPill.js +1 -2
- package/dist/billing/shared/ui/StatusPill.js.map +1 -1
- package/dist/billing/shared/ui/index.d.ts +0 -1
- package/dist/billing/shared/ui/index.js +5 -4
- package/dist/billing/shared/utils/directActivityGraphql.d.ts +2 -1
- package/dist/billing/shared/utils/directActivityGraphql.js +1 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts +2 -1
- package/dist/billing/shared/utils/directBillingGraphql.js +3 -3
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
- package/dist/billing/shared/utils/error.d.ts +0 -1
- package/dist/billing/shared/utils/error.js +1 -2
- package/dist/billing/shared/utils/error.js.map +1 -1
- package/dist/billing/shared/utils/format.d.ts +0 -1
- package/dist/billing/shared/utils/format.js +1 -2
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts +2 -1
- package/dist/billing/shared/utils/gatewayGraphql.js +4 -4
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
- package/dist/billing/shared/utils/index.d.ts +0 -1
- package/dist/billing/shared/utils/index.js +9 -8
- package/dist/billing/shared/utils/navigation.d.ts +0 -1
- package/dist/billing/shared/utils/navigation.js +1 -2
- package/dist/billing/shared/utils/navigation.js.map +1 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts +0 -1
- package/dist/billing/shared/utils/paymentTheme.js +2 -3
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
- package/dist/billing/shared/utils/pinnedRequest.d.ts +48 -0
- package/dist/billing/shared/utils/pinnedRequest.js +63 -0
- package/dist/billing/shared/utils/pinnedRequest.js.map +1 -0
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js +2 -3
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/billing/shared/utils/status.d.ts +0 -1
- package/dist/billing/shared/utils/status.js +24 -25
- package/dist/billing/shared/utils/status.js.map +1 -1
- package/dist/billing/shared/utils/tokens.d.ts +0 -1
- package/dist/billing/shared/utils/tokens.js +1 -2
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/dist/billing/translations/en.d.ts +0 -1
- package/dist/billing/types/index.d.ts +0 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/generated/global-operations.d.ts +3252 -3206
- package/dist/generated/global-operations.js +445 -422
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.d.ts +76 -47
- package/dist/generated/wspace-operations.js +2 -3
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/node_modules/@capacitor/core/dist/index.js +12 -14
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +75 -69
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +66 -55
- package/dist/billing/BillingAdminRoutes.d.ts.map +0 -1
- package/dist/billing/BillingRoot.d.ts.map +0 -1
- package/dist/billing/BillingUserRoutes.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingAccountSelection.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingEventEmitter.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingNavigate.d.ts.map +0 -1
- package/dist/billing/hooks/useBillingPermissions.d.ts.map +0 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.d.ts.map +0 -1
- package/dist/billing/hooks/useProducts.d.ts.map +0 -1
- package/dist/billing/index.d.ts.map +0 -1
- package/dist/billing/lib/native-purchases.d.ts.map +0 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddonPurchaseEligibility.d.ts.map +0 -1
- package/dist/billing/modules/addons/hooks/useAddons.d.ts.map +0 -1
- package/dist/billing/modules/addons/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.d.ts.map +0 -1
- package/dist/billing/modules/addons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/addons/store/addonCartStore.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/api.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/index.d.ts.map +0 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/index.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.d.ts.map +0 -1
- package/dist/billing/modules/analytics/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useInvoices.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useOrderCallbacks.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/usePayments.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useRefunds.d.ts.map +0 -1
- package/dist/billing/modules/billing/hooks/useTransactions.d.ts.map +0 -1
- package/dist/billing/modules/billing/index.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundIssueLogsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/RefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.d.ts.map +0 -1
- package/dist/billing/modules/billing/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/AutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompactAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CreditsPaymentOption.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/CurrencySelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/OrderSummary.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PaymentProviderSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SavedCardSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WebCheckoutRedirectView.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.d.ts.map +0 -1
- package/dist/billing/modules/checkout/components/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.d.ts.map +0 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.d.ts.map +0 -1
- package/dist/billing/modules/checkout/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/checkout/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/types/index.d.ts.map +0 -1
- package/dist/billing/modules/checkout/utils/storeOrder.d.ts.map +0 -1
- package/dist/billing/modules/coupons/index.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.d.ts.map +0 -1
- package/dist/billing/modules/coupons/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/hooks/useCredits.d.ts.map +0 -1
- package/dist/billing/modules/credits/index.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/CreditsPage.d.ts.map +0 -1
- package/dist/billing/modules/credits/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/components/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/index.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.d.ts.map +0 -1
- package/dist/billing/modules/dashboard/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/index.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.d.ts.map +0 -1
- package/dist/billing/modules/discounts/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/api.d.ts.map +0 -1
- package/dist/billing/modules/earnings/index.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.d.ts.map +0 -1
- package/dist/billing/modules/earnings/payoutAccountStatus.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/enterprise.d.ts.map +0 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/usePlans.d.ts.map +0 -1
- package/dist/billing/modules/plans/hooks/useQuotas.d.ts.map +0 -1
- package/dist/billing/modules/plans/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/PlansListPage.d.ts.map +0 -1
- package/dist/billing/modules/plans/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/currencyPriceOverrides.d.ts.map +0 -1
- package/dist/billing/modules/plans/utils/planSelector.d.ts.map +0 -1
- package/dist/billing/modules/promotions/index.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/promotions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuota.d.ts.map +0 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.d.ts.map +0 -1
- package/dist/billing/modules/quota/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.d.ts.map +0 -1
- package/dist/billing/modules/quota/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/quota/utils/quotaSelector.d.ts.map +0 -1
- package/dist/billing/modules/settings/index.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/SettingsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.d.ts.map +0 -1
- package/dist/billing/modules/settings/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/store/graphql/index.d.ts.map +0 -1
- package/dist/billing/modules/store/index.d.ts.map +0 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/index.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.d.ts.map +0 -1
- package/dist/billing/modules/subscriptions/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useUsage.d.ts.map +0 -1
- package/dist/billing/modules/usage/hooks/useWorkspaceAiSpend.d.ts.map +0 -1
- package/dist/billing/modules/usage/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/UsagePage.d.ts.map +0 -1
- package/dist/billing/modules/usage/pages/index.d.ts.map +0 -1
- package/dist/billing/modules/usage/utils/aiSpend.d.ts.map +0 -1
- package/dist/billing/providers/BillingProvider.d.ts.map +0 -1
- package/dist/billing/shared/components/AccessDenied.d.ts.map +0 -1
- package/dist/billing/shared/components/ActorIdentity.d.ts.map +0 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/EmptyState.d.ts.map +0 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.d.ts.map +0 -1
- package/dist/billing/shared/components/PageHeader.d.ts.map +0 -1
- package/dist/billing/shared/components/PushPermissionNudge.d.ts.map +0 -1
- package/dist/billing/shared/components/ServerError.d.ts.map +0 -1
- package/dist/billing/shared/components/StatCard.d.ts.map +0 -1
- package/dist/billing/shared/components/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/index.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useActorProfiles.d.ts.map +0 -1
- package/dist/billing/shared/hooks/useTr.d.ts.map +0 -1
- package/dist/billing/shared/index.d.ts.map +0 -1
- package/dist/billing/shared/types/graphql.d.ts.map +0 -1
- package/dist/billing/shared/types/index.d.ts.map +0 -1
- package/dist/billing/shared/ui/Card.d.ts.map +0 -1
- package/dist/billing/shared/ui/MetricCard.d.ts.map +0 -1
- package/dist/billing/shared/ui/ProgressBar.d.ts.map +0 -1
- package/dist/billing/shared/ui/SectionHeader.d.ts.map +0 -1
- package/dist/billing/shared/ui/StatusPill.d.ts.map +0 -1
- package/dist/billing/shared/ui/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/directActivityGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/directBillingGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/error.d.ts.map +0 -1
- package/dist/billing/shared/utils/format.d.ts.map +0 -1
- package/dist/billing/shared/utils/gatewayGraphql.d.ts.map +0 -1
- package/dist/billing/shared/utils/index.d.ts.map +0 -1
- package/dist/billing/shared/utils/navigation.d.ts.map +0 -1
- package/dist/billing/shared/utils/paymentTheme.d.ts.map +0 -1
- package/dist/billing/shared/utils/planFeatureQuantity.d.ts.map +0 -1
- package/dist/billing/shared/utils/status.d.ts.map +0 -1
- package/dist/billing/shared/utils/tokens.d.ts.map +0 -1
- package/dist/billing/translations/en.d.ts.map +0 -1
- package/dist/billing/types/index.d.ts.map +0 -1
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,54 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useBillingPermissions as
|
|
6
|
-
import { useGetDefaultBillingAccountDashboardQuery as
|
|
7
|
-
import {
|
|
1
|
+
import { useBillingNavigate as e } from "../../../hooks/useBillingNavigate.js";
|
|
2
|
+
import { useBilling as t } from "../../../providers/BillingProvider.js";
|
|
3
|
+
import { useBillingAccountSelection as n } from "../../../hooks/useBillingAccountSelection.js";
|
|
4
|
+
import { useInvoice as r, useInvoiceMutations as i } from "../hooks/useInvoices.js";
|
|
5
|
+
import { useBillingPermissions as a } from "../../../hooks/useBillingPermissions.js";
|
|
6
|
+
import { useGetDefaultBillingAccountDashboardQuery as o } from "../../../../generated/global-operations.js";
|
|
7
|
+
import { formatCurrency as s, formatDate as c, formatInvoiceNumber as l, formatInvoiceStatus as u } from "../../../shared/utils/format.js";
|
|
8
8
|
import { withBillingAccountId as d } from "../../../shared/utils/navigation.js";
|
|
9
|
-
import {
|
|
9
|
+
import { getInvoiceStatusColor as f, getStatusBadgeClasses as p } from "../../../shared/utils/status.js";
|
|
10
10
|
import { useState as m } from "react";
|
|
11
11
|
import { useParams as h } from "react-router";
|
|
12
12
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
13
13
|
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
14
|
import { EmphasisPanel as y, NextSteps as b, PagePurpose as x, ResponsiveTable as S } from "@burdenoff/fe-libs/ui";
|
|
15
|
-
|
|
15
|
+
// src/billing/modules/billing/pages/InvoiceDetailPage.tsx
|
|
16
16
|
var C = () => {
|
|
17
17
|
let { t: C } = v(), w = (e, t) => {
|
|
18
18
|
let n = C(e);
|
|
19
19
|
return n === e ? t : n;
|
|
20
|
-
}, { invoiceId: T } = h(), E =
|
|
20
|
+
}, { invoiceId: T } = h(), E = e(), { orgId: D } = t(), O = a(), { selectedAccountId: k } = n({
|
|
21
21
|
orgId: D,
|
|
22
22
|
syncFromUrl: !0,
|
|
23
23
|
urlParamName: "billingAccountId"
|
|
24
|
-
}), { data: A } =
|
|
24
|
+
}), { data: A } = o({ fetchPolicy: "cache-first" }), j = k ?? A?.getDefaultBillingAccount?.id ?? void 0, { invoice: M, isLoading: N, error: P, refetch: F } = r(T, j), { payInvoice: I, voidInvoice: L, isPaying: R, isVoiding: z } = i(), B = A?.getDefaultBillingAccount?.defaultPaymentMethod, [V, H] = m(null), U = async () => {
|
|
25
25
|
if (M) {
|
|
26
|
-
if (!B)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
try {
|
|
36
|
-
await I(M.id, B, j), await F();
|
|
37
|
-
} catch (e) {
|
|
38
|
-
H(e instanceof Error ? e.message : "Failed to pay invoice");
|
|
26
|
+
if (!B) H("Add and set a default payment method before paying this invoice.");
|
|
27
|
+
else if (!j) H("No billing account context");
|
|
28
|
+
else {
|
|
29
|
+
H(null);
|
|
30
|
+
try {
|
|
31
|
+
await I(M.id, B, j), await F();
|
|
32
|
+
} catch (e) {
|
|
33
|
+
H(e instanceof Error ? e.message : "Failed to pay invoice");
|
|
34
|
+
}
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
37
|
}, W = async () => {
|
|
42
38
|
if (M) {
|
|
43
|
-
if (!j)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
H(e instanceof Error ? e.message : "Failed to void invoice");
|
|
39
|
+
if (!j) H("No billing account context");
|
|
40
|
+
else {
|
|
41
|
+
H(null);
|
|
42
|
+
try {
|
|
43
|
+
await L(M.id, j), await F();
|
|
44
|
+
} catch (e) {
|
|
45
|
+
H(e instanceof Error ? e.message : "Failed to void invoice");
|
|
46
|
+
}
|
|
52
47
|
}
|
|
53
48
|
}
|
|
54
49
|
};
|
|
@@ -180,7 +175,7 @@ var C = () => {
|
|
|
180
175
|
]
|
|
181
176
|
})
|
|
182
177
|
});
|
|
183
|
-
let G =
|
|
178
|
+
let G = f(M.status), K = M.status === "OPEN", q = M.status === "DRAFT", J = M.items || [], Y = M.total - M.amountPaid, X = M.metadata?.invoicePdfBackupUrl, Z = [
|
|
184
179
|
{
|
|
185
180
|
key: "description",
|
|
186
181
|
header: "Description",
|
|
@@ -204,7 +199,7 @@ var C = () => {
|
|
|
204
199
|
cellClassName: "text-right",
|
|
205
200
|
cell: (e) => /* @__PURE__ */ g("span", {
|
|
206
201
|
className: "tabular-nums",
|
|
207
|
-
children:
|
|
202
|
+
children: s(e.unitPrice, M.currency)
|
|
208
203
|
})
|
|
209
204
|
},
|
|
210
205
|
{
|
|
@@ -214,7 +209,7 @@ var C = () => {
|
|
|
214
209
|
cellClassName: "text-right font-medium",
|
|
215
210
|
cell: (e) => /* @__PURE__ */ g("span", {
|
|
216
211
|
className: "tabular-nums",
|
|
217
|
-
children:
|
|
212
|
+
children: s(e.amount, M.currency)
|
|
218
213
|
})
|
|
219
214
|
}
|
|
220
215
|
], Q = [
|
|
@@ -277,18 +272,18 @@ var C = () => {
|
|
|
277
272
|
className: "flex items-center gap-3",
|
|
278
273
|
children: [/* @__PURE__ */ _("h1", {
|
|
279
274
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
280
|
-
children: ["Invoice ",
|
|
275
|
+
children: ["Invoice ", l(M.invoiceNumber)]
|
|
281
276
|
}), /* @__PURE__ */ g("span", {
|
|
282
|
-
className: `px-2 py-1 text-xs font-medium rounded ${
|
|
283
|
-
children:
|
|
277
|
+
className: `px-2 py-1 text-xs font-medium rounded ${p(G)}`,
|
|
278
|
+
children: u(M.status)
|
|
284
279
|
})]
|
|
285
280
|
}),
|
|
286
281
|
/* @__PURE__ */ _("p", {
|
|
287
282
|
className: "text-sm text-text-secondary mt-1",
|
|
288
283
|
children: [
|
|
289
284
|
"Created ",
|
|
290
|
-
|
|
291
|
-
M.dueDate && ` · Due ${
|
|
285
|
+
c(M.createdAt, "short"),
|
|
286
|
+
M.dueDate && ` · Due ${c(M.dueDate, "short")}`
|
|
292
287
|
]
|
|
293
288
|
}),
|
|
294
289
|
/* @__PURE__ */ g(x, {
|
|
@@ -387,7 +382,7 @@ var C = () => {
|
|
|
387
382
|
children: w("billing.invoices.subtotal", "Subtotal")
|
|
388
383
|
}), /* @__PURE__ */ g("span", {
|
|
389
384
|
className: "text-text-primary",
|
|
390
|
-
children:
|
|
385
|
+
children: s(M.subtotal, M.currency)
|
|
391
386
|
})]
|
|
392
387
|
}),
|
|
393
388
|
/* @__PURE__ */ _("div", {
|
|
@@ -397,7 +392,7 @@ var C = () => {
|
|
|
397
392
|
children: w("billing.invoices.tax", "Tax")
|
|
398
393
|
}), /* @__PURE__ */ g("span", {
|
|
399
394
|
className: "text-text-primary",
|
|
400
|
-
children:
|
|
395
|
+
children: s(M.tax, M.currency)
|
|
401
396
|
})]
|
|
402
397
|
}),
|
|
403
398
|
/* @__PURE__ */ _("div", {
|
|
@@ -407,7 +402,7 @@ var C = () => {
|
|
|
407
402
|
children: w("billing.invoices.total", "Total")
|
|
408
403
|
}), /* @__PURE__ */ g("span", {
|
|
409
404
|
className: "text-text-primary",
|
|
410
|
-
children:
|
|
405
|
+
children: s(M.total, M.currency)
|
|
411
406
|
})]
|
|
412
407
|
}),
|
|
413
408
|
M.amountPaid > 0 && /* @__PURE__ */ _("div", {
|
|
@@ -417,7 +412,7 @@ var C = () => {
|
|
|
417
412
|
children: w("billing.invoices.amountPaid", "Amount Paid")
|
|
418
413
|
}), /* @__PURE__ */ _("span", {
|
|
419
414
|
className: "text-status-success-text",
|
|
420
|
-
children: ["-",
|
|
415
|
+
children: ["-", s(M.amountPaid, M.currency)]
|
|
421
416
|
})]
|
|
422
417
|
}),
|
|
423
418
|
Y > 0 && /* @__PURE__ */ _("div", {
|
|
@@ -427,7 +422,7 @@ var C = () => {
|
|
|
427
422
|
children: w("billing.invoices.amountDue", "Amount Due")
|
|
428
423
|
}), /* @__PURE__ */ g("span", {
|
|
429
424
|
className: "text-status-warning-text",
|
|
430
|
-
children:
|
|
425
|
+
children: s(Y, M.currency)
|
|
431
426
|
})]
|
|
432
427
|
})
|
|
433
428
|
]
|
|
@@ -494,7 +489,7 @@ var C = () => {
|
|
|
494
489
|
children: "Amount"
|
|
495
490
|
}), /* @__PURE__ */ g("p", {
|
|
496
491
|
className: "text-sm text-text-primary mt-0.5",
|
|
497
|
-
children:
|
|
492
|
+
children: s(M.payment.amount, M.payment.currency)
|
|
498
493
|
})] }),
|
|
499
494
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
500
495
|
className: "text-sm text-text-secondary",
|
|
@@ -522,7 +517,7 @@ var C = () => {
|
|
|
522
517
|
children: "Paid At"
|
|
523
518
|
}), /* @__PURE__ */ g("p", {
|
|
524
519
|
className: "text-sm text-text-primary mt-0.5",
|
|
525
|
-
children:
|
|
520
|
+
children: c(M.payment.paidAt, "short")
|
|
526
521
|
})] })
|
|
527
522
|
]
|
|
528
523
|
})
|
|
@@ -559,7 +554,7 @@ var C = () => {
|
|
|
559
554
|
children: "Invoice Number"
|
|
560
555
|
}), /* @__PURE__ */ g("p", {
|
|
561
556
|
className: "text-sm text-text-primary mt-0.5",
|
|
562
|
-
children:
|
|
557
|
+
children: l(M.invoiceNumber)
|
|
563
558
|
})] }),
|
|
564
559
|
M.itemDescription && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
565
560
|
className: "text-sm text-text-secondary",
|
|
@@ -572,8 +567,8 @@ var C = () => {
|
|
|
572
567
|
className: "text-sm text-text-secondary",
|
|
573
568
|
children: "Status"
|
|
574
569
|
}), /* @__PURE__ */ g("span", {
|
|
575
|
-
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${
|
|
576
|
-
children:
|
|
570
|
+
className: `inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${p(G)}`,
|
|
571
|
+
children: u(M.status)
|
|
577
572
|
})] }),
|
|
578
573
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
579
574
|
className: "text-sm text-text-secondary",
|
|
@@ -587,21 +582,21 @@ var C = () => {
|
|
|
587
582
|
children: "Total"
|
|
588
583
|
}), /* @__PURE__ */ g("p", {
|
|
589
584
|
className: "text-sm font-semibold text-text-primary mt-0.5",
|
|
590
|
-
children:
|
|
585
|
+
children: s(M.total, M.currency)
|
|
591
586
|
})] }),
|
|
592
587
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
593
588
|
className: "text-sm text-text-secondary",
|
|
594
589
|
children: "Amount Paid"
|
|
595
590
|
}), /* @__PURE__ */ g("p", {
|
|
596
591
|
className: "text-sm text-status-success-text mt-0.5",
|
|
597
|
-
children:
|
|
592
|
+
children: s(M.amountPaid, M.currency)
|
|
598
593
|
})] }),
|
|
599
594
|
Y > 0 && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
600
595
|
className: "text-sm text-text-secondary",
|
|
601
596
|
children: "Amount Due"
|
|
602
597
|
}), /* @__PURE__ */ g("p", {
|
|
603
598
|
className: "text-sm font-semibold text-status-warning-text mt-0.5",
|
|
604
|
-
children:
|
|
599
|
+
children: s(Y, M.currency)
|
|
605
600
|
})] })
|
|
606
601
|
]
|
|
607
602
|
})]
|
|
@@ -622,28 +617,28 @@ var C = () => {
|
|
|
622
617
|
children: "Created"
|
|
623
618
|
}), /* @__PURE__ */ g("p", {
|
|
624
619
|
className: "text-sm text-text-primary mt-0.5",
|
|
625
|
-
children:
|
|
620
|
+
children: c(M.createdAt)
|
|
626
621
|
})] }),
|
|
627
622
|
M.dueDate && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
628
623
|
className: "text-sm text-text-secondary",
|
|
629
624
|
children: "Due Date"
|
|
630
625
|
}), /* @__PURE__ */ g("p", {
|
|
631
626
|
className: "text-sm text-text-primary mt-0.5",
|
|
632
|
-
children:
|
|
627
|
+
children: c(M.dueDate)
|
|
633
628
|
})] }),
|
|
634
629
|
M.paidAt && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
635
630
|
className: "text-sm text-text-secondary",
|
|
636
631
|
children: "Paid At"
|
|
637
632
|
}), /* @__PURE__ */ g("p", {
|
|
638
633
|
className: "text-sm text-text-primary mt-0.5",
|
|
639
|
-
children:
|
|
634
|
+
children: c(M.paidAt)
|
|
640
635
|
})] }),
|
|
641
636
|
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
642
637
|
className: "text-sm text-text-secondary",
|
|
643
638
|
children: "Last Updated"
|
|
644
639
|
}), /* @__PURE__ */ g("p", {
|
|
645
640
|
className: "text-sm text-text-primary mt-0.5",
|
|
646
|
-
children:
|
|
641
|
+
children: c(M.updatedAt)
|
|
647
642
|
})] })
|
|
648
643
|
]
|
|
649
644
|
})]
|
|
@@ -673,7 +668,6 @@ var C = () => {
|
|
|
673
668
|
]
|
|
674
669
|
});
|
|
675
670
|
};
|
|
676
|
-
//#endregion
|
|
677
671
|
export { C as InvoiceDetailPage };
|
|
678
672
|
|
|
679
673
|
//# sourceMappingURL=InvoiceDetailPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoiceDetailPage.js","names":[],"sources":["../../../../../src/billing/modules/billing/pages/InvoiceDetailPage.tsx"],"sourcesContent":["/**\n * Billing Module - Invoice Detail Page\n * Displays detailed information about a single invoice\n */\n\nimport { type FC, useState } from 'react';\nimport { useParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { useBillingAccountSelection } from '../../../hooks/useBillingAccountSelection';\nimport { useInvoice, useInvoiceMutations } from '../hooks/useInvoices';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useGetDefaultBillingAccountDashboardQuery } from '../../../../generated/global-operations';\nimport {\n formatCurrency,\n formatDate,\n formatInvoiceStatus,\n formatInvoiceNumber,\n} from '../../../shared/utils/format';\nimport { withBillingAccountId } from '../../../shared/utils/navigation';\nimport { getInvoiceStatusColor, getStatusBadgeClasses } from '../../../shared/utils/status';\nimport type { InvoiceStatus } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n PagePurpose,\n EmphasisPanel,\n NextSteps,\n type NextStep,\n} from '@burdenoff/fe-libs/ui';\n\nexport const InvoiceDetailPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const { invoiceId } = useParams<{ invoiceId: string }>();\n const navigateTo = useBillingNavigate();\n const { orgId } = useBilling();\n const permissions = useBillingPermissions();\n const { selectedAccountId } = useBillingAccountSelection({\n orgId,\n syncFromUrl: true,\n urlParamName: 'billingAccountId',\n });\n const { data: defaultBillingAccountData } = useGetDefaultBillingAccountDashboardQuery({\n fetchPolicy: 'cache-first',\n });\n const billingAccountId =\n selectedAccountId ?? defaultBillingAccountData?.getDefaultBillingAccount?.id ?? undefined;\n const { invoice, isLoading, error, refetch } = useInvoice(invoiceId, billingAccountId);\n const { payInvoice, voidInvoice, isPaying, isVoiding } = useInvoiceMutations();\n const defaultPaymentMethodId =\n defaultBillingAccountData?.getDefaultBillingAccount?.defaultPaymentMethod;\n\n // Action error state\n const [actionError, setActionError] = useState<string | null>(null);\n\n // Handle pay invoice\n const handlePayInvoice = async () => {\n if (!invoice) return;\n if (!defaultPaymentMethodId) {\n setActionError('Add and set a default payment method before paying this invoice.');\n return;\n }\n\n if (!billingAccountId) {\n setActionError('No billing account context');\n return;\n }\n setActionError(null);\n try {\n await payInvoice(invoice.id, defaultPaymentMethodId, billingAccountId);\n await refetch();\n } catch (err) {\n setActionError(err instanceof Error ? err.message : 'Failed to pay invoice');\n }\n };\n\n // Handle void invoice\n const handleVoidInvoice = async () => {\n if (!invoice) return;\n if (!billingAccountId) {\n setActionError('No billing account context');\n return;\n }\n\n setActionError(null);\n try {\n await voidInvoice(invoice.id, billingAccountId);\n await refetch();\n } catch (err) {\n setActionError(err instanceof Error ? err.message : 'Failed to void invoice');\n }\n };\n\n // Permission check\n if (!permissions.canViewInvoices) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <div className=\"size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center\">\n <svg\n className=\"size-6 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {tr('billing.invoices.noViewPermission', \"You don't have permission to view invoices.\")}\n </p>\n </div>\n </div>\n );\n }\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"space-y-2\">\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-32 bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-full bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-3/4 bg-bg-sunken animate-pulse rounded\" />\n </div>\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"flex items-center gap-4\">\n <div className=\"h-4 flex-1 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-16 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-16 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-20 bg-bg-sunken animate-pulse rounded\" />\n </div>\n ))}\n </div>\n </div>\n <div className=\"space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n {[1, 2, 3, 4].map((i) => (\n <div key={i} className=\"space-y-1\">\n <div className=\"h-3 w-20 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-28 bg-bg-sunken animate-pulse rounded\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error || !invoice) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <div className=\"size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center\">\n <svg\n className=\"size-6 text-status-error-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.invoiceNotFound', 'Invoice not found')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {error?.message ||\n tr(\n 'billing.invoices.invoiceNotFoundMessage',\n 'The invoice you are looking for does not exist.'\n )}\n </p>\n <div className=\"flex items-center justify-center gap-3\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo(withBillingAccountId('/invoices', billingAccountId))}\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Back to Invoices\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n const statusColor = getInvoiceStatusColor(invoice.status);\n const isOpen = invoice.status === ('OPEN' as InvoiceStatus);\n const isDraft = invoice.status === ('DRAFT' as InvoiceStatus);\n const items = invoice.items || [];\n const amountDue = invoice.total - invoice.amountPaid;\n // Our own durable backup copy — shown alongside the provider's pdfUrl, not\n // as a replacement, so the provider's link still works even if this one\n // was never stored (e.g. no S3 bucket configured for this environment).\n const invoicePdfBackupUrl = (invoice.metadata as Record<string, unknown> | undefined)\n ?.invoicePdfBackupUrl as string | undefined;\n\n const lineItemColumns: ResponsiveTableColumn<(typeof items)[number]>[] = [\n {\n key: 'description',\n header: 'Description',\n priority: 'primary',\n cell: (item) => item.description,\n },\n {\n key: 'quantity',\n header: 'Qty',\n headerClassName: 'text-right',\n cellClassName: 'text-right',\n cell: (item) => <span className=\"tabular-nums\">{item.quantity}</span>,\n },\n {\n key: 'unitPrice',\n header: 'Unit Price',\n headerClassName: 'text-right',\n cellClassName: 'text-right',\n cell: (item) => (\n <span className=\"tabular-nums\">{formatCurrency(item.unitPrice, invoice.currency)}</span>\n ),\n },\n {\n key: 'amount',\n header: 'Amount',\n headerClassName: 'text-right',\n cellClassName: 'text-right font-medium',\n cell: (item) => (\n <span className=\"tabular-nums\">{formatCurrency(item.amount, invoice.currency)}</span>\n ),\n },\n ];\n\n // Recommended next actions for this invoice\n const nextSteps: NextStep[] = [\n ...(isOpen && permissions.canPayInvoice\n ? [\n {\n id: 'pay',\n label: 'Pay this invoice',\n description: defaultPaymentMethodId\n ? 'Settle the outstanding amount with your default payment method.'\n : 'Add a default payment method first, then pay.',\n onClick: handlePayInvoice,\n },\n ]\n : []),\n ...(invoice.pdfUrl\n ? [\n {\n id: 'download',\n label: 'Download the PDF',\n description: 'Save a copy of this invoice for your records.',\n href: invoice.pdfUrl,\n },\n ]\n : []),\n ...(invoicePdfBackupUrl\n ? [\n {\n id: 'download-backup',\n label: 'Download the PDF (backup copy)',\n description: 'Our own stored copy — works even if the link above ever breaks.',\n href: invoicePdfBackupUrl,\n },\n ]\n : []),\n ...(invoice.subscription\n ? [\n {\n id: 'view-subscription',\n label: 'View the related subscription',\n description: 'See the plan and quotas this invoice billed for.',\n onClick: () =>\n navigateTo(\n withBillingAccountId(`/subscriptions/${invoice.subscription!.id}`, billingAccountId)\n ),\n },\n ]\n : []),\n {\n id: 'request-refund',\n label: 'Have an issue? Request a refund',\n description: 'Raise a refund request for a charge on this account.',\n onClick: () => navigateTo(withBillingAccountId('/refunds', billingAccountId)),\n },\n ];\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-4\">\n <button\n type=\"button\"\n onClick={() => navigateTo(withBillingAccountId('/invoices', billingAccountId))}\n className=\"p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n <svg className=\"size-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n <div>\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n Invoice {formatInvoiceNumber(invoice.invoiceNumber)}\n </h1>\n <span\n className={`px-2 py-1 text-xs font-medium rounded ${getStatusBadgeClasses(statusColor)}`}\n >\n {formatInvoiceStatus(invoice.status)}\n </span>\n </div>\n <p className=\"text-sm text-text-secondary mt-1\">\n Created {formatDate(invoice.createdAt, 'short')}\n {invoice.dueDate && ` · Due ${formatDate(invoice.dueDate, 'short')}`}\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.invoices.detailPurpose',\n 'The full breakdown of a single invoice — its line items, taxes, what has been paid and what is still due. Use it to download the PDF, pay an outstanding balance, jump to the subscription it covers, or raise a refund.'\n )}\n </PagePurpose>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 flex-wrap\">\n {invoice.pdfUrl && (\n <a\n href={invoice.pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Download PDF\n </a>\n )}\n {invoicePdfBackupUrl && (\n <a\n href={invoicePdfBackupUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Download PDF (backup)\n </a>\n )}\n {invoice.invoiceUrl && (\n <a\n href={invoice.invoiceUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n View on Portal\n </a>\n )}\n {isOpen && permissions.canPayInvoice && (\n <button\n type=\"button\"\n onClick={handlePayInvoice}\n disabled={isPaying || !defaultPaymentMethodId}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50\"\n >\n {!defaultPaymentMethodId\n ? 'Default Payment Method Required'\n : isPaying\n ? 'Processing...'\n : 'Pay Invoice'}\n </button>\n )}\n {(isOpen || isDraft) && permissions.canVoidInvoice && (\n <button\n type=\"button\"\n onClick={handleVoidInvoice}\n disabled={isVoiding}\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n {isVoiding\n ? tr('billing.invoices.voiding', 'Voiding...')\n : tr('billing.invoices.voidInvoice', 'Void Invoice')}\n </button>\n )}\n </div>\n </div>\n\n {/* Action Error */}\n {actionError && (\n <div className=\"p-3 bg-status-error-bg-subtle border border-status-error-border rounded-button\">\n <p className=\"text-sm text-status-error-text\">{actionError}</p>\n </div>\n )}\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Line Items — primary emphasis zone (what was billed & what is due) */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"p-6 border-b border-border-subtle\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.lineItems', 'Line Items')} ({items.length})\n </h2>\n </div>\n {items.length === 0 ? (\n <div className=\"p-6\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.invoices.noLineItems', 'No line items on this invoice.')}\n </p>\n </div>\n ) : (\n <ResponsiveTable data={items} rowKey={(item) => item.id} columns={lineItemColumns} />\n )}\n\n {/* Totals */}\n <div className=\"border-t border-border-subtle p-4\">\n <div className=\"max-w-xs ml-auto space-y-2\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">\n {tr('billing.invoices.subtotal', 'Subtotal')}\n </span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.subtotal, invoice.currency)}\n </span>\n </div>\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">{tr('billing.invoices.tax', 'Tax')}</span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.tax, invoice.currency)}\n </span>\n </div>\n <div className=\"flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2\">\n <span className=\"text-text-primary\">{tr('billing.invoices.total', 'Total')}</span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.total, invoice.currency)}\n </span>\n </div>\n {invoice.amountPaid > 0 && (\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">\n {tr('billing.invoices.amountPaid', 'Amount Paid')}\n </span>\n <span className=\"text-status-success-text\">\n -{formatCurrency(invoice.amountPaid, invoice.currency)}\n </span>\n </div>\n )}\n {amountDue > 0 && (\n <div className=\"flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2\">\n <span className=\"text-text-primary\">\n {tr('billing.invoices.amountDue', 'Amount Due')}\n </span>\n <span className=\"text-status-warning-text\">\n {formatCurrency(amountDue, invoice.currency)}\n </span>\n </div>\n )}\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Subscription Info */}\n {invoice.subscription && (\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.subscription', 'Subscription')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium text-text-primary\">\n {invoice.subscription.plan?.name || 'Unknown Plan'}\n </p>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n Subscription ID:{' '}\n <span className=\"font-mono text-xs\">{invoice.subscription.id}</span>\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(\n withBillingAccountId(\n `/subscriptions/${invoice.subscription!.id}`,\n billingAccountId\n )\n )\n }\n className=\"px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n View\n </button>\n </div>\n </div>\n </div>\n )}\n\n {/* Payment Info */}\n {invoice.payment && (\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.payment', 'Payment')}\n </h2>\n </div>\n <div className=\"p-6\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Payment ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">\n {invoice.payment.id}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Amount</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatCurrency(invoice.payment.amount, invoice.payment.currency)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Status</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.status.toLowerCase()}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Method</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.method.toLowerCase().replace(/_/g, ' ')}\n </p>\n </div>\n {invoice.payment.provider && (\n <div>\n <p className=\"text-sm text-text-secondary\">Provider</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.provider}\n </p>\n </div>\n )}\n {invoice.payment.paidAt && (\n <div>\n <p className=\"text-sm text-text-secondary\">Paid At</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatDate(invoice.payment.paidAt, 'short')}\n </p>\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Next steps guidance */}\n <NextSteps storageKey=\"billing-invoice-detail\" steps={nextSteps} />\n\n {/* Invoice Summary */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.details', 'Details')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invoice ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">{invoice.id}</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Invoice Number</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatInvoiceNumber(invoice.invoiceNumber)}\n </p>\n </div>\n {invoice.itemDescription && (\n <div>\n <p className=\"text-sm text-text-secondary\">Description</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{invoice.itemDescription}</p>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-secondary\">Status</p>\n <span\n className={`inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${getStatusBadgeClasses(statusColor)}`}\n >\n {formatInvoiceStatus(invoice.status)}\n </span>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Currency</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{invoice.currency}</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Total</p>\n <p className=\"text-sm font-semibold text-text-primary mt-0.5\">\n {formatCurrency(invoice.total, invoice.currency)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Amount Paid</p>\n <p className=\"text-sm text-status-success-text mt-0.5\">\n {formatCurrency(invoice.amountPaid, invoice.currency)}\n </p>\n </div>\n {amountDue > 0 && (\n <div>\n <p className=\"text-sm text-text-secondary\">Amount Due</p>\n <p className=\"text-sm font-semibold text-status-warning-text mt-0.5\">\n {formatCurrency(amountDue, invoice.currency)}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Dates */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.dates', 'Dates')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Created</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.createdAt)}</p>\n </div>\n {invoice.dueDate && (\n <div>\n <p className=\"text-sm text-text-secondary\">Due Date</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.dueDate)}</p>\n </div>\n )}\n {invoice.paidAt && (\n <div>\n <p className=\"text-sm text-text-secondary\">Paid At</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.paidAt)}</p>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-secondary\">Last Updated</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.updatedAt)}</p>\n </div>\n </div>\n </div>\n\n {/* Organization */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.organization', 'Organization')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Organization ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">\n {invoice.orgId}\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAa,UAA8B;CACzC,IAAM,EAAE,SAAM,EAAQ,GAChB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAa,EAAE,CAAG;EACxB,OAAO,MAAe,IAAM,IAAW;CACzC,GACM,EAAE,iBAAc,EAAiC,GACjD,IAAa,EAAmB,GAChC,EAAE,aAAU,EAAW,GACvB,IAAc,EAAsB,GACpC,EAAE,yBAAsB,EAA2B;EACvD;EACA,aAAa;EACb,cAAc;CAChB,CAAC,GACK,EAAE,MAAM,MAA8B,EAA0C,EACpF,aAAa,cACf,CAAC,GACK,IACJ,KAAqB,GAA2B,0BAA0B,MAAM,KAAA,GAC5E,EAAE,YAAS,cAAW,UAAO,eAAY,EAAW,GAAW,CAAgB,GAC/E,EAAE,eAAY,gBAAa,aAAU,iBAAc,EAAoB,GACvE,IACJ,GAA2B,0BAA0B,sBAGjD,CAAC,GAAa,KAAkB,EAAwB,IAAI,GAG5D,I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
|
|
1
|
+
{"version":3,"file":"InvoiceDetailPage.js","names":["InvoiceDetailPage","useI18n","tr","translated","t","key","fallback","useParams","navigateTo","useBillingNavigate","useBilling","permissions","useBillingPermissions","useBillingAccountSelection","defaultBillingAccountData","useGetDefaultBillingAccountDashboardQuery","billingAccountId","selectedAccountId","useInvoice","invoiceId","useInvoiceMutations","defaultPaymentMethodId","actionError","setActionError","useState","handlePayInvoice","invoice","payInvoice","refetch","err","handleVoidInvoice","voidInvoice","isLoading","i","error","withBillingAccountId","statusColor","getInvoiceStatusColor","isOpen","isDraft","items","amountDue","invoicePdfBackupUrl","lineItemColumns","item","formatCurrency","nextSteps","formatInvoiceNumber","getStatusBadgeClasses","formatInvoiceStatus","formatDate","PagePurpose","isPaying","isVoiding","EmphasisPanel","ResponsiveTable","NextSteps"],"sources":["../../../../../src/billing/modules/billing/pages/InvoiceDetailPage.tsx"],"sourcesContent":["/**\n * Billing Module - Invoice Detail Page\n * Displays detailed information about a single invoice\n */\n\nimport { type FC, useState } from 'react';\nimport { useParams } from 'react-router';\nimport { useBillingNavigate } from '../../../hooks/useBillingNavigate';\nimport { useBilling } from '../../../providers/BillingProvider';\nimport { useBillingAccountSelection } from '../../../hooks/useBillingAccountSelection';\nimport { useInvoice, useInvoiceMutations } from '../hooks/useInvoices';\nimport { useBillingPermissions } from '../../../hooks/useBillingPermissions';\nimport { useGetDefaultBillingAccountDashboardQuery } from '../../../../generated/global-operations';\nimport {\n formatCurrency,\n formatDate,\n formatInvoiceStatus,\n formatInvoiceNumber,\n} from '../../../shared/utils/format';\nimport { withBillingAccountId } from '../../../shared/utils/navigation';\nimport { getInvoiceStatusColor, getStatusBadgeClasses } from '../../../shared/utils/status';\nimport type { InvoiceStatus } from '../../../shared/types';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n PagePurpose,\n EmphasisPanel,\n NextSteps,\n type NextStep,\n} from '@burdenoff/fe-libs/ui';\n\nexport const InvoiceDetailPage: FC = () => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const translated = t(key);\n return translated === key ? fallback : translated;\n };\n const { invoiceId } = useParams<{ invoiceId: string }>();\n const navigateTo = useBillingNavigate();\n const { orgId } = useBilling();\n const permissions = useBillingPermissions();\n const { selectedAccountId } = useBillingAccountSelection({\n orgId,\n syncFromUrl: true,\n urlParamName: 'billingAccountId',\n });\n const { data: defaultBillingAccountData } = useGetDefaultBillingAccountDashboardQuery({\n fetchPolicy: 'cache-first',\n });\n const billingAccountId =\n selectedAccountId ?? defaultBillingAccountData?.getDefaultBillingAccount?.id ?? undefined;\n const { invoice, isLoading, error, refetch } = useInvoice(invoiceId, billingAccountId);\n const { payInvoice, voidInvoice, isPaying, isVoiding } = useInvoiceMutations();\n const defaultPaymentMethodId =\n defaultBillingAccountData?.getDefaultBillingAccount?.defaultPaymentMethod;\n\n // Action error state\n const [actionError, setActionError] = useState<string | null>(null);\n\n // Handle pay invoice\n const handlePayInvoice = async () => {\n if (!invoice) return;\n if (!defaultPaymentMethodId) {\n setActionError('Add and set a default payment method before paying this invoice.');\n return;\n }\n\n if (!billingAccountId) {\n setActionError('No billing account context');\n return;\n }\n setActionError(null);\n try {\n await payInvoice(invoice.id, defaultPaymentMethodId, billingAccountId);\n await refetch();\n } catch (err) {\n setActionError(err instanceof Error ? err.message : 'Failed to pay invoice');\n }\n };\n\n // Handle void invoice\n const handleVoidInvoice = async () => {\n if (!invoice) return;\n if (!billingAccountId) {\n setActionError('No billing account context');\n return;\n }\n\n setActionError(null);\n try {\n await voidInvoice(invoice.id, billingAccountId);\n await refetch();\n } catch (err) {\n setActionError(err instanceof Error ? err.message : 'Failed to void invoice');\n }\n };\n\n // Permission check\n if (!permissions.canViewInvoices) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-2\">\n <div className=\"size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center\">\n <svg\n className=\"size-6 text-text-secondary\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.accessDenied.title', 'Access Denied')}\n </h2>\n <p className=\"text-sm text-text-secondary max-w-sm\">\n {tr('billing.invoices.noViewPermission', \"You don't have permission to view invoices.\")}\n </p>\n </div>\n </div>\n );\n }\n\n // Loading state\n if (isLoading) {\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n <div className=\"flex items-center gap-4\">\n <div className=\"size-10 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"space-y-2\">\n <div className=\"h-8 w-48 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-32 bg-bg-sunken animate-pulse rounded\" />\n </div>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-32 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-full bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-3/4 bg-bg-sunken animate-pulse rounded\" />\n </div>\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n {[1, 2, 3].map((i) => (\n <div key={i} className=\"flex items-center gap-4\">\n <div className=\"h-4 flex-1 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-16 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-16 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-20 bg-bg-sunken animate-pulse rounded\" />\n </div>\n ))}\n </div>\n </div>\n <div className=\"space-y-6\">\n <div className=\"border border-border-subtle rounded-lg p-6 space-y-4\">\n <div className=\"h-6 w-24 bg-bg-sunken animate-pulse rounded\" />\n {[1, 2, 3, 4].map((i) => (\n <div key={i} className=\"space-y-1\">\n <div className=\"h-3 w-20 bg-bg-sunken animate-pulse rounded\" />\n <div className=\"h-4 w-28 bg-bg-sunken animate-pulse rounded\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error || !invoice) {\n return (\n <div className=\"flex items-center justify-center h-full min-h-[400px]\">\n <div className=\"text-center space-y-4\">\n <div className=\"size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center\">\n <svg\n className=\"size-6 text-status-error-text\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z\"\n />\n </svg>\n </div>\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.invoiceNotFound', 'Invoice not found')}\n </h2>\n <p className=\"text-sm text-text-secondary\">\n {error?.message ||\n tr(\n 'billing.invoices.invoiceNotFoundMessage',\n 'The invoice you are looking for does not exist.'\n )}\n </p>\n <div className=\"flex items-center justify-center gap-3\">\n <button\n type=\"button\"\n onClick={() => refetch()}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors\"\n >\n Try Again\n </button>\n <button\n type=\"button\"\n onClick={() => navigateTo(withBillingAccountId('/invoices', billingAccountId))}\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Back to Invoices\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n const statusColor = getInvoiceStatusColor(invoice.status);\n const isOpen = invoice.status === ('OPEN' as InvoiceStatus);\n const isDraft = invoice.status === ('DRAFT' as InvoiceStatus);\n const items = invoice.items || [];\n const amountDue = invoice.total - invoice.amountPaid;\n // Our own durable backup copy — shown alongside the provider's pdfUrl, not\n // as a replacement, so the provider's link still works even if this one\n // was never stored (e.g. no S3 bucket configured for this environment).\n const invoicePdfBackupUrl = (invoice.metadata as Record<string, unknown> | undefined)\n ?.invoicePdfBackupUrl as string | undefined;\n\n const lineItemColumns: ResponsiveTableColumn<(typeof items)[number]>[] = [\n {\n key: 'description',\n header: 'Description',\n priority: 'primary',\n cell: (item) => item.description,\n },\n {\n key: 'quantity',\n header: 'Qty',\n headerClassName: 'text-right',\n cellClassName: 'text-right',\n cell: (item) => <span className=\"tabular-nums\">{item.quantity}</span>,\n },\n {\n key: 'unitPrice',\n header: 'Unit Price',\n headerClassName: 'text-right',\n cellClassName: 'text-right',\n cell: (item) => (\n <span className=\"tabular-nums\">{formatCurrency(item.unitPrice, invoice.currency)}</span>\n ),\n },\n {\n key: 'amount',\n header: 'Amount',\n headerClassName: 'text-right',\n cellClassName: 'text-right font-medium',\n cell: (item) => (\n <span className=\"tabular-nums\">{formatCurrency(item.amount, invoice.currency)}</span>\n ),\n },\n ];\n\n // Recommended next actions for this invoice\n const nextSteps: NextStep[] = [\n ...(isOpen && permissions.canPayInvoice\n ? [\n {\n id: 'pay',\n label: 'Pay this invoice',\n description: defaultPaymentMethodId\n ? 'Settle the outstanding amount with your default payment method.'\n : 'Add a default payment method first, then pay.',\n onClick: handlePayInvoice,\n },\n ]\n : []),\n ...(invoice.pdfUrl\n ? [\n {\n id: 'download',\n label: 'Download the PDF',\n description: 'Save a copy of this invoice for your records.',\n href: invoice.pdfUrl,\n },\n ]\n : []),\n ...(invoicePdfBackupUrl\n ? [\n {\n id: 'download-backup',\n label: 'Download the PDF (backup copy)',\n description: 'Our own stored copy — works even if the link above ever breaks.',\n href: invoicePdfBackupUrl,\n },\n ]\n : []),\n ...(invoice.subscription\n ? [\n {\n id: 'view-subscription',\n label: 'View the related subscription',\n description: 'See the plan and quotas this invoice billed for.',\n onClick: () =>\n navigateTo(\n withBillingAccountId(`/subscriptions/${invoice.subscription!.id}`, billingAccountId)\n ),\n },\n ]\n : []),\n {\n id: 'request-refund',\n label: 'Have an issue? Request a refund',\n description: 'Raise a refund request for a charge on this account.',\n onClick: () => navigateTo(withBillingAccountId('/refunds', billingAccountId)),\n },\n ];\n\n return (\n <div className=\"space-y-6 px-6 lg:px-8 py-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex items-start gap-4\">\n <button\n type=\"button\"\n onClick={() => navigateTo(withBillingAccountId('/invoices', billingAccountId))}\n className=\"p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n <svg className=\"size-5\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M15 19l-7-7 7-7\"\n />\n </svg>\n </button>\n <div>\n <div className=\"flex items-center gap-3\">\n <h1 className=\"text-2xl md:text-3xl font-semibold tracking-tight text-text-primary\">\n Invoice {formatInvoiceNumber(invoice.invoiceNumber)}\n </h1>\n <span\n className={`px-2 py-1 text-xs font-medium rounded ${getStatusBadgeClasses(statusColor)}`}\n >\n {formatInvoiceStatus(invoice.status)}\n </span>\n </div>\n <p className=\"text-sm text-text-secondary mt-1\">\n Created {formatDate(invoice.createdAt, 'short')}\n {invoice.dueDate && ` · Due ${formatDate(invoice.dueDate, 'short')}`}\n </p>\n <PagePurpose className=\"mt-3\">\n {tr(\n 'billing.invoices.detailPurpose',\n 'The full breakdown of a single invoice — its line items, taxes, what has been paid and what is still due. Use it to download the PDF, pay an outstanding balance, jump to the subscription it covers, or raise a refund.'\n )}\n </PagePurpose>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 flex-wrap\">\n {invoice.pdfUrl && (\n <a\n href={invoice.pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Download PDF\n </a>\n )}\n {invoicePdfBackupUrl && (\n <a\n href={invoicePdfBackupUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n Download PDF (backup)\n </a>\n )}\n {invoice.invoiceUrl && (\n <a\n href={invoice.invoiceUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors\"\n >\n View on Portal\n </a>\n )}\n {isOpen && permissions.canPayInvoice && (\n <button\n type=\"button\"\n onClick={handlePayInvoice}\n disabled={isPaying || !defaultPaymentMethodId}\n className=\"px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50\"\n >\n {!defaultPaymentMethodId\n ? 'Default Payment Method Required'\n : isPaying\n ? 'Processing...'\n : 'Pay Invoice'}\n </button>\n )}\n {(isOpen || isDraft) && permissions.canVoidInvoice && (\n <button\n type=\"button\"\n onClick={handleVoidInvoice}\n disabled={isVoiding}\n className=\"px-4 py-2 text-sm font-medium border border-border-subtle text-status-error-text rounded-button hover:bg-status-error-bg-subtle transition-colors disabled:opacity-50\"\n >\n {isVoiding\n ? tr('billing.invoices.voiding', 'Voiding...')\n : tr('billing.invoices.voidInvoice', 'Void Invoice')}\n </button>\n )}\n </div>\n </div>\n\n {/* Action Error */}\n {actionError && (\n <div className=\"p-3 bg-status-error-bg-subtle border border-status-error-border rounded-button\">\n <p className=\"text-sm text-status-error-text\">{actionError}</p>\n </div>\n )}\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n {/* Main Content */}\n <div className=\"lg:col-span-2 space-y-6\">\n {/* Line Items — primary emphasis zone (what was billed & what is due) */}\n <EmphasisPanel className=\"overflow-hidden p-0\">\n <div className=\"p-6 border-b border-border-subtle\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.lineItems', 'Line Items')} ({items.length})\n </h2>\n </div>\n {items.length === 0 ? (\n <div className=\"p-6\">\n <p className=\"text-sm text-text-secondary\">\n {tr('billing.invoices.noLineItems', 'No line items on this invoice.')}\n </p>\n </div>\n ) : (\n <ResponsiveTable data={items} rowKey={(item) => item.id} columns={lineItemColumns} />\n )}\n\n {/* Totals */}\n <div className=\"border-t border-border-subtle p-4\">\n <div className=\"max-w-xs ml-auto space-y-2\">\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">\n {tr('billing.invoices.subtotal', 'Subtotal')}\n </span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.subtotal, invoice.currency)}\n </span>\n </div>\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">{tr('billing.invoices.tax', 'Tax')}</span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.tax, invoice.currency)}\n </span>\n </div>\n <div className=\"flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2\">\n <span className=\"text-text-primary\">{tr('billing.invoices.total', 'Total')}</span>\n <span className=\"text-text-primary\">\n {formatCurrency(invoice.total, invoice.currency)}\n </span>\n </div>\n {invoice.amountPaid > 0 && (\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"text-text-secondary\">\n {tr('billing.invoices.amountPaid', 'Amount Paid')}\n </span>\n <span className=\"text-status-success-text\">\n -{formatCurrency(invoice.amountPaid, invoice.currency)}\n </span>\n </div>\n )}\n {amountDue > 0 && (\n <div className=\"flex items-center justify-between text-sm font-semibold border-t border-border-subtle pt-2\">\n <span className=\"text-text-primary\">\n {tr('billing.invoices.amountDue', 'Amount Due')}\n </span>\n <span className=\"text-status-warning-text\">\n {formatCurrency(amountDue, invoice.currency)}\n </span>\n </div>\n )}\n </div>\n </div>\n </EmphasisPanel>\n\n {/* Subscription Info */}\n {invoice.subscription && (\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.subscription', 'Subscription')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium text-text-primary\">\n {invoice.subscription.plan?.name || 'Unknown Plan'}\n </p>\n <p className=\"text-sm text-text-secondary mt-0.5\">\n Subscription ID:{' '}\n <span className=\"font-mono text-xs\">{invoice.subscription.id}</span>\n </p>\n </div>\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(\n withBillingAccountId(\n `/subscriptions/${invoice.subscription!.id}`,\n billingAccountId\n )\n )\n }\n className=\"px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-sunken rounded-button transition-colors\"\n >\n View\n </button>\n </div>\n </div>\n </div>\n )}\n\n {/* Payment Info */}\n {invoice.payment && (\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.payment', 'Payment')}\n </h2>\n </div>\n <div className=\"p-6\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Payment ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">\n {invoice.payment.id}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Amount</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatCurrency(invoice.payment.amount, invoice.payment.currency)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Status</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.status.toLowerCase()}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Method</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.method.toLowerCase().replace(/_/g, ' ')}\n </p>\n </div>\n {invoice.payment.provider && (\n <div>\n <p className=\"text-sm text-text-secondary\">Provider</p>\n <p className=\"text-sm text-text-primary mt-0.5 capitalize\">\n {invoice.payment.provider}\n </p>\n </div>\n )}\n {invoice.payment.paidAt && (\n <div>\n <p className=\"text-sm text-text-secondary\">Paid At</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatDate(invoice.payment.paidAt, 'short')}\n </p>\n </div>\n )}\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* Sidebar */}\n <div className=\"space-y-6\">\n {/* Next steps guidance */}\n <NextSteps storageKey=\"billing-invoice-detail\" steps={nextSteps} />\n\n {/* Invoice Summary */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.details', 'Details')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Invoice ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">{invoice.id}</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Invoice Number</p>\n <p className=\"text-sm text-text-primary mt-0.5\">\n {formatInvoiceNumber(invoice.invoiceNumber)}\n </p>\n </div>\n {invoice.itemDescription && (\n <div>\n <p className=\"text-sm text-text-secondary\">Description</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{invoice.itemDescription}</p>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-secondary\">Status</p>\n <span\n className={`inline-flex mt-0.5 px-2 py-1 text-xs font-medium rounded ${getStatusBadgeClasses(statusColor)}`}\n >\n {formatInvoiceStatus(invoice.status)}\n </span>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Currency</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{invoice.currency}</p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Total</p>\n <p className=\"text-sm font-semibold text-text-primary mt-0.5\">\n {formatCurrency(invoice.total, invoice.currency)}\n </p>\n </div>\n <div>\n <p className=\"text-sm text-text-secondary\">Amount Paid</p>\n <p className=\"text-sm text-status-success-text mt-0.5\">\n {formatCurrency(invoice.amountPaid, invoice.currency)}\n </p>\n </div>\n {amountDue > 0 && (\n <div>\n <p className=\"text-sm text-text-secondary\">Amount Due</p>\n <p className=\"text-sm font-semibold text-status-warning-text mt-0.5\">\n {formatCurrency(amountDue, invoice.currency)}\n </p>\n </div>\n )}\n </div>\n </div>\n\n {/* Dates */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.dates', 'Dates')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Created</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.createdAt)}</p>\n </div>\n {invoice.dueDate && (\n <div>\n <p className=\"text-sm text-text-secondary\">Due Date</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.dueDate)}</p>\n </div>\n )}\n {invoice.paidAt && (\n <div>\n <p className=\"text-sm text-text-secondary\">Paid At</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.paidAt)}</p>\n </div>\n )}\n <div>\n <p className=\"text-sm text-text-secondary\">Last Updated</p>\n <p className=\"text-sm text-text-primary mt-0.5\">{formatDate(invoice.updatedAt)}</p>\n </div>\n </div>\n </div>\n\n {/* Organization */}\n <div className=\"border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden\">\n <div className=\"p-6 border-b border-border-subtle bg-bg-sunken\">\n <h2 className=\"text-lg font-semibold text-text-primary\">\n {tr('billing.invoices.organization', 'Organization')}\n </h2>\n </div>\n <div className=\"p-6 space-y-4\">\n <div>\n <p className=\"text-sm text-text-secondary\">Organization ID</p>\n <p className=\"font-mono text-sm text-text-primary mt-0.5 break-all\">\n {invoice.orgId}\n </p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAgCA,IAAaA,UAA8B;CACzC,IAAM,EAAE,SAAMC,EAAQ,GAChBC,KAAM,GAAa,MAA6B;EACpD,IAAMC,IAAaC,EAAEC,CAAG;EACxB,OAAOF,MAAeE,IAAMC,IAAWH;CACzC,GACM,EAAE,iBAAcI,EAAiC,GACjDC,IAAaC,EAAmB,GAChC,EAAE,aAAUC,EAAW,GACvBC,IAAcC,EAAsB,GACpC,EAAE,yBAAsBC,EAA2B;EACvD;EACA,aAAa;EACb,cAAc;CAChB,CAAC,GACK,EAAE,MAAMC,MAA8BC,EAA0C,EACpF,aAAa,cACf,CAAC,GACKC,IACJC,KAAqBH,GAA2B,0BAA0B,MAAM,KAAA,GAC5E,EAAE,YAAS,cAAW,UAAO,eAAYI,EAAWC,GAAWH,CAAgB,GAC/E,EAAE,eAAY,gBAAa,aAAU,iBAAcI,EAAoB,GACvEC,IACJP,GAA2B,0BAA0B,sBAGjD,CAACQ,GAAaC,KAAkBC,EAAwB,IAAI,GAG5DC,IAAmB,YAAY;EACnC,IAAKC,GACL;OAAI,CAACL,GACH,EAAe,kEAAkE;QAInF,IAAI,CAACL,GACH,EAAe,4BAA4B;QAG7C;MAAe,IAAI;IACnB,IAAI;KAEF,AADA,MAAMW,EAAWD,EAAQ,IAAIL,GAAwBL,CAAgB,GACrE,MAAMY,EAAQ;IAChB,SAASC,GAAK;KACZ,EAAeA,aAAe,QAAQA,E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