@burdenoff/microfe-billing 2026.821.1 → 2026.825.2
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.js.map +1 -1
- package/dist/billing/BillingRoot.js.map +1 -1
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/hooks/useBillingAccountSelection.js.map +1 -1
- package/dist/billing/hooks/useBillingEventEmitter.js.map +1 -1
- package/dist/billing/hooks/useBillingNavigate.js.map +1 -1
- package/dist/billing/hooks/useBillingPermissions.js.map +1 -1
- package/dist/billing/hooks/useDefaultBillingCurrency.js.map +1 -1
- package/dist/billing/modules/addons/components/FloatingCartDrawer.js.map +1 -1
- package/dist/billing/modules/addons/hooks/useAddons.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/addons/store/addonCartStore.js.map +1 -1
- package/dist/billing/modules/affiliate/api.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +107 -107
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +80 -81
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useRefunds.js.map +1 -1
- package/dist/billing/modules/billing/hooks/useTransactions.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +127 -127
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/CreditsAmountInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/NativeCheckoutView.js.map +1 -1
- package/dist/billing/modules/checkout/components/OrderSummary.js.map +1 -1
- package/dist/billing/modules/checkout/components/PromoCodeInput.js.map +1 -1
- package/dist/billing/modules/checkout/components/RazorpayPaymentButton.js.map +1 -1
- package/dist/billing/modules/checkout/components/SimpleAutoPayToggle.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/StripePaymentForm.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/UnifiedPaymentMethodSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js +0 -1
- package/dist/billing/modules/checkout/hooks/useCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useNativeCheckout.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentProviders.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/usePaymentStatusPolling.js.map +1 -1
- package/dist/billing/modules/checkout/hooks/useStoreShipping.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +412 -395
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/checkout/utils/storeOrder.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/hooks/useCredits.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useBillingOverviewData.js.map +1 -1
- package/dist/billing/modules/dashboard/hooks/useDashboard.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/api.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +145 -145
- package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +133 -133
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +7 -9
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +95 -95
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -1
- package/dist/billing/modules/plans/hooks/usePlans.js.map +1 -1
- package/dist/billing/modules/plans/hooks/useQuotas.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/hooks/useQuotaTemplates.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js +5 -6
- package/dist/billing/modules/store/pages/StoreCheckoutPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/modules/subscriptions/hooks/useSubscriptions.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/hooks/useUsage.js +14 -9
- package/dist/billing/modules/usage/hooks/useUsage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +481 -453
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/components/EmptyState.js.map +1 -1
- package/dist/billing/shared/components/PageHeader.js.map +1 -1
- package/dist/billing/shared/components/ServerError.js.map +1 -1
- package/dist/billing/shared/components/StatCard.js.map +1 -1
- package/dist/billing/shared/hooks/useActorProfiles.js.map +1 -1
- package/dist/billing/shared/types/graphql.js.map +1 -1
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/dist/billing/shared/ui/ProgressBar.js.map +1 -1
- package/dist/billing/shared/ui/StatusPill.js.map +1 -1
- package/dist/billing/shared/utils/directBillingGraphql.js.map +1 -1
- package/dist/billing/shared/utils/error.js.map +1 -1
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/gatewayGraphql.js.map +1 -1
- package/dist/billing/shared/utils/navigation.js.map +1 -1
- package/dist/billing/shared/utils/paymentTheme.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/dist/billing/shared/utils/status.js.map +1 -1
- package/dist/billing/shared/utils/tokens.js.map +1 -1
- package/dist/generated/global-operations.js +5 -1
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/generated/wspace-operations.js +1 -1
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.js +1 -1
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -1
- package/package.json +13 -10
|
@@ -2,63 +2,63 @@ import { PageHeader as e } from "../../../shared/components/PageHeader.js";
|
|
|
2
2
|
import "../../../shared/components/index.js";
|
|
3
3
|
import { formatCurrency as t, formatDateTime as n } from "../../../shared/utils/format.js";
|
|
4
4
|
import "../../../shared/utils/index.js";
|
|
5
|
-
import { useCreateRefundRecordMutation as r, useGetBillingAccountsCheckoutQuery as
|
|
6
|
-
import { useBillingNavigate as
|
|
7
|
-
import { RefundRecordStatus as
|
|
8
|
-
import { useEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
-
import { CheckCircle as d, Clock as f, CreditCard as
|
|
10
|
-
import { jsx as
|
|
11
|
-
import { useI18n as
|
|
12
|
-
import { IllustratedEmptyState as
|
|
5
|
+
import { useCreateRefundRecordMutation as r, useGetBillingAccountsCheckoutQuery as ee, useGetRefundRecordsQuery as te, useGetTransactionLazyQuery as i } from "../../../../generated/global-operations.js";
|
|
6
|
+
import { useBillingNavigate as a } from "../../../hooks/useBillingNavigate.js";
|
|
7
|
+
import { RefundRecordStatus as o } from "../../../../generated/global-types.js";
|
|
8
|
+
import { useEffect as s, useMemo as c, useRef as l, useState as u } from "react";
|
|
9
|
+
import { CheckCircle as d, Clock as f, CreditCard as ne, Loader2 as p, PlusCircle as m, Search as h, X as g, XCircle as _ } from "lucide-react";
|
|
10
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
12
|
+
import { IllustratedEmptyState as re, PagePurpose as ie } from "@burdenoff/fe-libs/ui";
|
|
13
13
|
//#region src/billing/modules/billing/pages/UserRefundsPage.tsx
|
|
14
14
|
var x = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, S = {
|
|
15
|
-
[
|
|
15
|
+
[o.Pending]: {
|
|
16
16
|
label: "In Review",
|
|
17
17
|
className: "bg-status-warning-bg/20 text-status-warning-text border-status-warning-border",
|
|
18
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
18
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(f, { className: e })
|
|
19
19
|
},
|
|
20
|
-
[
|
|
20
|
+
[o.Processing]: {
|
|
21
21
|
label: "Processing",
|
|
22
22
|
className: "bg-action-primary-bg/15 text-action-primary-bg border-action-primary-bg/30",
|
|
23
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
23
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(p, { className: `${e} animate-spin` })
|
|
24
24
|
},
|
|
25
|
-
[
|
|
25
|
+
[o.Completed]: {
|
|
26
26
|
label: "Refunded",
|
|
27
27
|
className: "bg-status-success-bg/20 text-status-success-text border-status-success-border",
|
|
28
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
28
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(d, { className: e })
|
|
29
29
|
},
|
|
30
|
-
[
|
|
30
|
+
[o.Failed]: {
|
|
31
31
|
label: "Failed",
|
|
32
32
|
className: "bg-status-error-bg/20 text-status-error-text border-status-error-border",
|
|
33
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
33
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(_, { className: e })
|
|
34
34
|
},
|
|
35
|
-
[
|
|
35
|
+
[o.Skipped]: {
|
|
36
36
|
label: "Closed",
|
|
37
37
|
className: "bg-bg-sunken text-text-secondary border-border-subtle",
|
|
38
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
38
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(_, { className: e })
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function ae({ status: e }) {
|
|
42
42
|
let t = S[e] ?? {
|
|
43
43
|
label: e,
|
|
44
44
|
className: "bg-bg-sunken text-text-secondary border-border-subtle",
|
|
45
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
45
|
+
icon: ({ className: e }) => /* @__PURE__ */ v(f, { className: e })
|
|
46
46
|
}, n = t.icon;
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ y("span", {
|
|
48
48
|
className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs font-medium ${t.className}`,
|
|
49
|
-
children: [/* @__PURE__ */
|
|
49
|
+
children: [/* @__PURE__ */ v(n, { className: "size-3" }), t.label]
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
var C = () => {
|
|
53
|
-
let { t: f } =
|
|
53
|
+
let { t: f } = b(), _ = (e, t) => {
|
|
54
54
|
let n = f(e);
|
|
55
55
|
return n === e ? t : n;
|
|
56
|
-
}, S =
|
|
57
|
-
|
|
56
|
+
}, S = a(), [C, w] = u(!1), [T, E] = u(""), [D, O] = u(null), [k, A] = u(!1), [j, M] = u(""), [N, P] = u(""), [F, I] = u(null), [oe, L] = u(!1), { data: R, loading: z } = ee({ fetchPolicy: "cache-and-network" }), B = c(() => R?.getBillingAccountsByOrg ?? [], [R]), [V, H] = u(void 0);
|
|
57
|
+
s(() => {
|
|
58
58
|
!V && B.length > 0 && H(B[0].id);
|
|
59
59
|
}, [B, V]);
|
|
60
|
-
let U = B.find((e) => e.id === V), [W, { data: G, loading: K, error: q }] =
|
|
61
|
-
|
|
60
|
+
let U = B.find((e) => e.id === V), [W, { data: G, loading: K, error: q }] = i({ fetchPolicy: "network-only" }), se = l("");
|
|
61
|
+
s(() => {
|
|
62
62
|
if (K) return;
|
|
63
63
|
let e = G?.getTransaction;
|
|
64
64
|
e ? (O(e), A(!1), P(String(e.amount))) : (G !== void 0 || q) && (O(null), A(!0), P(""));
|
|
@@ -68,15 +68,15 @@ var C = () => {
|
|
|
68
68
|
q
|
|
69
69
|
]);
|
|
70
70
|
let J = (e, t) => {
|
|
71
|
-
|
|
71
|
+
se.current = `${e}::${t}`, O(null), A(!1), P(""), W({ variables: {
|
|
72
72
|
id: e,
|
|
73
73
|
billingAccountId: t
|
|
74
74
|
} });
|
|
75
|
-
}, se = (e) => {
|
|
76
|
-
E(e), O(null), A(!1), P(""), x.test(e.trim()) && V && J(e.trim(), V);
|
|
77
75
|
}, ce = (e) => {
|
|
76
|
+
E(e), O(null), A(!1), P(""), x.test(e.trim()) && V && J(e.trim(), V);
|
|
77
|
+
}, le = (e) => {
|
|
78
78
|
H(e), O(null), A(!1), P(""), x.test(T.trim()) && J(T.trim(), e);
|
|
79
|
-
}, { data:
|
|
79
|
+
}, { data: ue, loading: de, refetch: fe } = te({
|
|
80
80
|
variables: {
|
|
81
81
|
billingAccountId: V,
|
|
82
82
|
pageSize: 20,
|
|
@@ -84,18 +84,18 @@ var C = () => {
|
|
|
84
84
|
},
|
|
85
85
|
skip: !V,
|
|
86
86
|
fetchPolicy: "cache-and-network"
|
|
87
|
-
}),
|
|
87
|
+
}), Y = ue?.getRefundRecords.records ?? [], [X, { loading: Z }] = r({ refetchQueries: ["GetRefundRecords"] }), pe = (e) => e ? e.stripePaymentId ? {
|
|
88
88
|
provider: "STRIPE",
|
|
89
89
|
gatewayPaymentId: e.stripePaymentId
|
|
90
90
|
} : e.razorpayPaymentId ? {
|
|
91
91
|
provider: "RAZORPAY",
|
|
92
92
|
gatewayPaymentId: e.razorpayPaymentId
|
|
93
|
-
} : null : null,
|
|
93
|
+
} : null : null, me = async (e) => {
|
|
94
94
|
if (e.preventDefault(), I(null), !D || !j.trim() || !N) {
|
|
95
95
|
I("Enter a valid transaction ID, an amount, and a reason.");
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
let n =
|
|
98
|
+
let n = pe(D);
|
|
99
99
|
if (!n) {
|
|
100
100
|
I("No payment gateway info found for this transaction. Please contact support.");
|
|
101
101
|
return;
|
|
@@ -110,7 +110,7 @@ var C = () => {
|
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
try {
|
|
113
|
-
await
|
|
113
|
+
await X({ variables: {
|
|
114
114
|
billingAccountId: V,
|
|
115
115
|
provider: n.provider,
|
|
116
116
|
gatewayPaymentId: n.gatewayPaymentId,
|
|
@@ -119,7 +119,7 @@ var C = () => {
|
|
|
119
119
|
transactionId: D.id,
|
|
120
120
|
reason: j.trim(),
|
|
121
121
|
notes: "Requested by user via billing portal"
|
|
122
|
-
} }), L(!0), w(!1), Q(), await
|
|
122
|
+
} }), L(!0), w(!1), Q(), await fe();
|
|
123
123
|
} catch (e) {
|
|
124
124
|
I(e instanceof Error ? e.message : "Failed to submit refund request.");
|
|
125
125
|
}
|
|
@@ -128,37 +128,37 @@ var C = () => {
|
|
|
128
128
|
}, $ = () => {
|
|
129
129
|
w(!1), L(!1), Q();
|
|
130
130
|
};
|
|
131
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ y("div", {
|
|
132
132
|
className: "space-y-6 p-6 max-w-3xl",
|
|
133
133
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
title:
|
|
136
|
-
description:
|
|
137
|
-
actions: C ? void 0 : /* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ v(e, {
|
|
135
|
+
title: _("billing.refunds.title", "Refunds"),
|
|
136
|
+
description: _("billing.refunds.description", "View your refund requests and submit new ones"),
|
|
137
|
+
actions: C ? void 0 : /* @__PURE__ */ y("button", {
|
|
138
138
|
type: "button",
|
|
139
139
|
onClick: () => {
|
|
140
140
|
w(!0), L(!1);
|
|
141
141
|
},
|
|
142
142
|
className: "inline-flex items-center gap-2 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",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
143
|
+
children: [/* @__PURE__ */ v(m, { className: "size-4" }), _("billing.refunds.requestRefund", "Request Refund")]
|
|
144
144
|
})
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
!z && B.length > 1 && /* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ v(ie, { children: _("billing.refunds.userPurpose", "Request money back for a payment and follow where each request stands. Paste the transaction ID of the charge you want refunded, tell us how much and why, and track every request here from \"In Review\" through to \"Refunded\".") }),
|
|
147
|
+
!z && B.length > 1 && /* @__PURE__ */ y("div", {
|
|
148
148
|
className: "flex items-center gap-3",
|
|
149
149
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ v(ne, { className: "size-4 text-text-secondary shrink-0" }),
|
|
151
|
+
/* @__PURE__ */ v("label", {
|
|
152
152
|
htmlFor: "accountSwitch",
|
|
153
153
|
className: "text-sm text-text-secondary shrink-0",
|
|
154
|
-
children:
|
|
154
|
+
children: _("billing.refunds.account", "Billing account")
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ v("select", {
|
|
157
157
|
id: "accountSwitch",
|
|
158
158
|
value: V ?? "",
|
|
159
|
-
onChange: (e) =>
|
|
159
|
+
onChange: (e) => le(e.target.value),
|
|
160
160
|
className: "flex-1 px-3 py-1.5 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm",
|
|
161
|
-
children: B.map((e) => /* @__PURE__ */
|
|
161
|
+
children: B.map((e) => /* @__PURE__ */ y("option", {
|
|
162
162
|
value: e.id,
|
|
163
163
|
children: [
|
|
164
164
|
e.name,
|
|
@@ -171,114 +171,114 @@ var C = () => {
|
|
|
171
171
|
})
|
|
172
172
|
]
|
|
173
173
|
}),
|
|
174
|
-
|
|
174
|
+
oe && /* @__PURE__ */ y("div", {
|
|
175
175
|
className: "flex items-center justify-between p-4 rounded-lg border border-status-success-border bg-status-success-bg/10",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ y("div", {
|
|
177
177
|
className: "flex items-center gap-2",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ v(d, { className: "size-4 text-status-success-text" }), /* @__PURE__ */ v("p", {
|
|
179
179
|
className: "text-sm text-status-success-text font-medium",
|
|
180
|
-
children:
|
|
180
|
+
children: _("billing.refunds.submitted", "Refund request submitted. Our team will review it shortly.")
|
|
181
181
|
})]
|
|
182
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ v("button", {
|
|
183
183
|
type: "button",
|
|
184
184
|
onClick: () => L(!1),
|
|
185
185
|
className: "text-status-success-text hover:opacity-70",
|
|
186
|
-
children: /* @__PURE__ */ g
|
|
186
|
+
children: /* @__PURE__ */ v(g, { className: "size-4" })
|
|
187
187
|
})]
|
|
188
188
|
}),
|
|
189
|
-
C && /* @__PURE__ */
|
|
189
|
+
C && /* @__PURE__ */ y("div", {
|
|
190
190
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ y("div", {
|
|
192
192
|
className: "flex items-center justify-between p-4 border-b border-border-subtle bg-bg-sunken",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
194
194
|
className: "font-semibold text-text-primary",
|
|
195
|
-
children:
|
|
196
|
-
}), /* @__PURE__ */
|
|
195
|
+
children: _("billing.refunds.newRequest", "New Refund Request")
|
|
196
|
+
}), /* @__PURE__ */ v("button", {
|
|
197
197
|
type: "button",
|
|
198
198
|
onClick: $,
|
|
199
199
|
className: "p-1 rounded hover:bg-bg-sunken transition-colors",
|
|
200
|
-
children: /* @__PURE__ */ g
|
|
200
|
+
children: /* @__PURE__ */ v(g, { className: "size-4 text-text-secondary" })
|
|
201
201
|
})]
|
|
202
|
-
}), /* @__PURE__ */
|
|
203
|
-
onSubmit:
|
|
202
|
+
}), /* @__PURE__ */ y("form", {
|
|
203
|
+
onSubmit: me,
|
|
204
204
|
className: "p-4 space-y-4",
|
|
205
205
|
children: [
|
|
206
|
-
F && /* @__PURE__ */
|
|
206
|
+
F && /* @__PURE__ */ v("div", {
|
|
207
207
|
className: "p-3 rounded-lg border border-status-error-border bg-status-error-bg/10",
|
|
208
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ v("p", {
|
|
209
209
|
className: "text-sm text-status-error-text",
|
|
210
210
|
children: F
|
|
211
211
|
})
|
|
212
212
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ y("div", { children: [
|
|
214
|
+
/* @__PURE__ */ y("label", {
|
|
215
215
|
htmlFor: "txnId",
|
|
216
216
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
217
|
-
children: [
|
|
217
|
+
children: [_("billing.refunds.transactionId", "Transaction ID"), " *"]
|
|
218
218
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ y("div", {
|
|
220
220
|
className: "relative",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ v("input", {
|
|
222
222
|
id: "txnId",
|
|
223
223
|
type: "text",
|
|
224
224
|
value: T,
|
|
225
|
-
onChange: (e) =>
|
|
225
|
+
onChange: (e) => ce(e.target.value),
|
|
226
226
|
placeholder: "Paste your transaction ID...",
|
|
227
227
|
className: "w-full pl-3 pr-9 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm font-mono"
|
|
228
|
-
}), /* @__PURE__ */
|
|
228
|
+
}), /* @__PURE__ */ v("div", {
|
|
229
229
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
230
|
-
children: K ? /* @__PURE__ */
|
|
230
|
+
children: K ? /* @__PURE__ */ v(p, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(h, { className: "size-4" })
|
|
231
231
|
})]
|
|
232
232
|
}),
|
|
233
|
-
D && /* @__PURE__ */
|
|
233
|
+
D && /* @__PURE__ */ y("div", {
|
|
234
234
|
className: "mt-2 p-3 rounded-button border border-status-success-border bg-status-success-bg/10 text-sm space-y-0.5",
|
|
235
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ y("div", {
|
|
236
236
|
className: "flex items-center gap-2",
|
|
237
237
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ v(d, { className: "size-3.5 text-status-success-text shrink-0" }),
|
|
239
|
+
/* @__PURE__ */ v("span", {
|
|
240
240
|
className: "font-medium text-text-primary",
|
|
241
241
|
children: t(D.amount, D.currency)
|
|
242
242
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ v("span", {
|
|
244
244
|
className: "text-text-secondary",
|
|
245
245
|
children: "·"
|
|
246
246
|
}),
|
|
247
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ v("span", {
|
|
248
248
|
className: "text-text-secondary",
|
|
249
249
|
children: n(D.createdAt)
|
|
250
250
|
}),
|
|
251
|
-
D.stripePaymentId && /* @__PURE__ */
|
|
251
|
+
D.stripePaymentId && /* @__PURE__ */ v("span", {
|
|
252
252
|
className: "text-xs text-text-secondary",
|
|
253
253
|
children: "Stripe"
|
|
254
254
|
}),
|
|
255
|
-
D.razorpayPaymentId && /* @__PURE__ */
|
|
255
|
+
D.razorpayPaymentId && /* @__PURE__ */ v("span", {
|
|
256
256
|
className: "text-xs text-text-secondary",
|
|
257
257
|
children: "Razorpay"
|
|
258
258
|
})
|
|
259
259
|
]
|
|
260
|
-
}), D.description && /* @__PURE__ */
|
|
260
|
+
}), D.description && /* @__PURE__ */ v("p", {
|
|
261
261
|
className: "text-xs text-text-secondary pl-5",
|
|
262
262
|
children: D.description
|
|
263
263
|
})]
|
|
264
264
|
}),
|
|
265
|
-
k && T.length > 0 && !K && /* @__PURE__ */
|
|
265
|
+
k && T.length > 0 && !K && /* @__PURE__ */ v("p", {
|
|
266
266
|
className: "mt-1 text-xs text-status-error-text",
|
|
267
|
-
children:
|
|
267
|
+
children: _("billing.refunds.txnNotFound", "Transaction not found in this billing account.")
|
|
268
268
|
}),
|
|
269
|
-
!x.test(T.trim()) && T.length > 4 && /* @__PURE__ */
|
|
269
|
+
!x.test(T.trim()) && T.length > 4 && /* @__PURE__ */ v("p", {
|
|
270
270
|
className: "mt-1 text-xs text-text-secondary",
|
|
271
|
-
children:
|
|
271
|
+
children: _("billing.refunds.txnIdHint", "Transaction IDs look like: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
|
|
272
272
|
})
|
|
273
273
|
] }),
|
|
274
|
-
D && /* @__PURE__ */
|
|
274
|
+
D && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
|
|
275
275
|
htmlFor: "refundAmount",
|
|
276
276
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
277
|
-
children: [
|
|
278
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: [_("billing.refunds.amount", "Refund Amount"), " *"]
|
|
278
|
+
}), /* @__PURE__ */ y("div", {
|
|
279
279
|
className: "flex items-center gap-2",
|
|
280
280
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ v("input", {
|
|
282
282
|
id: "refundAmount",
|
|
283
283
|
type: "number",
|
|
284
284
|
step: "0.01",
|
|
@@ -290,97 +290,97 @@ var C = () => {
|
|
|
290
290
|
className: "w-40 px-3 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm",
|
|
291
291
|
placeholder: "0.00"
|
|
292
292
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ v("span", {
|
|
294
294
|
className: "text-sm text-text-secondary",
|
|
295
295
|
children: D.currency ?? U?.currency ?? "USD"
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ y("span", {
|
|
298
298
|
className: "text-xs text-text-secondary",
|
|
299
299
|
children: ["max ", t(D.amount, D.currency)]
|
|
300
300
|
})
|
|
301
301
|
]
|
|
302
302
|
})] }),
|
|
303
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ y("label", {
|
|
304
304
|
htmlFor: "reason",
|
|
305
305
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
306
|
-
children: [
|
|
307
|
-
}), /* @__PURE__ */
|
|
306
|
+
children: [_("billing.refunds.reason", "Reason for refund"), " *"]
|
|
307
|
+
}), /* @__PURE__ */ v("textarea", {
|
|
308
308
|
id: "reason",
|
|
309
309
|
value: j,
|
|
310
310
|
onChange: (e) => M(e.target.value),
|
|
311
311
|
required: !0,
|
|
312
312
|
rows: 3,
|
|
313
313
|
className: "w-full px-3 py-2 border border-border-subtle rounded-button bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] text-sm resize-none",
|
|
314
|
-
placeholder:
|
|
314
|
+
placeholder: _("billing.refunds.reasonPlaceholder", "Describe why you are requesting a refund...")
|
|
315
315
|
})] }),
|
|
316
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ y("div", {
|
|
317
317
|
className: "flex items-center gap-3 pt-1",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ v("button", {
|
|
319
319
|
type: "submit",
|
|
320
320
|
disabled: Z || !D || !j.trim() || !N,
|
|
321
321
|
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 disabled:cursor-not-allowed",
|
|
322
|
-
children: Z ?
|
|
323
|
-
}), /* @__PURE__ */
|
|
322
|
+
children: Z ? _("billing.refunds.submitting", "Submitting...") : _("billing.refunds.submitRequest", "Submit Request")
|
|
323
|
+
}), /* @__PURE__ */ v("button", {
|
|
324
324
|
type: "button",
|
|
325
325
|
onClick: $,
|
|
326
326
|
className: "px-4 py-2 text-sm border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
327
|
-
children:
|
|
327
|
+
children: _("billing.common.cancel", "Cancel")
|
|
328
328
|
})]
|
|
329
329
|
})
|
|
330
330
|
]
|
|
331
331
|
})]
|
|
332
332
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ y("div", {
|
|
334
334
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ v("div", {
|
|
336
336
|
className: "p-4 border-b border-border-subtle bg-bg-sunken",
|
|
337
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ v("h2", {
|
|
338
338
|
className: "font-semibold text-text-primary",
|
|
339
|
-
children:
|
|
339
|
+
children: _("billing.refunds.history", "Refund History")
|
|
340
340
|
})
|
|
341
|
-
}), z ||
|
|
341
|
+
}), z || de ? /* @__PURE__ */ v("div", {
|
|
342
342
|
className: "p-8 flex items-center justify-center",
|
|
343
|
-
children: /* @__PURE__ */
|
|
344
|
-
}) :
|
|
343
|
+
children: /* @__PURE__ */ v(p, { className: "size-5 animate-spin text-text-secondary" })
|
|
344
|
+
}) : Y.length === 0 ? /* @__PURE__ */ v(re, {
|
|
345
345
|
illustration: "empty-data",
|
|
346
|
-
title:
|
|
347
|
-
description:
|
|
348
|
-
}) : /* @__PURE__ */
|
|
346
|
+
title: _("billing.refunds.noRefunds", "No refund requests yet"),
|
|
347
|
+
description: _("billing.refunds.noRefundsHint", "If you have an issue with a payment, click \"Request Refund\" to get started.")
|
|
348
|
+
}) : /* @__PURE__ */ v("ul", {
|
|
349
349
|
className: "divide-y divide-border-subtle",
|
|
350
|
-
children:
|
|
350
|
+
children: Y.map((e) => /* @__PURE__ */ y("li", {
|
|
351
351
|
className: "flex items-start gap-4 p-4 hover:bg-bg-sunken transition-colors",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
352
|
+
children: [/* @__PURE__ */ y("div", {
|
|
353
353
|
className: "flex-1 min-w-0",
|
|
354
354
|
children: [
|
|
355
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ y("div", {
|
|
356
356
|
className: "flex items-center gap-2 flex-wrap",
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ v("span", {
|
|
359
359
|
className: "text-sm font-medium text-text-primary",
|
|
360
360
|
children: t(e.amount, e.currency)
|
|
361
361
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
e.purchaseDetail && /* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ v(ae, { status: e.status }),
|
|
363
|
+
e.purchaseDetail && /* @__PURE__ */ v("span", {
|
|
364
364
|
className: "text-xs text-text-secondary truncate",
|
|
365
365
|
children: e.purchaseDetail
|
|
366
366
|
})
|
|
367
367
|
]
|
|
368
368
|
}),
|
|
369
|
-
e.reason && /* @__PURE__ */
|
|
369
|
+
e.reason && /* @__PURE__ */ v("p", {
|
|
370
370
|
className: "text-xs text-text-secondary mt-1 line-clamp-2",
|
|
371
371
|
children: e.reason
|
|
372
372
|
}),
|
|
373
|
-
e.errorMessage && e.status ===
|
|
373
|
+
e.errorMessage && e.status === o.Failed && /* @__PURE__ */ v("p", {
|
|
374
374
|
className: "text-xs text-status-error-text mt-1",
|
|
375
375
|
children: e.errorMessage
|
|
376
376
|
})
|
|
377
377
|
]
|
|
378
|
-
}), /* @__PURE__ */
|
|
378
|
+
}), /* @__PURE__ */ y("div", {
|
|
379
379
|
className: "text-right shrink-0",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
380
|
+
children: [/* @__PURE__ */ v("p", {
|
|
381
381
|
className: "text-xs text-text-secondary",
|
|
382
382
|
children: n(e.createdAt)
|
|
383
|
-
}), e.processedAt && /* @__PURE__ */
|
|
383
|
+
}), e.processedAt && /* @__PURE__ */ y("p", {
|
|
384
384
|
className: "text-xs text-text-secondary mt-0.5",
|
|
385
385
|
children: ["Processed ", n(e.processedAt)]
|
|
386
386
|
})]
|
|
@@ -388,16 +388,16 @@ var C = () => {
|
|
|
388
388
|
}, e.id))
|
|
389
389
|
})]
|
|
390
390
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
391
|
+
/* @__PURE__ */ y("p", {
|
|
392
392
|
className: "text-xs text-text-secondary",
|
|
393
393
|
children: [
|
|
394
|
-
|
|
394
|
+
_("billing.refunds.footer", "Refund requests are reviewed by our team within 3–5 business days. For urgent issues, contact support."),
|
|
395
395
|
" ",
|
|
396
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ v("button", {
|
|
397
397
|
type: "button",
|
|
398
398
|
onClick: () => S("/transactions/" + V),
|
|
399
399
|
className: "underline hover:no-underline",
|
|
400
|
-
children:
|
|
400
|
+
children: _("billing.refunds.viewTransactions", "View all transactions")
|
|
401
401
|
})
|
|
402
402
|
]
|
|
403
403
|
})
|