@burdenoff/microfe-billing 2026.623.3 → 2026.624.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.
Files changed (43) hide show
  1. package/dist/billing/BillingUserRoutes.js +3 -3
  2. package/dist/billing/BillingUserRoutes.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +34 -34
  4. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
  5. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +94 -94
  6. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
  7. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +162 -187
  8. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  9. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +146 -153
  10. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  11. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +10 -10
  12. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
  13. package/dist/billing/modules/billing/pages/TransactionsPage.js +62 -62
  14. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  15. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +164 -179
  16. package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
  17. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +8 -8
  18. package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
  19. package/dist/billing/modules/earnings/pages/EarningsPage.js +243 -305
  20. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  21. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +73 -78
  22. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  23. package/dist/billing/modules/earnings/pages/PayoutsPage.js +173 -179
  24. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  25. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +4 -4
  26. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
  27. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
  28. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
  29. package/dist/billing/modules/settings/pages/SettingsPage.js +181 -173
  30. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  31. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +111 -99
  32. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  33. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +68 -83
  34. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
  35. package/dist/billing/shared/components/AccessDenied.js +4 -4
  36. package/dist/billing/shared/components/AccessDenied.js.map +1 -1
  37. package/dist/billing/shared/components/ActorIdentity.js +8 -8
  38. package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
  39. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +11 -11
  40. package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
  41. package/dist/billing/shared/ui/MetricCard.js +1 -1
  42. package/dist/billing/shared/ui/MetricCard.js.map +1 -1
  43. package/package.json +1 -1
@@ -9,8 +9,80 @@ import { useEffect as s, useState as c } from "react";
9
9
  import { ArrowLeft as l, BarChart2 as u, Calendar as d, ChevronLeft as f, ChevronRight as p, Edit as m, History as h, Package as g, Tag as _, Users as v } from "lucide-react";
10
10
  import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
11
11
  import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { ResponsiveTable as C } from "@burdenoff/fe-libs/ui";
12
13
  //#region src/billing/modules/coupons/pages/CouponDetailPage.tsx
13
- function C({ status: e }) {
14
+ var w = [
15
+ {
16
+ key: "userId",
17
+ header: "User ID",
18
+ priority: "primary",
19
+ cell: (e) => /* @__PURE__ */ x("span", {
20
+ className: "font-mono",
21
+ children: [e.userId.slice(0, 12), "…"]
22
+ })
23
+ },
24
+ {
25
+ key: "transaction",
26
+ header: "Transaction",
27
+ cell: (e) => e.transactionId ? /* @__PURE__ */ x("span", {
28
+ className: "font-mono text-xs text-text-link",
29
+ children: [e.transactionId.slice(0, 12), "…"]
30
+ }) : e.orderId ? /* @__PURE__ */ x("span", {
31
+ className: "text-xs text-text-muted",
32
+ children: [
33
+ "Order: ",
34
+ e.orderId.slice(0, 12),
35
+ "…"
36
+ ]
37
+ }) : /* @__PURE__ */ b("span", {
38
+ className: "text-text-muted",
39
+ children: ", "
40
+ })
41
+ },
42
+ {
43
+ key: "original",
44
+ header: "Original",
45
+ cell: (e) => /* @__PURE__ */ x("span", {
46
+ className: "tabular-nums",
47
+ children: [
48
+ e.originalAmount.toFixed(2),
49
+ " ",
50
+ e.currency
51
+ ]
52
+ })
53
+ },
54
+ {
55
+ key: "discount",
56
+ header: "Discount",
57
+ cell: (e) => /* @__PURE__ */ x("span", {
58
+ className: "tabular-nums text-status-success-text font-medium",
59
+ children: [
60
+ "-",
61
+ e.discountValue.toFixed(2),
62
+ " ",
63
+ e.currency
64
+ ]
65
+ })
66
+ },
67
+ {
68
+ key: "final",
69
+ header: "Final",
70
+ cell: (e) => /* @__PURE__ */ x("span", {
71
+ className: "tabular-nums font-medium",
72
+ children: [
73
+ e.finalAmount.toFixed(2),
74
+ " ",
75
+ e.currency
76
+ ]
77
+ })
78
+ },
79
+ {
80
+ key: "usedAt",
81
+ header: "Used At",
82
+ cell: (e) => new Date(e.usedAt).toLocaleString()
83
+ }
84
+ ];
85
+ function T({ status: e }) {
14
86
  let { label: t, className: n } = {
15
87
  [o.Active]: {
16
88
  label: "Active",
@@ -37,7 +109,7 @@ function C({ status: e }) {
37
109
  children: t
38
110
  });
39
111
  }
40
- function w({ label: e, value: t }) {
112
+ function E({ label: e, value: t }) {
41
113
  return /* @__PURE__ */ x("div", {
42
114
  className: "flex items-start gap-2 py-3 border-b border-border-subtle last:border-0",
43
115
  children: [/* @__PURE__ */ b("span", {
@@ -49,29 +121,29 @@ function w({ label: e, value: t }) {
49
121
  })]
50
122
  });
51
123
  }
52
- var T = () => {
53
- let { t: o } = S(), T = (e, t) => {
124
+ var D = () => {
125
+ let { t: o } = S(), D = (e, t) => {
54
126
  let n = o(e);
55
127
  return n === e ? t : n;
56
- }, E = a(), D = n(), O = window.location.pathname.split("/").filter(Boolean).slice(-1)[0], [k, A] = c("details"), [j, M] = c(0), [N, { data: P, loading: F, error: I }] = r(), { data: L, loading: R } = i({
128
+ }, O = a(), k = n(), A = window.location.pathname.split("/").filter(Boolean).slice(-1)[0], [j, M] = c("details"), [N, P] = c(0), [F, { data: I, loading: L, error: R }] = r(), { data: z, loading: B } = i({
57
129
  variables: {
58
- couponId: O,
130
+ couponId: A,
59
131
  limit: 20,
60
- offset: j * 20
132
+ offset: N * 20
61
133
  },
62
- skip: !O || k !== "usage"
134
+ skip: !A || j !== "usage"
63
135
  });
64
136
  if (s(() => {
65
- O && N({ variables: { id: O } });
66
- }, [O, N]), !D.canManageDiscounts) return /* @__PURE__ */ b(e, { message: "You don't have permission to view coupon details." });
67
- if (F) return /* @__PURE__ */ x("div", {
137
+ A && F({ variables: { id: A } });
138
+ }, [A, F]), !k.canManageDiscounts) return /* @__PURE__ */ b(e, { message: "You don't have permission to view coupon details." });
139
+ if (L) return /* @__PURE__ */ x("div", {
68
140
  className: "p-8",
69
141
  children: [/* @__PURE__ */ b(t, {
70
- title: T("billing.coupons.detailTitle", "Coupon Details"),
142
+ title: D("billing.coupons.detailTitle", "Coupon Details"),
71
143
  description: "Loading...",
72
144
  actions: /* @__PURE__ */ x("button", {
73
145
  type: "button",
74
- onClick: () => E("/coupons"),
146
+ onClick: () => O("/coupons"),
75
147
  className: "px-4 py-2 rounded-lg border border-border-subtle text-text-primary hover:bg-bg-sunken flex items-center gap-2",
76
148
  children: [/* @__PURE__ */ b(l, { className: "size-4" }), "Back"]
77
149
  })
@@ -80,43 +152,43 @@ var T = () => {
80
152
  children: /* @__PURE__ */ b("div", { className: "size-8 animate-spin rounded-full border-4 border-action-primary-bg border-t-transparent" })
81
153
  })]
82
154
  });
83
- if (I || !P?.getCoupon) return /* @__PURE__ */ x("div", {
155
+ if (R || !I?.getCoupon) return /* @__PURE__ */ x("div", {
84
156
  className: "p-8",
85
157
  children: [/* @__PURE__ */ b(t, {
86
158
  title: "Coupon Details",
87
159
  description: "Coupon not found",
88
160
  actions: /* @__PURE__ */ x("button", {
89
161
  type: "button",
90
- onClick: () => E("/coupons"),
162
+ onClick: () => O("/coupons"),
91
163
  className: "px-4 py-2 rounded-lg border border-border-subtle text-text-primary hover:bg-bg-sunken flex items-center gap-2",
92
164
  children: [/* @__PURE__ */ b(l, { className: "size-4" }), "Back"]
93
165
  })
94
166
  }), /* @__PURE__ */ b("div", {
95
167
  className: "flex items-center justify-center h-64 text-status-error-text text-sm",
96
- children: I ? `Error: ${I.message}` : "Coupon not found"
168
+ children: R ? `Error: ${R.message}` : "Coupon not found"
97
169
  })]
98
170
  });
99
- let z = P.getCoupon, B = z.maxTotalUses && z.maxTotalUses > 0 ? Math.round(z.currentUses / z.maxTotalUses * 100) : null, V = (e) => e ? new Date(e).toLocaleDateString(void 0, {
171
+ let V = I.getCoupon, H = V.maxTotalUses && V.maxTotalUses > 0 ? Math.round(V.currentUses / V.maxTotalUses * 100) : null, U = (e) => e ? new Date(e).toLocaleDateString(void 0, {
100
172
  year: "numeric",
101
173
  month: "short",
102
174
  day: "numeric"
103
- }) : null, H = () => z.type === "PERCENTAGE" ? `${z.value}%` : `${z.value}${z.currency ? ` ${z.currency}` : ""}`;
175
+ }) : null, W = () => V.type === "PERCENTAGE" ? `${V.value}%` : `${V.value}${V.currency ? ` ${V.currency}` : ""}`;
104
176
  return /* @__PURE__ */ x("div", {
105
177
  className: "p-8",
106
178
  children: [
107
179
  /* @__PURE__ */ b(t, {
108
- title: z.name || z.code,
109
- description: z.description || `Coupon code: ${z.code}`,
180
+ title: V.name || V.code,
181
+ description: V.description || `Coupon code: ${V.code}`,
110
182
  actions: /* @__PURE__ */ x("div", {
111
183
  className: "flex items-center gap-3",
112
184
  children: [/* @__PURE__ */ x("button", {
113
185
  type: "button",
114
- onClick: () => E("/coupons"),
186
+ onClick: () => O("/coupons"),
115
187
  className: "px-4 py-2 rounded-lg border border-border-subtle text-text-primary hover:bg-bg-sunken flex items-center gap-2",
116
188
  children: [/* @__PURE__ */ b(l, { className: "size-4" }), "Back"]
117
189
  }), /* @__PURE__ */ x("button", {
118
190
  type: "button",
119
- onClick: () => E(`/coupons/${z.id}/edit`),
191
+ onClick: () => O(`/coupons/${V.id}/edit`),
120
192
  className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover flex items-center gap-2",
121
193
  children: [/* @__PURE__ */ b(m, { className: "size-4" }), "Edit"]
122
194
  })]
@@ -126,131 +198,44 @@ var T = () => {
126
198
  className: "mt-6 border-b border-border-subtle flex gap-1",
127
199
  children: ["details", "usage"].map((e) => /* @__PURE__ */ x("button", {
128
200
  type: "button",
129
- onClick: () => A(e),
130
- className: `flex items-center gap-2 px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors ${k === e ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
131
- children: [b(e === "details" ? _ : h, { className: "size-4" }), e === "details" ? "Details" : `Usage History${L ? ` (${L.getCouponUsageHistory.total})` : ""}`]
201
+ onClick: () => M(e),
202
+ className: `flex items-center gap-2 px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors ${j === e ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-muted hover:text-text-primary"}`,
203
+ children: [b(e === "details" ? _ : h, { className: "size-4" }), e === "details" ? "Details" : `Usage History${z ? ` (${z.getCouponUsageHistory.total})` : ""}`]
132
204
  }, e))
133
205
  }),
134
- k === "usage" && /* @__PURE__ */ b("div", {
206
+ j === "usage" && /* @__PURE__ */ b("div", {
135
207
  className: "mt-6 bg-bg-surface border border-border-subtle rounded-lg overflow-hidden",
136
- children: R ? /* @__PURE__ */ b("div", {
208
+ children: B ? /* @__PURE__ */ b("div", {
137
209
  className: "flex items-center justify-center h-40",
138
210
  children: /* @__PURE__ */ b("div", { className: "size-6 animate-spin rounded-full border-4 border-action-primary-bg border-t-transparent" })
139
- }) : L?.getCouponUsageHistory.usages.length ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("div", {
140
- className: "overflow-x-auto",
141
- children: /* @__PURE__ */ x("table", {
142
- className: "w-full",
143
- children: [/* @__PURE__ */ b("thead", {
144
- className: "bg-bg-sunken/50 border-b border-border-subtle",
145
- children: /* @__PURE__ */ x("tr", { children: [
146
- /* @__PURE__ */ b("th", {
147
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
148
- children: "User ID"
149
- }),
150
- /* @__PURE__ */ b("th", {
151
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
152
- children: "Transaction"
153
- }),
154
- /* @__PURE__ */ b("th", {
155
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
156
- children: "Original"
157
- }),
158
- /* @__PURE__ */ b("th", {
159
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
160
- children: "Discount"
161
- }),
162
- /* @__PURE__ */ b("th", {
163
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
164
- children: "Final"
165
- }),
166
- /* @__PURE__ */ b("th", {
167
- className: "text-left p-4 text-xs font-medium text-text-muted uppercase tracking-wide",
168
- children: "Used At"
169
- })
170
- ] })
171
- }), /* @__PURE__ */ b("tbody", {
172
- className: "divide-y divide-border-subtle",
173
- children: L.getCouponUsageHistory.usages.map((e) => /* @__PURE__ */ x("tr", {
174
- className: "hover:bg-bg-sunken/30",
175
- children: [
176
- /* @__PURE__ */ x("td", {
177
- className: "p-4 text-sm text-text-primary font-mono",
178
- children: [e.userId.slice(0, 12), "…"]
179
- }),
180
- /* @__PURE__ */ b("td", {
181
- className: "p-4 text-sm",
182
- children: e.transactionId ? /* @__PURE__ */ x("span", {
183
- className: "font-mono text-xs text-text-link",
184
- children: [e.transactionId.slice(0, 12), "…"]
185
- }) : e.orderId ? /* @__PURE__ */ x("span", {
186
- className: "text-xs text-text-muted",
187
- children: [
188
- "Order: ",
189
- e.orderId.slice(0, 12),
190
- "…"
191
- ]
192
- }) : /* @__PURE__ */ b("span", {
193
- className: "text-text-muted",
194
- children: ", "
195
- })
196
- }),
197
- /* @__PURE__ */ x("td", {
198
- className: "p-4 text-sm text-text-primary",
199
- children: [
200
- e.originalAmount.toFixed(2),
201
- " ",
202
- e.currency
203
- ]
204
- }),
205
- /* @__PURE__ */ x("td", {
206
- className: "p-4 text-sm text-status-success-text font-medium",
207
- children: [
208
- "-",
209
- e.discountValue.toFixed(2),
210
- " ",
211
- e.currency
212
- ]
213
- }),
214
- /* @__PURE__ */ x("td", {
215
- className: "p-4 text-sm text-text-primary font-medium",
216
- children: [
217
- e.finalAmount.toFixed(2),
218
- " ",
219
- e.currency
220
- ]
221
- }),
222
- /* @__PURE__ */ b("td", {
223
- className: "p-4 text-sm text-text-muted",
224
- children: new Date(e.usedAt).toLocaleString()
225
- })
226
- ]
227
- }, e.id))
228
- })]
229
- })
230
- }), (L.getCouponUsageHistory.total ?? 0) > 20 && /* @__PURE__ */ x("div", {
211
+ }) : z?.getCouponUsageHistory.usages.length ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b(C, {
212
+ data: z.getCouponUsageHistory.usages,
213
+ rowKey: (e) => e.id,
214
+ columns: w
215
+ }), (z.getCouponUsageHistory.total ?? 0) > 20 && /* @__PURE__ */ x("div", {
231
216
  className: "flex items-center justify-between p-4 border-t border-border-subtle",
232
217
  children: [/* @__PURE__ */ x("p", {
233
218
  className: "text-sm text-text-muted",
234
219
  children: [
235
- j * 20 + 1,
220
+ N * 20 + 1,
236
221
  "–",
237
- Math.min((j + 1) * 20, L.getCouponUsageHistory.total),
222
+ Math.min((N + 1) * 20, z.getCouponUsageHistory.total),
238
223
  " ",
239
224
  "of ",
240
- L.getCouponUsageHistory.total
225
+ z.getCouponUsageHistory.total
241
226
  ]
242
227
  }), /* @__PURE__ */ x("div", {
243
228
  className: "flex items-center gap-2",
244
229
  children: [/* @__PURE__ */ b("button", {
245
230
  type: "button",
246
- onClick: () => M((e) => Math.max(0, e - 1)),
247
- disabled: j === 0,
231
+ onClick: () => P((e) => Math.max(0, e - 1)),
232
+ disabled: N === 0,
248
233
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken disabled:opacity-40",
249
234
  children: /* @__PURE__ */ b(f, { className: "size-4" })
250
235
  }), /* @__PURE__ */ b("button", {
251
236
  type: "button",
252
- onClick: () => M((e) => e + 1),
253
- disabled: !L.getCouponUsageHistory.hasMore,
237
+ onClick: () => P((e) => e + 1),
238
+ disabled: !z.getCouponUsageHistory.hasMore,
254
239
  className: "p-1.5 rounded border border-border-subtle hover:bg-bg-sunken disabled:opacity-40",
255
240
  children: /* @__PURE__ */ b(p, { className: "size-4" })
256
241
  })]
@@ -260,7 +245,7 @@ var T = () => {
260
245
  children: "No usage recorded for this coupon yet."
261
246
  })
262
247
  }),
263
- k === "details" && /* @__PURE__ */ x("div", {
248
+ j === "details" && /* @__PURE__ */ x("div", {
264
249
  className: "mt-8 grid grid-cols-1 lg:grid-cols-3 gap-6",
265
250
  children: [
266
251
  /* @__PURE__ */ x("div", {
@@ -276,7 +261,7 @@ var T = () => {
276
261
  })]
277
262
  }), /* @__PURE__ */ b("p", {
278
263
  className: "text-lg font-mono font-bold text-text-primary",
279
- children: z.code
264
+ children: V.code
280
265
  })]
281
266
  }),
282
267
  /* @__PURE__ */ x("div", {
@@ -291,11 +276,11 @@ var T = () => {
291
276
  }),
292
277
  /* @__PURE__ */ b("p", {
293
278
  className: "text-lg font-bold text-text-primary",
294
- children: H()
279
+ children: W()
295
280
  }),
296
281
  /* @__PURE__ */ b("p", {
297
282
  className: "text-xs text-text-muted capitalize",
298
- children: z.type.replace("_", " ").toLowerCase()
283
+ children: V.type.replace("_", " ").toLowerCase()
299
284
  })
300
285
  ]
301
286
  }),
@@ -311,13 +296,13 @@ var T = () => {
311
296
  }),
312
297
  /* @__PURE__ */ x("p", {
313
298
  className: "text-lg font-bold text-text-primary",
314
- children: [z.currentUses, z.maxTotalUses ? ` / ${z.maxTotalUses}` : ""]
299
+ children: [V.currentUses, V.maxTotalUses ? ` / ${V.maxTotalUses}` : ""]
315
300
  }),
316
- B !== null && /* @__PURE__ */ b("div", {
301
+ H !== null && /* @__PURE__ */ b("div", {
317
302
  className: "mt-1.5 h-1.5 w-full bg-bg-sunken rounded-full overflow-hidden",
318
303
  children: /* @__PURE__ */ b("div", {
319
304
  className: "h-full bg-action-primary-bg rounded-full",
320
- style: { width: `${Math.min(B, 100)}%` }
305
+ style: { width: `${Math.min(H, 100)}%` }
321
306
  })
322
307
  })
323
308
  ]
@@ -334,11 +319,11 @@ var T = () => {
334
319
  }),
335
320
  /* @__PURE__ */ b("div", {
336
321
  className: "mt-1",
337
- children: /* @__PURE__ */ b(C, { status: z.status })
322
+ children: /* @__PURE__ */ b(T, { status: V.status })
338
323
  }),
339
- z.validUntil && /* @__PURE__ */ x("p", {
324
+ V.validUntil && /* @__PURE__ */ x("p", {
340
325
  className: "text-xs text-text-muted mt-1",
341
- children: ["Expires ", V(z.validUntil)]
326
+ children: ["Expires ", U(V.validUntil)]
342
327
  })
343
328
  ]
344
329
  })
@@ -353,36 +338,36 @@ var T = () => {
353
338
  className: "text-sm font-semibold text-text-primary uppercase tracking-wide mb-2",
354
339
  children: "Coupon Details"
355
340
  }),
356
- /* @__PURE__ */ b(w, {
341
+ /* @__PURE__ */ b(E, {
357
342
  label: "Code",
358
343
  value: /* @__PURE__ */ b("span", {
359
344
  className: "font-mono",
360
- children: z.code
345
+ children: V.code
361
346
  })
362
347
  }),
363
- /* @__PURE__ */ b(w, {
348
+ /* @__PURE__ */ b(E, {
364
349
  label: "Name",
365
- value: z.name
350
+ value: V.name
366
351
  }),
367
- /* @__PURE__ */ b(w, {
352
+ /* @__PURE__ */ b(E, {
368
353
  label: "Description",
369
- value: z.description
354
+ value: V.description
370
355
  }),
371
- /* @__PURE__ */ b(w, {
356
+ /* @__PURE__ */ b(E, {
372
357
  label: "Type",
373
- value: z.type.replace("_", " ").toLowerCase()
358
+ value: V.type.replace("_", " ").toLowerCase()
374
359
  }),
375
- /* @__PURE__ */ b(w, {
360
+ /* @__PURE__ */ b(E, {
376
361
  label: "Value",
377
- value: H()
362
+ value: W()
378
363
  }),
379
- /* @__PURE__ */ b(w, {
364
+ /* @__PURE__ */ b(E, {
380
365
  label: "Scope",
381
- value: z.scope
366
+ value: V.scope
382
367
  }),
383
- /* @__PURE__ */ b(w, {
368
+ /* @__PURE__ */ b(E, {
384
369
  label: "Status",
385
- value: /* @__PURE__ */ b(C, { status: z.status })
370
+ value: /* @__PURE__ */ b(T, { status: V.status })
386
371
  })
387
372
  ]
388
373
  }), /* @__PURE__ */ x("div", {
@@ -392,32 +377,32 @@ var T = () => {
392
377
  className: "text-sm font-semibold text-text-primary uppercase tracking-wide mb-2",
393
378
  children: "Restrictions"
394
379
  }),
395
- /* @__PURE__ */ b(w, {
380
+ /* @__PURE__ */ b(E, {
396
381
  label: "Min Purchase Amount",
397
- value: z.minPurchaseAmount == null ? null : `${z.minPurchaseAmount}${z.currency ? ` ${z.currency}` : ""}`
382
+ value: V.minPurchaseAmount == null ? null : `${V.minPurchaseAmount}${V.currency ? ` ${V.currency}` : ""}`
398
383
  }),
399
- /* @__PURE__ */ b(w, {
384
+ /* @__PURE__ */ b(E, {
400
385
  label: "Max Discount Amount",
401
- value: z.maxDiscountAmount == null ? null : `${z.maxDiscountAmount}${z.currency ? ` ${z.currency}` : ""}`
386
+ value: V.maxDiscountAmount == null ? null : `${V.maxDiscountAmount}${V.currency ? ` ${V.currency}` : ""}`
402
387
  }),
403
- /* @__PURE__ */ b(w, {
388
+ /* @__PURE__ */ b(E, {
404
389
  label: "Max Uses Per User",
405
- value: z.maxUsesPerUser
390
+ value: V.maxUsesPerUser
406
391
  }),
407
- /* @__PURE__ */ b(w, {
392
+ /* @__PURE__ */ b(E, {
408
393
  label: "Restricted Users",
409
- value: z.restrictedToUserIds?.length ? /* @__PURE__ */ b("span", {
394
+ value: V.restrictedToUserIds?.length ? /* @__PURE__ */ b("span", {
410
395
  className: "font-mono text-xs break-all",
411
- children: z.restrictedToUserIds.join(", ")
396
+ children: V.restrictedToUserIds.join(", ")
412
397
  }) : "No restrictions"
413
398
  }),
414
- /* @__PURE__ */ b(w, {
399
+ /* @__PURE__ */ b(E, {
415
400
  label: "Applicable Products",
416
- value: z.applicableProducts?.length ? z.applicableProducts.join(", ") : "All products"
401
+ value: V.applicableProducts?.length ? V.applicableProducts.join(", ") : "All products"
417
402
  }),
418
- /* @__PURE__ */ b(w, {
403
+ /* @__PURE__ */ b(E, {
419
404
  label: "Excluded Products",
420
- value: z.excludedProducts?.length ? z.excludedProducts.join(", ") : "None"
405
+ value: V.excludedProducts?.length ? V.excludedProducts.join(", ") : "None"
421
406
  })
422
407
  ]
423
408
  })]
@@ -432,33 +417,33 @@ var T = () => {
432
417
  className: "text-sm font-semibold text-text-primary uppercase tracking-wide mb-2",
433
418
  children: "Validity"
434
419
  }),
435
- /* @__PURE__ */ b(w, {
420
+ /* @__PURE__ */ b(E, {
436
421
  label: "Valid From",
437
- value: V(z.validFrom)
422
+ value: U(V.validFrom)
438
423
  }),
439
- /* @__PURE__ */ b(w, {
424
+ /* @__PURE__ */ b(E, {
440
425
  label: "Valid Until",
441
- value: V(z.validUntil) ?? "No expiry"
426
+ value: U(V.validUntil) ?? "No expiry"
442
427
  })
443
428
  ]
444
429
  }),
445
- z.campaignId && /* @__PURE__ */ x("div", {
430
+ V.campaignId && /* @__PURE__ */ x("div", {
446
431
  className: "bg-bg-surface border border-border-subtle rounded-lg p-6",
447
432
  children: [
448
433
  /* @__PURE__ */ b("h3", {
449
434
  className: "text-sm font-semibold text-text-primary uppercase tracking-wide mb-2",
450
435
  children: "Campaign"
451
436
  }),
452
- /* @__PURE__ */ b(w, {
437
+ /* @__PURE__ */ b(E, {
453
438
  label: "Campaign ID",
454
439
  value: /* @__PURE__ */ b("span", {
455
440
  className: "font-mono text-xs",
456
- children: z.campaignId
441
+ children: V.campaignId
457
442
  })
458
443
  }),
459
- /* @__PURE__ */ b(w, {
444
+ /* @__PURE__ */ b(E, {
460
445
  label: "Campaign Name",
461
- value: z.campaignName
446
+ value: V.campaignName
462
447
  })
463
448
  ]
464
449
  }),
@@ -469,17 +454,17 @@ var T = () => {
469
454
  className: "text-sm font-semibold text-text-primary uppercase tracking-wide mb-2",
470
455
  children: [/* @__PURE__ */ b(g, { className: "size-4 inline mr-1" }), "Audit"]
471
456
  }),
472
- /* @__PURE__ */ b(w, {
457
+ /* @__PURE__ */ b(E, {
473
458
  label: "Created",
474
- value: V(z.createdAt)
459
+ value: U(V.createdAt)
475
460
  }),
476
- /* @__PURE__ */ b(w, {
461
+ /* @__PURE__ */ b(E, {
477
462
  label: "Last Updated",
478
- value: V(z.updatedAt)
463
+ value: U(V.updatedAt)
479
464
  }),
480
- /* @__PURE__ */ b(w, {
465
+ /* @__PURE__ */ b(E, {
481
466
  label: "Created By",
482
- value: z.createdBy ?? null
467
+ value: V.createdBy ?? null
483
468
  })
484
469
  ]
485
470
  })
@@ -491,6 +476,6 @@ var T = () => {
491
476
  });
492
477
  };
493
478
  //#endregion
494
- export { T as CouponDetailPage };
479
+ export { D as CouponDetailPage };
495
480
 
496
481
  //# sourceMappingURL=CouponDetailPage.js.map