@burdenoff/microfe-billing 2026.802.1 → 2026.803.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/plans/pages/PlanBrowseDetailPage.js +121 -120
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +155 -154
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/shared/utils/format.js +14 -11
- package/dist/billing/shared/utils/format.js.map +1 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js +5 -1
- package/dist/billing/shared/utils/planFeatureQuantity.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,71 +1,72 @@
|
|
|
1
|
-
import { formatCurrency as e, formatPlanDuration as t, formatPlanDurationLabel as n } from "../../../shared/utils/format.js";
|
|
2
|
-
import { getPlanFeatureQuantity as
|
|
3
|
-
import { useBillingPermissions as
|
|
4
|
-
import { useBillingNavigate as
|
|
5
|
-
import { usePlan as
|
|
1
|
+
import { formatCurrency as e, formatPlanDuration as t, formatPlanDurationLabel as n, formatQuotaValue as r } from "../../../shared/utils/format.js";
|
|
2
|
+
import { getPlanFeatureQuantity as i, getPlanFeatureUnit as a } from "../../../shared/utils/planFeatureQuantity.js";
|
|
3
|
+
import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
|
|
4
|
+
import { useBillingNavigate as s } from "../../../hooks/useBillingNavigate.js";
|
|
5
|
+
import { usePlan as c, usePlanMutations as l } from "../hooks/usePlans.js";
|
|
6
6
|
import "../hooks/index.js";
|
|
7
|
-
import { useMemo as
|
|
8
|
-
import { useParams as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { useI18n as
|
|
11
|
-
import { EmphasisPanel as
|
|
7
|
+
import { useMemo as u } from "react";
|
|
8
|
+
import { useParams as d } from "react-router";
|
|
9
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
|
+
import { EmphasisPanel as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
//#region src/billing/modules/plans/pages/PlanDetailPage.tsx
|
|
13
|
-
function
|
|
13
|
+
function v(e) {
|
|
14
14
|
let t = /* @__PURE__ */ new Map();
|
|
15
15
|
for (let n of e) {
|
|
16
16
|
if (!n.quota) continue;
|
|
17
|
-
let e = n.quota.id,
|
|
18
|
-
|
|
17
|
+
let e = n.quota.id, r = n.quota.limits?.type ?? "unknown", o = i(n), s = t.get(e);
|
|
18
|
+
s ? (s.totalValue += o, s.count += 1) : t.set(e, {
|
|
19
19
|
quotaId: e,
|
|
20
20
|
name: n.quota.name ?? "Unknown Quota",
|
|
21
21
|
quotaType: n.quota.quotaType ?? "",
|
|
22
|
-
limitType:
|
|
23
|
-
totalValue:
|
|
24
|
-
count: 1
|
|
22
|
+
limitType: r,
|
|
23
|
+
totalValue: o,
|
|
24
|
+
count: 1,
|
|
25
|
+
unit: a(n)
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
28
|
return Array.from(t.values());
|
|
28
29
|
}
|
|
29
|
-
var
|
|
30
|
-
let { t:
|
|
31
|
-
let n =
|
|
30
|
+
var y = () => {
|
|
31
|
+
let { t: i } = h(), a = (e, t) => {
|
|
32
|
+
let n = i(e);
|
|
32
33
|
return n === e ? t : n;
|
|
33
|
-
}, { planId:
|
|
34
|
-
return
|
|
34
|
+
}, { planId: y } = d(), b = s(), x = o(), { plan: S, isLoading: C, error: w, refetch: T } = c(y), { togglePlan: E, isToggling: D } = l(), O = u(() => v(S?.features || []), [S?.features]);
|
|
35
|
+
return x.canViewPlans ? C ? /* @__PURE__ */ m("div", {
|
|
35
36
|
className: "space-y-6 p-6",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
+
children: [/* @__PURE__ */ m("div", {
|
|
37
38
|
className: "flex items-center gap-4",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
39
|
-
}), /* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ p("div", { className: "size-10 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ p("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" })]
|
|
40
|
+
}), /* @__PURE__ */ m("div", {
|
|
40
41
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
41
|
-
children: [/* @__PURE__ */
|
|
42
|
+
children: [/* @__PURE__ */ p("div", {
|
|
42
43
|
className: "lg:col-span-2 space-y-6",
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ m("div", {
|
|
44
45
|
className: "border border-border-subtle rounded-lg p-6 space-y-4",
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ p("div", { className: "h-6 w-32 bg-bg-sunken animate-pulse rounded" }),
|
|
48
|
+
/* @__PURE__ */ p("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" }),
|
|
49
|
+
/* @__PURE__ */ p("div", { className: "h-4 w-3/4 bg-bg-sunken animate-pulse rounded" })
|
|
49
50
|
]
|
|
50
51
|
})
|
|
51
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ m("div", {
|
|
52
53
|
className: "border border-border-subtle rounded-lg p-6 space-y-4",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ p("div", { className: "h-6 w-24 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ p("div", { className: "h-10 w-full bg-bg-sunken animate-pulse rounded" })]
|
|
54
55
|
})]
|
|
55
56
|
})]
|
|
56
|
-
}) :
|
|
57
|
+
}) : w || !S ? /* @__PURE__ */ p("div", {
|
|
57
58
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
58
|
-
children: /* @__PURE__ */
|
|
59
|
+
children: /* @__PURE__ */ m("div", {
|
|
59
60
|
className: "text-center space-y-4",
|
|
60
61
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ p("div", {
|
|
62
63
|
className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ p("svg", {
|
|
64
65
|
className: "size-6 text-status-error-text",
|
|
65
66
|
fill: "none",
|
|
66
67
|
viewBox: "0 0 24 24",
|
|
67
68
|
stroke: "currentColor",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ p("path", {
|
|
69
70
|
strokeLinecap: "round",
|
|
70
71
|
strokeLinejoin: "round",
|
|
71
72
|
strokeWidth: 2,
|
|
@@ -73,173 +74,173 @@ var _ = () => {
|
|
|
73
74
|
})
|
|
74
75
|
})
|
|
75
76
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ p("h2", {
|
|
77
78
|
className: "text-lg font-semibold text-text-primary",
|
|
78
|
-
children:
|
|
79
|
+
children: a("billing.plans.planNotFound", "Plan not found")
|
|
79
80
|
}),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ p("p", {
|
|
81
82
|
className: "text-sm text-text-muted",
|
|
82
|
-
children:
|
|
83
|
+
children: w?.message || a("billing.plans.planNotFoundMessage", "The plan you are looking for does not exist.")
|
|
83
84
|
}),
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ p("button", {
|
|
85
86
|
type: "button",
|
|
86
|
-
onClick: () =>
|
|
87
|
+
onClick: () => b("/plans"),
|
|
87
88
|
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",
|
|
88
89
|
children: "Back to Plans"
|
|
89
90
|
})
|
|
90
91
|
]
|
|
91
92
|
})
|
|
92
|
-
}) : /* @__PURE__ */
|
|
93
|
+
}) : /* @__PURE__ */ m("div", {
|
|
93
94
|
className: "space-y-6 p-6",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ m("div", {
|
|
95
96
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ m("div", {
|
|
97
98
|
className: "flex items-start gap-4",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ p("button", {
|
|
99
100
|
type: "button",
|
|
100
|
-
onClick: () =>
|
|
101
|
+
onClick: () => b("/plans"),
|
|
101
102
|
className: "p-2 -ml-2 text-text-muted hover:text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
|
|
102
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ p("svg", {
|
|
103
104
|
className: "size-5",
|
|
104
105
|
fill: "none",
|
|
105
106
|
viewBox: "0 0 24 24",
|
|
106
107
|
stroke: "currentColor",
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ p("path", {
|
|
108
109
|
strokeLinecap: "round",
|
|
109
110
|
strokeLinejoin: "round",
|
|
110
111
|
strokeWidth: 2,
|
|
111
112
|
d: "M15 19l-7-7 7-7"
|
|
112
113
|
})
|
|
113
114
|
})
|
|
114
|
-
}), /* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
}), /* @__PURE__ */ m("div", { children: [
|
|
116
|
+
/* @__PURE__ */ m("div", {
|
|
116
117
|
className: "flex items-center gap-3",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ p("h1", {
|
|
118
119
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
119
|
-
children:
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
-
className: `px-2 py-1 text-xs font-medium rounded ${
|
|
122
|
-
children:
|
|
120
|
+
children: S.name
|
|
121
|
+
}), /* @__PURE__ */ p("span", {
|
|
122
|
+
className: `px-2 py-1 text-xs font-medium rounded ${S.isActive ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-muted"}`,
|
|
123
|
+
children: S.isActive ? "Active" : "Inactive"
|
|
123
124
|
})]
|
|
124
125
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ m("p", {
|
|
126
127
|
className: "text-sm text-text-muted mt-1",
|
|
127
|
-
children: [n(
|
|
128
|
+
children: [n(S.duration), " billing plan"]
|
|
128
129
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ p(_, {
|
|
130
131
|
className: "mt-3",
|
|
131
|
-
children:
|
|
132
|
+
children: a("billing.plans.detailPurpose", "A full breakdown of this plan — its price, billing period and every quota and feature it grants. Use it to decide whether the plan fits before subscribing, or (as an admin) to edit or activate it.")
|
|
132
133
|
})
|
|
133
134
|
] })]
|
|
134
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ m("div", {
|
|
135
136
|
className: "flex items-center gap-2",
|
|
136
|
-
children: [
|
|
137
|
+
children: [x.canCreateSubscription && S.isActive && /* @__PURE__ */ p("button", {
|
|
137
138
|
type: "button",
|
|
138
|
-
onClick: () =>
|
|
139
|
+
onClick: () => b(`/checkout/${S.id}`),
|
|
139
140
|
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",
|
|
140
141
|
children: "Subscribe to Plan"
|
|
141
|
-
}),
|
|
142
|
+
}), x.canManagePlans && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("button", {
|
|
142
143
|
type: "button",
|
|
143
|
-
onClick: () =>
|
|
144
|
+
onClick: () => b(`/plans/${S.id}/edit`),
|
|
144
145
|
className: "px-4 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
145
146
|
children: "Edit Plan"
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ p("button", {
|
|
147
148
|
type: "button",
|
|
148
149
|
onClick: async () => {
|
|
149
|
-
if (
|
|
150
|
-
await
|
|
150
|
+
if (x.canManagePlans) try {
|
|
151
|
+
await E(S.id, !S.isActive), await T();
|
|
151
152
|
} catch (e) {
|
|
152
153
|
console.error("Failed to toggle plan:", e);
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
|
-
disabled:
|
|
156
|
-
className: `px-4 py-2 text-sm font-medium border border-border-subtle rounded-md transition-colors ${
|
|
157
|
-
children:
|
|
156
|
+
disabled: D,
|
|
157
|
+
className: `px-4 py-2 text-sm font-medium border border-border-subtle rounded-md transition-colors ${S.isActive ? "text-status-error-text hover:bg-status-error-bg-subtle" : "text-status-success-text hover:bg-status-success-bg-subtle"}`,
|
|
158
|
+
children: D ? a("billing.plans.processing", "Processing...") : S.isActive ? a("billing.plans.deactivate", "Deactivate") : a("billing.plans.activate", "Activate")
|
|
158
159
|
})] })]
|
|
159
160
|
})]
|
|
160
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ m("div", {
|
|
161
162
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
+
children: [/* @__PURE__ */ m("div", {
|
|
163
164
|
className: "lg:col-span-2 space-y-6",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ m(g, {
|
|
165
166
|
className: "p-6",
|
|
166
167
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
+
/* @__PURE__ */ p("h2", {
|
|
168
169
|
className: "text-lg font-semibold text-text-primary mb-4",
|
|
169
|
-
children:
|
|
170
|
+
children: a("billing.plans.pricing", "Pricing")
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ m("div", {
|
|
172
173
|
className: "flex items-baseline gap-1",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ p("span", {
|
|
174
175
|
className: "text-4xl font-bold text-text-primary",
|
|
175
|
-
children: e(
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: e(S.price, S.currency)
|
|
177
|
+
}), /* @__PURE__ */ m("span", {
|
|
177
178
|
className: "text-lg text-text-muted",
|
|
178
|
-
children: ["/ ", t(
|
|
179
|
+
children: ["/ ", t(S.duration)]
|
|
179
180
|
})]
|
|
180
181
|
}),
|
|
181
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ m("p", {
|
|
182
183
|
className: "text-sm text-text-muted mt-2",
|
|
183
184
|
children: [
|
|
184
|
-
|
|
185
|
+
a("billing.plans.billed", "Billed"),
|
|
185
186
|
" ",
|
|
186
|
-
|
|
187
|
+
S.duration === "monthly" ? a("billing.plans.everyMonth", "every month") : a("billing.plans.annually", "annually")
|
|
187
188
|
]
|
|
188
189
|
})
|
|
189
190
|
]
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ m("div", {
|
|
191
192
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ p("div", {
|
|
193
194
|
className: "p-6 border-b border-border-subtle bg-bg-sunken/30",
|
|
194
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ m("h2", {
|
|
195
196
|
className: "text-lg font-semibold text-text-primary",
|
|
196
197
|
children: [
|
|
197
|
-
|
|
198
|
+
a("billing.plans.featuresAndQuotas", "Features & Quotas"),
|
|
198
199
|
" (",
|
|
199
|
-
|
|
200
|
+
O.length,
|
|
200
201
|
")"
|
|
201
202
|
]
|
|
202
203
|
})
|
|
203
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ p("div", {
|
|
204
205
|
className: "p-6",
|
|
205
|
-
children:
|
|
206
|
+
children: O.length === 0 ? /* @__PURE__ */ p("p", {
|
|
206
207
|
className: "text-sm text-text-muted",
|
|
207
|
-
children:
|
|
208
|
-
}) : /* @__PURE__ */
|
|
208
|
+
children: a("billing.plans.noFeatures", "No features configured for this plan.")
|
|
209
|
+
}) : /* @__PURE__ */ p("ul", {
|
|
209
210
|
className: "space-y-3",
|
|
210
|
-
children:
|
|
211
|
+
children: O.map((e) => /* @__PURE__ */ m("li", {
|
|
211
212
|
className: "flex items-start gap-3 p-3 rounded-lg bg-bg-sunken/30",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ p("div", {
|
|
213
214
|
className: "size-8 rounded-full bg-status-success-bg-subtle flex items-center justify-center shrink-0",
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ p("svg", {
|
|
215
216
|
className: "size-4 text-status-success-text",
|
|
216
217
|
fill: "none",
|
|
217
218
|
viewBox: "0 0 24 24",
|
|
218
219
|
stroke: "currentColor",
|
|
219
|
-
children: /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ p("path", {
|
|
220
221
|
strokeLinecap: "round",
|
|
221
222
|
strokeLinejoin: "round",
|
|
222
223
|
strokeWidth: 2,
|
|
223
224
|
d: "M5 13l4 4L19 7"
|
|
224
225
|
})
|
|
225
226
|
})
|
|
226
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ m("div", {
|
|
227
228
|
className: "flex-1",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ m("div", {
|
|
229
230
|
className: "flex items-center justify-between",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ p("p", {
|
|
231
232
|
className: "font-medium text-text-primary",
|
|
232
233
|
children: e.name
|
|
233
|
-
}), /* @__PURE__ */
|
|
234
|
+
}), /* @__PURE__ */ p("span", {
|
|
234
235
|
className: "font-semibold text-text-primary",
|
|
235
|
-
children: e.totalValue.
|
|
236
|
+
children: r(e.totalValue, e.unit)
|
|
236
237
|
})]
|
|
237
|
-
}), /* @__PURE__ */
|
|
238
|
+
}), /* @__PURE__ */ m("div", {
|
|
238
239
|
className: "flex items-center gap-2 mt-1",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ m("span", {
|
|
240
241
|
className: "text-sm text-text-muted capitalize",
|
|
241
242
|
children: ["Type: ", e.limitType]
|
|
242
|
-
}), e.quotaType && /* @__PURE__ */
|
|
243
|
+
}), e.quotaType && /* @__PURE__ */ p("span", {
|
|
243
244
|
className: "px-2 py-0.5 text-xs font-medium bg-bg-sunken text-text-muted rounded",
|
|
244
245
|
children: e.quotaType
|
|
245
246
|
})]
|
|
@@ -249,100 +250,100 @@ var _ = () => {
|
|
|
249
250
|
})
|
|
250
251
|
})]
|
|
251
252
|
})]
|
|
252
|
-
}), /* @__PURE__ */
|
|
253
|
+
}), /* @__PURE__ */ m("div", {
|
|
253
254
|
className: "space-y-6",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ m("div", {
|
|
255
256
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
256
|
-
children: [/* @__PURE__ */
|
|
257
|
+
children: [/* @__PURE__ */ p("div", {
|
|
257
258
|
className: "p-6 border-b border-border-subtle bg-bg-sunken/30",
|
|
258
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ p("h2", {
|
|
259
260
|
className: "text-lg font-semibold text-text-primary",
|
|
260
|
-
children:
|
|
261
|
+
children: a("billing.plans.planDetails", "Plan Details")
|
|
261
262
|
})
|
|
262
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ m("div", {
|
|
263
264
|
className: "p-6 space-y-4",
|
|
264
265
|
children: [
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
266
267
|
className: "text-sm text-text-muted",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */
|
|
268
|
+
children: a("billing.plans.planName", "Plan Name")
|
|
269
|
+
}), /* @__PURE__ */ p("p", {
|
|
269
270
|
className: "text-sm font-medium text-text-primary mt-0.5",
|
|
270
|
-
children:
|
|
271
|
+
children: S.name
|
|
271
272
|
})] }),
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
273
274
|
className: "text-sm text-text-muted",
|
|
274
|
-
children:
|
|
275
|
-
}), /* @__PURE__ */
|
|
275
|
+
children: a("billing.plans.status", "Status")
|
|
276
|
+
}), /* @__PURE__ */ p("p", {
|
|
276
277
|
className: "text-sm text-text-primary mt-0.5",
|
|
277
|
-
children: /* @__PURE__ */
|
|
278
|
-
className: `inline-flex items-center px-2 py-0.5 text-xs font-medium rounded ${
|
|
279
|
-
children:
|
|
278
|
+
children: /* @__PURE__ */ p("span", {
|
|
279
|
+
className: `inline-flex items-center px-2 py-0.5 text-xs font-medium rounded ${S.isActive ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-muted"}`,
|
|
280
|
+
children: S.isActive ? "Active" : "Inactive"
|
|
280
281
|
})
|
|
281
282
|
})] }),
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
283
284
|
className: "text-sm text-text-muted",
|
|
284
|
-
children:
|
|
285
|
-
}), /* @__PURE__ */
|
|
285
|
+
children: a("billing.plans.price", "Price")
|
|
286
|
+
}), /* @__PURE__ */ m("p", {
|
|
286
287
|
className: "text-sm font-medium text-text-primary mt-0.5",
|
|
287
288
|
children: [
|
|
288
|
-
e(
|
|
289
|
+
e(S.price, S.currency),
|
|
289
290
|
" / ",
|
|
290
|
-
t(
|
|
291
|
+
t(S.duration)
|
|
291
292
|
]
|
|
292
293
|
})] }),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
294
295
|
className: "text-sm text-text-muted",
|
|
295
|
-
children:
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
children: a("billing.plans.currency", "Currency")
|
|
297
|
+
}), /* @__PURE__ */ p("p", {
|
|
297
298
|
className: "text-sm text-text-primary mt-0.5",
|
|
298
|
-
children:
|
|
299
|
+
children: S.currency
|
|
299
300
|
})] }),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
301
302
|
className: "text-sm text-text-muted",
|
|
302
|
-
children:
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
children: a("billing.plans.billingPeriod", "Billing Period")
|
|
304
|
+
}), /* @__PURE__ */ p("p", {
|
|
304
305
|
className: "text-sm text-text-primary mt-0.5",
|
|
305
|
-
children: n(
|
|
306
|
+
children: n(S.duration)
|
|
306
307
|
})] })
|
|
307
308
|
]
|
|
308
309
|
})]
|
|
309
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ m("div", {
|
|
310
311
|
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ p("div", {
|
|
312
313
|
className: "p-6 border-b border-border-subtle bg-bg-sunken/30",
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ p("h2", {
|
|
314
315
|
className: "text-lg font-semibold text-text-primary",
|
|
315
|
-
children:
|
|
316
|
+
children: a("billing.plans.statistics", "Statistics")
|
|
316
317
|
})
|
|
317
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ p("div", {
|
|
318
319
|
className: "p-6 space-y-4",
|
|
319
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ m("div", {
|
|
320
321
|
className: "flex items-center justify-between",
|
|
321
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ p("p", {
|
|
322
323
|
className: "text-sm text-text-muted",
|
|
323
|
-
children:
|
|
324
|
-
}), /* @__PURE__ */
|
|
324
|
+
children: a("billing.plans.uniqueQuotas", "Unique Quotas")
|
|
325
|
+
}), /* @__PURE__ */ p("p", {
|
|
325
326
|
className: "font-semibold text-text-primary",
|
|
326
|
-
children:
|
|
327
|
+
children: O.length
|
|
327
328
|
})]
|
|
328
329
|
})
|
|
329
330
|
})]
|
|
330
331
|
})]
|
|
331
332
|
})]
|
|
332
333
|
})]
|
|
333
|
-
}) : /* @__PURE__ */
|
|
334
|
+
}) : /* @__PURE__ */ p("div", {
|
|
334
335
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
+
children: /* @__PURE__ */ m("div", {
|
|
336
337
|
className: "text-center space-y-2",
|
|
337
338
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ p("div", {
|
|
339
340
|
className: "size-12 mx-auto rounded-full bg-bg-sunken flex items-center justify-center",
|
|
340
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ p("svg", {
|
|
341
342
|
className: "size-6 text-text-muted",
|
|
342
343
|
fill: "none",
|
|
343
344
|
viewBox: "0 0 24 24",
|
|
344
345
|
stroke: "currentColor",
|
|
345
|
-
children: /* @__PURE__ */
|
|
346
|
+
children: /* @__PURE__ */ p("path", {
|
|
346
347
|
strokeLinecap: "round",
|
|
347
348
|
strokeLinejoin: "round",
|
|
348
349
|
strokeWidth: 2,
|
|
@@ -350,19 +351,19 @@ var _ = () => {
|
|
|
350
351
|
})
|
|
351
352
|
})
|
|
352
353
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ p("h2", {
|
|
354
355
|
className: "text-lg font-semibold text-text-primary",
|
|
355
|
-
children:
|
|
356
|
+
children: a("billing.accessDenied.title", "Access Denied")
|
|
356
357
|
}),
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ p("p", {
|
|
358
359
|
className: "text-sm text-text-muted max-w-sm",
|
|
359
|
-
children:
|
|
360
|
+
children: a("billing.plans.noViewPlanPermission", "You don't have permission to view this plan.")
|
|
360
361
|
})
|
|
361
362
|
]
|
|
362
363
|
})
|
|
363
364
|
});
|
|
364
365
|
};
|
|
365
366
|
//#endregion
|
|
366
|
-
export {
|
|
367
|
+
export { y as PlanDetailPage };
|
|
367
368
|
|
|
368
369
|
//# sourceMappingURL=PlanDetailPage.js.map
|