@burdenoff/microfe-billing 2026.530.2 → 2026.530.3

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 (28) hide show
  1. package/dist/billing/BillingAdminRoutes.js +84 -71
  2. package/dist/billing/BillingAdminRoutes.js.map +1 -1
  3. package/dist/billing/BillingUserRoutes.js +103 -90
  4. package/dist/billing/BillingUserRoutes.js.map +1 -1
  5. package/dist/billing/modules/billing/index.js +2 -1
  6. package/dist/billing/modules/billing/pages/InvoicesListPage.js +135 -126
  7. package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
  8. package/dist/billing/modules/billing/pages/UserRefundsPage.js +417 -0
  9. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -0
  10. package/dist/billing/modules/billing/pages/index.js +1 -0
  11. package/dist/billing/modules/plans/constants/featuredQuotas.js +37 -0
  12. package/dist/billing/modules/plans/constants/featuredQuotas.js.map +1 -0
  13. package/dist/billing/modules/plans/index.js +2 -1
  14. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +205 -0
  15. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -0
  16. package/dist/billing/modules/plans/pages/PlanCreatePage.js +51 -33
  17. package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
  18. package/dist/billing/modules/plans/pages/PlanEditPage.js +78 -60
  19. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  20. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +246 -126
  21. package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
  22. package/dist/billing/modules/plans/pages/index.js +1 -0
  23. package/dist/billing/shared/types/graphql.js.map +1 -1
  24. package/dist/generated/global-operations.js +317 -287
  25. package/dist/generated/global-operations.js.map +1 -1
  26. package/dist/generated/global-types.js +3 -1
  27. package/dist/generated/global-types.js.map +1 -1
  28. package/package.json +1 -1
@@ -6,34 +6,35 @@ import { useBillingNavigate as c } from "../../../hooks/useBillingNavigate.js";
6
6
  import { withBillingAccountId as l } from "../../../shared/utils/navigation.js";
7
7
  import { usePaginatedInvoices as u } from "../hooks/useInvoices.js";
8
8
  import { useEffect as d, useMemo as f, useRef as p, useState as m } from "react";
9
- import { useSearchParams as h } from "react-router-dom";
10
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
11
- import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { RotateCcw as h } from "lucide-react";
10
+ import { useSearchParams as g } from "react-router-dom";
11
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
12
+ import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
13
  //#region src/billing/modules/billing/pages/InvoicesListPage.tsx
13
- var b = () => {
14
- let { t: e } = y(), t = (t, n) => {
14
+ var x = () => {
15
+ let { t: e } = b(), t = (t, n) => {
15
16
  let r = e(t);
16
17
  return r === t ? n : r;
17
- }, n = c(), i = o(), [a] = h(), b = a.get("billingAccountId") ?? void 0, { data: S } = s({ fetchPolicy: "cache-first" }), C = S?.getBillingAccountsByOrg ?? [], [w, T] = m(b);
18
+ }, n = c(), i = o(), [a] = g(), x = a.get("billingAccountId") ?? void 0, { data: C } = s({ fetchPolicy: "cache-first" }), w = C?.getBillingAccountsByOrg ?? [], [T, E] = m(x);
18
19
  d(() => {
19
- T(b);
20
- }, [b]);
21
- let E = f(() => (C.find((e) => e.isDefault) ?? C[0])?.id ?? void 0, [C]), D = w === void 0 ? E ?? null : w, [O, k] = m("all"), [A, j] = m(""), [M, N] = m(""), [P, F] = m(1), I = p(null);
22
- d(() => (I.current && clearTimeout(I.current), I.current = setTimeout(() => {
23
- N(A), F(1);
20
+ E(x);
21
+ }, [x]);
22
+ let D = f(() => (w.find((e) => e.isDefault) ?? w[0])?.id ?? void 0, [w]), O = T === void 0 ? D ?? null : T, [k, A] = m("all"), [j, M] = m(""), [N, P] = m(""), [F, I] = m(1), L = p(null);
23
+ d(() => (L.current && clearTimeout(L.current), L.current = setTimeout(() => {
24
+ P(j), I(1);
24
25
  }, 400), () => {
25
- I.current && clearTimeout(I.current);
26
- }), [A]);
27
- let { invoices: L, totalPages: R, isLoading: z, error: B, refetch: V } = u({
28
- billingAccountId: D ?? void 0,
29
- status: O === "all" ? void 0 : O,
30
- search: M || void 0,
31
- page: P,
26
+ L.current && clearTimeout(L.current);
27
+ }), [j]);
28
+ let { invoices: R, totalPages: z, isLoading: B, error: V, refetch: H } = u({
29
+ billingAccountId: O ?? void 0,
30
+ status: k === "all" ? void 0 : k,
31
+ search: N || void 0,
32
+ page: F,
32
33
  pageSize: 20
33
34
  });
34
- return i.canViewInvoices ? z && L.length === 0 ? /* @__PURE__ */ v("div", {
35
+ return i.canViewInvoices ? B && R.length === 0 ? /* @__PURE__ */ y("div", {
35
36
  className: "space-y-6 p-6",
36
- children: [/* @__PURE__ */ _("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ _("div", {
37
+ children: [/* @__PURE__ */ v("div", { className: "h-8 w-48 bg-muted animate-pulse rounded" }), /* @__PURE__ */ v("div", {
37
38
  className: "space-y-3",
38
39
  children: [
39
40
  1,
@@ -41,30 +42,30 @@ var b = () => {
41
42
  3,
42
43
  4,
43
44
  5
44
- ].map((e) => /* @__PURE__ */ _("div", {
45
+ ].map((e) => /* @__PURE__ */ v("div", {
45
46
  className: "border border-border rounded-lg p-4",
46
- children: /* @__PURE__ */ v("div", {
47
+ children: /* @__PURE__ */ y("div", {
47
48
  className: "flex items-center gap-4",
48
- children: [/* @__PURE__ */ _("div", { className: "size-10 bg-muted animate-pulse rounded" }), /* @__PURE__ */ v("div", {
49
+ children: [/* @__PURE__ */ v("div", { className: "size-10 bg-muted animate-pulse rounded" }), /* @__PURE__ */ y("div", {
49
50
  className: "flex-1 space-y-2",
50
- children: [/* @__PURE__ */ _("div", { className: "h-4 w-32 bg-muted animate-pulse rounded" }), /* @__PURE__ */ _("div", { className: "h-3 w-48 bg-muted animate-pulse rounded" })]
51
+ children: [/* @__PURE__ */ v("div", { className: "h-4 w-32 bg-muted animate-pulse rounded" }), /* @__PURE__ */ v("div", { className: "h-3 w-48 bg-muted animate-pulse rounded" })]
51
52
  })]
52
53
  })
53
54
  }, e))
54
55
  })]
55
- }) : B ? /* @__PURE__ */ _("div", {
56
+ }) : V ? /* @__PURE__ */ v("div", {
56
57
  className: "flex items-center justify-center h-full min-h-[400px]",
57
- children: /* @__PURE__ */ v("div", {
58
+ children: /* @__PURE__ */ y("div", {
58
59
  className: "text-center space-y-4",
59
60
  children: [
60
- /* @__PURE__ */ _("div", {
61
+ /* @__PURE__ */ v("div", {
61
62
  className: "size-12 mx-auto rounded-full bg-destructive/10 flex items-center justify-center",
62
- children: /* @__PURE__ */ _("svg", {
63
+ children: /* @__PURE__ */ v("svg", {
63
64
  className: "size-6 text-destructive",
64
65
  fill: "none",
65
66
  viewBox: "0 0 24 24",
66
67
  stroke: "currentColor",
67
- children: /* @__PURE__ */ _("path", {
68
+ children: /* @__PURE__ */ v("path", {
68
69
  strokeLinecap: "round",
69
70
  strokeLinejoin: "round",
70
71
  strokeWidth: 2,
@@ -72,55 +73,63 @@ var b = () => {
72
73
  })
73
74
  })
74
75
  }),
75
- /* @__PURE__ */ _("h2", {
76
+ /* @__PURE__ */ v("h2", {
76
77
  className: "text-lg font-semibold text-foreground",
77
78
  children: t("billing.invoices.failedToLoad", "Failed to load invoices")
78
79
  }),
79
- /* @__PURE__ */ _("p", {
80
+ /* @__PURE__ */ v("p", {
80
81
  className: "text-sm text-muted-foreground",
81
- children: B.message
82
+ children: V.message
82
83
  }),
83
- /* @__PURE__ */ _("button", {
84
+ /* @__PURE__ */ v("button", {
84
85
  type: "button",
85
- onClick: () => V(),
86
+ onClick: () => H(),
86
87
  className: "px-4 py-2 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
87
88
  children: "Try Again"
88
89
  })
89
90
  ]
90
91
  })
91
- }) : /* @__PURE__ */ v("div", {
92
+ }) : /* @__PURE__ */ y("div", {
92
93
  className: "space-y-6 p-6",
93
94
  children: [
94
- /* @__PURE__ */ v("div", {
95
+ /* @__PURE__ */ y("div", {
95
96
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
96
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
97
+ children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
97
98
  className: "text-2xl font-bold text-foreground",
98
99
  children: t("billing.invoices.title", "Invoices")
99
- }), /* @__PURE__ */ _("p", {
100
+ }), /* @__PURE__ */ v("p", {
100
101
  className: "text-sm text-muted-foreground mt-1",
101
102
  children: t("billing.invoices.subtitle", "View and manage your billing invoices")
102
- })] }), C.length > 1 && /* @__PURE__ */ v("div", {
103
- className: "flex items-center gap-2",
104
- children: [/* @__PURE__ */ _("label", {
105
- className: "text-sm text-muted-foreground whitespace-nowrap",
106
- children: "Billing Account"
107
- }), /* @__PURE__ */ v("select", {
108
- value: D ?? "",
109
- onChange: (e) => T(e.target.value || null),
110
- className: "text-sm border border-border rounded-md bg-background text-foreground px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary",
111
- children: [/* @__PURE__ */ _("option", {
112
- value: "",
113
- children: "All Accounts"
114
- }), C.map((e) => /* @__PURE__ */ v("option", {
115
- value: e.id ?? "",
116
- children: [e.name ?? e.email ?? e.id, e.isDefault ? " (Default)" : ""]
117
- }, e.id ?? ""))]
103
+ })] }), /* @__PURE__ */ y("div", {
104
+ className: "flex items-center gap-3",
105
+ children: [/* @__PURE__ */ y("button", {
106
+ type: "button",
107
+ onClick: () => n("/refunds"),
108
+ className: "inline-flex items-center gap-2 px-3 py-2 text-sm font-medium border border-border text-foreground rounded-md hover:bg-muted transition-colors",
109
+ children: [/* @__PURE__ */ v(h, { className: "size-4" }), t("billing.invoices.myRefunds", "My Refunds")]
110
+ }), w.length > 1 && /* @__PURE__ */ y("div", {
111
+ className: "flex items-center gap-2",
112
+ children: [/* @__PURE__ */ v("label", {
113
+ className: "text-sm text-muted-foreground whitespace-nowrap",
114
+ children: "Billing Account"
115
+ }), /* @__PURE__ */ y("select", {
116
+ value: O ?? "",
117
+ onChange: (e) => E(e.target.value || null),
118
+ className: "text-sm border border-border rounded-md bg-background text-foreground px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary",
119
+ children: [/* @__PURE__ */ v("option", {
120
+ value: "",
121
+ children: "All Accounts"
122
+ }), w.map((e) => /* @__PURE__ */ y("option", {
123
+ value: e.id ?? "",
124
+ children: [e.name ?? e.email ?? e.id, e.isDefault ? " (Default)" : ""]
125
+ }, e.id ?? ""))]
126
+ })]
118
127
  })]
119
128
  })]
120
129
  }),
121
- /* @__PURE__ */ v("div", {
130
+ /* @__PURE__ */ y("div", {
122
131
  className: "flex flex-wrap items-center gap-4 pb-4 border-b border-border",
123
- children: [/* @__PURE__ */ _("div", {
132
+ children: [/* @__PURE__ */ v("div", {
124
133
  className: "inline-flex rounded-lg border border-border p-1 bg-muted/50 flex-wrap",
125
134
  children: [
126
135
  "all",
@@ -128,47 +137,47 @@ var b = () => {
128
137
  "PAID",
129
138
  "DRAFT",
130
139
  "VOID"
131
- ].map((e) => /* @__PURE__ */ _("button", {
140
+ ].map((e) => /* @__PURE__ */ v("button", {
132
141
  type: "button",
133
142
  onClick: () => {
134
- k(e), F(1);
143
+ A(e), I(1);
135
144
  },
136
- className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${O === e ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
145
+ className: `px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${k === e ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"}`,
137
146
  children: e === "all" ? "All" : r(e)
138
147
  }, e))
139
- }), /* @__PURE__ */ v("div", {
148
+ }), /* @__PURE__ */ y("div", {
140
149
  className: "relative flex-1 min-w-0 w-full sm:max-w-md",
141
- children: [/* @__PURE__ */ _("svg", {
150
+ children: [/* @__PURE__ */ v("svg", {
142
151
  className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground",
143
152
  fill: "none",
144
153
  viewBox: "0 0 24 24",
145
154
  stroke: "currentColor",
146
- children: /* @__PURE__ */ _("path", {
155
+ children: /* @__PURE__ */ v("path", {
147
156
  strokeLinecap: "round",
148
157
  strokeLinejoin: "round",
149
158
  strokeWidth: 2,
150
159
  d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
151
160
  })
152
- }), /* @__PURE__ */ _("input", {
161
+ }), /* @__PURE__ */ v("input", {
153
162
  type: "text",
154
163
  placeholder: t("billing.invoices.searchPlaceholder", "Search by invoice number..."),
155
- value: A,
156
- onChange: (e) => j(e.target.value),
164
+ value: j,
165
+ onChange: (e) => M(e.target.value),
157
166
  className: "w-full pl-[3.25rem] pr-4 py-2 text-sm border border-border rounded-md bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"
158
167
  })]
159
168
  })]
160
169
  }),
161
- !z && L.length === 0 ? /* @__PURE__ */ v("div", {
170
+ !B && R.length === 0 ? /* @__PURE__ */ y("div", {
162
171
  className: "flex flex-col items-center justify-center py-12 border border-dashed border-border rounded-lg",
163
172
  children: [
164
- /* @__PURE__ */ _("div", {
173
+ /* @__PURE__ */ v("div", {
165
174
  className: "size-12 rounded-full bg-muted flex items-center justify-center mb-4",
166
- children: /* @__PURE__ */ _("svg", {
175
+ children: /* @__PURE__ */ v("svg", {
167
176
  className: "size-6 text-muted-foreground",
168
177
  fill: "none",
169
178
  viewBox: "0 0 24 24",
170
179
  stroke: "currentColor",
171
- children: /* @__PURE__ */ _("path", {
180
+ children: /* @__PURE__ */ v("path", {
172
181
  strokeLinecap: "round",
173
182
  strokeLinejoin: "round",
174
183
  strokeWidth: 2,
@@ -176,104 +185,104 @@ var b = () => {
176
185
  })
177
186
  })
178
187
  }),
179
- /* @__PURE__ */ _("h3", {
188
+ /* @__PURE__ */ v("h3", {
180
189
  className: "text-lg font-medium text-foreground",
181
190
  children: t("billing.invoices.noInvoicesFound", "No invoices found")
182
191
  }),
183
- /* @__PURE__ */ _("p", {
192
+ /* @__PURE__ */ v("p", {
184
193
  className: "text-sm text-muted-foreground mt-1",
185
- children: O !== "all" || M ? t("billing.invoices.noInvoicesFiltered", "No invoices match your filters.") : t("billing.invoices.noInvoicesYet", "You don't have any invoices yet.")
194
+ children: k !== "all" || N ? t("billing.invoices.noInvoicesFiltered", "No invoices match your filters.") : t("billing.invoices.noInvoicesYet", "You don't have any invoices yet.")
186
195
  })
187
196
  ]
188
- }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _("div", {
197
+ }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("div", {
189
198
  className: "border border-border rounded-lg overflow-hidden",
190
- children: /* @__PURE__ */ v("table", {
199
+ children: /* @__PURE__ */ y("table", {
191
200
  className: "w-full",
192
- children: [/* @__PURE__ */ _("thead", {
201
+ children: [/* @__PURE__ */ v("thead", {
193
202
  className: "bg-muted/50",
194
- children: /* @__PURE__ */ v("tr", { children: [
195
- /* @__PURE__ */ _("th", {
203
+ children: /* @__PURE__ */ y("tr", { children: [
204
+ /* @__PURE__ */ v("th", {
196
205
  className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
197
206
  children: "Invoice"
198
207
  }),
199
- /* @__PURE__ */ _("th", {
208
+ /* @__PURE__ */ v("th", {
200
209
  className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground",
201
210
  children: "Status"
202
211
  }),
203
- !D && C.length > 1 && /* @__PURE__ */ _("th", {
212
+ !O && w.length > 1 && /* @__PURE__ */ v("th", {
204
213
  className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden lg:table-cell",
205
214
  children: "Account"
206
215
  }),
207
- /* @__PURE__ */ _("th", {
216
+ /* @__PURE__ */ v("th", {
208
217
  className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden sm:table-cell",
209
218
  children: "Date"
210
219
  }),
211
- /* @__PURE__ */ _("th", {
220
+ /* @__PURE__ */ v("th", {
212
221
  className: "text-left px-4 py-3 text-sm font-medium text-muted-foreground hidden md:table-cell",
213
222
  children: "Due Date"
214
223
  }),
215
- /* @__PURE__ */ _("th", {
224
+ /* @__PURE__ */ v("th", {
216
225
  className: "text-right px-4 py-3 text-sm font-medium text-muted-foreground",
217
226
  children: "Amount"
218
227
  }),
219
- /* @__PURE__ */ _("th", {
228
+ /* @__PURE__ */ v("th", {
220
229
  className: "text-right px-4 py-3 text-sm font-medium text-muted-foreground",
221
230
  children: "Actions"
222
231
  })
223
232
  ] })
224
- }), /* @__PURE__ */ _("tbody", {
233
+ }), /* @__PURE__ */ v("tbody", {
225
234
  className: "divide-y divide-border",
226
- children: L.map((e) => /* @__PURE__ */ _(x, {
235
+ children: R.map((e) => /* @__PURE__ */ v(S, {
227
236
  invoice: e,
228
237
  onView: () => n(l(`/invoices/${e.id}`, e.billingAccountId)),
229
238
  canPay: i.canPayInvoice,
230
239
  canVoid: i.canVoidInvoice,
231
- showAccount: !D && C.length > 1,
232
- accountName: C.find((t) => t.id === e.billingAccountId)?.name ?? null
240
+ showAccount: !O && w.length > 1,
241
+ accountName: w.find((t) => t.id === e.billingAccountId)?.name ?? null
233
242
  }, e.id))
234
243
  })]
235
244
  })
236
- }), R > 1 && /* @__PURE__ */ v("div", {
245
+ }), z > 1 && /* @__PURE__ */ y("div", {
237
246
  className: "flex items-center justify-between pt-2",
238
- children: [/* @__PURE__ */ v("p", {
247
+ children: [/* @__PURE__ */ y("p", {
239
248
  className: "text-sm text-muted-foreground",
240
249
  children: [
241
250
  "Page ",
242
- P,
251
+ F,
243
252
  " of ",
244
- R
253
+ z
245
254
  ]
246
- }), /* @__PURE__ */ v("div", {
255
+ }), /* @__PURE__ */ y("div", {
247
256
  className: "flex items-center gap-2",
248
- children: [/* @__PURE__ */ _("button", {
257
+ children: [/* @__PURE__ */ v("button", {
249
258
  type: "button",
250
- onClick: () => F((e) => Math.max(1, e - 1)),
251
- disabled: P <= 1,
259
+ onClick: () => I((e) => Math.max(1, e - 1)),
260
+ disabled: F <= 1,
252
261
  className: "px-3 py-1.5 text-sm font-medium border border-border rounded-md bg-background text-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
253
262
  children: "Previous"
254
- }), /* @__PURE__ */ _("button", {
263
+ }), /* @__PURE__ */ v("button", {
255
264
  type: "button",
256
- onClick: () => F((e) => Math.min(R, e + 1)),
257
- disabled: P >= R,
265
+ onClick: () => I((e) => Math.min(z, e + 1)),
266
+ disabled: F >= z,
258
267
  className: "px-3 py-1.5 text-sm font-medium border border-border rounded-md bg-background text-foreground hover:bg-muted disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
259
268
  children: "Next"
260
269
  })]
261
270
  })]
262
271
  })] })
263
272
  ]
264
- }) : /* @__PURE__ */ _("div", {
273
+ }) : /* @__PURE__ */ v("div", {
265
274
  className: "flex items-center justify-center h-full min-h-[400px]",
266
- children: /* @__PURE__ */ v("div", {
275
+ children: /* @__PURE__ */ y("div", {
267
276
  className: "text-center space-y-2",
268
277
  children: [
269
- /* @__PURE__ */ _("div", {
278
+ /* @__PURE__ */ v("div", {
270
279
  className: "size-12 mx-auto rounded-full bg-muted flex items-center justify-center",
271
- children: /* @__PURE__ */ _("svg", {
280
+ children: /* @__PURE__ */ v("svg", {
272
281
  className: "size-6 text-muted-foreground",
273
282
  fill: "none",
274
283
  viewBox: "0 0 24 24",
275
284
  stroke: "currentColor",
276
- children: /* @__PURE__ */ _("path", {
285
+ children: /* @__PURE__ */ v("path", {
277
286
  strokeLinecap: "round",
278
287
  strokeLinejoin: "round",
279
288
  strokeWidth: 2,
@@ -281,93 +290,93 @@ var b = () => {
281
290
  })
282
291
  })
283
292
  }),
284
- /* @__PURE__ */ _("h2", {
293
+ /* @__PURE__ */ v("h2", {
285
294
  className: "text-lg font-semibold text-foreground",
286
295
  children: t("billing.accessDenied.title", "Access Denied")
287
296
  }),
288
- /* @__PURE__ */ _("p", {
297
+ /* @__PURE__ */ v("p", {
289
298
  className: "text-sm text-muted-foreground max-w-sm",
290
299
  children: t("billing.invoices.noViewPermission", "You don't have permission to view invoices.")
291
300
  })
292
301
  ]
293
302
  })
294
303
  });
295
- }, x = ({ invoice: o, onView: s, canPay: c, canVoid: l, showAccount: u = !1, accountName: d }) => {
304
+ }, S = ({ invoice: o, onView: s, canPay: c, canVoid: l, showAccount: u = !1, accountName: d }) => {
296
305
  let f = i(o.status), p = o.status === "OPEN", m = o.status === "DRAFT";
297
- return /* @__PURE__ */ v("tr", {
306
+ return /* @__PURE__ */ y("tr", {
298
307
  className: "hover:bg-muted/30 transition-colors",
299
308
  children: [
300
- /* @__PURE__ */ v("td", {
309
+ /* @__PURE__ */ y("td", {
301
310
  className: "p-4",
302
- children: [/* @__PURE__ */ _("button", {
311
+ children: [/* @__PURE__ */ v("button", {
303
312
  type: "button",
304
313
  onClick: s,
305
314
  className: "font-medium text-foreground hover:text-primary transition-colors",
306
315
  children: n(o.invoiceNumber)
307
- }), (o.itemDescription ?? o.subscription?.plan?.name) && /* @__PURE__ */ _("p", {
316
+ }), (o.itemDescription ?? o.subscription?.plan?.name) && /* @__PURE__ */ v("p", {
308
317
  className: "text-sm text-muted-foreground mt-0.5",
309
318
  children: o.itemDescription ?? o.subscription?.plan?.name
310
319
  })]
311
320
  }),
312
- /* @__PURE__ */ _("td", {
321
+ /* @__PURE__ */ v("td", {
313
322
  className: "p-4",
314
- children: /* @__PURE__ */ _("span", {
323
+ children: /* @__PURE__ */ v("span", {
315
324
  className: `inline-flex px-2 py-1 text-xs font-medium rounded ${a(f)}`,
316
325
  children: r(o.status)
317
326
  })
318
327
  }),
319
- u && /* @__PURE__ */ _("td", {
328
+ u && /* @__PURE__ */ v("td", {
320
329
  className: "p-4 hidden lg:table-cell",
321
- children: d ? /* @__PURE__ */ _("span", {
330
+ children: d ? /* @__PURE__ */ v("span", {
322
331
  className: "inline-flex items-center px-2 py-0.5 text-xs font-medium rounded-full bg-muted text-muted-foreground border border-border",
323
332
  children: d
324
- }) : /* @__PURE__ */ _("span", {
333
+ }) : /* @__PURE__ */ v("span", {
325
334
  className: "text-sm text-muted-foreground",
326
335
  children: ", "
327
336
  })
328
337
  }),
329
- /* @__PURE__ */ _("td", {
338
+ /* @__PURE__ */ v("td", {
330
339
  className: "p-4 text-sm text-muted-foreground hidden sm:table-cell",
331
340
  children: t(o.createdAt, "short")
332
341
  }),
333
- /* @__PURE__ */ _("td", {
342
+ /* @__PURE__ */ v("td", {
334
343
  className: "p-4 text-sm text-muted-foreground hidden md:table-cell",
335
344
  children: o.dueDate ? t(o.dueDate, "short") : "—"
336
345
  }),
337
- /* @__PURE__ */ _("td", {
346
+ /* @__PURE__ */ v("td", {
338
347
  className: "p-4 text-right font-medium text-foreground",
339
348
  children: e(o.total, o.currency)
340
349
  }),
341
- /* @__PURE__ */ _("td", {
350
+ /* @__PURE__ */ v("td", {
342
351
  className: "p-4 text-right",
343
- children: /* @__PURE__ */ v("div", {
352
+ children: /* @__PURE__ */ y("div", {
344
353
  className: "flex items-center justify-end gap-2",
345
354
  children: [
346
- o.invoiceUrl ? /* @__PURE__ */ _("a", {
355
+ o.invoiceUrl ? /* @__PURE__ */ v("a", {
347
356
  href: o.invoiceUrl,
348
357
  target: "_blank",
349
358
  rel: "noopener noreferrer",
350
359
  className: "px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md transition-colors",
351
360
  children: "View"
352
- }) : /* @__PURE__ */ _("button", {
361
+ }) : /* @__PURE__ */ v("button", {
353
362
  type: "button",
354
363
  onClick: s,
355
364
  className: "px-3 py-1.5 text-sm font-medium text-foreground hover:bg-muted rounded-md transition-colors",
356
365
  children: "View"
357
366
  }),
358
- o.pdfUrl && /* @__PURE__ */ _("a", {
367
+ o.pdfUrl && /* @__PURE__ */ v("a", {
359
368
  href: o.pdfUrl,
360
369
  target: "_blank",
361
370
  rel: "noopener noreferrer",
362
371
  className: "px-3 py-1.5 text-sm font-medium text-primary hover:bg-primary/10 rounded-md transition-colors",
363
372
  children: "PDF"
364
373
  }),
365
- p && c && /* @__PURE__ */ _("button", {
374
+ p && c && /* @__PURE__ */ v("button", {
366
375
  type: "button",
367
376
  className: "px-3 py-1.5 text-sm font-medium bg-primary text-primary-foreground rounded-md hover:bg-primary/90 transition-colors",
368
377
  children: "Pay"
369
378
  }),
370
- (p || m) && l && /* @__PURE__ */ _("button", {
379
+ (p || m) && l && /* @__PURE__ */ v("button", {
371
380
  type: "button",
372
381
  className: "px-3 py-1.5 text-sm font-medium text-destructive hover:bg-destructive/10 rounded-md transition-colors",
373
382
  children: "Void"
@@ -379,6 +388,6 @@ var b = () => {
379
388
  });
380
389
  };
381
390
  //#endregion
382
- export { b as InvoicesListPage };
391
+ export { x as InvoicesListPage };
383
392
 
384
393
  //# sourceMappingURL=InvoicesListPage.js.map