@burdenoff/microfe-timecampus 2026.1108.1 → 2026.1109.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.
@@ -1,17 +1,19 @@
1
- import { useTimeCampus as e } from "../../providers/TimeCampusProvider.js";
1
+ import { useTimeCampus as e, useTimeCampusNavigate as ee } from "../../providers/TimeCampusProvider.js";
2
2
  import { StatCard as t } from "../../components/StatCard.js";
3
3
  import { LoadingSkeleton as n } from "../../components/LoadingSkeleton.js";
4
- import { useExportTimeCampusUserDataMutation as ee, useOverrideTimeCampusWorkspaceQuotaMutation as te, useRecordTimeCampusImpersonationAuditMutation as r, useRemoveTimeCampusFeatureFlagOverrideMutation as i, useRequestTimeCampusUserDataErasureMutation as a, useSetTimeCampusFeatureFlagOverrideMutation as o, useTimeCampusDataErasureRequestsQuery as s, useTimeCampusImpersonationAuditQuery as ne, useTimeCampusWorkspaceQuotaOverviewQuery as re } from "../../../generated/wspace-operations.js";
5
- import { ErrorBoundary as c } from "../../components/ErrorBoundary.js";
4
+ import { useExportTimeCampusUserDataMutation as te, useOverrideTimeCampusWorkspaceQuotaMutation as r, useRecordTimeCampusImpersonationAuditMutation as i, useRemoveTimeCampusFeatureFlagOverrideMutation as a, useRequestTimeCampusUserDataErasureMutation as o, useSetTimeCampusFeatureFlagOverrideMutation as s, useTimeCampusDataErasureRequestsQuery as c, useTimeCampusImpersonationAuditQuery as ne, useTimeCampusWorkspaceQuotaOverviewQuery as re } from "../../../generated/wspace-operations.js";
5
+ import { ErrorBoundary as l } from "../../components/ErrorBoundary.js";
6
6
  import { PageLayout as ie } from "../../components/PageLayout.js";
7
- import { useState as l } from "react";
8
- import { Activity as ae, FileDown as u, Flag as d, Gauge as f, RefreshCw as p, RotateCcw as m, ShieldAlert as h, Trash2 as g, UserCog as _, Users as v } from "lucide-react";
9
- import { gql as y } from "@apollo/client";
10
- import { useMutation as b, useQuery as x } from "@apollo/client/react";
11
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
12
- import { GlassCard as w } from "@burdenoff/fe-libs/ui";
7
+ import { ADMIN_MARKETPLACE_CERTIFICATION_PATH as ae } from "../../adminPaths.js";
8
+ import { useState as u } from "react";
9
+ import { Activity as d, BadgeCheck as f, FileDown as p, Flag as m, Gauge as h, RefreshCw as g, RotateCcw as _, ShieldAlert as v, Trash2 as y, UserCog as b, Users as oe } from "lucide-react";
10
+ import { gql as x } from "@apollo/client";
11
+ import { useMutation as S, useQuery as C } from "@apollo/client/react";
12
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
13
+ import { GlassCard as E } from "@burdenoff/fe-libs/ui";
14
+ import { useSafePermissions as D } from "@burdenoff/fe-libs/shared/providers/shell";
13
15
  //#region src/timecampus/pages/admin/AdminPage.tsx
14
- var T = y`
16
+ var O = x`
15
17
  query TimeCampusAdminWorkspaceState($workspaceId: ID!) {
16
18
  timeCampusAdminWorkspaceState(workspaceId: $workspaceId) {
17
19
  workspaceId
@@ -29,7 +31,7 @@ var T = y`
29
31
  generatedAt
30
32
  }
31
33
  }
32
- `, E = y`
34
+ `, k = x`
33
35
  query TimeCampusFeatureFlags($workspaceId: ID!) {
34
36
  timeCampusFeatureFlags(workspaceId: $workspaceId) {
35
37
  workspaceId
@@ -41,14 +43,14 @@ var T = y`
41
43
  }
42
44
  }
43
45
  }
44
- `, D = y`
46
+ `, A = x`
45
47
  mutation ReprocessTimeCampusTimeline($workspaceId: ID!) {
46
48
  reprocessTimeCampusTimeline(workspaceId: $workspaceId) {
47
49
  success
48
50
  message
49
51
  }
50
52
  }
51
- `, O = y`
53
+ `, j = x`
52
54
  mutation ResetTimeCampusDemoData($workspaceId: ID!) {
53
55
  resetTimeCampusDemoData(workspaceId: $workspaceId) {
54
56
  success
@@ -56,67 +58,67 @@ var T = y`
56
58
  }
57
59
  }
58
60
  `;
59
- function k(e) {
61
+ function M(e) {
60
62
  return e == null ? "—" : e.toLocaleString();
61
63
  }
62
- var A = () => {
63
- let { workspaceId: c = "" } = e(), [y, A] = l(null), [j, M] = l(""), [N, P] = l("timecampus.operations"), [F, I] = l(!0), [L, R] = l("timecampus.projects.count"), [z, B] = l("100"), [V, H] = l("support"), { data: U, loading: W, error: G, refetch: K } = x(T, {
64
- variables: { workspaceId: c },
65
- skip: !c
66
- }), { data: q, loading: J, error: oe } = x(E, {
67
- variables: { workspaceId: c },
68
- skip: !c
69
- }), { data: se, loading: ce, error: le, refetch: ue } = re({
70
- variables: { workspaceId: c },
71
- skip: !c
72
- }), { data: de, loading: fe, error: pe, refetch: me } = s({
73
- variables: { workspaceId: c },
74
- skip: !c
75
- }), { data: he, loading: ge, error: _e, refetch: ve } = ne({
76
- variables: { workspaceId: c },
77
- skip: !c
78
- }), [ye, { loading: be }] = b(D), [xe, { loading: Se }] = b(O), [Ce, { loading: we }] = o(), [Te, { loading: Ee }] = i(), [De, { loading: Oe }] = te(), [ke, { loading: Ae }] = ee(), [je, { loading: Me }] = a(), [Ne, { loading: Pe }] = r();
79
- if (!c) return /* @__PURE__ */ C("div", {
64
+ var N = () => {
65
+ let { workspaceId: l = "" } = e(), x = ee(), N = D()?.isSuperAdmin ?? !1, [P, F] = u(null), [I, L] = u(""), [R, z] = u("timecampus.operations"), [B, V] = u(!0), [H, U] = u("timecampus.projects.count"), [W, G] = u("100"), [K, q] = u("support"), { data: se, loading: J, error: ce, refetch: le } = C(O, {
66
+ variables: { workspaceId: l },
67
+ skip: !l
68
+ }), { data: ue, loading: de, error: fe } = C(k, {
69
+ variables: { workspaceId: l },
70
+ skip: !l
71
+ }), { data: pe, loading: me, error: he, refetch: ge } = re({
72
+ variables: { workspaceId: l },
73
+ skip: !l
74
+ }), { data: _e, loading: ve, error: ye, refetch: be } = c({
75
+ variables: { workspaceId: l },
76
+ skip: !l
77
+ }), { data: xe, loading: Se, error: Ce, refetch: we } = ne({
78
+ variables: { workspaceId: l },
79
+ skip: !l
80
+ }), [Te, { loading: Ee }] = S(A), [De, { loading: Oe }] = S(j), [ke, { loading: Ae }] = s(), [je, { loading: Me }] = a(), [Ne, { loading: Pe }] = r(), [Fe, { loading: Ie }] = te(), [Le, { loading: Re }] = o(), [ze, { loading: Be }] = i();
81
+ if (!l) return /* @__PURE__ */ T("div", {
80
82
  className: "flex min-h-[40vh] items-center justify-center text-text-secondary",
81
- children: [/* @__PURE__ */ S(h, { className: "mr-2 h-5 w-5" }), "Workspace context is required."]
83
+ children: [/* @__PURE__ */ w(v, { className: "mr-2 h-5 w-5" }), "Workspace context is required."]
82
84
  });
83
- let Y = U?.timeCampusAdminWorkspaceState, Fe = q?.timeCampusFeatureFlags?.items ?? [], X = se?.data?.timeCampusWorkspaceQuotaOverview?.assignments ?? [], Z = de?.data?.timeCampusDataErasureRequests ?? [], Q = he?.data?.timeCampusImpersonationAudit ?? [], Ie = async () => {
85
+ let Y = se?.timeCampusAdminWorkspaceState, Ve = ue?.timeCampusFeatureFlags?.items ?? [], X = pe?.data?.timeCampusWorkspaceQuotaOverview?.assignments ?? [], Z = _e?.data?.timeCampusDataErasureRequests ?? [], Q = xe?.data?.timeCampusImpersonationAudit ?? [], He = async () => {
84
86
  if (!window.confirm("Reprocess timeline categorization for this workspace?")) return;
85
- let e = await ye({ variables: { workspaceId: c } });
86
- A(e.data?.reprocessTimeCampusTimeline?.message ?? "Done");
87
- }, Le = async () => {
87
+ let e = await Te({ variables: { workspaceId: l } });
88
+ F(e.data?.reprocessTimeCampusTimeline?.message ?? "Done");
89
+ }, Ue = async () => {
88
90
  if (!window.confirm("Reset demo data for this workspace? This cannot be undone.")) return;
89
- let e = await xe({ variables: { workspaceId: c } });
90
- A(e.data?.resetTimeCampusDemoData?.message ?? "Done"), await K();
91
- }, Re = async () => {
92
- let e = await Ce({ variables: { input: {
93
- workspaceId: c,
94
- key: N,
95
- enabled: F
91
+ let e = await De({ variables: { workspaceId: l } });
92
+ F(e.data?.resetTimeCampusDemoData?.message ?? "Done"), await le();
93
+ }, We = async () => {
94
+ let e = await ke({ variables: { input: {
95
+ workspaceId: l,
96
+ key: R,
97
+ enabled: B
96
98
  } } });
97
- A(e.data ? `Feature flag ${N} set to ${String(F)}` : "Done");
98
- }, ze = async () => {
99
- let e = await Te({ variables: {
100
- workspaceId: c,
101
- key: N
99
+ F(e.data ? `Feature flag ${R} set to ${String(B)}` : "Done");
100
+ }, Ge = async () => {
101
+ let e = await je({ variables: {
102
+ workspaceId: l,
103
+ key: R
102
104
  } });
103
- A(`Removed override for ${N}: ${String(e.data)}`);
104
- }, Be = async () => {
105
- let e = await De({ variables: { input: {
106
- workspaceId: c,
107
- quotaName: L,
105
+ F(`Removed override for ${R}: ${String(e.data)}`);
106
+ }, Ke = async () => {
107
+ let e = await Ne({ variables: { input: {
108
+ workspaceId: l,
109
+ quotaName: H,
108
110
  productId: "timecampus",
109
- limit: z ? Number(z) : null
111
+ limit: W ? Number(W) : null
110
112
  } } });
111
- A(e.data ? `Quota ${L} overridden to ${z || "unlimited"}` : "Done"), await ue();
112
- }, Ve = async () => {
113
- if (!j) {
114
- A("Enter a target user ID");
113
+ F(e.data ? `Quota ${H} overridden to ${W || "unlimited"}` : "Done"), await ge();
114
+ }, qe = async () => {
115
+ if (!I) {
116
+ F("Enter a target user ID");
115
117
  return;
116
118
  }
117
- let e = await ke({ variables: { input: {
118
- workspaceId: c,
119
- userId: j,
119
+ let e = await Fe({ variables: { input: {
120
+ workspaceId: l,
121
+ userId: I,
120
122
  entityTypes: [
121
123
  "timeEntry",
122
124
  "project",
@@ -125,157 +127,167 @@ var A = () => {
125
127
  ],
126
128
  format: "JSON"
127
129
  } } });
128
- A(e.data ? `Export job ${e.data.exportTimeCampusUserData.id} created` : "Done");
129
- }, He = async () => {
130
- if (!j) {
131
- A("Enter a target user ID");
130
+ F(e.data ? `Export job ${e.data.exportTimeCampusUserData.id} created` : "Done");
131
+ }, Je = async () => {
132
+ if (!I) {
133
+ F("Enter a target user ID");
132
134
  return;
133
135
  }
134
- if (!window.confirm(`Request TimeCampus data erasure for user ${j}?`)) return;
135
- let e = await je({ variables: {
136
- workspaceId: c,
137
- userId: j
136
+ if (!window.confirm(`Request TimeCampus data erasure for user ${I}?`)) return;
137
+ let e = await Le({ variables: {
138
+ workspaceId: l,
139
+ userId: I
138
140
  } });
139
- A(e.data ? `Erasure request ${e.data.requestTimeCampusUserDataErasure.id} created` : "Done"), await me();
140
- }, Ue = async () => {
141
- if (!j) {
142
- A("Enter a target user ID");
141
+ F(e.data ? `Erasure request ${e.data.requestTimeCampusUserDataErasure.id} created` : "Done"), await be();
142
+ }, Ye = async () => {
143
+ if (!I) {
144
+ F("Enter a target user ID");
143
145
  return;
144
146
  }
145
- let e = await Ne({ variables: { input: {
146
- workspaceId: c,
147
- targetUserId: j,
148
- reason: V
147
+ let e = await ze({ variables: { input: {
148
+ workspaceId: l,
149
+ targetUserId: I,
150
+ reason: K
149
151
  } } });
150
- A(e.data ? `Impersonation session ${e.data.recordTimeCampusImpersonationAudit.id} recorded` : "Done"), await ve();
152
+ F(e.data ? `Impersonation session ${e.data.recordTimeCampusImpersonationAudit.id} recorded` : "Done"), await we();
151
153
  }, $ = [
152
- G,
153
- oe,
154
- le,
155
- pe,
156
- _e
154
+ ce,
155
+ fe,
156
+ he,
157
+ ye,
158
+ Ce
157
159
  ].filter(Boolean);
158
- return /* @__PURE__ */ C(ie, {
160
+ return /* @__PURE__ */ T(ie, {
159
161
  title: "TimeCampus Admin",
160
162
  description: "Workspace state, feature flags, quotas, compliance, and super-admin maintenance actions.",
163
+ actions: N ? /* @__PURE__ */ T("button", {
164
+ type: "button",
165
+ onClick: () => x(`/${ae}`),
166
+ className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover",
167
+ "data-testid": "timecampus-admin-open-certification",
168
+ children: [/* @__PURE__ */ w(f, {
169
+ className: "h-4 w-4",
170
+ "aria-hidden": "true"
171
+ }), "Marketplace Certification"]
172
+ }) : void 0,
161
173
  children: [
162
- y && /* @__PURE__ */ C("div", {
174
+ P && /* @__PURE__ */ T("div", {
163
175
  className: "mb-4 rounded-md bg-status-info-bg px-4 py-3 text-sm text-status-info-text",
164
- children: [y, /* @__PURE__ */ S("button", {
176
+ children: [P, /* @__PURE__ */ w("button", {
165
177
  type: "button",
166
- onClick: () => A(null),
178
+ onClick: () => F(null),
167
179
  className: "ml-4 underline",
168
180
  children: "Dismiss"
169
181
  })]
170
182
  }),
171
- $.length > 0 && /* @__PURE__ */ C("div", {
183
+ $.length > 0 && /* @__PURE__ */ T("div", {
172
184
  className: "mb-4 rounded-md bg-status-error-bg px-4 py-3 text-sm text-status-error-text",
173
185
  children: ["Failed to load admin data. ", $.map((e) => e?.message).join("; ")]
174
186
  }),
175
- /* @__PURE__ */ C("section", {
187
+ /* @__PURE__ */ T("section", {
176
188
  className: "mb-8",
177
- children: [/* @__PURE__ */ C("h2", {
189
+ children: [/* @__PURE__ */ T("h2", {
178
190
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
179
- children: [/* @__PURE__ */ S(ae, { className: "h-5 w-5" }), "Workspace State"]
180
- }), W ? /* @__PURE__ */ S(n, {}) : /* @__PURE__ */ C("div", {
191
+ children: [/* @__PURE__ */ w(d, { className: "h-5 w-5" }), "Workspace State"]
192
+ }), J ? /* @__PURE__ */ w(n, {}) : /* @__PURE__ */ T("div", {
181
193
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
182
194
  children: [
183
- /* @__PURE__ */ S(t, {
195
+ /* @__PURE__ */ w(t, {
184
196
  title: "Time Entries",
185
197
  value: Y?.timeEntryCount ?? 0
186
198
  }),
187
- /* @__PURE__ */ S(t, {
199
+ /* @__PURE__ */ w(t, {
188
200
  title: "Projects",
189
201
  value: Y?.projectCount ?? 0
190
202
  }),
191
- /* @__PURE__ */ S(t, {
203
+ /* @__PURE__ */ w(t, {
192
204
  title: "Tasks",
193
205
  value: Y?.taskCount ?? 0
194
206
  }),
195
- /* @__PURE__ */ S(t, {
207
+ /* @__PURE__ */ w(t, {
196
208
  title: "Pomodoro Sessions",
197
209
  value: Y?.pomodoroSessionCount ?? 0
198
210
  }),
199
- /* @__PURE__ */ S(t, {
211
+ /* @__PURE__ */ w(t, {
200
212
  title: "Meetings",
201
213
  value: Y?.meetingCount ?? 0
202
214
  }),
203
- /* @__PURE__ */ S(t, {
215
+ /* @__PURE__ */ w(t, {
204
216
  title: "Expenses",
205
217
  value: Y?.expenseCount ?? 0
206
218
  }),
207
- /* @__PURE__ */ S(t, {
219
+ /* @__PURE__ */ w(t, {
208
220
  title: "Invoices",
209
221
  value: Y?.invoiceCount ?? 0
210
222
  }),
211
- /* @__PURE__ */ S(t, {
223
+ /* @__PURE__ */ w(t, {
212
224
  title: "Pending Approvals",
213
225
  value: Y?.pendingApprovalCount ?? 0
214
226
  }),
215
- /* @__PURE__ */ S(t, {
227
+ /* @__PURE__ */ w(t, {
216
228
  title: "Location Entries",
217
229
  value: Y?.locationEntryCount ?? 0
218
230
  }),
219
- /* @__PURE__ */ S(t, {
231
+ /* @__PURE__ */ w(t, {
220
232
  title: "Focus Scores",
221
233
  value: Y?.focusScoreCount ?? 0
222
234
  }),
223
- /* @__PURE__ */ S(t, {
235
+ /* @__PURE__ */ w(t, {
224
236
  title: "App Usage Records",
225
237
  value: Y?.applicationUsageCount ?? 0
226
238
  })
227
239
  ]
228
240
  })]
229
241
  }),
230
- /* @__PURE__ */ C("section", {
242
+ /* @__PURE__ */ T("section", {
231
243
  className: "mb-8",
232
244
  children: [
233
- /* @__PURE__ */ C("h2", {
245
+ /* @__PURE__ */ T("h2", {
234
246
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
235
- children: [/* @__PURE__ */ S(d, { className: "h-5 w-5" }), "Feature Flags"]
247
+ children: [/* @__PURE__ */ w(m, { className: "h-5 w-5" }), "Feature Flags"]
236
248
  }),
237
- J ? /* @__PURE__ */ S(n, {}) : /* @__PURE__ */ S(w, {
249
+ de ? /* @__PURE__ */ w(n, {}) : /* @__PURE__ */ w(E, {
238
250
  className: "mb-4 overflow-hidden",
239
- children: /* @__PURE__ */ C("table", {
251
+ children: /* @__PURE__ */ T("table", {
240
252
  className: "w-full text-sm",
241
- children: [/* @__PURE__ */ S("thead", {
253
+ children: [/* @__PURE__ */ w("thead", {
242
254
  className: "bg-bg-subtle",
243
- children: /* @__PURE__ */ C("tr", { children: [
244
- /* @__PURE__ */ S("th", {
255
+ children: /* @__PURE__ */ T("tr", { children: [
256
+ /* @__PURE__ */ w("th", {
245
257
  className: "px-4 py-3 text-left font-medium text-text-secondary",
246
258
  children: "Key"
247
259
  }),
248
- /* @__PURE__ */ S("th", {
260
+ /* @__PURE__ */ w("th", {
249
261
  className: "px-4 py-3 text-left font-medium text-text-secondary",
250
262
  children: "Category"
251
263
  }),
252
- /* @__PURE__ */ S("th", {
264
+ /* @__PURE__ */ w("th", {
253
265
  className: "px-4 py-3 text-left font-medium text-text-secondary",
254
266
  children: "Default"
255
267
  }),
256
- /* @__PURE__ */ S("th", {
268
+ /* @__PURE__ */ w("th", {
257
269
  className: "px-4 py-3 text-left font-medium text-text-secondary",
258
270
  children: "Current"
259
271
  })
260
272
  ] })
261
- }), /* @__PURE__ */ S("tbody", { children: Fe.map((e) => /* @__PURE__ */ C("tr", {
273
+ }), /* @__PURE__ */ w("tbody", { children: Ve.map((e) => /* @__PURE__ */ T("tr", {
262
274
  className: "border-t border-border-subtle",
263
275
  children: [
264
- /* @__PURE__ */ S("td", {
276
+ /* @__PURE__ */ w("td", {
265
277
  className: "px-4 py-3 font-mono text-text-primary",
266
278
  children: e.key
267
279
  }),
268
- /* @__PURE__ */ S("td", {
280
+ /* @__PURE__ */ w("td", {
269
281
  className: "px-4 py-3 text-text-secondary",
270
282
  children: e.category
271
283
  }),
272
- /* @__PURE__ */ S("td", {
284
+ /* @__PURE__ */ w("td", {
273
285
  className: "px-4 py-3 text-text-secondary",
274
286
  children: String(e.defaultValue)
275
287
  }),
276
- /* @__PURE__ */ S("td", {
288
+ /* @__PURE__ */ w("td", {
277
289
  className: "px-4 py-3",
278
- children: /* @__PURE__ */ S("span", {
290
+ children: /* @__PURE__ */ w("span", {
279
291
  className: `inline-flex rounded-full px-2 py-1 text-xs font-medium ${e.value ? "bg-status-success-bg text-status-success-text" : "bg-status-error-bg text-status-error-text"}`,
280
292
  children: e.value ? "Enabled" : "Disabled"
281
293
  })
@@ -284,253 +296,253 @@ var A = () => {
284
296
  }, e.key)) })]
285
297
  })
286
298
  }),
287
- /* @__PURE__ */ C(w, {
299
+ /* @__PURE__ */ T(E, {
288
300
  className: "flex flex-wrap items-end gap-4 p-4",
289
301
  children: [
290
- /* @__PURE__ */ C("div", {
302
+ /* @__PURE__ */ T("div", {
291
303
  className: "flex flex-col gap-1",
292
- children: [/* @__PURE__ */ S("label", {
304
+ children: [/* @__PURE__ */ w("label", {
293
305
  className: "text-xs font-medium text-text-secondary",
294
306
  children: "Flag key"
295
- }), /* @__PURE__ */ S("input", {
307
+ }), /* @__PURE__ */ w("input", {
296
308
  type: "text",
297
- value: N,
298
- onChange: (e) => P(e.target.value),
309
+ value: R,
310
+ onChange: (e) => z(e.target.value),
299
311
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary"
300
312
  })]
301
313
  }),
302
- /* @__PURE__ */ C("div", {
314
+ /* @__PURE__ */ T("div", {
303
315
  className: "flex flex-col gap-1",
304
- children: [/* @__PURE__ */ S("label", {
316
+ children: [/* @__PURE__ */ w("label", {
305
317
  className: "text-xs font-medium text-text-secondary",
306
318
  children: "Enabled"
307
- }), /* @__PURE__ */ C("select", {
308
- value: String(F),
309
- onChange: (e) => I(e.target.value === "true"),
319
+ }), /* @__PURE__ */ T("select", {
320
+ value: String(B),
321
+ onChange: (e) => V(e.target.value === "true"),
310
322
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary",
311
- children: [/* @__PURE__ */ S("option", {
323
+ children: [/* @__PURE__ */ w("option", {
312
324
  value: "true",
313
325
  children: "true"
314
- }), /* @__PURE__ */ S("option", {
326
+ }), /* @__PURE__ */ w("option", {
315
327
  value: "false",
316
328
  children: "false"
317
329
  })]
318
330
  })]
319
331
  }),
320
- /* @__PURE__ */ C("button", {
332
+ /* @__PURE__ */ T("button", {
321
333
  type: "button",
322
- onClick: Re,
323
- disabled: we,
334
+ onClick: We,
335
+ disabled: Ae,
324
336
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
325
- children: [/* @__PURE__ */ S(d, { className: "h-4 w-4" }), "Set Override"]
337
+ children: [/* @__PURE__ */ w(m, { className: "h-4 w-4" }), "Set Override"]
326
338
  }),
327
- /* @__PURE__ */ C("button", {
339
+ /* @__PURE__ */ T("button", {
328
340
  type: "button",
329
- onClick: ze,
330
- disabled: Ee,
341
+ onClick: Ge,
342
+ disabled: Me,
331
343
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
332
- children: [/* @__PURE__ */ S(m, { className: "h-4 w-4" }), "Remove Override"]
344
+ children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Remove Override"]
333
345
  })
334
346
  ]
335
347
  })
336
348
  ]
337
349
  }),
338
- /* @__PURE__ */ C("section", {
350
+ /* @__PURE__ */ T("section", {
339
351
  className: "mb-8",
340
352
  children: [
341
- /* @__PURE__ */ C("h2", {
353
+ /* @__PURE__ */ T("h2", {
342
354
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
343
- children: [/* @__PURE__ */ S(f, { className: "h-5 w-5" }), "Workspace Quotas"]
355
+ children: [/* @__PURE__ */ w(h, { className: "h-5 w-5" }), "Workspace Quotas"]
344
356
  }),
345
- ce ? /* @__PURE__ */ S(n, {}) : /* @__PURE__ */ S(w, {
357
+ me ? /* @__PURE__ */ w(n, {}) : /* @__PURE__ */ w(E, {
346
358
  className: "mb-4 overflow-hidden",
347
- children: /* @__PURE__ */ C("table", {
359
+ children: /* @__PURE__ */ T("table", {
348
360
  className: "w-full text-sm",
349
- children: [/* @__PURE__ */ S("thead", {
361
+ children: [/* @__PURE__ */ w("thead", {
350
362
  className: "bg-bg-subtle",
351
- children: /* @__PURE__ */ C("tr", { children: [
352
- /* @__PURE__ */ S("th", {
363
+ children: /* @__PURE__ */ T("tr", { children: [
364
+ /* @__PURE__ */ w("th", {
353
365
  className: "px-4 py-3 text-left font-medium text-text-secondary",
354
366
  children: "Quota"
355
367
  }),
356
- /* @__PURE__ */ S("th", {
368
+ /* @__PURE__ */ w("th", {
357
369
  className: "px-4 py-3 text-left font-medium text-text-secondary",
358
370
  children: "Product"
359
371
  }),
360
- /* @__PURE__ */ S("th", {
372
+ /* @__PURE__ */ w("th", {
361
373
  className: "px-4 py-3 text-left font-medium text-text-secondary",
362
374
  children: "Limit"
363
375
  }),
364
- /* @__PURE__ */ S("th", {
376
+ /* @__PURE__ */ w("th", {
365
377
  className: "px-4 py-3 text-left font-medium text-text-secondary",
366
378
  children: "Used"
367
379
  }),
368
- /* @__PURE__ */ S("th", {
380
+ /* @__PURE__ */ w("th", {
369
381
  className: "px-4 py-3 text-left font-medium text-text-secondary",
370
382
  children: "Reset"
371
383
  }),
372
- /* @__PURE__ */ S("th", {
384
+ /* @__PURE__ */ w("th", {
373
385
  className: "px-4 py-3 text-left font-medium text-text-secondary",
374
386
  children: "Active"
375
387
  })
376
388
  ] })
377
- }), /* @__PURE__ */ C("tbody", { children: [X.map((e) => /* @__PURE__ */ C("tr", {
389
+ }), /* @__PURE__ */ T("tbody", { children: [X.map((e) => /* @__PURE__ */ T("tr", {
378
390
  className: "border-t border-border-subtle",
379
391
  children: [
380
- /* @__PURE__ */ S("td", {
392
+ /* @__PURE__ */ w("td", {
381
393
  className: "px-4 py-3 font-mono text-text-primary",
382
394
  children: e.quotaName
383
395
  }),
384
- /* @__PURE__ */ S("td", {
396
+ /* @__PURE__ */ w("td", {
385
397
  className: "px-4 py-3 text-text-secondary",
386
398
  children: e.productId
387
399
  }),
388
- /* @__PURE__ */ S("td", {
400
+ /* @__PURE__ */ w("td", {
389
401
  className: "px-4 py-3 text-text-secondary",
390
- children: e.noLimit ? "Unlimited" : k(e.limit)
402
+ children: e.noLimit ? "Unlimited" : M(e.limit)
391
403
  }),
392
- /* @__PURE__ */ S("td", {
404
+ /* @__PURE__ */ w("td", {
393
405
  className: "px-4 py-3 text-text-secondary",
394
- children: k(e.used)
406
+ children: M(e.used)
395
407
  }),
396
- /* @__PURE__ */ S("td", {
408
+ /* @__PURE__ */ w("td", {
397
409
  className: "px-4 py-3 text-text-secondary",
398
410
  children: e.resetPeriod
399
411
  }),
400
- /* @__PURE__ */ S("td", {
412
+ /* @__PURE__ */ w("td", {
401
413
  className: "px-4 py-3 text-text-secondary",
402
414
  children: e.isActive ? "Yes" : "No"
403
415
  })
404
416
  ]
405
- }, e.id)), X.length === 0 && /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
417
+ }, e.id)), X.length === 0 && /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", {
406
418
  colSpan: 6,
407
419
  className: "px-4 py-3 text-center text-text-secondary",
408
420
  children: "No quota assignments for this workspace."
409
421
  }) })] })]
410
422
  })
411
423
  }),
412
- /* @__PURE__ */ C(w, {
424
+ /* @__PURE__ */ T(E, {
413
425
  className: "flex flex-wrap items-end gap-4 p-4",
414
426
  children: [
415
- /* @__PURE__ */ C("div", {
427
+ /* @__PURE__ */ T("div", {
416
428
  className: "flex flex-col gap-1",
417
- children: [/* @__PURE__ */ S("label", {
429
+ children: [/* @__PURE__ */ w("label", {
418
430
  className: "text-xs font-medium text-text-secondary",
419
431
  children: "Quota name"
420
- }), /* @__PURE__ */ S("input", {
432
+ }), /* @__PURE__ */ w("input", {
421
433
  type: "text",
422
- value: L,
423
- onChange: (e) => R(e.target.value),
434
+ value: H,
435
+ onChange: (e) => U(e.target.value),
424
436
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary"
425
437
  })]
426
438
  }),
427
- /* @__PURE__ */ C("div", {
439
+ /* @__PURE__ */ T("div", {
428
440
  className: "flex flex-col gap-1",
429
- children: [/* @__PURE__ */ S("label", {
441
+ children: [/* @__PURE__ */ w("label", {
430
442
  className: "text-xs font-medium text-text-secondary",
431
443
  children: "Limit (empty = unlimited)"
432
- }), /* @__PURE__ */ S("input", {
444
+ }), /* @__PURE__ */ w("input", {
433
445
  type: "number",
434
- value: z,
435
- onChange: (e) => B(e.target.value),
446
+ value: W,
447
+ onChange: (e) => G(e.target.value),
436
448
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary"
437
449
  })]
438
450
  }),
439
- /* @__PURE__ */ C("button", {
451
+ /* @__PURE__ */ T("button", {
440
452
  type: "button",
441
- onClick: Be,
442
- disabled: Oe,
453
+ onClick: Ke,
454
+ disabled: Pe,
443
455
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
444
- children: [/* @__PURE__ */ S(f, { className: "h-4 w-4" }), "Override Quota"]
456
+ children: [/* @__PURE__ */ w(h, { className: "h-4 w-4" }), "Override Quota"]
445
457
  })
446
458
  ]
447
459
  })
448
460
  ]
449
461
  }),
450
- /* @__PURE__ */ C("section", {
462
+ /* @__PURE__ */ T("section", {
451
463
  className: "mb-8",
452
464
  children: [
453
- /* @__PURE__ */ C("h2", {
465
+ /* @__PURE__ */ T("h2", {
454
466
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
455
- children: [/* @__PURE__ */ S(v, { className: "h-5 w-5" }), "User Data Export / Erasure"]
467
+ children: [/* @__PURE__ */ w(oe, { className: "h-5 w-5" }), "User Data Export / Erasure"]
456
468
  }),
457
- /* @__PURE__ */ C(w, {
469
+ /* @__PURE__ */ T(E, {
458
470
  className: "flex flex-wrap items-end gap-4 p-4",
459
471
  children: [
460
- /* @__PURE__ */ C("div", {
472
+ /* @__PURE__ */ T("div", {
461
473
  className: "flex flex-col gap-1",
462
- children: [/* @__PURE__ */ S("label", {
474
+ children: [/* @__PURE__ */ w("label", {
463
475
  className: "text-xs font-medium text-text-secondary",
464
476
  children: "Target user ID"
465
- }), /* @__PURE__ */ S("input", {
477
+ }), /* @__PURE__ */ w("input", {
466
478
  type: "text",
467
- value: j,
468
- onChange: (e) => M(e.target.value),
479
+ value: I,
480
+ onChange: (e) => L(e.target.value),
469
481
  placeholder: "user-uuid",
470
482
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary"
471
483
  })]
472
484
  }),
473
- /* @__PURE__ */ C("button", {
485
+ /* @__PURE__ */ T("button", {
474
486
  type: "button",
475
- onClick: Ve,
476
- disabled: Ae,
487
+ onClick: qe,
488
+ disabled: Ie,
477
489
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
478
- children: [/* @__PURE__ */ S(u, { className: "h-4 w-4" }), "Export User Data"]
490
+ children: [/* @__PURE__ */ w(p, { className: "h-4 w-4" }), "Export User Data"]
479
491
  }),
480
- /* @__PURE__ */ C("button", {
492
+ /* @__PURE__ */ T("button", {
481
493
  type: "button",
482
- onClick: He,
483
- disabled: Me,
494
+ onClick: Je,
495
+ disabled: Re,
484
496
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
485
- children: [/* @__PURE__ */ S(g, { className: "h-4 w-4" }), "Request Erasure"]
497
+ children: [/* @__PURE__ */ w(y, { className: "h-4 w-4" }), "Request Erasure"]
486
498
  })
487
499
  ]
488
500
  }),
489
- fe ? /* @__PURE__ */ S(n, {}) : /* @__PURE__ */ S(w, {
501
+ ve ? /* @__PURE__ */ w(n, {}) : /* @__PURE__ */ w(E, {
490
502
  className: "mt-4 overflow-hidden",
491
- children: /* @__PURE__ */ C("table", {
503
+ children: /* @__PURE__ */ T("table", {
492
504
  className: "w-full text-sm",
493
- children: [/* @__PURE__ */ S("thead", {
505
+ children: [/* @__PURE__ */ w("thead", {
494
506
  className: "bg-bg-subtle",
495
- children: /* @__PURE__ */ C("tr", { children: [
496
- /* @__PURE__ */ S("th", {
507
+ children: /* @__PURE__ */ T("tr", { children: [
508
+ /* @__PURE__ */ w("th", {
497
509
  className: "px-4 py-3 text-left font-medium text-text-secondary",
498
510
  children: "User"
499
511
  }),
500
- /* @__PURE__ */ S("th", {
512
+ /* @__PURE__ */ w("th", {
501
513
  className: "px-4 py-3 text-left font-medium text-text-secondary",
502
514
  children: "Status"
503
515
  }),
504
- /* @__PURE__ */ S("th", {
516
+ /* @__PURE__ */ w("th", {
505
517
  className: "px-4 py-3 text-left font-medium text-text-secondary",
506
518
  children: "Requested By"
507
519
  }),
508
- /* @__PURE__ */ S("th", {
520
+ /* @__PURE__ */ w("th", {
509
521
  className: "px-4 py-3 text-left font-medium text-text-secondary",
510
522
  children: "Requested At"
511
523
  })
512
524
  ] })
513
- }), /* @__PURE__ */ C("tbody", { children: [Z.map((e) => /* @__PURE__ */ C("tr", {
525
+ }), /* @__PURE__ */ T("tbody", { children: [Z.map((e) => /* @__PURE__ */ T("tr", {
514
526
  className: "border-t border-border-subtle",
515
527
  children: [
516
- /* @__PURE__ */ S("td", {
528
+ /* @__PURE__ */ w("td", {
517
529
  className: "px-4 py-3 font-mono text-text-primary",
518
530
  children: e.userId
519
531
  }),
520
- /* @__PURE__ */ S("td", {
532
+ /* @__PURE__ */ w("td", {
521
533
  className: "px-4 py-3 text-text-secondary",
522
534
  children: e.status
523
535
  }),
524
- /* @__PURE__ */ S("td", {
536
+ /* @__PURE__ */ w("td", {
525
537
  className: "px-4 py-3 text-text-secondary",
526
538
  children: e.requestedBy
527
539
  }),
528
- /* @__PURE__ */ S("td", {
540
+ /* @__PURE__ */ w("td", {
529
541
  className: "px-4 py-3 text-text-secondary",
530
542
  children: new Date(e.requestedAt).toLocaleString()
531
543
  })
532
544
  ]
533
- }, e.id)), Z.length === 0 && /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
545
+ }, e.id)), Z.length === 0 && /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", {
534
546
  colSpan: 4,
535
547
  className: "px-4 py-3 text-center text-text-secondary",
536
548
  children: "No erasure requests."
@@ -539,66 +551,66 @@ var A = () => {
539
551
  })
540
552
  ]
541
553
  }),
542
- /* @__PURE__ */ C("section", {
554
+ /* @__PURE__ */ T("section", {
543
555
  className: "mb-8",
544
556
  children: [
545
- /* @__PURE__ */ C("h2", {
557
+ /* @__PURE__ */ T("h2", {
546
558
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
547
- children: [/* @__PURE__ */ S(_, { className: "h-5 w-5" }), "Impersonation Audit"]
559
+ children: [/* @__PURE__ */ w(b, { className: "h-5 w-5" }), "Impersonation Audit"]
548
560
  }),
549
- /* @__PURE__ */ C(w, {
561
+ /* @__PURE__ */ T(E, {
550
562
  className: "flex flex-wrap items-end gap-4 p-4",
551
- children: [/* @__PURE__ */ C("div", {
563
+ children: [/* @__PURE__ */ T("div", {
552
564
  className: "flex flex-col gap-1",
553
- children: [/* @__PURE__ */ S("label", {
565
+ children: [/* @__PURE__ */ w("label", {
554
566
  className: "text-xs font-medium text-text-secondary",
555
567
  children: "Reason"
556
- }), /* @__PURE__ */ S("input", {
568
+ }), /* @__PURE__ */ w("input", {
557
569
  type: "text",
558
- value: V,
559
- onChange: (e) => H(e.target.value),
570
+ value: K,
571
+ onChange: (e) => q(e.target.value),
560
572
  className: "rounded-md border border-border-subtle bg-bg-subtle px-3 py-2 text-sm text-text-primary"
561
573
  })]
562
- }), /* @__PURE__ */ C("button", {
574
+ }), /* @__PURE__ */ T("button", {
563
575
  type: "button",
564
- onClick: Ue,
565
- disabled: Pe,
576
+ onClick: Ye,
577
+ disabled: Be,
566
578
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
567
- children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), "Record Session"]
579
+ children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), "Record Session"]
568
580
  })]
569
581
  }),
570
- ge ? /* @__PURE__ */ S(n, {}) : /* @__PURE__ */ S(w, {
582
+ Se ? /* @__PURE__ */ w(n, {}) : /* @__PURE__ */ w(E, {
571
583
  className: "mt-4 overflow-hidden",
572
- children: /* @__PURE__ */ C("table", {
584
+ children: /* @__PURE__ */ T("table", {
573
585
  className: "w-full text-sm",
574
- children: [/* @__PURE__ */ S("thead", {
586
+ children: [/* @__PURE__ */ w("thead", {
575
587
  className: "bg-bg-subtle",
576
- children: /* @__PURE__ */ C("tr", { children: [
577
- /* @__PURE__ */ S("th", {
588
+ children: /* @__PURE__ */ T("tr", { children: [
589
+ /* @__PURE__ */ w("th", {
578
590
  className: "px-4 py-3 text-left font-medium text-text-secondary",
579
591
  children: "Target User"
580
592
  }),
581
- /* @__PURE__ */ S("th", {
593
+ /* @__PURE__ */ w("th", {
582
594
  className: "px-4 py-3 text-left font-medium text-text-secondary",
583
595
  children: "Actor"
584
596
  }),
585
- /* @__PURE__ */ S("th", {
597
+ /* @__PURE__ */ w("th", {
586
598
  className: "px-4 py-3 text-left font-medium text-text-secondary",
587
599
  children: "Reason"
588
600
  }),
589
- /* @__PURE__ */ S("th", {
601
+ /* @__PURE__ */ w("th", {
590
602
  className: "px-4 py-3 text-left font-medium text-text-secondary",
591
603
  children: "Started At"
592
604
  })
593
605
  ] })
594
- }), /* @__PURE__ */ C("tbody", { children: [Q.map((e) => /* @__PURE__ */ C("tr", {
606
+ }), /* @__PURE__ */ T("tbody", { children: [Q.map((e) => /* @__PURE__ */ T("tr", {
595
607
  className: "border-t border-border-subtle",
596
608
  children: [
597
- /* @__PURE__ */ S("td", {
609
+ /* @__PURE__ */ w("td", {
598
610
  className: "px-4 py-3 font-mono text-text-primary",
599
611
  children: e.targetUserId
600
612
  }),
601
- /* @__PURE__ */ C("td", {
613
+ /* @__PURE__ */ T("td", {
602
614
  className: "px-4 py-3 text-text-secondary",
603
615
  children: [
604
616
  e.actorId,
@@ -607,16 +619,16 @@ var A = () => {
607
619
  ")"
608
620
  ]
609
621
  }),
610
- /* @__PURE__ */ S("td", {
622
+ /* @__PURE__ */ w("td", {
611
623
  className: "px-4 py-3 text-text-secondary",
612
624
  children: e.reason ?? "—"
613
625
  }),
614
- /* @__PURE__ */ S("td", {
626
+ /* @__PURE__ */ w("td", {
615
627
  className: "px-4 py-3 text-text-secondary",
616
628
  children: new Date(e.startedAt).toLocaleString()
617
629
  })
618
630
  ]
619
- }, e.id)), Q.length === 0 && /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
631
+ }, e.id)), Q.length === 0 && /* @__PURE__ */ w("tr", { children: /* @__PURE__ */ w("td", {
620
632
  colSpan: 4,
621
633
  className: "px-4 py-3 text-center text-text-secondary",
622
634
  children: "No impersonation sessions recorded."
@@ -625,29 +637,29 @@ var A = () => {
625
637
  })
626
638
  ]
627
639
  }),
628
- /* @__PURE__ */ C("section", { children: [/* @__PURE__ */ C("h2", {
640
+ /* @__PURE__ */ T("section", { children: [/* @__PURE__ */ T("h2", {
629
641
  className: "mb-4 flex items-center gap-2 text-lg font-semibold text-text-primary",
630
- children: [/* @__PURE__ */ S(p, { className: "h-5 w-5" }), "Maintenance"]
631
- }), /* @__PURE__ */ C(w, {
642
+ children: [/* @__PURE__ */ w(g, { className: "h-5 w-5" }), "Maintenance"]
643
+ }), /* @__PURE__ */ T(E, {
632
644
  className: "flex flex-wrap items-center gap-4 p-4",
633
- children: [/* @__PURE__ */ C("button", {
645
+ children: [/* @__PURE__ */ T("button", {
634
646
  type: "button",
635
- onClick: Ie,
636
- disabled: be,
647
+ onClick: He,
648
+ disabled: Ee,
637
649
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
638
- children: [/* @__PURE__ */ S(p, { className: "h-4 w-4" }), "Reprocess Timeline"]
639
- }), /* @__PURE__ */ C("button", {
650
+ children: [/* @__PURE__ */ w(g, { className: "h-4 w-4" }), "Reprocess Timeline"]
651
+ }), /* @__PURE__ */ T("button", {
640
652
  type: "button",
641
- onClick: Le,
642
- disabled: Se,
653
+ onClick: Ue,
654
+ disabled: Oe,
643
655
  className: "inline-flex items-center gap-2 rounded-md bg-status-error-bg px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/90 disabled:opacity-50",
644
- children: [/* @__PURE__ */ S(m, { className: "h-4 w-4" }), "Reset Demo Data"]
656
+ children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Reset Demo Data"]
645
657
  })]
646
658
  })] })
647
659
  ]
648
660
  });
649
- }, j = () => /* @__PURE__ */ S(c, { children: /* @__PURE__ */ S(A, {}) });
661
+ }, P = () => /* @__PURE__ */ w(l, { children: /* @__PURE__ */ w(N, {}) });
650
662
  //#endregion
651
- export { j as AdminPage };
663
+ export { P as AdminPage };
652
664
 
653
665
  //# sourceMappingURL=AdminPage.js.map