@burdenoff/microfe-billing 2026.1116.1 → 2026.1119.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/modules/addons/pages/AddonCreatePage.js +143 -143
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +170 -170
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +148 -148
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +115 -115
- package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +136 -136
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +129 -129
- package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +325 -325
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +149 -149
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +99 -98
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/StoreShippingSection.js +125 -124
- package/dist/billing/modules/checkout/components/StoreShippingSection.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +61 -60
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +177 -177
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +231 -231
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +139 -139
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +54 -54
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +65 -65
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +95 -95
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +232 -231
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +328 -328
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +57 -57
- package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +53 -53
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +100 -100
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +150 -150
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +125 -125
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +113 -113
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +132 -132
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +101 -101
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +125 -125
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js +51 -50
- package/dist/billing/modules/usage/components/WorkspaceAiSpendPanel.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +107 -107
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/shared/components/GeoPricingOverridesEditor.js +1 -0
- package/package.json +2 -2
|
@@ -10,158 +10,158 @@ import { canShowRefundRequest as a } from "../../../shared/utils/accessRules.js"
|
|
|
10
10
|
import { useCreateRefundRecordMutation as ne, useGetBillingAccountsCheckoutQuery as re, useGetRefundRecordsQuery as ie, useGetTransactionLazyQuery as ae } from "../../../../generated/global-operations.js";
|
|
11
11
|
import { RefundRecordStatus as o } from "../../../../generated/global-types.js";
|
|
12
12
|
import { useEffect as s, useMemo as oe, useRef as c, useState as l } from "react";
|
|
13
|
-
import { IllustratedEmptyState as u, PagePurpose as
|
|
14
|
-
import { CheckCircle as
|
|
15
|
-
import { jsx as
|
|
16
|
-
import { useI18n as
|
|
13
|
+
import { IllustratedEmptyState as u, PagePurpose as se, ThemedSelect as ce } from "@burdenoff/fe-libs/ui";
|
|
14
|
+
import { CheckCircle as d, Clock as f, CreditCard as le, Loader2 as p, PlusCircle as ue, Search as de, X as m, XCircle as h } from "lucide-react";
|
|
15
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
16
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
17
|
// src/billing/modules/billing/pages/UserRefundsPage.tsx
|
|
18
18
|
var y = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, b = {
|
|
19
19
|
[o.Pending]: {
|
|
20
20
|
label: "In Review",
|
|
21
21
|
className: "bg-status-warning-bg/20 text-status-warning-text border-status-warning-border",
|
|
22
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
22
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(f, { className: e })
|
|
23
23
|
},
|
|
24
24
|
[o.Processing]: {
|
|
25
25
|
label: "Processing",
|
|
26
26
|
className: "bg-action-primary-bg/15 text-action-primary-bg border-action-primary-bg/30",
|
|
27
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
27
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(p, { className: `${e} animate-spin` })
|
|
28
28
|
},
|
|
29
29
|
[o.Completed]: {
|
|
30
30
|
label: "Refunded",
|
|
31
31
|
className: "bg-status-success-bg/20 text-status-success-text border-status-success-border",
|
|
32
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
32
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(d, { className: e })
|
|
33
33
|
},
|
|
34
34
|
[o.Failed]: {
|
|
35
35
|
label: "Failed",
|
|
36
36
|
className: "bg-status-error-bg/20 text-status-error-text border-status-error-border",
|
|
37
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
37
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(h, { className: e })
|
|
38
38
|
},
|
|
39
39
|
[o.Skipped]: {
|
|
40
40
|
label: "Closed",
|
|
41
41
|
className: "bg-bg-sunken text-text-secondary border-border-subtle",
|
|
42
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
42
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(h, { className: e })
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
function x({ status: e }) {
|
|
46
46
|
let t = b[e] ?? {
|
|
47
47
|
label: e,
|
|
48
48
|
className: "bg-bg-sunken text-text-secondary border-border-subtle",
|
|
49
|
-
icon: ({ className: e }) => /* @__PURE__ */
|
|
49
|
+
icon: ({ className: e }) => /* @__PURE__ */ g(f, { className: e })
|
|
50
50
|
}, n = t.icon;
|
|
51
|
-
return /* @__PURE__ */
|
|
51
|
+
return /* @__PURE__ */ _("span", {
|
|
52
52
|
className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-full border text-xs font-medium ${t.className}`,
|
|
53
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ g(n, { className: "size-3" }), t.label]
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
var S = () => {
|
|
57
|
-
let { t:
|
|
58
|
-
let n =
|
|
57
|
+
let { t: f } = v(), h = (e, t) => {
|
|
58
|
+
let n = f(e);
|
|
59
59
|
return n === e ? t : n;
|
|
60
|
-
}, b = t(), S = n(), C = ee(),
|
|
60
|
+
}, b = t(), S = n(), C = ee(), fe = a(C, S.canProcessRefund), [w, T] = l(!1), [E, D] = l(""), [O, k] = l(null), [A, j] = l(!1), [M, N] = l(""), [P, F] = l(""), [I, L] = l(null), [R, z] = l(!1), { data: B, loading: V } = re({ fetchPolicy: "cache-and-network" }), H = oe(() => B?.getBillingAccountsByOrg ?? [], [B]), [U, W] = l(void 0);
|
|
61
61
|
s(() => {
|
|
62
|
-
!
|
|
63
|
-
}, [
|
|
64
|
-
let
|
|
62
|
+
!U && H.length > 0 && W(H[0].id);
|
|
63
|
+
}, [H, U]);
|
|
64
|
+
let G = H.find((e) => e.id === U), [pe, { data: K, loading: q, error: J }] = ae({ fetchPolicy: "network-only" }), me = c("");
|
|
65
65
|
s(() => {
|
|
66
|
-
if (
|
|
67
|
-
let e =
|
|
68
|
-
e ? (k(e),
|
|
66
|
+
if (q) return;
|
|
67
|
+
let e = K?.getTransaction;
|
|
68
|
+
e ? (k(e), j(!1), F(String(e.amount))) : (K !== void 0 || J) && (k(null), j(!0), F(""));
|
|
69
69
|
}, [
|
|
70
|
-
G,
|
|
71
70
|
K,
|
|
72
|
-
q
|
|
71
|
+
q,
|
|
72
|
+
J
|
|
73
73
|
]);
|
|
74
|
-
let
|
|
74
|
+
let Y = (e, t) => {
|
|
75
75
|
let n = `${e}::${t}`;
|
|
76
|
-
me.current = n, k(null),
|
|
76
|
+
me.current = n, k(null), j(!1), F(""), pe({ variables: {
|
|
77
77
|
id: e,
|
|
78
78
|
billingAccountId: t
|
|
79
79
|
} });
|
|
80
80
|
}, he = (e) => {
|
|
81
|
-
D(e), k(null),
|
|
81
|
+
D(e), k(null), j(!1), F(""), y.test(e.trim()) && U && Y(e.trim(), U);
|
|
82
82
|
}, ge = (e) => {
|
|
83
|
-
|
|
83
|
+
W(e), k(null), j(!1), F(""), y.test(E.trim()) && Y(E.trim(), e);
|
|
84
84
|
}, { data: _e, loading: ve, refetch: ye } = ie({
|
|
85
85
|
variables: {
|
|
86
|
-
billingAccountId:
|
|
86
|
+
billingAccountId: U,
|
|
87
87
|
pageSize: 20,
|
|
88
88
|
page: 1
|
|
89
89
|
},
|
|
90
|
-
skip: !
|
|
90
|
+
skip: !U,
|
|
91
91
|
fetchPolicy: "cache-and-network"
|
|
92
|
-
}),
|
|
92
|
+
}), X = _e?.getRefundRecords.records ?? [], [be, { loading: Z }] = ne({ refetchQueries: ["GetRefundRecords"] }), xe = (e) => e ? e.stripePaymentId ? {
|
|
93
93
|
provider: "STRIPE",
|
|
94
94
|
gatewayPaymentId: e.stripePaymentId
|
|
95
95
|
} : e.razorpayPaymentId ? {
|
|
96
96
|
provider: "RAZORPAY",
|
|
97
97
|
gatewayPaymentId: e.razorpayPaymentId
|
|
98
|
-
} : null : null,
|
|
99
|
-
if (e.preventDefault(),
|
|
100
|
-
|
|
98
|
+
} : null : null, Se = async (e) => {
|
|
99
|
+
if (e.preventDefault(), L(null), !O || !M.trim() || !P) {
|
|
100
|
+
L("Enter a valid transaction ID, an amount, and a reason.");
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
let t =
|
|
103
|
+
let t = xe(O);
|
|
104
104
|
if (!t) {
|
|
105
|
-
|
|
105
|
+
L("No payment gateway info found for this transaction. Please contact support.");
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
let n = parseFloat(
|
|
109
|
-
if (isNaN(n) || n <= 0)
|
|
110
|
-
else if (n > O.amount)
|
|
108
|
+
let n = parseFloat(P);
|
|
109
|
+
if (isNaN(n) || n <= 0) L("Please enter a valid amount greater than 0.");
|
|
110
|
+
else if (n > O.amount) L(`Cannot exceed the original payment amount (${r(O.amount, O.currency)}).`);
|
|
111
111
|
else try {
|
|
112
|
-
await
|
|
113
|
-
billingAccountId:
|
|
112
|
+
await be({ variables: {
|
|
113
|
+
billingAccountId: U,
|
|
114
114
|
provider: t.provider,
|
|
115
115
|
gatewayPaymentId: t.gatewayPaymentId,
|
|
116
116
|
amount: n,
|
|
117
|
-
currency: O.currency ??
|
|
117
|
+
currency: O.currency ?? G?.currency ?? "USD",
|
|
118
118
|
transactionId: O.id,
|
|
119
|
-
reason:
|
|
119
|
+
reason: M.trim(),
|
|
120
120
|
notes: "Requested by user via billing portal"
|
|
121
|
-
} }),
|
|
121
|
+
} }), z(!0), T(!1), Q(), await ye();
|
|
122
122
|
} catch (e) {
|
|
123
|
-
|
|
123
|
+
L(e instanceof Error ? e.message : "Failed to submit refund request.");
|
|
124
124
|
}
|
|
125
125
|
}, Q = () => {
|
|
126
|
-
D(""), k(null),
|
|
126
|
+
D(""), k(null), j(!1), N(""), F(""), L(null);
|
|
127
127
|
}, $ = () => {
|
|
128
|
-
T(!1),
|
|
128
|
+
T(!1), z(!1), Q();
|
|
129
129
|
};
|
|
130
|
-
return /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ _("div", {
|
|
131
131
|
className: C ? "space-y-6 px-4 py-6 sm:px-6 lg:px-8" : "space-y-6 p-6 max-w-3xl",
|
|
132
132
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
title:
|
|
135
|
-
description:
|
|
136
|
-
actions: !w &&
|
|
133
|
+
/* @__PURE__ */ g(e, {
|
|
134
|
+
title: h("billing.refunds.title", "Refunds"),
|
|
135
|
+
description: h("billing.refunds.description", "View your refund requests and submit new ones"),
|
|
136
|
+
actions: !w && fe ? /* @__PURE__ */ _("button", {
|
|
137
137
|
type: "button",
|
|
138
138
|
onClick: () => {
|
|
139
|
-
T(!0),
|
|
139
|
+
T(!0), z(!1);
|
|
140
140
|
},
|
|
141
141
|
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",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ g(ue, { className: "size-4" }), h("billing.refunds.requestRefund", "Request Refund")]
|
|
143
143
|
}) : void 0
|
|
144
144
|
}),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
C && /* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ g(se, { children: h("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\".") }),
|
|
146
|
+
C && /* @__PURE__ */ g(te, {
|
|
147
147
|
active: "refunds",
|
|
148
|
-
billingAccountId:
|
|
148
|
+
billingAccountId: U
|
|
149
149
|
}),
|
|
150
|
-
!
|
|
150
|
+
!V && H.length > 1 && /* @__PURE__ */ _("div", {
|
|
151
151
|
className: C ? "flex flex-wrap items-center gap-x-3 gap-y-2" : "flex items-center gap-3",
|
|
152
152
|
children: [
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ g(le, { className: "size-4 text-text-secondary shrink-0" }),
|
|
154
|
+
/* @__PURE__ */ g("label", {
|
|
155
155
|
htmlFor: "accountSwitch",
|
|
156
156
|
className: "text-sm text-text-secondary shrink-0",
|
|
157
|
-
children:
|
|
157
|
+
children: h("billing.refunds.account", "Billing account")
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
159
|
+
/* @__PURE__ */ g(ce, {
|
|
160
160
|
id: "accountSwitch",
|
|
161
|
-
value:
|
|
161
|
+
value: U ?? "",
|
|
162
162
|
onChange: (e) => ge(e.target.value),
|
|
163
163
|
className: `${C ? "min-w-0 basis-full truncate sm:basis-auto sm:max-w-lg " : ""}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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`,
|
|
164
|
-
children:
|
|
164
|
+
children: H.map((e) => /* @__PURE__ */ _("option", {
|
|
165
165
|
value: e.id,
|
|
166
166
|
children: [
|
|
167
167
|
e.name,
|
|
@@ -174,219 +174,219 @@ var S = () => {
|
|
|
174
174
|
})
|
|
175
175
|
]
|
|
176
176
|
}),
|
|
177
|
-
|
|
177
|
+
R && /* @__PURE__ */ _("div", {
|
|
178
178
|
className: "flex items-center justify-between p-4 rounded-lg border border-status-success-border bg-status-success-bg/10",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ _("div", {
|
|
180
180
|
className: "flex items-center gap-2",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ g(d, { className: "size-4 text-status-success-text" }), /* @__PURE__ */ g("p", {
|
|
182
182
|
className: "text-sm text-status-success-text font-medium",
|
|
183
|
-
children:
|
|
183
|
+
children: h("billing.refunds.submitted", "Refund request submitted. Our team will review it shortly.")
|
|
184
184
|
})]
|
|
185
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ g("button", {
|
|
186
186
|
type: "button",
|
|
187
|
-
onClick: () =>
|
|
187
|
+
onClick: () => z(!1),
|
|
188
188
|
className: "text-status-success-text hover:opacity-70",
|
|
189
|
-
children: /* @__PURE__ */
|
|
189
|
+
children: /* @__PURE__ */ g(m, { className: "size-4" })
|
|
190
190
|
})]
|
|
191
191
|
}),
|
|
192
|
-
w && /* @__PURE__ */
|
|
192
|
+
w && /* @__PURE__ */ _("div", {
|
|
193
193
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ _("div", {
|
|
195
195
|
className: "flex items-center justify-between p-4 border-b border-border-subtle bg-bg-sunken",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
196
|
+
children: [/* @__PURE__ */ g("h2", {
|
|
197
197
|
className: "font-semibold text-text-primary",
|
|
198
|
-
children:
|
|
199
|
-
}), /* @__PURE__ */
|
|
198
|
+
children: h("billing.refunds.newRequest", "New Refund Request")
|
|
199
|
+
}), /* @__PURE__ */ g("button", {
|
|
200
200
|
type: "button",
|
|
201
201
|
onClick: $,
|
|
202
202
|
className: "p-1 rounded hover:bg-bg-sunken transition-colors",
|
|
203
|
-
children: /* @__PURE__ */
|
|
203
|
+
children: /* @__PURE__ */ g(m, { className: "size-4 text-text-secondary" })
|
|
204
204
|
})]
|
|
205
|
-
}), /* @__PURE__ */
|
|
206
|
-
onSubmit:
|
|
205
|
+
}), /* @__PURE__ */ _("form", {
|
|
206
|
+
onSubmit: Se,
|
|
207
207
|
className: "p-4 space-y-4",
|
|
208
208
|
children: [
|
|
209
|
-
|
|
209
|
+
I && /* @__PURE__ */ g("div", {
|
|
210
210
|
className: "p-3 rounded-lg border border-status-error-border bg-status-error-bg/10",
|
|
211
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ g("p", {
|
|
212
212
|
className: "text-sm text-status-error-text",
|
|
213
|
-
children:
|
|
213
|
+
children: I
|
|
214
214
|
})
|
|
215
215
|
}),
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ _("div", { children: [
|
|
217
|
+
/* @__PURE__ */ _("label", {
|
|
218
218
|
htmlFor: "txnId",
|
|
219
219
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
220
|
-
children: [
|
|
220
|
+
children: [h("billing.refunds.transactionId", "Transaction ID"), " *"]
|
|
221
221
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ _("div", {
|
|
223
223
|
className: "relative",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ g("input", {
|
|
225
225
|
id: "txnId",
|
|
226
226
|
type: "text",
|
|
227
227
|
value: E,
|
|
228
228
|
onChange: (e) => he(e.target.value),
|
|
229
229
|
placeholder: "Paste your transaction ID...",
|
|
230
230
|
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"
|
|
231
|
-
}), /* @__PURE__ */
|
|
231
|
+
}), /* @__PURE__ */ g("div", {
|
|
232
232
|
className: "absolute right-2.5 top-1/2 -translate-y-1/2 text-text-secondary",
|
|
233
|
-
children:
|
|
233
|
+
children: q ? /* @__PURE__ */ g(p, { className: "size-4 animate-spin" }) : /* @__PURE__ */ g(de, { className: "size-4" })
|
|
234
234
|
})]
|
|
235
235
|
}),
|
|
236
|
-
O && /* @__PURE__ */
|
|
236
|
+
O && /* @__PURE__ */ _("div", {
|
|
237
237
|
className: "mt-2 p-3 rounded-button border border-status-success-border bg-status-success-bg/10 text-sm space-y-0.5",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ _("div", {
|
|
239
239
|
className: "flex items-center gap-2",
|
|
240
240
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ g(d, { className: "size-3.5 text-status-success-text shrink-0" }),
|
|
242
|
+
/* @__PURE__ */ g("span", {
|
|
243
243
|
className: "font-medium text-text-primary",
|
|
244
244
|
children: r(O.amount, O.currency)
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ g("span", {
|
|
247
247
|
className: "text-text-secondary",
|
|
248
248
|
children: "·"
|
|
249
249
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ g("span", {
|
|
251
251
|
className: "text-text-secondary",
|
|
252
252
|
children: i(O.createdAt)
|
|
253
253
|
}),
|
|
254
|
-
O.stripePaymentId && /* @__PURE__ */
|
|
254
|
+
O.stripePaymentId && /* @__PURE__ */ g("span", {
|
|
255
255
|
className: "text-xs text-text-secondary",
|
|
256
256
|
children: "Stripe"
|
|
257
257
|
}),
|
|
258
|
-
O.razorpayPaymentId && /* @__PURE__ */
|
|
258
|
+
O.razorpayPaymentId && /* @__PURE__ */ g("span", {
|
|
259
259
|
className: "text-xs text-text-secondary",
|
|
260
260
|
children: "Razorpay"
|
|
261
261
|
})
|
|
262
262
|
]
|
|
263
|
-
}), O.description && /* @__PURE__ */
|
|
263
|
+
}), O.description && /* @__PURE__ */ g("p", {
|
|
264
264
|
className: "text-xs text-text-secondary pl-5",
|
|
265
265
|
children: O.description
|
|
266
266
|
})]
|
|
267
267
|
}),
|
|
268
|
-
|
|
268
|
+
A && E.length > 0 && !q && /* @__PURE__ */ g("p", {
|
|
269
269
|
className: "mt-1 text-xs text-status-error-text",
|
|
270
|
-
children:
|
|
270
|
+
children: h("billing.refunds.txnNotFound", "Transaction not found in this billing account.")
|
|
271
271
|
}),
|
|
272
|
-
!y.test(E.trim()) && E.length > 4 && /* @__PURE__ */
|
|
272
|
+
!y.test(E.trim()) && E.length > 4 && /* @__PURE__ */ g("p", {
|
|
273
273
|
className: "mt-1 text-xs text-text-secondary",
|
|
274
|
-
children:
|
|
274
|
+
children: h("billing.refunds.txnIdHint", "Transaction IDs look like: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")
|
|
275
275
|
})
|
|
276
276
|
] }),
|
|
277
|
-
O && /* @__PURE__ */
|
|
277
|
+
O && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
278
278
|
htmlFor: "refundAmount",
|
|
279
279
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
280
|
-
children: [
|
|
281
|
-
}), /* @__PURE__ */
|
|
280
|
+
children: [h("billing.refunds.amount", "Refund Amount"), " *"]
|
|
281
|
+
}), /* @__PURE__ */ _("div", {
|
|
282
282
|
className: "flex items-center gap-2",
|
|
283
283
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ g("input", {
|
|
285
285
|
id: "refundAmount",
|
|
286
286
|
type: "number",
|
|
287
287
|
step: "0.01",
|
|
288
288
|
min: "0.01",
|
|
289
289
|
max: O.amount,
|
|
290
|
-
value:
|
|
291
|
-
onChange: (e) =>
|
|
290
|
+
value: P,
|
|
291
|
+
onChange: (e) => F(e.target.value),
|
|
292
292
|
required: !0,
|
|
293
293
|
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",
|
|
294
294
|
placeholder: "0.00"
|
|
295
295
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ g("span", {
|
|
297
297
|
className: "text-sm text-text-secondary",
|
|
298
|
-
children: O.currency ??
|
|
298
|
+
children: O.currency ?? G?.currency ?? "USD"
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ _("span", {
|
|
301
301
|
className: "text-xs text-text-secondary",
|
|
302
302
|
children: ["max ", r(O.amount, O.currency)]
|
|
303
303
|
})
|
|
304
304
|
]
|
|
305
305
|
})] }),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
|
|
307
307
|
htmlFor: "reason",
|
|
308
308
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
309
|
-
children: [
|
|
310
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: [h("billing.refunds.reason", "Reason for refund"), " *"]
|
|
310
|
+
}), /* @__PURE__ */ g("textarea", {
|
|
311
311
|
id: "reason",
|
|
312
|
-
value:
|
|
313
|
-
onChange: (e) =>
|
|
312
|
+
value: M,
|
|
313
|
+
onChange: (e) => N(e.target.value),
|
|
314
314
|
required: !0,
|
|
315
315
|
rows: 3,
|
|
316
316
|
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",
|
|
317
|
-
placeholder:
|
|
317
|
+
placeholder: h("billing.refunds.reasonPlaceholder", "Describe why you are requesting a refund...")
|
|
318
318
|
})] }),
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ _("div", {
|
|
320
320
|
className: "flex items-center gap-3 pt-1",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ g("button", {
|
|
322
322
|
type: "submit",
|
|
323
|
-
disabled: Z || !O || !
|
|
323
|
+
disabled: Z || !O || !M.trim() || !P,
|
|
324
324
|
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",
|
|
325
|
-
children: Z ?
|
|
326
|
-
}), /* @__PURE__ */
|
|
325
|
+
children: Z ? h("billing.refunds.submitting", "Submitting...") : h("billing.refunds.submitRequest", "Submit Request")
|
|
326
|
+
}), /* @__PURE__ */ g("button", {
|
|
327
327
|
type: "button",
|
|
328
328
|
onClick: $,
|
|
329
329
|
className: "px-4 py-2 text-sm border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
330
|
-
children:
|
|
330
|
+
children: h("billing.common.cancel", "Cancel")
|
|
331
331
|
})]
|
|
332
332
|
})
|
|
333
333
|
]
|
|
334
334
|
})]
|
|
335
335
|
}),
|
|
336
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ _("div", {
|
|
337
337
|
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 overflow-hidden",
|
|
338
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ g("div", {
|
|
339
339
|
className: "p-4 border-b border-border-subtle bg-bg-sunken",
|
|
340
|
-
children: /* @__PURE__ */
|
|
340
|
+
children: /* @__PURE__ */ g("h2", {
|
|
341
341
|
className: "font-semibold text-text-primary",
|
|
342
|
-
children:
|
|
342
|
+
children: h("billing.refunds.history", "Refund History")
|
|
343
343
|
})
|
|
344
|
-
}),
|
|
344
|
+
}), V || ve ? /* @__PURE__ */ g("div", {
|
|
345
345
|
className: "p-8 flex items-center justify-center",
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
-
}) :
|
|
346
|
+
children: /* @__PURE__ */ g(p, { className: "size-5 animate-spin text-text-secondary" })
|
|
347
|
+
}) : X.length === 0 ? /* @__PURE__ */ g("div", {
|
|
348
348
|
className: C ? "flex justify-center px-4 py-10 text-center" : void 0,
|
|
349
|
-
children: /* @__PURE__ */
|
|
349
|
+
children: /* @__PURE__ */ g(u, {
|
|
350
350
|
illustration: "empty-data",
|
|
351
|
-
title:
|
|
352
|
-
description:
|
|
351
|
+
title: h("billing.refunds.noRefunds", "No refund requests yet"),
|
|
352
|
+
description: h("billing.refunds.noRefundsHint", "If you have an issue with a payment, click \"Request Refund\" to get started.")
|
|
353
353
|
})
|
|
354
|
-
}) : /* @__PURE__ */
|
|
354
|
+
}) : /* @__PURE__ */ g("ul", {
|
|
355
355
|
className: "divide-y divide-border-subtle",
|
|
356
|
-
children:
|
|
356
|
+
children: X.map((e) => /* @__PURE__ */ _("li", {
|
|
357
357
|
className: `flex gap-4 p-4 hover:bg-bg-sunken transition-colors ${C ? "flex-col gap-2 sm:flex-row sm:items-start sm:gap-4" : "items-start"}`,
|
|
358
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ _("div", {
|
|
359
359
|
className: "flex-1 min-w-0",
|
|
360
360
|
children: [
|
|
361
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ _("div", {
|
|
362
362
|
className: "flex items-center gap-2 flex-wrap",
|
|
363
363
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ g("span", {
|
|
365
365
|
className: "text-sm font-medium text-text-primary",
|
|
366
366
|
children: r(e.amount, e.currency)
|
|
367
367
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
e.purchaseDetail && /* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ g(x, { status: e.status }),
|
|
369
|
+
e.purchaseDetail && /* @__PURE__ */ g("span", {
|
|
370
370
|
className: "text-xs text-text-secondary truncate",
|
|
371
371
|
children: e.purchaseDetail
|
|
372
372
|
})
|
|
373
373
|
]
|
|
374
374
|
}),
|
|
375
|
-
e.reason && /* @__PURE__ */
|
|
375
|
+
e.reason && /* @__PURE__ */ g("p", {
|
|
376
376
|
className: "text-xs text-text-secondary mt-1 line-clamp-2",
|
|
377
377
|
children: e.reason
|
|
378
378
|
}),
|
|
379
|
-
e.errorMessage && e.status === o.Failed && /* @__PURE__ */
|
|
379
|
+
e.errorMessage && e.status === o.Failed && /* @__PURE__ */ g("p", {
|
|
380
380
|
className: "text-xs text-status-error-text mt-1",
|
|
381
381
|
children: e.errorMessage
|
|
382
382
|
})
|
|
383
383
|
]
|
|
384
|
-
}), /* @__PURE__ */
|
|
384
|
+
}), /* @__PURE__ */ _("div", {
|
|
385
385
|
className: C ? "shrink-0 sm:text-right" : "text-right shrink-0",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ g("p", {
|
|
387
387
|
className: "text-xs text-text-secondary",
|
|
388
388
|
children: i(e.createdAt)
|
|
389
|
-
}), e.processedAt && /* @__PURE__ */
|
|
389
|
+
}), e.processedAt && /* @__PURE__ */ _("p", {
|
|
390
390
|
className: "text-xs text-text-secondary mt-0.5",
|
|
391
391
|
children: ["Processed ", i(e.processedAt)]
|
|
392
392
|
})]
|
|
@@ -394,16 +394,16 @@ var S = () => {
|
|
|
394
394
|
}, e.id))
|
|
395
395
|
})]
|
|
396
396
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ _("p", {
|
|
398
398
|
className: "text-xs text-text-secondary",
|
|
399
399
|
children: [
|
|
400
|
-
|
|
400
|
+
h("billing.refunds.footer", "Refund requests are reviewed by our team within 3–5 business days. For urgent issues, contact support."),
|
|
401
401
|
" ",
|
|
402
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ g("button", {
|
|
403
403
|
type: "button",
|
|
404
|
-
onClick: () => b("/transactions/" +
|
|
404
|
+
onClick: () => b("/transactions/" + U),
|
|
405
405
|
className: "underline hover:no-underline",
|
|
406
|
-
children:
|
|
406
|
+
children: h("billing.refunds.viewTransactions", "View all transactions")
|
|
407
407
|
})
|
|
408
408
|
]
|
|
409
409
|
})
|