@burdenoff/microfe-admin 2026.626.1 → 2026.712.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.
@@ -2,91 +2,92 @@ import { useToast as e } from "../components/Toast.js";
2
2
  import { useAdmin as t } from "../providers/AdminProvider.js";
3
3
  import { useAdminPermissions as n } from "../hooks/useAdminPermissions.js";
4
4
  import { Avatar as r, Button as i, EmptyState as ee, Input as te } from "../components/ui.js";
5
- import { PageLayout as ne } from "../components/PageLayout.js";
6
- import { TenantStatusBadge as re } from "../components/StatusBadge.js";
7
- import { formatBytes as ie, formatDate as a, formatNumber as o } from "../utils/formatters.js";
5
+ import { PageLayout as a } from "../components/PageLayout.js";
6
+ import { TenantStatusBadge as ne } from "../components/StatusBadge.js";
7
+ import { formatBytes as re, formatDate as ie, formatNumber as o } from "../utils/formatters.js";
8
8
  import { DataTable as ae, Pagination as oe } from "../components/DataTable.js";
9
- import { tWithFallback as se } from "../utils/i18n.js";
10
- import { TenantForm as ce } from "../components/forms/TenantForm.js";
11
- import { RowActions as le, createRowActions as ue } from "../components/RowActions.js";
12
- import { PermissionGuard as s } from "../components/PermissionGuard.js";
9
+ import { tWithFallback as s } from "../utils/i18n.js";
10
+ import { TenantForm as se } from "../components/forms/TenantForm.js";
11
+ import { RowActions as ce, createRowActions as le } from "../components/RowActions.js";
12
+ import { PermissionGuard as c } from "../components/PermissionGuard.js";
13
13
  import "../components/index.js";
14
- import { joinPath as c } from "../utils/navigation.js";
15
- import { mapTenantToUi as de } from "../utils/mappers.js";
16
- import { useActivateTenantMutation as fe, useCreateTenantMutation as l, useListTenantsQuery as u, useSuspendTenantMutation as d, useUpdateTenantMutation as pe } from "../../generated/global-operations.js";
17
- import { useAdminStore as me } from "../store/adminStore.js";
18
- import { emitTenantLifecycle as f } from "../utils/tenantEvents.js";
14
+ import { joinPath as l } from "../utils/navigation.js";
15
+ import { mapTenantToUi as u } from "../utils/mappers.js";
16
+ import { useActivateTenantMutation as ue, useCreateTenantMutation as de, useListTenantsQuery as fe, useSuspendTenantMutation as pe, useUpdateTenantMutation as me } from "../../generated/global-operations.js";
17
+ import { useAdminStore as he } from "../store/adminStore.js";
18
+ import { emitTenantLifecycle as d } from "../utils/tenantEvents.js";
19
+ import { TENANT_FEATURE_FLAGS as f } from "../constants/featureFlags.js";
19
20
  import { useCallback as p, useMemo as m, useState as h } from "react";
20
- import { Building2 as g, Plus as _, Search as v } from "lucide-react";
21
- import { useNavigate as y } from "react-router-dom";
22
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
23
- import { useFeatureFlag as S } from "@burdenoff/fe-libs/shared/feature-flags";
24
- import { EmphasisPanel as he, PagePurpose as ge } from "@burdenoff/fe-libs/ui";
21
+ import { Building2 as g, Plus as ge, Search as _ } from "lucide-react";
22
+ import { useNavigate as v } from "react-router-dom";
23
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
24
+ import { useFeatureFlag as x } from "@burdenoff/fe-libs/shared/feature-flags";
25
25
  import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
26
- import { useEventBus as ve } from "@burdenoff/fe-libs/shared/events";
26
+ import { EmphasisPanel as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
27
+ import { useEventBus as be } from "@burdenoff/fe-libs/shared/events";
27
28
  //#region src/admin/pages/TenantsListPage.tsx
28
- var C = 20;
29
- function w() {
30
- let { canViewTenants: w, canManageTenants: T, isLoading: E } = n(), D = y(), { basePath: O = "" } = t(), { tenantFilter: k, updateTenantFilter: A, resetTenantFilter: j } = me(), M = e(), { t: N } = _e(), P = S("admin.tenant.create", !0), F = S("admin.tenant.edit", !0), I = ve(), L = p((e, t, n) => se(N, e, t, n), [N]), [R, z] = h(1), [ye, B] = h(!1), [be, V] = h(void 0), xe = m(() => {
29
+ var S = 20;
30
+ function C() {
31
+ let { canViewTenants: C, canManageTenants: w, isLoading: T } = n(), E = v(), { basePath: D = "" } = t(), { tenantFilter: O, updateTenantFilter: k, resetTenantFilter: A } = he(), j = e(), { t: M } = _e(), N = x(f.management, !0), xe = x(f.list, !0), Se = x(f.create, !0), P = x(f.edit, !0), F = be(), I = p((e, t, n) => s(M, e, t, n), [M]), [L, R] = h(1), [Ce, z] = h(!1), [we, B] = h(void 0), Te = m(() => {
31
32
  let e = {};
32
- k.search && (e.search = k.search);
33
+ O.search && (e.search = O.search);
33
34
  let t = {
34
35
  active: "ACTIVE",
35
36
  suspended: "SUSPENDED",
36
37
  deleted: "DELETED"
37
38
  };
38
- return k.status !== "all" && t[k.status] && (e.status = t[k.status]), e;
39
- }, [k.search, k.status]), H = E || !w, { data: U, loading: Se, error: W, refetch: G } = u({
39
+ return O.status !== "all" && t[O.status] && (e.status = t[O.status]), e;
40
+ }, [O.search, O.status]), V = N && xe, H = w && N, Ee = T || !C || !V, { data: U, loading: De, error: W, refetch: G } = fe({
40
41
  variables: {
41
- filter: xe,
42
- limit: C,
43
- offset: (R - 1) * C
42
+ filter: Te,
43
+ limit: S,
44
+ offset: (L - 1) * S
44
45
  },
45
46
  fetchPolicy: "cache-and-network",
46
- skip: H
47
- }), [K, { loading: Ce }] = l({ onCompleted: () => {
47
+ skip: Ee
48
+ }), [K, { loading: Oe }] = de({ onCompleted: () => {
48
49
  G();
49
- } }), [q, { loading: we }] = pe({ onCompleted: () => {
50
+ } }), [q, { loading: ke }] = me({ onCompleted: () => {
50
51
  G();
51
- } }), [J] = d({ onCompleted: () => {
52
+ } }), [J] = pe({ onCompleted: () => {
52
53
  G();
53
- } }), [Y] = fe({ onCompleted: () => {
54
+ } }), [Y] = ue({ onCompleted: () => {
54
55
  G();
55
- } }), Te = m(() => (U?.tenants?.items ?? []).map(de), [U]), X = U?.tenants?.total ?? 0, Ee = Math.ceil(X / C), De = p(() => {
56
- V(void 0), B(!0);
56
+ } }), Ae = m(() => (U?.tenants?.items ?? []).map(u), [U]), X = U?.tenants?.total ?? 0, je = Math.ceil(X / S), Me = p(() => {
57
+ B(void 0), z(!0);
57
58
  }, []), Z = p((e) => {
58
- V(e), B(!0);
59
+ B(e), z(!0);
59
60
  }, []), Q = p(async (e) => {
60
61
  try {
61
- await J({ variables: { id: e.id } }), f(I, "tenant.tenant.suspended", {
62
+ await J({ variables: { id: e.id } }), d(F, "tenant.tenant.suspended", {
62
63
  tenantId: e.id,
63
64
  tenantSlug: e.slug,
64
65
  status: "SUSPENDED"
65
- }), M.success(L("admin.tenants.toast.suspendedTitle", "Tenant suspended"), L("admin.tenants.toast.suspendedDescription", "{{name}} has been suspended.", { name: e.name }));
66
+ }), j.success(I("admin.tenants.toast.suspendedTitle", "Tenant suspended"), I("admin.tenants.toast.suspendedDescription", "{{name}} has been suspended.", { name: e.name }));
66
67
  } catch {
67
- M.error(L("admin.tenants.toast.errorTitle", "Error"), L("admin.tenants.toast.suspendFailed", "Failed to suspend tenant."));
68
+ j.error(I("admin.tenants.toast.errorTitle", "Error"), I("admin.tenants.toast.suspendFailed", "Failed to suspend tenant."));
68
69
  }
69
70
  }, [
70
71
  J,
71
- M,
72
- L,
73
- I
72
+ j,
73
+ I,
74
+ F
74
75
  ]), $ = p(async (e) => {
75
76
  try {
76
- await Y({ variables: { id: e.id } }), f(I, "tenant.tenant.activated", {
77
+ await Y({ variables: { id: e.id } }), d(F, "tenant.tenant.activated", {
77
78
  tenantId: e.id,
78
79
  tenantSlug: e.slug,
79
80
  status: "ACTIVE"
80
- }), M.success(L("admin.tenants.toast.activatedTitle", "Tenant activated"), L("admin.tenants.toast.activatedDescription", "{{name}} has been activated.", { name: e.name }));
81
+ }), j.success(I("admin.tenants.toast.activatedTitle", "Tenant activated"), I("admin.tenants.toast.activatedDescription", "{{name}} has been activated.", { name: e.name }));
81
82
  } catch {
82
- M.error(L("admin.tenants.toast.errorTitle", "Error"), L("admin.tenants.toast.activateFailed", "Failed to activate tenant."));
83
+ j.error(I("admin.tenants.toast.errorTitle", "Error"), I("admin.tenants.toast.activateFailed", "Failed to activate tenant."));
83
84
  }
84
85
  }, [
85
86
  Y,
86
- M,
87
- L,
88
- I
89
- ]), Oe = p(async (e) => {
87
+ j,
88
+ I,
89
+ F
90
+ ]), Ne = p(async (e) => {
90
91
  let t = "id" in e && e.id;
91
92
  try {
92
93
  if (t) {
@@ -102,10 +103,10 @@ function w() {
102
103
  }
103
104
  }
104
105
  } }), n = t.data?.updateTenant?.id ?? e.id, r = t.data?.updateTenant?.slug;
105
- f(I, "tenant.tenant.updated", {
106
+ d(F, "tenant.tenant.updated", {
106
107
  tenantId: n,
107
108
  tenantSlug: r
108
- }), M.success(L("admin.tenants.toast.updatedTitle", "Tenant updated"), L("admin.tenants.toast.updatedDescription", "{{name}} has been updated.", { name: e.name ?? "" }));
109
+ }), j.success(I("admin.tenants.toast.updatedTitle", "Tenant updated"), I("admin.tenants.toast.updatedDescription", "{{name}} has been updated.", { name: e.name ?? "" }));
109
110
  } else {
110
111
  let t = (await K({ variables: { input: {
111
112
  name: e.name,
@@ -117,60 +118,61 @@ function w() {
117
118
  plan: e.plan
118
119
  }
119
120
  } } })).data?.createTenant;
120
- t?.id && f(I, "tenant.tenant.created", {
121
+ t?.id && d(F, "tenant.tenant.created", {
121
122
  tenantId: t.id,
122
123
  tenantSlug: t.slug
123
- }), M.success(L("admin.tenants.toast.createdTitle", "Tenant created"), L("admin.tenants.toast.createdDescription", "{{name}} has been created.", { name: e.name ?? "" }));
124
+ }), j.success(I("admin.tenants.toast.createdTitle", "Tenant created"), I("admin.tenants.toast.createdDescription", "{{name}} has been created.", { name: e.name ?? "" }));
124
125
  }
125
- B(!1);
126
+ z(!1);
126
127
  } catch (e) {
127
128
  let n = e instanceof Error ? e.message : "Unknown error";
128
- throw M.error(t ? L("admin.tenants.toast.updateFailedTitle", "Update failed") : L("admin.tenants.toast.createFailedTitle", "Create failed"), n), e;
129
+ throw j.error(t ? I("admin.tenants.toast.updateFailedTitle", "Update failed") : I("admin.tenants.toast.createFailedTitle", "Create failed"), n), e;
129
130
  }
130
131
  }, [
131
132
  K,
132
133
  q,
133
- M,
134
- L,
135
- I
136
- ]), ke = (e) => {
137
- D(c(O, `tenants/${e.id}`));
138
- }, Ae = p((e) => {
139
- let t = ue({
140
- onView: () => D(c(O, `tenants/${e.id}`)),
141
- onEdit: T && F ? () => Z(e) : void 0
134
+ j,
135
+ I,
136
+ F
137
+ ]), Pe = (e) => {
138
+ E(l(D, `tenants/${e.id}`));
139
+ }, Fe = p((e) => {
140
+ let t = le({
141
+ onView: () => E(l(D, `tenants/${e.id}`)),
142
+ onEdit: w && P ? () => Z(e) : void 0
142
143
  });
143
- return T && t.push({
144
+ return H && t.push({
144
145
  key: e.status === "active" ? "suspend" : "activate",
145
- label: e.status === "active" ? L("admin.tenants.actions.suspend", "Suspend") : L("admin.tenants.actions.activate", "Activate"),
146
+ label: e.status === "active" ? I("admin.tenants.actions.suspend", "Suspend") : I("admin.tenants.actions.activate", "Activate"),
146
147
  separator: !0,
147
148
  onClick: e.status === "active" ? () => Q(e) : () => $(e)
148
149
  }), t;
149
150
  }, [
151
+ E,
150
152
  D,
151
- O,
152
- T,
153
- F,
153
+ w,
154
+ H,
155
+ P,
154
156
  Z,
155
157
  Q,
156
158
  $,
157
- L
158
- ]), je = [
159
+ I
160
+ ]), Ie = [
159
161
  {
160
162
  key: "name",
161
- header: L("admin.tenants.table.tenant", "Tenant"),
163
+ header: I("admin.tenants.table.tenant", "Tenant"),
162
164
  sortable: !0,
163
- render: (e) => /* @__PURE__ */ x("div", {
165
+ render: (e) => /* @__PURE__ */ b("div", {
164
166
  className: "flex items-center gap-3",
165
- children: [/* @__PURE__ */ b(r, {
167
+ children: [/* @__PURE__ */ y(r, {
166
168
  fallback: e.name.slice(0, 2).toUpperCase(),
167
169
  size: "sm"
168
- }), /* @__PURE__ */ x("div", {
170
+ }), /* @__PURE__ */ b("div", {
169
171
  className: "min-w-0",
170
- children: [/* @__PURE__ */ b("div", {
172
+ children: [/* @__PURE__ */ y("div", {
171
173
  className: "truncate font-medium text-text-primary",
172
174
  children: e.name
173
- }), /* @__PURE__ */ b("div", {
175
+ }), /* @__PURE__ */ y("div", {
174
176
  className: "truncate text-xs text-text-secondary",
175
177
  children: e.slug
176
178
  })]
@@ -179,18 +181,18 @@ function w() {
179
181
  },
180
182
  {
181
183
  key: "status",
182
- header: L("admin.tenants.table.status", "Status"),
184
+ header: I("admin.tenants.table.status", "Status"),
183
185
  width: "120px",
184
- render: (e) => /* @__PURE__ */ b(re, { status: e.status })
186
+ render: (e) => /* @__PURE__ */ y(ne, { status: e.status })
185
187
  },
186
188
  {
187
189
  key: "plan",
188
- header: L("admin.tenants.table.plan", "Plan"),
190
+ header: I("admin.tenants.table.plan", "Plan"),
189
191
  width: "100px"
190
192
  },
191
193
  {
192
194
  key: "userCount",
193
- header: L("admin.tenants.table.users", "Users"),
195
+ header: I("admin.tenants.table.users", "Users"),
194
196
  width: "80px",
195
197
  align: "right",
196
198
  sortable: !0,
@@ -198,159 +200,169 @@ function w() {
198
200
  },
199
201
  {
200
202
  key: "storageUsed",
201
- header: L("admin.tenants.table.storage", "Storage"),
203
+ header: I("admin.tenants.table.storage", "Storage"),
202
204
  width: "100px",
203
205
  align: "right",
204
- render: (e) => ie(e.storageUsed)
206
+ render: (e) => re(e.storageUsed)
205
207
  },
206
208
  {
207
209
  key: "createdAt",
208
- header: L("admin.tenants.table.created", "Created"),
210
+ header: I("admin.tenants.table.created", "Created"),
209
211
  width: "120px",
210
212
  sortable: !0,
211
- render: (e) => a(e.createdAt)
213
+ render: (e) => ie(e.createdAt)
212
214
  },
213
215
  {
214
216
  key: "actions",
215
217
  header: "",
216
218
  width: "50px",
217
219
  align: "right",
218
- render: (e) => /* @__PURE__ */ b(le, {
219
- actions: Ae(e),
220
- ariaLabel: L("admin.tenants.table.actionsFor", "Actions for {{name}}", { name: e.name })
220
+ render: (e) => /* @__PURE__ */ y(ce, {
221
+ actions: Fe(e),
222
+ ariaLabel: I("admin.tenants.table.actionsFor", "Actions for {{name}}", { name: e.name })
221
223
  })
222
224
  }
223
225
  ];
224
- return /* @__PURE__ */ b(s, {
225
- allowed: w,
226
- isLoading: E,
227
- pageTitle: L("admin.tenants.title", "Tenants"),
228
- denyMessage: L("admin.tenants.denyMessage", "You don't have permission to view tenants."),
229
- children: /* @__PURE__ */ x(ne, {
230
- title: L("admin.tenants.title", "Tenants"),
231
- gradientWord: L("admin.tenants.title", "Tenants"),
232
- description: X ? L("admin.tenants.descriptionWithTotal", "Manage all tenants on the platform · {{total}} total", { total: X }) : L("admin.tenants.description", "Manage all tenants on the platform"),
233
- actions: T && P ? /* @__PURE__ */ x(i, {
234
- onClick: De,
235
- disabled: Ce || we,
236
- children: [/* @__PURE__ */ b(_, { className: "mr-2 h-4 w-4" }), L("admin.tenants.actions.createTenant", "Create Tenant")]
226
+ return !T && !C ? /* @__PURE__ */ y(c, {
227
+ allowed: !1,
228
+ isLoading: !1,
229
+ pageTitle: I("admin.tenants.title", "Tenants"),
230
+ denyMessage: I("admin.tenants.denyMessage", "You don't have permission to view tenants."),
231
+ children: null
232
+ }) : V ? /* @__PURE__ */ y(c, {
233
+ allowed: C,
234
+ isLoading: T,
235
+ pageTitle: I("admin.tenants.title", "Tenants"),
236
+ denyMessage: I("admin.tenants.denyMessage", "You don't have permission to view tenants."),
237
+ children: /* @__PURE__ */ b(a, {
238
+ title: I("admin.tenants.title", "Tenants"),
239
+ gradientWord: I("admin.tenants.title", "Tenants"),
240
+ description: X ? I("admin.tenants.descriptionWithTotal", "Manage all tenants on the platform · {{total}} total", { total: X }) : I("admin.tenants.description", "Manage all tenants on the platform"),
241
+ actions: w && Se ? /* @__PURE__ */ b(i, {
242
+ onClick: Me,
243
+ disabled: Oe || ke,
244
+ children: [/* @__PURE__ */ y(ge, { className: "mr-2 h-4 w-4" }), I("admin.tenants.actions.createTenant", "Create Tenant")]
237
245
  }) : void 0,
238
- children: [/* @__PURE__ */ x("div", {
246
+ children: [/* @__PURE__ */ b("div", {
239
247
  className: "space-y-4",
240
248
  children: [
241
- /* @__PURE__ */ b(ge, { children: L("admin.tenants.purpose", "Tenants are the isolated customer accounts on the platform — each with its own users, data, plan and billing. Use this page to find a tenant, onboard a new one, and suspend or reactivate access when a customer churns or returns.") }),
242
- /* @__PURE__ */ x(he, {
249
+ /* @__PURE__ */ y(ye, { children: I("admin.tenants.purpose", "Tenants are the isolated customer accounts on the platform — each with its own users, data, plan and billing. Use this page to find a tenant, onboard a new one, and suspend or reactivate access when a customer churns or returns.") }),
250
+ /* @__PURE__ */ b(ve, {
243
251
  className: "flex items-center gap-4 p-5",
244
- children: [/* @__PURE__ */ b("div", {
252
+ children: [/* @__PURE__ */ y("div", {
245
253
  className: "flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-action-primary-bg/15 text-action-primary-bg",
246
- children: /* @__PURE__ */ b(g, { className: "h-6 w-6" })
247
- }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("div", {
254
+ children: /* @__PURE__ */ y(g, { className: "h-6 w-6" })
255
+ }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("div", {
248
256
  className: "text-3xl font-bold tabular-nums text-text-primary",
249
257
  children: o(X)
250
- }), /* @__PURE__ */ b("p", {
258
+ }), /* @__PURE__ */ y("p", {
251
259
  className: "text-sm text-text-secondary",
252
- children: L("admin.tenants.emphasis.label", "tenants on the platform")
260
+ children: I("admin.tenants.emphasis.label", "tenants on the platform")
253
261
  })] })]
254
262
  }),
255
- /* @__PURE__ */ x("div", {
263
+ /* @__PURE__ */ b("div", {
256
264
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
257
- children: [/* @__PURE__ */ x("div", {
265
+ children: [/* @__PURE__ */ b("div", {
258
266
  className: "relative max-w-sm flex-1",
259
- children: [/* @__PURE__ */ b(v, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ b(te, {
260
- placeholder: L("admin.tenants.searchPlaceholder", "Search tenants..."),
261
- value: k.search,
267
+ children: [/* @__PURE__ */ y(_, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ y(te, {
268
+ placeholder: I("admin.tenants.searchPlaceholder", "Search tenants..."),
269
+ value: O.search,
262
270
  onChange: (e) => {
263
- z(1), A({ search: e.target.value });
271
+ R(1), k({ search: e.target.value });
264
272
  },
265
273
  className: "pl-9"
266
274
  })]
267
- }), /* @__PURE__ */ x("div", {
275
+ }), /* @__PURE__ */ b("div", {
268
276
  className: "flex items-center gap-2",
269
- children: [/* @__PURE__ */ x("select", {
270
- value: k.status,
277
+ children: [/* @__PURE__ */ b("select", {
278
+ value: O.status,
271
279
  onChange: (e) => {
272
- z(1), A({ status: e.target.value });
280
+ R(1), k({ status: e.target.value });
273
281
  },
274
282
  className: "h-10 rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] focus:ring-offset-2",
275
283
  children: [
276
- /* @__PURE__ */ b("option", {
284
+ /* @__PURE__ */ y("option", {
277
285
  value: "all",
278
- children: L("admin.tenants.filters.status.all", "All Status")
286
+ children: I("admin.tenants.filters.status.all", "All Status")
279
287
  }),
280
- /* @__PURE__ */ b("option", {
288
+ /* @__PURE__ */ y("option", {
281
289
  value: "active",
282
- children: L("admin.tenants.filters.status.active", "Active")
290
+ children: I("admin.tenants.filters.status.active", "Active")
283
291
  }),
284
- /* @__PURE__ */ b("option", {
292
+ /* @__PURE__ */ y("option", {
285
293
  value: "suspended",
286
- children: L("admin.tenants.filters.status.suspended", "Suspended")
294
+ children: I("admin.tenants.filters.status.suspended", "Suspended")
287
295
  }),
288
- /* @__PURE__ */ b("option", {
296
+ /* @__PURE__ */ y("option", {
289
297
  value: "deleted",
290
- children: L("admin.tenants.filters.status.deleted", "Deleted")
298
+ children: I("admin.tenants.filters.status.deleted", "Deleted")
291
299
  })
292
300
  ]
293
- }), (k.search || k.status !== "all") && /* @__PURE__ */ b(i, {
301
+ }), (O.search || O.status !== "all") && /* @__PURE__ */ y(i, {
294
302
  variant: "ghost",
295
303
  onClick: () => {
296
- z(1), j();
304
+ R(1), A();
297
305
  },
298
- children: L("admin.tenants.filters.clear", "Clear")
306
+ children: I("admin.tenants.filters.clear", "Clear")
299
307
  })]
300
308
  })]
301
309
  }),
302
- W && /* @__PURE__ */ x("div", {
310
+ W && /* @__PURE__ */ b("div", {
303
311
  className: "rounded-md border border-status-error-border/50 bg-status-error-bg/10 p-4 text-sm text-status-error-text",
304
312
  children: [
305
- L("admin.tenants.error.loadFailed", "Failed to load tenants"),
313
+ I("admin.tenants.error.loadFailed", "Failed to load tenants"),
306
314
  ": ",
307
315
  W.message
308
316
  ]
309
317
  }),
310
- /* @__PURE__ */ b(ae, {
311
- columns: je,
312
- data: Te,
318
+ /* @__PURE__ */ y(ae, {
319
+ columns: Ie,
320
+ data: Ae,
313
321
  keyExtractor: (e) => e.id,
314
- onRowClick: ke,
315
- sortBy: k.sortBy,
316
- sortOrder: k.sortOrder,
317
- onSort: (e, t) => A({
322
+ onRowClick: Pe,
323
+ sortBy: O.sortBy,
324
+ sortOrder: O.sortOrder,
325
+ onSort: (e, t) => k({
318
326
  sortBy: e,
319
327
  sortOrder: t
320
328
  }),
321
- loading: Se,
322
- emptyState: /* @__PURE__ */ b(ee, {
329
+ loading: De,
330
+ emptyState: /* @__PURE__ */ y(ee, {
323
331
  illustration: "empty-search",
324
- icon: /* @__PURE__ */ b(g, { className: "h-8 w-8" }),
325
- title: L("admin.tenants.empty.title", "No tenants found"),
326
- description: L("admin.tenants.empty.description", "Try adjusting your search or filters"),
327
- action: /* @__PURE__ */ b(i, {
332
+ icon: /* @__PURE__ */ y(g, { className: "h-8 w-8" }),
333
+ title: I("admin.tenants.empty.title", "No tenants found"),
334
+ description: I("admin.tenants.empty.description", "Try adjusting your search or filters"),
335
+ action: /* @__PURE__ */ y(i, {
328
336
  variant: "outline",
329
337
  onClick: () => {
330
- z(1), j();
338
+ R(1), A();
331
339
  },
332
- children: L("admin.tenants.empty.clearFilters", "Clear filters")
340
+ children: I("admin.tenants.empty.clearFilters", "Clear filters")
333
341
  })
334
342
  })
335
343
  }),
336
- X > C && /* @__PURE__ */ b(oe, {
337
- page: R,
338
- totalPages: Ee,
344
+ X > S && /* @__PURE__ */ y(oe, {
345
+ page: L,
346
+ totalPages: je,
339
347
  totalItems: X,
340
- pageSize: C,
341
- onPageChange: z
348
+ pageSize: S,
349
+ onPageChange: R
342
350
  })
343
351
  ]
344
- }), /* @__PURE__ */ b(ce, {
345
- open: ye,
346
- onClose: () => B(!1),
347
- tenant: be,
348
- onSave: Oe
352
+ }), /* @__PURE__ */ y(se, {
353
+ open: Ce,
354
+ onClose: () => z(!1),
355
+ tenant: we,
356
+ onSave: Ne
349
357
  })]
350
358
  })
359
+ }) : /* @__PURE__ */ y(a, {
360
+ title: I("admin.tenants.featureDisabledTitle", "Tenant management unavailable"),
361
+ description: I("admin.tenants.featureDisabled", "This feature is currently disabled."),
362
+ children: null
351
363
  });
352
364
  }
353
365
  //#endregion
354
- export { w as TenantsListPage };
366
+ export { C as TenantsListPage };
355
367
 
356
368
  //# sourceMappingURL=TenantsListPage.js.map