@burdenoff/microfe-organization 2026.625.2 → 2026.626.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/organization-management/modules/members/components/InviteStatusBadge.js +6 -2
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js +58 -53
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +56 -52
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js +72 -68
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MembersListPage.js +232 -225
- package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +172 -182
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js +132 -128
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js +5 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js +42 -37
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +316 -266
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js +52 -47
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +108 -96
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js +5 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +43 -38
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +341 -286
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js +50 -45
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +219 -209
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/package.json +2 -2
- package/dist/organization-management/shared/components/feedback/EmptyState.js +0 -31
- package/dist/organization-management/shared/components/feedback/EmptyState.js.map +0 -1
|
@@ -3,23 +3,22 @@ import { toast as t } from "../../../../node_modules/sonner/dist/index.js";
|
|
|
3
3
|
import { useTr as n } from "../../../shared/hooks/useTr.js";
|
|
4
4
|
import { LoadingState as r } from "../../../shared/components/feedback/LoadingState.js";
|
|
5
5
|
import { ErrorState as i } from "../../../shared/components/feedback/ErrorState.js";
|
|
6
|
-
import { EmptyState as ee } from "../../../shared/components/feedback/EmptyState.js";
|
|
7
6
|
import { useConfirmDialog as a } from "../../../shared/components/dialog/ConfirmDialog.js";
|
|
8
7
|
import { PERMISSIONS as o } from "../../../constants/permissions.js";
|
|
9
8
|
import { MemberRoleBadge as s } from "../../members/components/MemberRoleBadge.js";
|
|
10
|
-
import { useWorkspace as
|
|
11
|
-
import { WorkspaceStatusBadge as
|
|
12
|
-
import { useRemoveWorkspaceMember as
|
|
13
|
-
import { AddWorkspaceMemberDialog as
|
|
14
|
-
import { useMemo as
|
|
15
|
-
import { ArrowLeft as
|
|
16
|
-
import { CTAOverflowMenu as b, EmphasisPanel as x, GlassCard as S,
|
|
17
|
-
import { usePermissions as
|
|
18
|
-
import { jsx as
|
|
19
|
-
import { useParams as
|
|
20
|
-
import { ActorIdentity as
|
|
9
|
+
import { useWorkspace as ee } from "../hooks/useWorkspaces.js";
|
|
10
|
+
import { WorkspaceStatusBadge as c } from "../components/WorkspaceStatusBadge.js";
|
|
11
|
+
import { useRemoveWorkspaceMember as l, useWorkspaceMembers as u } from "../hooks/useWorkspaceMembers.js";
|
|
12
|
+
import { AddWorkspaceMemberDialog as d } from "../components/AddWorkspaceMemberDialog.js";
|
|
13
|
+
import { useMemo as f, useState as p } from "react";
|
|
14
|
+
import { ArrowLeft as m, Briefcase as h, Edit as g, Trash2 as _, UserPlus as v, Users as y } from "lucide-react";
|
|
15
|
+
import { CTAOverflowMenu as b, EmphasisPanel as x, GlassCard as S, IllustratedEmptyState as C, NextSteps as w, PagePurpose as T, ResponsiveTable as E } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { usePermissions as te } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
17
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
18
|
+
import { useParams as ne } from "react-router-dom";
|
|
19
|
+
import { ActorIdentity as re, buildActorFallback as k, useActorProfiles as A } from "@burdenoff/fe-libs/shared";
|
|
21
20
|
//#region src/organization-management/modules/workspaces/pages/WorkspaceDetailPage.tsx
|
|
22
|
-
function
|
|
21
|
+
function j(e) {
|
|
23
22
|
return new Date(e).toLocaleDateString("en-US", {
|
|
24
23
|
year: "numeric",
|
|
25
24
|
month: "long",
|
|
@@ -28,46 +27,46 @@ function A(e) {
|
|
|
28
27
|
minute: "2-digit"
|
|
29
28
|
});
|
|
30
29
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
30
|
+
function M() {
|
|
31
|
+
let M = n(), { id: N } = ne(), { navigate: P, basePath: F = "/organizations", apiGatewayUrl: I, authToken: L } = e(), { hasPermission: R, isLoading: z } = te(), { workspace: B, loading: V, error: H } = ee(N ?? ""), [U, W] = p("overview"), [G, K] = p(!1), { openConfirmDialog: q, ConfirmDialog: J } = a(), { members: Y, loading: X, error: Z, refetch: Q } = u(U === "members" && N ? N ?? "" : "", 50, 0), { removeWorkspaceMember: ie, loading: ae } = l(), $ = Y.length > 0 || U === "members" ? Y.length : B?.memberCount ?? 0, oe = A(f(() => Y.map((e) => ({
|
|
33
32
|
actorId: e.userId,
|
|
34
33
|
actorType: "user"
|
|
35
|
-
})), [
|
|
36
|
-
apiGatewayUrl:
|
|
37
|
-
authToken:
|
|
38
|
-
orgId:
|
|
39
|
-
workspaceId:
|
|
40
|
-
}),
|
|
34
|
+
})), [Y]), {
|
|
35
|
+
apiGatewayUrl: I,
|
|
36
|
+
authToken: L,
|
|
37
|
+
orgId: B?.organizationId,
|
|
38
|
+
workspaceId: N
|
|
39
|
+
}), se = f(() => [{
|
|
41
40
|
id: "overview",
|
|
42
|
-
label:
|
|
41
|
+
label: M("workspaces.detail.tab.overview", "Overview")
|
|
43
42
|
}, {
|
|
44
43
|
id: "members",
|
|
45
|
-
label: `${
|
|
46
|
-
}], [$,
|
|
47
|
-
|
|
48
|
-
title:
|
|
49
|
-
description: `${
|
|
50
|
-
confirmText:
|
|
44
|
+
label: `${M("workspaces.detail.tab.members", "Members")} (${$})`
|
|
45
|
+
}], [$, M]), ce = (e) => {
|
|
46
|
+
N && q({
|
|
47
|
+
title: M("workspaces.removeMember.title", "Remove workspace member"),
|
|
48
|
+
description: `${M("workspaces.removeMember.prefix", "Remove")} ${e} ${M("workspaces.removeMember.suffix", "from this workspace? They will keep their organization membership.")}`,
|
|
49
|
+
confirmText: M("common.remove", "Remove"),
|
|
51
50
|
variant: "danger",
|
|
52
51
|
onConfirm: () => {
|
|
53
52
|
(async () => {
|
|
54
53
|
try {
|
|
55
|
-
let n = await
|
|
56
|
-
if (n.errors?.length) throw Error(n.errors[0]?.message ??
|
|
57
|
-
await
|
|
54
|
+
let n = await ie(N, e);
|
|
55
|
+
if (n.errors?.length) throw Error(n.errors[0]?.message ?? M("workspaces.removeMember.failed", "Failed to remove workspace member"));
|
|
56
|
+
await Q(), t.success(M("workspaces.removeMember.success", "Workspace member removed successfully"));
|
|
58
57
|
} catch (e) {
|
|
59
|
-
t.error(e instanceof Error ? e.message :
|
|
58
|
+
t.error(e instanceof Error ? e.message : M("workspaces.removeMember.failed", "Failed to remove workspace member"));
|
|
60
59
|
}
|
|
61
60
|
})();
|
|
62
61
|
}
|
|
63
62
|
});
|
|
64
|
-
},
|
|
63
|
+
}, le = [
|
|
65
64
|
{
|
|
66
65
|
key: "user",
|
|
67
|
-
header:
|
|
66
|
+
header: M("members.detail.userId", "User ID"),
|
|
68
67
|
priority: "primary",
|
|
69
|
-
cell: (e) => /* @__PURE__ */
|
|
70
|
-
profile:
|
|
68
|
+
cell: (e) => /* @__PURE__ */ D(re, {
|
|
69
|
+
profile: oe[e.userId] ?? k({
|
|
71
70
|
actorId: e.userId,
|
|
72
71
|
actorType: "user"
|
|
73
72
|
}),
|
|
@@ -76,305 +75,361 @@ function j() {
|
|
|
76
75
|
},
|
|
77
76
|
{
|
|
78
77
|
key: "role",
|
|
79
|
-
header:
|
|
78
|
+
header: M("members.list.column.role", "Role"),
|
|
80
79
|
priority: "secondary",
|
|
81
|
-
cell: (e) => /* @__PURE__ */
|
|
80
|
+
cell: (e) => /* @__PURE__ */ D(s, { role: e.role })
|
|
82
81
|
},
|
|
83
82
|
{
|
|
84
83
|
key: "joined",
|
|
85
|
-
header:
|
|
84
|
+
header: M("members.list.joined", "Joined"),
|
|
86
85
|
priority: "secondary",
|
|
87
|
-
cell: (e) => /* @__PURE__ */
|
|
86
|
+
cell: (e) => /* @__PURE__ */ D("span", {
|
|
88
87
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
89
|
-
children:
|
|
88
|
+
children: j(e.joinedAt)
|
|
90
89
|
})
|
|
91
90
|
},
|
|
92
91
|
{
|
|
93
92
|
key: "invitedBy",
|
|
94
|
-
header:
|
|
93
|
+
header: M("members.list.invitedBy", "Invited by"),
|
|
95
94
|
priority: "secondary",
|
|
96
|
-
cell: (e) => /* @__PURE__ */
|
|
95
|
+
cell: (e) => /* @__PURE__ */ D("span", {
|
|
97
96
|
className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
|
|
98
97
|
children: e.invitedBy || "—"
|
|
99
98
|
})
|
|
100
99
|
}
|
|
101
|
-
]
|
|
102
|
-
|
|
100
|
+
], ue = (e) => /* @__PURE__ */ D("button", {
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: () => ce(e.userId),
|
|
103
|
+
disabled: ae,
|
|
104
|
+
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",
|
|
105
|
+
"aria-label": `${M("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${M("workspaces.removeMember.ariaSuffix", "from workspace")}`,
|
|
106
|
+
title: `${M("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${M("workspaces.removeMember.ariaSuffix", "from workspace")}`,
|
|
107
|
+
children: /* @__PURE__ */ D(_, {
|
|
108
|
+
size: 18,
|
|
109
|
+
"aria-hidden": "true"
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
return z ? /* @__PURE__ */ D("div", {
|
|
103
113
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
104
|
-
children: /* @__PURE__ */
|
|
105
|
-
}) :
|
|
114
|
+
children: /* @__PURE__ */ D(r, { message: M("common.loadingPermissions", "Loading permissions...") })
|
|
115
|
+
}) : R(o.WORKSPACE_READ) ? V ? /* @__PURE__ */ D("div", {
|
|
106
116
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
}) :
|
|
117
|
+
children: /* @__PURE__ */ D(r, { message: M("workspaces.detail.loading", "Loading workspace details...") })
|
|
118
|
+
}) : H || !B ? /* @__PURE__ */ D("div", {
|
|
109
119
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
-
message:
|
|
120
|
+
children: /* @__PURE__ */ D(i, {
|
|
121
|
+
message: H?.message || M("workspaces.detail.notFound", "Workspace not found"),
|
|
112
122
|
action: {
|
|
113
|
-
label:
|
|
114
|
-
onClick: () =>
|
|
123
|
+
label: M("workspaces.create.backToWorkspaces", "Back to Workspaces"),
|
|
124
|
+
onClick: () => P(`${F}/workspaces`)
|
|
115
125
|
}
|
|
116
126
|
})
|
|
117
|
-
}) : /* @__PURE__ */
|
|
127
|
+
}) : /* @__PURE__ */ O("div", {
|
|
118
128
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6 animate-in fade-in duration-200",
|
|
119
129
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ O("div", {
|
|
121
131
|
className: "mx-auto flex w-full max-w-7xl flex-col gap-6",
|
|
122
|
-
children: [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ O("div", {
|
|
134
|
+
className: "space-y-4",
|
|
135
|
+
children: [/* @__PURE__ */ O("button", {
|
|
136
|
+
type: "button",
|
|
137
|
+
onClick: () => P(`${F}/workspaces`),
|
|
138
|
+
className: "inline-flex min-h-10 items-center gap-2 text-[var(--color-text-secondary)] transition-all duration-200 hover:text-[var(--color-text-primary)]",
|
|
139
|
+
children: [/* @__PURE__ */ D(m, {
|
|
140
|
+
size: 20,
|
|
141
|
+
"aria-hidden": "true"
|
|
142
|
+
}), /* @__PURE__ */ D("span", {
|
|
143
|
+
className: "text-sm font-medium",
|
|
144
|
+
children: M("workspaces.create.backToWorkspaces", "Back to Workspaces")
|
|
145
|
+
})]
|
|
146
|
+
}), /* @__PURE__ */ O(x, {
|
|
147
|
+
className: "flex flex-col gap-4 p-5 lg:flex-row lg:items-start lg:justify-between",
|
|
148
|
+
children: [/* @__PURE__ */ O("div", {
|
|
149
|
+
className: "flex min-w-0 items-start gap-4",
|
|
150
|
+
children: [/* @__PURE__ */ D("div", {
|
|
151
|
+
className: "flex size-16 items-center justify-center rounded-xl bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)]",
|
|
152
|
+
children: /* @__PURE__ */ D(h, {
|
|
153
|
+
size: 28,
|
|
154
|
+
"aria-hidden": "true"
|
|
155
|
+
})
|
|
156
|
+
}), /* @__PURE__ */ O("div", {
|
|
157
|
+
className: "min-w-0 space-y-2",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ O("div", {
|
|
160
|
+
className: "flex flex-wrap items-start gap-2",
|
|
161
|
+
children: [/* @__PURE__ */ D("h1", {
|
|
162
|
+
className: "text-3xl font-bold text-[var(--color-text-primary)]",
|
|
163
|
+
children: B.name
|
|
164
|
+
}), /* @__PURE__ */ D(c, { status: B.status })]
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ O("p", {
|
|
167
|
+
className: "break-all font-mono text-sm text-[var(--color-text-secondary)]",
|
|
168
|
+
children: ["/", B.slug]
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ D(T, {
|
|
171
|
+
className: "max-w-2xl",
|
|
172
|
+
children: M("workspaces.detail.purpose", "This is one workspace — a focused space where a team collaborates. Review its details here, switch to the Members tab to control who has access, or edit its settings. Use this page to keep the right people in and the workspace healthy.")
|
|
173
|
+
})
|
|
174
|
+
]
|
|
156
175
|
})]
|
|
176
|
+
}), /* @__PURE__ */ D(b, {
|
|
177
|
+
primary: R(o.WORKSPACE_UPDATE) ? {
|
|
178
|
+
label: M("workspaces.edit.title", "Edit Workspace"),
|
|
179
|
+
icon: /* @__PURE__ */ D(g, {
|
|
180
|
+
size: 16,
|
|
181
|
+
"aria-hidden": "true"
|
|
182
|
+
}),
|
|
183
|
+
onSelect: () => P(`${F}/workspaces/${N}/edit`)
|
|
184
|
+
} : void 0,
|
|
185
|
+
actions: [{
|
|
186
|
+
label: M("workspaces.detail.viewOrganization", "View Organization"),
|
|
187
|
+
icon: /* @__PURE__ */ D(y, {
|
|
188
|
+
size: 16,
|
|
189
|
+
"aria-hidden": "true"
|
|
190
|
+
}),
|
|
191
|
+
onSelect: () => P(`${F}/${B.organizationId}`)
|
|
192
|
+
}]
|
|
157
193
|
})]
|
|
158
|
-
})
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
194
|
+
})]
|
|
195
|
+
}),
|
|
196
|
+
/* @__PURE__ */ D(w, {
|
|
197
|
+
storageKey: "organization-workspace-detail",
|
|
198
|
+
steps: [
|
|
199
|
+
...R(o.MEMBER_INVITE) ? [{
|
|
200
|
+
id: "add-member",
|
|
201
|
+
label: M("workspaces.detail.next.addMember", "Add a member"),
|
|
202
|
+
description: M("workspaces.detail.next.addMemberDesc", "Bring people from the parent organization into this workspace."),
|
|
203
|
+
icon: /* @__PURE__ */ D(v, {
|
|
162
204
|
size: 16,
|
|
163
205
|
"aria-hidden": "true"
|
|
164
206
|
}),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
207
|
+
onClick: () => {
|
|
208
|
+
W("members"), K(!0);
|
|
209
|
+
}
|
|
210
|
+
}] : [],
|
|
211
|
+
{
|
|
212
|
+
id: "review-members",
|
|
213
|
+
label: M("workspaces.detail.next.reviewMembers", "Review members & access"),
|
|
214
|
+
description: M("workspaces.detail.next.reviewMembersDesc", "See who can access this workspace and their roles."),
|
|
215
|
+
icon: /* @__PURE__ */ D(y, {
|
|
170
216
|
size: 16,
|
|
171
217
|
"aria-hidden": "true"
|
|
172
218
|
}),
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
},
|
|
219
|
+
onClick: () => W("members")
|
|
220
|
+
},
|
|
221
|
+
...R(o.WORKSPACE_UPDATE) ? [{
|
|
222
|
+
id: "edit",
|
|
223
|
+
label: M("workspaces.detail.next.edit", "Edit workspace settings"),
|
|
224
|
+
description: M("workspaces.detail.next.editDesc", "Update the name, slug, or status of this workspace."),
|
|
225
|
+
icon: /* @__PURE__ */ D(g, {
|
|
226
|
+
size: 16,
|
|
227
|
+
"aria-hidden": "true"
|
|
228
|
+
}),
|
|
229
|
+
onClick: () => P(`${F}/workspaces/${N}/edit`)
|
|
230
|
+
}] : [],
|
|
231
|
+
{
|
|
232
|
+
id: "view-org",
|
|
233
|
+
label: M("workspaces.detail.next.viewOrg", "Open the parent organization"),
|
|
234
|
+
description: M("workspaces.detail.next.viewOrgDesc", "Jump to the organization this workspace belongs to."),
|
|
235
|
+
icon: /* @__PURE__ */ D(h, {
|
|
236
|
+
size: 16,
|
|
237
|
+
"aria-hidden": "true"
|
|
238
|
+
}),
|
|
239
|
+
onClick: () => P(`${F}/${B.organizationId}`)
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}),
|
|
243
|
+
/* @__PURE__ */ O(S, {
|
|
244
|
+
treatment: "plain",
|
|
245
|
+
className: "border-border-seam p-0",
|
|
246
|
+
children: [/* @__PURE__ */ D("div", {
|
|
247
|
+
className: "overflow-x-auto border-b border-[var(--color-border-seam)]",
|
|
248
|
+
children: /* @__PURE__ */ D("div", {
|
|
249
|
+
className: "flex min-w-max gap-2 px-4 pt-4 sm:px-6",
|
|
250
|
+
children: se.map((e) => {
|
|
251
|
+
let t = U === e.id;
|
|
252
|
+
return /* @__PURE__ */ D("button", {
|
|
253
|
+
type: "button",
|
|
254
|
+
onClick: () => W(e.id),
|
|
255
|
+
className: `inline-flex min-h-11 items-center rounded-t-lg border-b-2 px-4 py-3 text-sm font-medium transition-colors ${t ? "border-[var(--color-action-primary-bg)] text-[var(--color-action-primary-bg)]" : "border-transparent text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)]"}`,
|
|
256
|
+
"aria-pressed": t,
|
|
257
|
+
children: e.label
|
|
258
|
+
}, e.id);
|
|
259
|
+
})
|
|
193
260
|
})
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
|
|
209
|
-
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
210
|
-
children: j("common.name", "Name")
|
|
211
|
-
}), /* @__PURE__ */ w("dd", {
|
|
212
|
-
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
213
|
-
children: z.name
|
|
214
|
-
})] }),
|
|
215
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
|
|
216
|
-
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
217
|
-
children: j("common.slug", "Slug")
|
|
218
|
-
}), /* @__PURE__ */ w("dd", {
|
|
219
|
-
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
|
|
220
|
-
children: z.slug
|
|
221
|
-
})] }),
|
|
222
|
-
/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
|
|
223
|
-
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
224
|
-
children: j("common.status", "Status")
|
|
225
|
-
}), /* @__PURE__ */ w("dd", {
|
|
226
|
-
className: "mt-1",
|
|
227
|
-
children: /* @__PURE__ */ w(l, { status: z.status })
|
|
228
|
-
})] }),
|
|
229
|
-
/* @__PURE__ */ T("div", {
|
|
230
|
-
className: "sm:col-span-2",
|
|
231
|
-
children: [/* @__PURE__ */ w("dt", {
|
|
261
|
+
}), /* @__PURE__ */ D("div", {
|
|
262
|
+
className: "p-4 sm:p-6",
|
|
263
|
+
children: U === "overview" ? /* @__PURE__ */ O("div", {
|
|
264
|
+
className: "grid grid-cols-1 gap-6 xl:grid-cols-[minmax(0,1fr)_320px]",
|
|
265
|
+
children: [/* @__PURE__ */ O(S, {
|
|
266
|
+
treatment: "plain",
|
|
267
|
+
className: "border-border-seam bg-[var(--color-bg-canvas)] p-5",
|
|
268
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
269
|
+
className: "text-lg font-semibold text-[var(--color-text-primary)]",
|
|
270
|
+
children: M("workspaces.detail.detailsSection", "Workspace details")
|
|
271
|
+
}), /* @__PURE__ */ O("dl", {
|
|
272
|
+
className: "mt-5 grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
232
275
|
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
233
|
-
children:
|
|
234
|
-
}), /* @__PURE__ */
|
|
235
|
-
className: "mt-1
|
|
236
|
-
children:
|
|
237
|
-
})]
|
|
238
|
-
|
|
239
|
-
z.endpoint ? /* @__PURE__ */ T("div", {
|
|
240
|
-
className: "sm:col-span-2",
|
|
241
|
-
children: [/* @__PURE__ */ w("dt", {
|
|
276
|
+
children: M("common.name", "Name")
|
|
277
|
+
}), /* @__PURE__ */ D("dd", {
|
|
278
|
+
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
279
|
+
children: B.name
|
|
280
|
+
})] }),
|
|
281
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
242
282
|
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
243
|
-
children:
|
|
244
|
-
}), /* @__PURE__ */
|
|
283
|
+
children: M("common.slug", "Slug")
|
|
284
|
+
}), /* @__PURE__ */ D("dd", {
|
|
245
285
|
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
|
|
246
|
-
children:
|
|
247
|
-
})]
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
children:
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
286
|
+
children: B.slug
|
|
287
|
+
})] }),
|
|
288
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
289
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
290
|
+
children: M("common.status", "Status")
|
|
291
|
+
}), /* @__PURE__ */ D("dd", {
|
|
292
|
+
className: "mt-1",
|
|
293
|
+
children: /* @__PURE__ */ D(c, { status: B.status })
|
|
294
|
+
})] }),
|
|
295
|
+
/* @__PURE__ */ O("div", {
|
|
296
|
+
className: "sm:col-span-2",
|
|
297
|
+
children: [/* @__PURE__ */ D("dt", {
|
|
298
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
299
|
+
children: M("members.detail.orgId", "Organization ID")
|
|
300
|
+
}), /* @__PURE__ */ D("dd", {
|
|
301
|
+
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
|
|
302
|
+
children: B.organizationId
|
|
303
|
+
})]
|
|
304
|
+
}),
|
|
305
|
+
B.endpoint ? /* @__PURE__ */ O("div", {
|
|
306
|
+
className: "sm:col-span-2",
|
|
307
|
+
children: [/* @__PURE__ */ D("dt", {
|
|
308
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
309
|
+
children: M("workspaces.detail.endpoint", "Endpoint")
|
|
310
|
+
}), /* @__PURE__ */ D("dd", {
|
|
311
|
+
className: "mt-1 break-all font-mono text-sm text-[var(--color-text-primary)]",
|
|
312
|
+
children: B.endpoint
|
|
313
|
+
})]
|
|
314
|
+
}) : null
|
|
315
|
+
]
|
|
316
|
+
})]
|
|
317
|
+
}), /* @__PURE__ */ O(S, {
|
|
318
|
+
treatment: "plain",
|
|
319
|
+
className: "border-border-seam bg-[var(--color-bg-canvas)] p-5 xl:sticky xl:top-6 xl:self-start",
|
|
320
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
321
|
+
className: "text-lg font-semibold text-[var(--color-text-primary)]",
|
|
322
|
+
children: M("common.metadata", "Metadata")
|
|
323
|
+
}), /* @__PURE__ */ O("dl", {
|
|
324
|
+
className: "mt-5 space-y-4",
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
327
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
328
|
+
children: M("workspaces.list.members", "Members")
|
|
329
|
+
}), /* @__PURE__ */ D("dd", {
|
|
330
|
+
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
331
|
+
children: $
|
|
332
|
+
})] }),
|
|
333
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
334
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
335
|
+
children: M("common.created", "Created")
|
|
336
|
+
}), /* @__PURE__ */ D("dd", {
|
|
337
|
+
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
338
|
+
children: j(B.createdAt)
|
|
339
|
+
})] }),
|
|
340
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
341
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
342
|
+
children: M("common.lastUpdated", "Last updated")
|
|
343
|
+
}), /* @__PURE__ */ D("dd", {
|
|
344
|
+
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
345
|
+
children: j(B.updatedAt)
|
|
346
|
+
})] }),
|
|
347
|
+
B.region ? /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("dt", {
|
|
348
|
+
className: "text-sm font-medium text-[var(--color-text-secondary)]",
|
|
349
|
+
children: M("workspaces.detail.region", "Region")
|
|
350
|
+
}), /* @__PURE__ */ D("dd", {
|
|
351
|
+
className: "mt-1 text-sm text-[var(--color-text-primary)]",
|
|
352
|
+
children: B.region
|
|
353
|
+
})] }) : null
|
|
354
|
+
]
|
|
355
|
+
})]
|
|
309
356
|
})]
|
|
310
|
-
})
|
|
311
|
-
className: "
|
|
312
|
-
children: /* @__PURE__ */
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}) : J.length > 0 ? /* @__PURE__ */ w("div", {
|
|
322
|
-
className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-bg-canvas)] md:p-2",
|
|
323
|
-
children: /* @__PURE__ */ w(C, {
|
|
324
|
-
columns: se,
|
|
325
|
-
data: J,
|
|
326
|
-
rowKey: (e) => e.id,
|
|
327
|
-
rowActions: (e) => /* @__PURE__ */ w("button", {
|
|
357
|
+
}) : /* @__PURE__ */ O("section", {
|
|
358
|
+
className: "space-y-4",
|
|
359
|
+
children: [/* @__PURE__ */ O("div", {
|
|
360
|
+
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
361
|
+
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h2", {
|
|
362
|
+
className: "text-lg font-semibold text-[var(--color-text-primary)]",
|
|
363
|
+
children: M("workspaces.detail.membersTitle", "Workspace members")
|
|
364
|
+
}), /* @__PURE__ */ D("p", {
|
|
365
|
+
className: "text-sm text-[var(--color-text-secondary)]",
|
|
366
|
+
children: M("workspaces.detail.membersSubtitle", "Add organization members to this workspace and manage access.")
|
|
367
|
+
})] }), R(o.MEMBER_INVITE) && /* @__PURE__ */ O("button", {
|
|
328
368
|
type: "button",
|
|
329
|
-
onClick: () =>
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
title: `${j("workspaces.removeMember.ariaPrefix", "Remove")} ${e.userId} ${j("workspaces.removeMember.ariaSuffix", "from workspace")}`,
|
|
334
|
-
children: /* @__PURE__ */ w(v, {
|
|
335
|
-
size: 18,
|
|
369
|
+
onClick: () => K(!0),
|
|
370
|
+
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",
|
|
371
|
+
children: [/* @__PURE__ */ D(v, {
|
|
372
|
+
size: 16,
|
|
336
373
|
"aria-hidden": "true"
|
|
337
|
-
})
|
|
338
|
-
})
|
|
339
|
-
})
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
size: 40,
|
|
345
|
-
"aria-hidden": "true"
|
|
346
|
-
}),
|
|
347
|
-
title: j("workspaces.detail.emptyMembersTitle", "No workspace members yet"),
|
|
348
|
-
description: j("workspaces.detail.emptyMembersDescription", "Add people from the parent organization to grant workspace access."),
|
|
374
|
+
}), /* @__PURE__ */ D("span", { children: M("workspaces.detail.addMember", "Add Member") })]
|
|
375
|
+
})]
|
|
376
|
+
}), X ? /* @__PURE__ */ D("div", {
|
|
377
|
+
className: "py-8",
|
|
378
|
+
children: /* @__PURE__ */ D(r, { message: M("workspaces.detail.loadingMembers", "Loading workspace members...") })
|
|
379
|
+
}) : Z ? /* @__PURE__ */ D(i, {
|
|
380
|
+
message: Z.message,
|
|
349
381
|
action: {
|
|
350
|
-
label:
|
|
351
|
-
onClick: () =>
|
|
382
|
+
label: M("common.retry", "Retry"),
|
|
383
|
+
onClick: () => {
|
|
384
|
+
Q();
|
|
385
|
+
}
|
|
352
386
|
}
|
|
353
|
-
})
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
387
|
+
}) : Y.length > 0 ? /* @__PURE__ */ D("div", {
|
|
388
|
+
className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-bg-canvas)] md:p-2",
|
|
389
|
+
children: /* @__PURE__ */ D(E, {
|
|
390
|
+
columns: le,
|
|
391
|
+
data: Y,
|
|
392
|
+
rowKey: (e) => e.id,
|
|
393
|
+
rowActions: ue
|
|
394
|
+
})
|
|
395
|
+
}) : /* @__PURE__ */ D("div", {
|
|
396
|
+
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-canvas)] p-6",
|
|
397
|
+
children: /* @__PURE__ */ D(C, {
|
|
398
|
+
illustration: "empty-people",
|
|
399
|
+
title: M("workspaces.detail.emptyMembersTitle", "No workspace members yet"),
|
|
400
|
+
description: M("workspaces.detail.emptyMembersDescription", "Add people from the parent organization to grant workspace access."),
|
|
401
|
+
action: /* @__PURE__ */ D("button", {
|
|
402
|
+
type: "button",
|
|
403
|
+
onClick: () => K(!0),
|
|
404
|
+
className: "inline-flex min-h-11 items-center justify-center gap-2 rounded-lg bg-[var(--color-action-primary-bg)] px-4 py-2 font-medium text-[var(--color-action-primary-text)] transition-all duration-200 hover:bg-[var(--color-action-primary-bgHover)]",
|
|
405
|
+
children: M("workspaces.detail.addMember", "Add Member")
|
|
406
|
+
})
|
|
407
|
+
})
|
|
408
|
+
})]
|
|
409
|
+
})
|
|
410
|
+
})]
|
|
411
|
+
})
|
|
412
|
+
]
|
|
358
413
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
360
|
-
open:
|
|
361
|
-
onOpenChange:
|
|
362
|
-
workspaceId:
|
|
363
|
-
organizationId:
|
|
364
|
-
existingMembers:
|
|
365
|
-
onInviteOrganizationMember: () =>
|
|
414
|
+
/* @__PURE__ */ D(d, {
|
|
415
|
+
open: G,
|
|
416
|
+
onOpenChange: K,
|
|
417
|
+
workspaceId: B.id,
|
|
418
|
+
organizationId: B.organizationId,
|
|
419
|
+
existingMembers: Y,
|
|
420
|
+
onInviteOrganizationMember: () => P(`${F}/${B.organizationId}/members/invite`)
|
|
366
421
|
}),
|
|
367
|
-
|
|
422
|
+
J
|
|
368
423
|
]
|
|
369
|
-
}) : /* @__PURE__ */
|
|
424
|
+
}) : /* @__PURE__ */ D("div", {
|
|
370
425
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
371
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ D("div", {
|
|
372
427
|
className: "p-8 text-center text-[var(--color-text-secondary)]",
|
|
373
|
-
children:
|
|
428
|
+
children: M("workspaces.detail.noPermission", "You don't have permission to view this workspace.")
|
|
374
429
|
})
|
|
375
430
|
});
|
|
376
431
|
}
|
|
377
432
|
//#endregion
|
|
378
|
-
export {
|
|
433
|
+
export { M as WorkspaceDetailPage };
|
|
379
434
|
|
|
380
435
|
//# sourceMappingURL=WorkspaceDetailPage.js.map
|