@burdenoff/microfe-organization 2026.513.2 → 2026.517.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.d.ts +50 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +90 -70
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.d.ts.map +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.js +1 -1
- package/dist/organization-management/AdminOrganizationRoutes.js.map +1 -1
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.d.ts +32 -0
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.d.ts.map +1 -1
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.js +64 -42
- package/dist/organization-management/modules/organizations/hooks/useOrganizations.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.d.ts +18 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.d.ts.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +205 -200
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,199 +1,199 @@
|
|
|
1
1
|
import { useOrgConsole as e } from "../../../providers/OrgConsoleProvider.js";
|
|
2
2
|
import { toast as t } from "../../../../node_modules/sonner/dist/index.js";
|
|
3
|
-
import { useDeleteOrganization as n,
|
|
4
|
-
import { OrganizationStatusBadge as
|
|
5
|
-
import { useTr as
|
|
6
|
-
import { SearchInput as
|
|
7
|
-
import { SelectionCheckbox as
|
|
8
|
-
import { LoadingState as
|
|
9
|
-
import { ErrorState as
|
|
10
|
-
import { EmptyState as
|
|
11
|
-
import { useDebouncedValue as
|
|
3
|
+
import { useDeleteOrganization as n, useMyOrganizations as r, useOrganizations as i } from "../hooks/useOrganizations.js";
|
|
4
|
+
import { OrganizationStatusBadge as a } from "../components/OrganizationStatusBadge.js";
|
|
5
|
+
import { useTr as ee } from "../../../shared/hooks/useTr.js";
|
|
6
|
+
import { SearchInput as te } from "../../../shared/components/input/SearchInput.js";
|
|
7
|
+
import { SelectionCheckbox as o } from "../../../shared/components/input/SelectionCheckbox.js";
|
|
8
|
+
import { LoadingState as s } from "../../../shared/components/feedback/LoadingState.js";
|
|
9
|
+
import { ErrorState as ne } from "../../../shared/components/feedback/ErrorState.js";
|
|
10
|
+
import { EmptyState as c } from "../../../shared/components/feedback/EmptyState.js";
|
|
11
|
+
import { useDebouncedValue as re } from "../../../shared/hooks/useDebouncedValue.js";
|
|
12
12
|
import { useConfirmDialog as l } from "../../../shared/components/dialog/ConfirmDialog.js";
|
|
13
13
|
import { PERMISSIONS as u } from "../../../constants/permissions.js";
|
|
14
14
|
import { useOrganizationPageView as d } from "../../../hooks/useOrganizationPageView.js";
|
|
15
|
-
import { isNative as f, nativeConfirm as
|
|
16
|
-
import { useEffect as
|
|
17
|
-
import { Building2 as
|
|
18
|
-
import { useFeatureFlagDetails as
|
|
19
|
-
import { usePermissions as
|
|
20
|
-
import { Fragment as
|
|
15
|
+
import { isNative as f, nativeConfirm as ie, nativeImpact as ae, nativeNotify as p, nativeToast as m } from "../../../../utils/nativeBridge.js";
|
|
16
|
+
import { useEffect as h, useMemo as g, useState as _ } from "react";
|
|
17
|
+
import { Building2 as v, Eye as y, Plus as b, RefreshCw as oe, SquarePen as x, Trash2 as S } from "lucide-react";
|
|
18
|
+
import { useFeatureFlagDetails as se } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
19
|
+
import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
20
|
+
import { Fragment as le, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
21
21
|
//#region src/organization-management/modules/organizations/pages/OrganizationsListPage.tsx
|
|
22
|
-
function
|
|
22
|
+
function T(e) {
|
|
23
23
|
return new Date(e).toLocaleDateString();
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function E({ mode: E = "my" } = {}) {
|
|
26
26
|
d("organizations.list");
|
|
27
|
-
let
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
let t = new Set(
|
|
27
|
+
let D = ee(), { navigate: O, basePath: k = "/organizations" } = e(), { hasPermission: A, isLoading: ue } = ce(), j = se("organization.create"), M = j ? !!j.value : !0, [N, P] = _(""), F = re(N, 300), [I, L] = _(/* @__PURE__ */ new Set()), { openConfirmDialog: R, ConfirmDialog: z } = l(), B = r(200, 0, E === "my"), V = i(void 0, 200, 0, E === "admin"), { organizations: H, loading: de, error: U, refetch: W } = E === "admin" ? V : B, fe = F.trim().length > 0, G = g(() => {
|
|
28
|
+
let e = F.trim().toLowerCase();
|
|
29
|
+
return e ? H.filter((t) => t.name?.toLowerCase().includes(e) || t.slug?.toLowerCase().includes(e)) : H;
|
|
30
|
+
}, [H, F]), { deleteOrganization: pe, loading: K } = n();
|
|
31
|
+
h(() => {
|
|
32
|
+
L((e) => {
|
|
33
|
+
let t = new Set(G.map((e) => e.id)), n = new Set([...e].filter((e) => t.has(e)));
|
|
34
34
|
return n.size === e.size ? e : n;
|
|
35
35
|
});
|
|
36
|
-
}, [
|
|
37
|
-
let q =
|
|
36
|
+
}, [G]);
|
|
37
|
+
let q = g(() => G.filter((e) => I.has(e.id)), [G, I]), J = G.length > 0 && G.every((e) => I.has(e.id)), Y = G.some((e) => I.has(e.id)) && !J, X = async (e) => {
|
|
38
38
|
try {
|
|
39
39
|
let n = (await Promise.allSettled(e.map(async (e) => {
|
|
40
|
-
let t = await
|
|
40
|
+
let t = await pe(e);
|
|
41
41
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to delete organization");
|
|
42
42
|
}))).find((e) => e.status === "rejected");
|
|
43
43
|
if (n?.status === "rejected") throw n.reason;
|
|
44
|
-
|
|
45
|
-
let r = e.length === 1 ?
|
|
44
|
+
L(/* @__PURE__ */ new Set()), await W();
|
|
45
|
+
let r = e.length === 1 ? D("organizations.delete.successSingle", "Organization deleted successfully") : `${e.length} ${D("organizations.delete.successMany", "organizations deleted successfully")}`;
|
|
46
46
|
t.success(r), p("success"), f() && m(r);
|
|
47
47
|
} catch (e) {
|
|
48
|
-
let n = e instanceof Error ? e.message :
|
|
48
|
+
let n = e instanceof Error ? e.message : D("organizations.delete.failed", "Failed to delete organization");
|
|
49
49
|
t.error(n), p("error"), f() && m(n);
|
|
50
50
|
}
|
|
51
51
|
}, Z = (e, t) => {
|
|
52
|
-
|
|
53
|
-
let n =
|
|
54
|
-
|
|
52
|
+
ae("medium");
|
|
53
|
+
let n = D("organizations.delete.title", "Delete organization"), r = `${D("organizations.delete.confirmPrefix", "Delete")} ${t}? ${D("common.cannotBeUndone", "This action cannot be undone.")}`;
|
|
54
|
+
ie({
|
|
55
55
|
title: n,
|
|
56
56
|
message: r,
|
|
57
|
-
okButtonTitle:
|
|
57
|
+
okButtonTitle: D("common.delete", "Delete")
|
|
58
58
|
}).then((t) => {
|
|
59
|
-
t === null ?
|
|
59
|
+
t === null ? R({
|
|
60
60
|
title: n,
|
|
61
61
|
description: r,
|
|
62
|
-
confirmText:
|
|
62
|
+
confirmText: D("common.delete", "Delete"),
|
|
63
63
|
variant: "danger",
|
|
64
64
|
onConfirm: () => {
|
|
65
65
|
X([e]);
|
|
66
66
|
}
|
|
67
67
|
}) : t && X([e]);
|
|
68
68
|
});
|
|
69
|
-
},
|
|
70
|
-
q.length !== 0 &&
|
|
71
|
-
title:
|
|
72
|
-
description: `${
|
|
73
|
-
confirmText: `${
|
|
69
|
+
}, me = () => {
|
|
70
|
+
q.length !== 0 && R({
|
|
71
|
+
title: D("organizations.delete.bulkTitle", "Delete selected organizations"),
|
|
72
|
+
description: `${D("organizations.delete.bulkPrefix", "Delete")} ${q.length} ${D(q.length === 1 ? "organizations.delete.bulkSuffixSingle" : "organizations.delete.bulkSuffixMany", q.length === 1 ? "selected organization?" : "selected organizations?")} ${D("common.cannotBeUndone", "This action cannot be undone.")}`,
|
|
73
|
+
confirmText: `${D("common.delete", "Delete")} ${q.length}`,
|
|
74
74
|
variant: "danger",
|
|
75
75
|
onConfirm: () => {
|
|
76
76
|
X(q.map((e) => e.id));
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
}, Q = (e, t) => {
|
|
80
|
-
|
|
80
|
+
L((n) => {
|
|
81
81
|
let r = new Set(n);
|
|
82
82
|
return t ? r.add(e) : r.delete(e), r;
|
|
83
83
|
});
|
|
84
84
|
}, $ = (e) => {
|
|
85
|
-
|
|
85
|
+
L((t) => {
|
|
86
86
|
let n = new Set(t);
|
|
87
|
-
return
|
|
87
|
+
return G.forEach((t) => {
|
|
88
88
|
e ? n.add(t.id) : n.delete(t.id);
|
|
89
89
|
}), n;
|
|
90
90
|
});
|
|
91
91
|
};
|
|
92
|
-
return
|
|
92
|
+
return ue ? /* @__PURE__ */ C("div", {
|
|
93
93
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
-
}) :
|
|
94
|
+
children: /* @__PURE__ */ C(s, { message: D("common.loadingPermissions", "Loading permissions...") })
|
|
95
|
+
}) : de ? /* @__PURE__ */ C("div", {
|
|
96
96
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
-
}) :
|
|
97
|
+
children: /* @__PURE__ */ C(s, { message: D("organizations.list.loading", "Loading organizations...") })
|
|
98
|
+
}) : U ? /* @__PURE__ */ C("div", {
|
|
99
99
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
message:
|
|
100
|
+
children: /* @__PURE__ */ C(ne, {
|
|
101
|
+
message: U.message,
|
|
102
102
|
action: {
|
|
103
|
-
label:
|
|
103
|
+
label: D("common.retry", "Retry"),
|
|
104
104
|
onClick: () => {
|
|
105
|
-
|
|
105
|
+
W();
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
})
|
|
109
|
-
}) : /* @__PURE__ */
|
|
109
|
+
}) : /* @__PURE__ */ w("div", {
|
|
110
110
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-300",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ w("div", {
|
|
112
112
|
className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
|
|
113
113
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ w("div", {
|
|
115
115
|
className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ w("div", {
|
|
117
117
|
className: "space-y-2",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ C("h1", {
|
|
119
119
|
className: "text-3xl font-bold text-[var(--color-text-primary)]",
|
|
120
|
-
children:
|
|
121
|
-
}), /* @__PURE__ */
|
|
120
|
+
children: D("organizations.list.title", "Organizations")
|
|
121
|
+
}), /* @__PURE__ */ C("p", {
|
|
122
122
|
className: "max-w-2xl text-[var(--color-text-secondary)]",
|
|
123
|
-
children:
|
|
123
|
+
children: D("organizations.list.subtitle", "Manage tenant organizations and the workspaces that belong to them.")
|
|
124
124
|
})]
|
|
125
|
-
}),
|
|
126
|
-
onClick: () =>
|
|
125
|
+
}), M && A(u.ORG_CREATE) && /* @__PURE__ */ w("button", {
|
|
126
|
+
onClick: () => O(`${k}/new`),
|
|
127
127
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2.5 text-[var(--color-action-primary-text)] transition-all duration-200 hover:opacity-90 active:scale-[0.98]",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
128
|
+
children: [/* @__PURE__ */ C(b, {
|
|
129
129
|
size: 18,
|
|
130
130
|
"aria-hidden": "true"
|
|
131
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ C("span", {
|
|
132
132
|
className: "font-medium",
|
|
133
|
-
children:
|
|
133
|
+
children: D("organizations.create.button", "Create Organization")
|
|
134
134
|
})]
|
|
135
135
|
})]
|
|
136
136
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ w("div", {
|
|
138
138
|
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)]",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ w("div", {
|
|
140
140
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
142
|
-
value:
|
|
143
|
-
onChange:
|
|
144
|
-
placeholder:
|
|
145
|
-
label:
|
|
141
|
+
children: [/* @__PURE__ */ C(te, {
|
|
142
|
+
value: N,
|
|
143
|
+
onChange: P,
|
|
144
|
+
placeholder: D("organizations.list.searchPlaceholder", "Search organizations..."),
|
|
145
|
+
label: D("organizations.list.searchLabel", "Search organizations"),
|
|
146
146
|
inputId: "organizations-search",
|
|
147
147
|
className: "flex-1"
|
|
148
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ C("button", {
|
|
149
149
|
onClick: () => {
|
|
150
|
-
|
|
150
|
+
W();
|
|
151
151
|
},
|
|
152
152
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] px-4 py-2 text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)] active:scale-95",
|
|
153
|
-
"aria-label":
|
|
154
|
-
title:
|
|
155
|
-
children: /* @__PURE__ */
|
|
153
|
+
"aria-label": D("organizations.list.refresh", "Refresh organizations"),
|
|
154
|
+
title: D("organizations.list.refresh", "Refresh organizations"),
|
|
155
|
+
children: /* @__PURE__ */ C(oe, {
|
|
156
156
|
size: 18,
|
|
157
157
|
"aria-hidden": "true"
|
|
158
158
|
})
|
|
159
159
|
})]
|
|
160
|
-
}),
|
|
160
|
+
}), G.length > 0 ? /* @__PURE__ */ w("div", {
|
|
161
161
|
className: "mt-4 flex flex-col gap-3 rounded-lg border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-4 sm:flex-row sm:items-center sm:justify-between",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ w("div", {
|
|
163
163
|
className: "flex flex-wrap items-center gap-3",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ w("label", {
|
|
165
165
|
className: "flex items-center gap-2 text-sm text-[var(--color-text-primary)]",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ C(o, {
|
|
167
167
|
checked: J,
|
|
168
168
|
indeterminate: Y,
|
|
169
169
|
onChange: $,
|
|
170
|
-
ariaLabel:
|
|
171
|
-
}), /* @__PURE__ */
|
|
172
|
-
}),
|
|
173
|
-
onClick: () =>
|
|
170
|
+
ariaLabel: D("organizations.list.selectAll", "Select all organizations")
|
|
171
|
+
}), /* @__PURE__ */ C("span", { children: D("common.selectAllVisible", "Select all visible") })]
|
|
172
|
+
}), I.size > 0 ? /* @__PURE__ */ C("button", {
|
|
173
|
+
onClick: () => L(/* @__PURE__ */ new Set()),
|
|
174
174
|
className: "text-sm text-[var(--color-text-secondary)] transition-colors hover:text-[var(--color-text-primary)]",
|
|
175
|
-
children:
|
|
175
|
+
children: D("common.clearSelection", "Clear selection")
|
|
176
176
|
}) : null]
|
|
177
|
-
}), /* @__PURE__ */
|
|
177
|
+
}), /* @__PURE__ */ w("div", {
|
|
178
178
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ w("span", {
|
|
180
180
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
181
181
|
children: [
|
|
182
|
-
|
|
182
|
+
I.size,
|
|
183
183
|
" ",
|
|
184
|
-
|
|
184
|
+
D("common.selected", "selected")
|
|
185
185
|
]
|
|
186
|
-
}),
|
|
187
|
-
onClick:
|
|
186
|
+
}), A(u.ORG_DELETE) && /* @__PURE__ */ w("button", {
|
|
187
|
+
onClick: me,
|
|
188
188
|
disabled: q.length === 0 || K,
|
|
189
189
|
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg border border-[var(--color-status-error-border)] px-3 py-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
190
190
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ C(S, {
|
|
192
192
|
size: 16,
|
|
193
193
|
"aria-hidden": "true"
|
|
194
194
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
q.length > 0 ? /* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ C("span", { children: D("common.deleteSelected", "Delete Selected") }),
|
|
196
|
+
q.length > 0 ? /* @__PURE__ */ w("span", { children: [
|
|
197
197
|
"(",
|
|
198
198
|
q.length,
|
|
199
199
|
")"
|
|
@@ -203,222 +203,233 @@ function O() {
|
|
|
203
203
|
})]
|
|
204
204
|
}) : null]
|
|
205
205
|
}),
|
|
206
|
-
|
|
206
|
+
G.length === 0 ? /* @__PURE__ */ C("div", {
|
|
207
207
|
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-6 shadow-[var(--shadow-elevation-1)]",
|
|
208
|
-
children: /* @__PURE__ */
|
|
209
|
-
icon: /* @__PURE__ */
|
|
208
|
+
children: fe && H.length > 0 ? /* @__PURE__ */ C(c, {
|
|
209
|
+
icon: /* @__PURE__ */ C(v, {
|
|
210
210
|
size: 40,
|
|
211
211
|
"aria-hidden": "true"
|
|
212
212
|
}),
|
|
213
|
-
title:
|
|
214
|
-
description:
|
|
215
|
-
action:
|
|
216
|
-
label:
|
|
217
|
-
onClick: () =>
|
|
213
|
+
title: D("organizations.list.noMatchesTitle", "No matching organizations"),
|
|
214
|
+
description: D("organizations.list.noMatchesDescription", "No organizations match your search. Try a different name or slug, or clear the search."),
|
|
215
|
+
action: {
|
|
216
|
+
label: D("common.clearSearch", "Clear search"),
|
|
217
|
+
onClick: () => P("")
|
|
218
|
+
}
|
|
219
|
+
}) : /* @__PURE__ */ C(c, {
|
|
220
|
+
icon: /* @__PURE__ */ C(v, {
|
|
221
|
+
size: 40,
|
|
222
|
+
"aria-hidden": "true"
|
|
223
|
+
}),
|
|
224
|
+
title: D("organizations.list.emptyTitle", "No organizations found"),
|
|
225
|
+
description: D("organizations.list.emptyDescription", "Create your first organization to start managing workspaces, members, and invites."),
|
|
226
|
+
action: M && A(u.ORG_CREATE) ? {
|
|
227
|
+
label: D("organizations.create.button", "Create Organization"),
|
|
228
|
+
onClick: () => O(`${k}/new`)
|
|
218
229
|
} : void 0
|
|
219
230
|
})
|
|
220
|
-
}) : /* @__PURE__ */
|
|
231
|
+
}) : /* @__PURE__ */ w(le, { children: [/* @__PURE__ */ C("div", {
|
|
221
232
|
className: "grid gap-4 md:hidden",
|
|
222
|
-
children:
|
|
233
|
+
children: G.map((e) => /* @__PURE__ */ w("article", {
|
|
223
234
|
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-4 shadow-[var(--shadow-elevation-1)]",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ w("div", {
|
|
225
236
|
className: "flex items-start gap-3",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
227
|
-
checked:
|
|
237
|
+
children: [/* @__PURE__ */ C(o, {
|
|
238
|
+
checked: I.has(e.id),
|
|
228
239
|
onChange: (t) => Q(e.id, t),
|
|
229
|
-
ariaLabel: `${
|
|
230
|
-
}), /* @__PURE__ */
|
|
240
|
+
ariaLabel: `${D("organizations.list.selectOne", "Select organization")} ${e.name}`
|
|
241
|
+
}), /* @__PURE__ */ w("div", {
|
|
231
242
|
className: "flex min-w-0 flex-1 gap-3",
|
|
232
|
-
children: [e.logo ? /* @__PURE__ */
|
|
243
|
+
children: [e.logo ? /* @__PURE__ */ C("img", {
|
|
233
244
|
src: e.logo,
|
|
234
|
-
alt: `${e.name} ${
|
|
245
|
+
alt: `${e.name} ${D("common.logo", "logo")}`,
|
|
235
246
|
className: "h-12 w-12 rounded-lg object-cover"
|
|
236
|
-
}) : /* @__PURE__ */
|
|
247
|
+
}) : /* @__PURE__ */ C("div", {
|
|
237
248
|
className: "flex h-12 w-12 items-center justify-center rounded-lg bg-[var(--color-action-primary-bg)]/12 text-base font-semibold text-[var(--color-action-primary-bg)]",
|
|
238
249
|
children: e.name[0]
|
|
239
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ w("div", {
|
|
240
251
|
className: "min-w-0 flex-1",
|
|
241
252
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ w("div", {
|
|
243
254
|
className: "flex flex-wrap items-start gap-2",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
245
256
|
className: "text-base font-semibold text-[var(--color-text-primary)]",
|
|
246
257
|
children: e.name
|
|
247
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ C(a, { status: e.status })]
|
|
248
259
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ w("p", {
|
|
250
261
|
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-muted)]",
|
|
251
262
|
children: ["/", e.slug]
|
|
252
263
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ w("dl", {
|
|
254
265
|
className: "mt-3 grid grid-cols-2 gap-3 text-sm",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
266
|
+
children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
256
267
|
className: "text-[var(--color-text-secondary)]",
|
|
257
|
-
children:
|
|
258
|
-
}), /* @__PURE__ */
|
|
268
|
+
children: D("organizations.list.column.workspaces", "Workspaces")
|
|
269
|
+
}), /* @__PURE__ */ C("dd", {
|
|
259
270
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
260
271
|
children: e.workspaceCount ?? 0
|
|
261
|
-
})] }), /* @__PURE__ */
|
|
272
|
+
})] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
|
|
262
273
|
className: "text-[var(--color-text-secondary)]",
|
|
263
|
-
children:
|
|
264
|
-
}), /* @__PURE__ */
|
|
274
|
+
children: D("common.created", "Created")
|
|
275
|
+
}), /* @__PURE__ */ C("dd", {
|
|
265
276
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
266
|
-
children:
|
|
277
|
+
children: T(e.createdAt)
|
|
267
278
|
})] })]
|
|
268
279
|
})
|
|
269
280
|
]
|
|
270
281
|
})]
|
|
271
282
|
})]
|
|
272
|
-
}), /* @__PURE__ */
|
|
283
|
+
}), /* @__PURE__ */ w("div", {
|
|
273
284
|
className: "mt-4 flex flex-wrap gap-2 border-t border-[var(--color-border-default)] pt-4",
|
|
274
285
|
children: [
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
onClick: () =>
|
|
286
|
+
/* @__PURE__ */ w("button", {
|
|
287
|
+
onClick: () => O(`${k}/${e.id}`),
|
|
277
288
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-border-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ C(y, {
|
|
279
290
|
size: 16,
|
|
280
291
|
"aria-hidden": "true"
|
|
281
|
-
}),
|
|
292
|
+
}), D("common.view", "View")]
|
|
282
293
|
}),
|
|
283
|
-
|
|
284
|
-
onClick: () =>
|
|
294
|
+
A(u.ORG_UPDATE) && /* @__PURE__ */ w("button", {
|
|
295
|
+
onClick: () => O(`${k}/${e.id}/edit`),
|
|
285
296
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-border-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] transition-all duration-200 hover:bg-[var(--color-bg-subtle)]",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ C(x, {
|
|
287
298
|
size: 16,
|
|
288
299
|
"aria-hidden": "true"
|
|
289
|
-
}),
|
|
300
|
+
}), D("common.edit", "Edit")]
|
|
290
301
|
}),
|
|
291
|
-
|
|
302
|
+
A(u.ORG_DELETE) && /* @__PURE__ */ w("button", {
|
|
292
303
|
onClick: () => Z(e.id, e.name),
|
|
293
304
|
disabled: K,
|
|
294
305
|
className: "inline-flex min-h-10 items-center gap-2 rounded-lg border border-[var(--color-status-error-border)] px-3 py-2 text-sm text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ C(S, {
|
|
296
307
|
size: 16,
|
|
297
308
|
"aria-hidden": "true"
|
|
298
|
-
}),
|
|
309
|
+
}), D("common.delete", "Delete")]
|
|
299
310
|
})
|
|
300
311
|
]
|
|
301
312
|
})]
|
|
302
313
|
}, e.id))
|
|
303
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ C("div", {
|
|
304
315
|
className: "hidden overflow-hidden rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] shadow-[var(--shadow-elevation-1)] md:block",
|
|
305
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ C("div", {
|
|
306
317
|
className: "overflow-x-auto",
|
|
307
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ w("table", {
|
|
308
319
|
className: "min-w-full",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ C("thead", {
|
|
310
321
|
className: "bg-[var(--color-bg-subtle)]",
|
|
311
|
-
children: /* @__PURE__ */
|
|
312
|
-
/* @__PURE__ */
|
|
322
|
+
children: /* @__PURE__ */ w("tr", { children: [
|
|
323
|
+
/* @__PURE__ */ C("th", {
|
|
313
324
|
className: "w-12 px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
314
|
-
children: /* @__PURE__ */
|
|
325
|
+
children: /* @__PURE__ */ C(o, {
|
|
315
326
|
checked: J,
|
|
316
327
|
indeterminate: Y,
|
|
317
328
|
onChange: $,
|
|
318
|
-
ariaLabel:
|
|
329
|
+
ariaLabel: D("organizations.list.selectAll", "Select all organizations")
|
|
319
330
|
})
|
|
320
331
|
}),
|
|
321
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ C("th", {
|
|
322
333
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
323
|
-
children:
|
|
334
|
+
children: D("organizations.list.column.organization", "Organization")
|
|
324
335
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ C("th", {
|
|
326
337
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
327
|
-
children:
|
|
338
|
+
children: D("common.status", "Status")
|
|
328
339
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ C("th", {
|
|
330
341
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
331
|
-
children:
|
|
342
|
+
children: D("organizations.list.column.workspaces", "Workspaces")
|
|
332
343
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
344
|
+
/* @__PURE__ */ C("th", {
|
|
334
345
|
className: "px-6 py-3 text-left text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
335
|
-
children:
|
|
346
|
+
children: D("common.created", "Created")
|
|
336
347
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ C("th", {
|
|
338
349
|
className: "px-6 py-3 text-right text-xs font-semibold uppercase tracking-wide text-[var(--color-text-secondary)]",
|
|
339
|
-
children:
|
|
350
|
+
children: D("common.actions", "Actions")
|
|
340
351
|
})
|
|
341
352
|
] })
|
|
342
|
-
}), /* @__PURE__ */
|
|
353
|
+
}), /* @__PURE__ */ C("tbody", {
|
|
343
354
|
className: "divide-y divide-[var(--color-border-default)]",
|
|
344
|
-
children:
|
|
355
|
+
children: G.map((e) => /* @__PURE__ */ w("tr", {
|
|
345
356
|
className: "transition-colors hover:bg-[var(--color-bg-subtle)]",
|
|
346
357
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ C("td", {
|
|
348
359
|
className: "px-6 py-4 align-top",
|
|
349
|
-
children: /* @__PURE__ */
|
|
350
|
-
checked:
|
|
360
|
+
children: /* @__PURE__ */ C(o, {
|
|
361
|
+
checked: I.has(e.id),
|
|
351
362
|
onChange: (t) => Q(e.id, t),
|
|
352
|
-
ariaLabel: `${
|
|
363
|
+
ariaLabel: `${D("organizations.list.selectOne", "Select organization")} ${e.name}`
|
|
353
364
|
})
|
|
354
365
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ C("td", {
|
|
356
367
|
className: "px-6 py-4",
|
|
357
|
-
children: /* @__PURE__ */
|
|
368
|
+
children: /* @__PURE__ */ w("div", {
|
|
358
369
|
className: "flex items-start gap-3",
|
|
359
|
-
children: [e.logo ? /* @__PURE__ */
|
|
370
|
+
children: [e.logo ? /* @__PURE__ */ C("img", {
|
|
360
371
|
src: e.logo,
|
|
361
|
-
alt: `${e.name} ${
|
|
372
|
+
alt: `${e.name} ${D("common.logo", "logo")}`,
|
|
362
373
|
className: "h-10 w-10 rounded-lg object-cover"
|
|
363
|
-
}) : /* @__PURE__ */
|
|
374
|
+
}) : /* @__PURE__ */ C("div", {
|
|
364
375
|
className: "flex h-10 w-10 items-center justify-center rounded-lg bg-[var(--color-action-primary-bg)]/12 font-semibold text-[var(--color-action-primary-bg)]",
|
|
365
376
|
children: e.name[0]
|
|
366
|
-
}), /* @__PURE__ */
|
|
377
|
+
}), /* @__PURE__ */ w("div", {
|
|
367
378
|
className: "min-w-0",
|
|
368
|
-
children: [/* @__PURE__ */
|
|
379
|
+
children: [/* @__PURE__ */ C("p", {
|
|
369
380
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
370
381
|
children: e.name
|
|
371
|
-
}), /* @__PURE__ */
|
|
382
|
+
}), /* @__PURE__ */ w("p", {
|
|
372
383
|
className: "break-all font-mono text-sm text-[var(--color-text-muted)]",
|
|
373
384
|
children: ["/", e.slug]
|
|
374
385
|
})]
|
|
375
386
|
})]
|
|
376
387
|
})
|
|
377
388
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ C("td", {
|
|
379
390
|
className: "px-6 py-4 align-top",
|
|
380
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ C(a, { status: e.status })
|
|
381
392
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ C("td", {
|
|
383
394
|
className: "px-6 py-4 align-top text-[var(--color-text-primary)]",
|
|
384
395
|
children: e.workspaceCount ?? 0
|
|
385
396
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ C("td", {
|
|
387
398
|
className: "px-6 py-4 align-top text-sm text-[var(--color-text-secondary)]",
|
|
388
|
-
children:
|
|
399
|
+
children: T(e.createdAt)
|
|
389
400
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ C("td", {
|
|
391
402
|
className: "px-6 py-4 align-top",
|
|
392
|
-
children: /* @__PURE__ */
|
|
403
|
+
children: /* @__PURE__ */ w("div", {
|
|
393
404
|
className: "flex items-center justify-end gap-2",
|
|
394
405
|
children: [
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
onClick: () =>
|
|
406
|
+
/* @__PURE__ */ C("button", {
|
|
407
|
+
onClick: () => O(`${k}/${e.id}`),
|
|
397
408
|
className: "rounded-lg p-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]",
|
|
398
|
-
title: `${
|
|
399
|
-
"aria-label": `${
|
|
400
|
-
children: /* @__PURE__ */
|
|
409
|
+
title: `${D("common.view", "View")} ${e.name}`,
|
|
410
|
+
"aria-label": `${D("common.view", "View")} ${e.name}`,
|
|
411
|
+
children: /* @__PURE__ */ C(y, {
|
|
401
412
|
size: 18,
|
|
402
413
|
"aria-hidden": "true"
|
|
403
414
|
})
|
|
404
415
|
}),
|
|
405
|
-
|
|
406
|
-
onClick: () =>
|
|
416
|
+
A(u.ORG_UPDATE) && /* @__PURE__ */ C("button", {
|
|
417
|
+
onClick: () => O(`${k}/${e.id}/edit`),
|
|
407
418
|
className: "rounded-lg p-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:bg-[var(--color-bg-muted)] hover:text-[var(--color-text-primary)]",
|
|
408
|
-
title: `${
|
|
409
|
-
"aria-label": `${
|
|
410
|
-
children: /* @__PURE__ */
|
|
419
|
+
title: `${D("common.edit", "Edit")} ${e.name}`,
|
|
420
|
+
"aria-label": `${D("common.edit", "Edit")} ${e.name}`,
|
|
421
|
+
children: /* @__PURE__ */ C(x, {
|
|
411
422
|
size: 18,
|
|
412
423
|
"aria-hidden": "true"
|
|
413
424
|
})
|
|
414
425
|
}),
|
|
415
|
-
|
|
426
|
+
A(u.ORG_DELETE) && /* @__PURE__ */ C("button", {
|
|
416
427
|
onClick: () => Z(e.id, e.name),
|
|
417
428
|
disabled: K,
|
|
418
429
|
className: "rounded-lg p-2 text-[var(--color-status-error-text)] transition-all duration-200 hover:bg-[var(--color-status-error-bgSubtle)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
419
|
-
title: `${
|
|
420
|
-
"aria-label": `${
|
|
421
|
-
children: /* @__PURE__ */
|
|
430
|
+
title: `${D("common.delete", "Delete")} ${e.name}`,
|
|
431
|
+
"aria-label": `${D("common.delete", "Delete")} ${e.name}`,
|
|
432
|
+
children: /* @__PURE__ */ C(S, {
|
|
422
433
|
size: 18,
|
|
423
434
|
"aria-hidden": "true"
|
|
424
435
|
})
|
|
@@ -433,16 +444,10 @@ function O() {
|
|
|
433
444
|
})
|
|
434
445
|
})] })
|
|
435
446
|
]
|
|
436
|
-
}),
|
|
437
|
-
}) : /* @__PURE__ */ T("div", {
|
|
438
|
-
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
439
|
-
children: /* @__PURE__ */ T("div", {
|
|
440
|
-
className: "p-8 text-center text-[var(--color-text-secondary)]",
|
|
441
|
-
children: O("organizations.list.noPermission", "You don't have permission to view organizations.")
|
|
442
|
-
})
|
|
447
|
+
}), z]
|
|
443
448
|
});
|
|
444
449
|
}
|
|
445
450
|
//#endregion
|
|
446
|
-
export {
|
|
451
|
+
export { E as OrganizationsListPage };
|
|
447
452
|
|
|
448
453
|
//# sourceMappingURL=OrganizationsListPage.js.map
|