@burdenoff/microfe-workspaces 2026.1201.1 → 2026.1202.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.
|
@@ -4,15 +4,15 @@ import { commitWorkspaceSelection as ee } from "../hooks/useOpenWorkspace.js";
|
|
|
4
4
|
import { useTr as te } from "../hooks/useTr.js";
|
|
5
5
|
import { useCrossWorkspaceOverview as ne, useMspOrgLinks as re, useMspOrganizationSummary as ie, useWorkspaceShares as ae } from "../hooks/useCollaboration.js";
|
|
6
6
|
import { useCollaborationMutations as oe } from "../hooks/useCollaborationMutations.js";
|
|
7
|
-
import { MspBillingMode as n, MspDelegatedScope as r, MspLinkRole as se, MspOrgLinkStatus as i, WorkspaceShareAccessLevel as a, WorkspaceShareDirection as ce, WorkspaceShareResourceType as o, WorkspaceShareStatus as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { ArrowRightLeft as
|
|
10
|
-
import { AuroraBackground as
|
|
11
|
-
import { useActiveContext as
|
|
12
|
-
import { jsx as
|
|
13
|
-
import { toast as
|
|
7
|
+
import { MspBillingMode as n, MspDelegatedScope as r, MspLinkRole as se, MspOrgLinkStatus as i, WorkspaceShareAccessLevel as a, WorkspaceShareDirection as ce, WorkspaceShareResourceType as o, WorkspaceShareStatus as le } from "../generated/wspace-types.js";
|
|
8
|
+
import { useCallback as ue, useState as s } from "react";
|
|
9
|
+
import { ArrowRightLeft as de, Building2 as fe, CheckCircle2 as c, CreditCard as pe, FolderKanban as me, Globe as he, Link2 as ge, PauseCircle as _e, PlayCircle as ve, Plus as ye, Share2 as l, ShieldCheck as be, Users as xe, XCircle as u } from "lucide-react";
|
|
10
|
+
import { AuroraBackground as Se, Badge as d, Button as f, CardContent as p, CardHeader as m, CardTitle as h, GlassCard as g, GradientText as Ce, Input as _, PagePurpose as we, Skeleton as v } from "@burdenoff/fe-libs/ui";
|
|
11
|
+
import { useActiveContext as Te } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
12
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
13
|
+
import { toast as x } from "sonner";
|
|
14
14
|
// src/pages/CollaborationConsolePage.tsx
|
|
15
|
-
var
|
|
15
|
+
var Ee = [
|
|
16
16
|
{
|
|
17
17
|
value: r.ViewOverview,
|
|
18
18
|
label: "View Overview"
|
|
@@ -33,7 +33,7 @@ var Oe = [
|
|
|
33
33
|
value: r.ManageShares,
|
|
34
34
|
label: "Manage Shares"
|
|
35
35
|
}
|
|
36
|
-
],
|
|
36
|
+
], De = [
|
|
37
37
|
{
|
|
38
38
|
value: o.Channel,
|
|
39
39
|
label: "Shared Channel"
|
|
@@ -46,7 +46,7 @@ var Oe = [
|
|
|
46
46
|
value: o.Mentions,
|
|
47
47
|
label: "Cross-Workspace Mentions"
|
|
48
48
|
}
|
|
49
|
-
],
|
|
49
|
+
], Oe = [
|
|
50
50
|
{
|
|
51
51
|
value: a.ReadOnly,
|
|
52
52
|
label: "Read Only"
|
|
@@ -59,7 +59,7 @@ var Oe = [
|
|
|
59
59
|
value: a.Admin,
|
|
60
60
|
label: "Admin"
|
|
61
61
|
}
|
|
62
|
-
],
|
|
62
|
+
], ke = [
|
|
63
63
|
{
|
|
64
64
|
value: n.Consolidated,
|
|
65
65
|
label: "Consolidated (MSP Billed)"
|
|
@@ -73,7 +73,7 @@ var Oe = [
|
|
|
73
73
|
label: "Split Billing"
|
|
74
74
|
}
|
|
75
75
|
];
|
|
76
|
-
function
|
|
76
|
+
function S(e) {
|
|
77
77
|
switch (e) {
|
|
78
78
|
case "ACTIVE": return "bg-status-success-bgSubtle text-status-success-text border-status-success-border";
|
|
79
79
|
case "PENDING": return "bg-status-warning-bgSubtle text-status-warning-text border-status-warning-border";
|
|
@@ -81,272 +81,261 @@ function b(e) {
|
|
|
81
81
|
default: return "bg-surface-secondary text-text-secondary border-border-seam";
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function C() {
|
|
85
85
|
t("workspaces.collaboration");
|
|
86
|
-
let
|
|
87
|
-
ee({
|
|
88
|
-
setOrganization: C,
|
|
89
|
-
setWorkspace: w,
|
|
90
|
-
setProject: Ne,
|
|
91
|
-
setTenant: Pe
|
|
92
|
-
}, {
|
|
86
|
+
let C = te(), { workspaceId: w, organizationId: Ae } = e(), { setContext: T } = Te(), [E, D] = s("portfolio"), [O, k] = s(null), [je, A] = s(!1), [Me, Ne] = s(""), [Pe, Fe] = s(o.Channel), [Ie, j] = s(""), [M, N] = s(""), [P, Le] = s(a.Collaborate), [Re, F] = s(!1), [I, L] = s(""), [R, z] = s(""), [B, V] = s(""), [H, ze] = s(n.Consolidated), [U, W] = s(""), [G, K] = s(""), [q, Be] = s([r.ViewOverview, r.ViewBillingSummary]), J = ne(), Ve = ae(w, ce.All), He = re(w, se.All), Y = ie(w, O), X = oe(), Ue = ue((e) => {
|
|
87
|
+
ee({ setContext: T }, {
|
|
93
88
|
id: e.id,
|
|
94
89
|
orgId: e.orgId,
|
|
95
90
|
tenantId: e.tenantId
|
|
96
|
-
}),
|
|
97
|
-
}, [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
w,
|
|
102
|
-
x
|
|
103
|
-
]), qe = (e) => {
|
|
104
|
-
We((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
105
|
-
}, Je = async (e) => {
|
|
106
|
-
if (e.preventDefault(), !S) y.error(x("collaborationConsole.workspaceRequired", "Select an active workspace first"));
|
|
91
|
+
}), x.success(C("collaborationConsole.switchedToast", "Switched active workspace to {{name}}", { name: e.name }));
|
|
92
|
+
}, [T, C]), We = (e) => {
|
|
93
|
+
Be((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
94
|
+
}, Ge = async (e) => {
|
|
95
|
+
if (e.preventDefault(), !w) x.error(C("collaborationConsole.workspaceRequired", "Select an active workspace first"));
|
|
107
96
|
else try {
|
|
108
97
|
await X.createShare.mutateAsync({
|
|
109
|
-
workspaceId:
|
|
110
|
-
targetWorkspaceId:
|
|
111
|
-
resourceType:
|
|
112
|
-
resourceId:
|
|
98
|
+
workspaceId: w,
|
|
99
|
+
targetWorkspaceId: Me.trim(),
|
|
100
|
+
resourceType: Pe,
|
|
101
|
+
resourceId: Ie.trim(),
|
|
113
102
|
resourceName: M.trim(),
|
|
114
103
|
accessLevel: P
|
|
115
|
-
}),
|
|
104
|
+
}), x.success(C("collaborationConsole.shareCreated", "Cross-workspace share offered (pending target consent)")), Ne(""), j(""), N(""), A(!1);
|
|
116
105
|
} catch (e) {
|
|
117
|
-
|
|
106
|
+
x.error(e instanceof Error ? e.message : "Failed to create share");
|
|
118
107
|
}
|
|
119
|
-
},
|
|
120
|
-
if (
|
|
108
|
+
}, Ke = async (e) => {
|
|
109
|
+
if (w) try {
|
|
121
110
|
await X.acceptShare.mutateAsync({
|
|
122
|
-
workspaceId:
|
|
111
|
+
workspaceId: w,
|
|
123
112
|
shareId: e
|
|
124
|
-
}),
|
|
113
|
+
}), x.success(C("collaborationConsole.shareAccepted", "Share consent granted and activated"));
|
|
125
114
|
} catch (e) {
|
|
126
|
-
|
|
115
|
+
x.error(e instanceof Error ? e.message : "Failed to accept share");
|
|
127
116
|
}
|
|
128
|
-
},
|
|
129
|
-
if (
|
|
117
|
+
}, qe = async (e) => {
|
|
118
|
+
if (w) try {
|
|
130
119
|
await X.revokeShare.mutateAsync({
|
|
131
|
-
workspaceId:
|
|
120
|
+
workspaceId: w,
|
|
132
121
|
shareId: e,
|
|
133
122
|
reason: "Revoked via Multi-Org & Sharing Console"
|
|
134
|
-
}),
|
|
123
|
+
}), x.success(C("collaborationConsole.shareRevoked", "Share revoked immediately"));
|
|
135
124
|
} catch (e) {
|
|
136
|
-
|
|
125
|
+
x.error(e instanceof Error ? e.message : "Failed to revoke share");
|
|
137
126
|
}
|
|
138
|
-
},
|
|
139
|
-
if (e.preventDefault(), !
|
|
140
|
-
else if (
|
|
127
|
+
}, Je = async (e) => {
|
|
128
|
+
if (e.preventDefault(), !w) x.error(C("collaborationConsole.workspaceRequired", "Select an active workspace first"));
|
|
129
|
+
else if (q.length === 0) x.error(C("collaborationConsole.scopeRequired", "Select at least one delegated permission scope"));
|
|
141
130
|
else try {
|
|
142
131
|
let e = U.trim() ? Number.parseInt(U, 10) : void 0;
|
|
143
132
|
await X.createMspLink.mutateAsync({
|
|
144
|
-
workspaceId:
|
|
133
|
+
workspaceId: w,
|
|
145
134
|
clientOrgId: I.trim(),
|
|
146
135
|
clientOrgName: R.trim(),
|
|
147
136
|
clientWorkspaceId: B.trim() || void 0,
|
|
148
|
-
delegatedScopes:
|
|
137
|
+
delegatedScopes: q,
|
|
149
138
|
billingMode: H,
|
|
150
139
|
monthlySeatBudget: Number.isFinite(e) ? e : void 0,
|
|
151
140
|
notes: G.trim() || void 0
|
|
152
|
-
}),
|
|
141
|
+
}), x.success(C("collaborationConsole.mspCreated", "MSP link proposed — awaiting client organization approval")), L(""), z(""), V(""), W(""), K(""), F(!1);
|
|
153
142
|
} catch (e) {
|
|
154
|
-
|
|
143
|
+
x.error(e instanceof Error ? e.message : "Failed to propose MSP link");
|
|
155
144
|
}
|
|
156
|
-
},
|
|
157
|
-
if (
|
|
145
|
+
}, Ye = async (e) => {
|
|
146
|
+
if (w) try {
|
|
158
147
|
await X.approveMspLink.mutateAsync({
|
|
159
|
-
workspaceId:
|
|
148
|
+
workspaceId: w,
|
|
160
149
|
linkId: e
|
|
161
|
-
}),
|
|
150
|
+
}), x.success(C("collaborationConsole.mspApproved", "MSP organization link approved"));
|
|
162
151
|
} catch (e) {
|
|
163
|
-
|
|
152
|
+
x.error(e instanceof Error ? e.message : "Failed to approve MSP link");
|
|
164
153
|
}
|
|
165
|
-
},
|
|
166
|
-
if (
|
|
154
|
+
}, Xe = async (e, t) => {
|
|
155
|
+
if (w) try {
|
|
167
156
|
await X.updateMspLink.mutateAsync({
|
|
168
|
-
workspaceId:
|
|
157
|
+
workspaceId: w,
|
|
169
158
|
linkId: e,
|
|
170
159
|
status: t
|
|
171
|
-
}),
|
|
160
|
+
}), x.success(t === i.Suspended ? C("collaborationConsole.mspSuspended", "MSP link suspended") : C("collaborationConsole.mspReactivated", "MSP link reactivated"));
|
|
172
161
|
} catch (e) {
|
|
173
|
-
|
|
162
|
+
x.error(e instanceof Error ? e.message : "Failed to update MSP link");
|
|
174
163
|
}
|
|
175
|
-
},
|
|
176
|
-
if (
|
|
164
|
+
}, Ze = async (e) => {
|
|
165
|
+
if (w) try {
|
|
177
166
|
await X.revokeMspLink.mutateAsync({
|
|
178
|
-
workspaceId:
|
|
167
|
+
workspaceId: w,
|
|
179
168
|
linkId: e
|
|
180
|
-
}),
|
|
169
|
+
}), x.success(C("collaborationConsole.mspRevoked", "MSP organization link revoked"));
|
|
181
170
|
} catch (e) {
|
|
182
|
-
|
|
171
|
+
x.error(e instanceof Error ? e.message : "Failed to revoke MSP link");
|
|
183
172
|
}
|
|
184
|
-
}, Z =
|
|
185
|
-
return /* @__PURE__ */
|
|
173
|
+
}, Z = J.data, Q = Ve.data?.items ?? [], $ = He.data?.items ?? [];
|
|
174
|
+
return /* @__PURE__ */ b("div", {
|
|
186
175
|
className: "space-y-6 p-3 sm:p-6",
|
|
187
176
|
"data-testid": "collaboration-console-page",
|
|
188
177
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ b("div", {
|
|
190
179
|
className: "relative overflow-hidden rounded-card flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 px-4 py-4",
|
|
191
180
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ y(Se, { intensity: "subtle" }),
|
|
182
|
+
/* @__PURE__ */ b("div", {
|
|
194
183
|
className: "relative z-10",
|
|
195
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ b("div", {
|
|
196
185
|
className: "flex items-center gap-2",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ y(he, {
|
|
198
187
|
className: "text-primary",
|
|
199
188
|
size: 24,
|
|
200
189
|
"aria-hidden": "true"
|
|
201
|
-
}), /* @__PURE__ */
|
|
190
|
+
}), /* @__PURE__ */ y("h1", {
|
|
202
191
|
className: "text-2xl sm:text-3xl font-bold",
|
|
203
|
-
children: /* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ y(Ce, { children: C("collaborationConsole.title", "Multi-Org & Cross-Workspace Console") })
|
|
204
193
|
})]
|
|
205
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ y("p", {
|
|
206
195
|
className: "text-sm sm:text-base text-text-secondary mt-1",
|
|
207
|
-
children:
|
|
196
|
+
children: C("collaborationConsole.subtitle", "Manage bilateral cross-workspace shares, delegated MSP client organizations, and aggregated seat billing without compromising workspace isolation.")
|
|
208
197
|
})]
|
|
209
198
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ b("div", {
|
|
211
200
|
className: "relative z-10 flex flex-wrap items-center gap-2",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
201
|
+
children: [/* @__PURE__ */ b(f, {
|
|
213
202
|
variant: "outline",
|
|
214
203
|
size: "sm",
|
|
215
204
|
onClick: () => {
|
|
216
|
-
|
|
205
|
+
D("shares"), A(!0);
|
|
217
206
|
},
|
|
218
207
|
className: "gap-2",
|
|
219
208
|
"data-testid": "open-share-form-btn",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ y(l, {
|
|
221
210
|
size: 16,
|
|
222
211
|
"aria-hidden": "true"
|
|
223
|
-
}),
|
|
224
|
-
}), /* @__PURE__ */
|
|
212
|
+
}), C("collaborationConsole.newShareButton", "Share Resource")]
|
|
213
|
+
}), /* @__PURE__ */ b(f, {
|
|
225
214
|
size: "sm",
|
|
226
215
|
onClick: () => {
|
|
227
|
-
|
|
216
|
+
D("msp"), F(!0);
|
|
228
217
|
},
|
|
229
218
|
className: "gap-2",
|
|
230
219
|
"data-testid": "open-msp-form-btn",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ y(ye, {
|
|
232
221
|
size: 16,
|
|
233
222
|
"aria-hidden": "true"
|
|
234
|
-
}),
|
|
223
|
+
}), C("collaborationConsole.newMspLinkButton", "Link Client Org")]
|
|
235
224
|
})]
|
|
236
225
|
})
|
|
237
226
|
]
|
|
238
227
|
}),
|
|
239
|
-
/* @__PURE__ */
|
|
240
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ y(we, { children: C("collaborationConsole.purpose", "Strict workspace isolation stays on by default. Every cross-workspace share (channels, projects, mentions) and MSP organization link starts pending and activates only after explicit target-side consent. Either organization can revoke access instantaneously.") }),
|
|
229
|
+
/* @__PURE__ */ b("div", {
|
|
241
230
|
className: "grid grid-cols-2 lg:grid-cols-4 gap-4",
|
|
242
231
|
"data-testid": "portfolio-kpi-strip",
|
|
243
232
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ y(g, {
|
|
245
234
|
treatment: "insight",
|
|
246
|
-
children: /* @__PURE__ */
|
|
235
|
+
children: /* @__PURE__ */ b(p, {
|
|
247
236
|
className: "p-4 flex items-center justify-between",
|
|
248
|
-
children: [/* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
238
|
+
/* @__PURE__ */ y("p", {
|
|
250
239
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
251
|
-
children:
|
|
240
|
+
children: C("collaborationConsole.kpiOrgs", "Organizations")
|
|
252
241
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ y("p", {
|
|
254
243
|
className: "text-2xl font-bold text-text-primary mt-1",
|
|
255
|
-
children:
|
|
244
|
+
children: J.isLoading ? "—" : Z?.totals.organizationCount ?? 0
|
|
256
245
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ b("p", {
|
|
258
247
|
className: "text-xs text-text-muted mt-0.5",
|
|
259
248
|
children: [
|
|
260
249
|
Z?.totals.managedOrganizationCount ?? 0,
|
|
261
250
|
" ",
|
|
262
|
-
|
|
251
|
+
C("collaborationConsole.kpiManagedSuffix", "MSP-managed")
|
|
263
252
|
]
|
|
264
253
|
})
|
|
265
|
-
] }), /* @__PURE__ */
|
|
254
|
+
] }), /* @__PURE__ */ y(fe, {
|
|
266
255
|
className: "text-primary",
|
|
267
256
|
size: 24,
|
|
268
257
|
"aria-hidden": "true"
|
|
269
258
|
})]
|
|
270
259
|
})
|
|
271
260
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ y(g, {
|
|
273
262
|
treatment: "insight",
|
|
274
|
-
children: /* @__PURE__ */
|
|
263
|
+
children: /* @__PURE__ */ b(p, {
|
|
275
264
|
className: "p-4 flex items-center justify-between",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
277
|
-
/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
266
|
+
/* @__PURE__ */ y("p", {
|
|
278
267
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
279
|
-
children:
|
|
268
|
+
children: C("collaborationConsole.kpiWorkspaces", "Workspaces")
|
|
280
269
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ y("p", {
|
|
282
271
|
className: "text-2xl font-bold text-text-primary mt-1",
|
|
283
|
-
children:
|
|
272
|
+
children: J.isLoading ? "—" : Z?.totals.workspaceCount ?? 0
|
|
284
273
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ b("p", {
|
|
286
275
|
className: "text-xs text-text-muted mt-0.5",
|
|
287
276
|
children: [
|
|
288
277
|
Z?.totals.activeWorkspaceCount ?? 0,
|
|
289
278
|
" ",
|
|
290
|
-
|
|
279
|
+
C("collaborationConsole.kpiActiveSuffix", "active")
|
|
291
280
|
]
|
|
292
281
|
})
|
|
293
|
-
] }), /* @__PURE__ */
|
|
282
|
+
] }), /* @__PURE__ */ y(me, {
|
|
294
283
|
className: "text-primary",
|
|
295
284
|
size: 24,
|
|
296
285
|
"aria-hidden": "true"
|
|
297
286
|
})]
|
|
298
287
|
})
|
|
299
288
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ y(g, {
|
|
301
290
|
treatment: "insight",
|
|
302
|
-
children: /* @__PURE__ */
|
|
291
|
+
children: /* @__PURE__ */ b(p, {
|
|
303
292
|
className: "p-4 flex items-center justify-between",
|
|
304
|
-
children: [/* @__PURE__ */
|
|
305
|
-
/* @__PURE__ */
|
|
293
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
294
|
+
/* @__PURE__ */ y("p", {
|
|
306
295
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
307
|
-
children:
|
|
296
|
+
children: C("collaborationConsole.kpiSeats", "Aggregated Seats")
|
|
308
297
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ y("p", {
|
|
310
299
|
className: "text-2xl font-bold text-text-primary mt-1",
|
|
311
|
-
children:
|
|
300
|
+
children: J.isLoading ? "—" : Z?.totals.totalActiveSeats ?? 0
|
|
312
301
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ b("p", {
|
|
314
303
|
className: "text-xs text-text-muted mt-0.5",
|
|
315
304
|
children: [
|
|
316
305
|
Z?.totals.totalProjects ?? 0,
|
|
317
306
|
" ",
|
|
318
|
-
|
|
307
|
+
C("collaborationConsole.kpiProjectsSuffix", "projects")
|
|
319
308
|
]
|
|
320
309
|
})
|
|
321
|
-
] }), /* @__PURE__ */
|
|
310
|
+
] }), /* @__PURE__ */ y(xe, {
|
|
322
311
|
className: "text-primary",
|
|
323
312
|
size: 24,
|
|
324
313
|
"aria-hidden": "true"
|
|
325
314
|
})]
|
|
326
315
|
})
|
|
327
316
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
317
|
+
/* @__PURE__ */ y(g, {
|
|
329
318
|
treatment: "insight",
|
|
330
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ b(p, {
|
|
331
320
|
className: "p-4 flex items-center justify-between",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
333
|
-
/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ b("div", { children: [
|
|
322
|
+
/* @__PURE__ */ y("p", {
|
|
334
323
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
335
|
-
children:
|
|
324
|
+
children: C("collaborationConsole.kpiShares", "Active Shares")
|
|
336
325
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ y("p", {
|
|
338
327
|
className: "text-2xl font-bold text-text-primary mt-1",
|
|
339
|
-
children:
|
|
328
|
+
children: J.isLoading ? "—" : Z?.totals.activeShareCount ?? 0
|
|
340
329
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ b("p", {
|
|
342
331
|
className: "text-xs text-text-muted mt-0.5",
|
|
343
332
|
children: [
|
|
344
333
|
$.length,
|
|
345
334
|
" ",
|
|
346
|
-
|
|
335
|
+
C("collaborationConsole.kpiLinksSuffix", "MSP links")
|
|
347
336
|
]
|
|
348
337
|
})
|
|
349
|
-
] }), /* @__PURE__ */
|
|
338
|
+
] }), /* @__PURE__ */ y(be, {
|
|
350
339
|
className: "text-primary",
|
|
351
340
|
size: 24,
|
|
352
341
|
"aria-hidden": "true"
|
|
@@ -355,59 +344,59 @@ function x() {
|
|
|
355
344
|
})
|
|
356
345
|
]
|
|
357
346
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ b("div", {
|
|
359
348
|
className: "flex flex-wrap items-center gap-2 border-b border-border-seam pb-3",
|
|
360
349
|
role: "tablist",
|
|
361
|
-
"aria-label":
|
|
350
|
+
"aria-label": C("collaborationConsole.tabsAria", "Multi-org console sections"),
|
|
362
351
|
children: [
|
|
363
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ b(f, {
|
|
364
353
|
role: "tab",
|
|
365
|
-
"aria-selected":
|
|
366
|
-
variant:
|
|
354
|
+
"aria-selected": E === "portfolio",
|
|
355
|
+
variant: E === "portfolio" ? "default" : "outline",
|
|
367
356
|
size: "sm",
|
|
368
|
-
onClick: () =>
|
|
357
|
+
onClick: () => D("portfolio"),
|
|
369
358
|
className: "gap-2",
|
|
370
359
|
"data-testid": "tab-portfolio",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ y(pe, {
|
|
372
361
|
size: 16,
|
|
373
362
|
"aria-hidden": "true"
|
|
374
|
-
}),
|
|
363
|
+
}), C("collaborationConsole.tabPortfolio", "Portfolio & Billing")]
|
|
375
364
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ b(f, {
|
|
377
366
|
role: "tab",
|
|
378
|
-
"aria-selected":
|
|
379
|
-
variant:
|
|
367
|
+
"aria-selected": E === "shares",
|
|
368
|
+
variant: E === "shares" ? "default" : "outline",
|
|
380
369
|
size: "sm",
|
|
381
|
-
onClick: () =>
|
|
370
|
+
onClick: () => D("shares"),
|
|
382
371
|
className: "gap-2",
|
|
383
372
|
"data-testid": "tab-shares",
|
|
384
373
|
children: [
|
|
385
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ y(l, {
|
|
386
375
|
size: 16,
|
|
387
376
|
"aria-hidden": "true"
|
|
388
377
|
}),
|
|
389
|
-
|
|
390
|
-
/* @__PURE__ */
|
|
378
|
+
C("collaborationConsole.tabShares", "Cross-Workspace Shares"),
|
|
379
|
+
/* @__PURE__ */ y(d, {
|
|
391
380
|
variant: "secondary",
|
|
392
381
|
children: Q.length
|
|
393
382
|
})
|
|
394
383
|
]
|
|
395
384
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ b(f, {
|
|
397
386
|
role: "tab",
|
|
398
|
-
"aria-selected":
|
|
399
|
-
variant:
|
|
387
|
+
"aria-selected": E === "msp",
|
|
388
|
+
variant: E === "msp" ? "default" : "outline",
|
|
400
389
|
size: "sm",
|
|
401
|
-
onClick: () =>
|
|
390
|
+
onClick: () => D("msp"),
|
|
402
391
|
className: "gap-2",
|
|
403
392
|
"data-testid": "tab-msp",
|
|
404
393
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ y(ge, {
|
|
406
395
|
size: 16,
|
|
407
396
|
"aria-hidden": "true"
|
|
408
397
|
}),
|
|
409
|
-
|
|
410
|
-
/* @__PURE__ */
|
|
398
|
+
C("collaborationConsole.tabMsp", "MSP Org Links"),
|
|
399
|
+
/* @__PURE__ */ y(d, {
|
|
411
400
|
variant: "secondary",
|
|
412
401
|
children: $.length
|
|
413
402
|
})
|
|
@@ -415,100 +404,100 @@ function x() {
|
|
|
415
404
|
})
|
|
416
405
|
]
|
|
417
406
|
}),
|
|
418
|
-
|
|
407
|
+
E === "portfolio" && /* @__PURE__ */ b("div", {
|
|
419
408
|
className: "space-y-4",
|
|
420
409
|
"data-testid": "panel-portfolio",
|
|
421
|
-
children: [
|
|
410
|
+
children: [J.isLoading ? /* @__PURE__ */ y("div", {
|
|
422
411
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
423
|
-
children: Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */
|
|
424
|
-
}) :
|
|
412
|
+
children: Array.from({ length: 2 }).map((e, t) => /* @__PURE__ */ y(v, { className: "h-48 w-full rounded-card" }, t))
|
|
413
|
+
}) : J.error ? /* @__PURE__ */ y(g, { children: /* @__PURE__ */ b(p, {
|
|
425
414
|
className: "p-6 text-center",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ y("p", {
|
|
427
416
|
className: "text-status-error-text font-medium",
|
|
428
|
-
children:
|
|
429
|
-
}), /* @__PURE__ */
|
|
417
|
+
children: C("collaborationConsole.overviewError", "Unable to load multi-org overview")
|
|
418
|
+
}), /* @__PURE__ */ y("p", {
|
|
430
419
|
className: "text-xs text-text-secondary mt-1",
|
|
431
|
-
children:
|
|
420
|
+
children: J.error instanceof Error ? J.error.message : ""
|
|
432
421
|
})]
|
|
433
|
-
}) }) : !Z || Z.organizations.length === 0 ? /* @__PURE__ */
|
|
422
|
+
}) }) : !Z || Z.organizations.length === 0 ? /* @__PURE__ */ y(g, { children: /* @__PURE__ */ b(p, {
|
|
434
423
|
className: "p-8 text-center",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ y("p", {
|
|
436
425
|
className: "text-text-primary font-medium",
|
|
437
|
-
children:
|
|
438
|
-
}), /* @__PURE__ */
|
|
426
|
+
children: C("collaborationConsole.emptyPortfolio", "No accessible organizations yet")
|
|
427
|
+
}), /* @__PURE__ */ y("p", {
|
|
439
428
|
className: "text-sm text-text-secondary mt-1",
|
|
440
|
-
children:
|
|
429
|
+
children: C("collaborationConsole.emptyPortfolioHint", "Create a workspace or link a client organization to manage multiple tenants from one view.")
|
|
441
430
|
})]
|
|
442
|
-
}) }) : /* @__PURE__ */
|
|
431
|
+
}) }) : /* @__PURE__ */ y("div", {
|
|
443
432
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
|
|
444
|
-
children: Z.organizations.map((e) => /* @__PURE__ */
|
|
433
|
+
children: Z.organizations.map((e) => /* @__PURE__ */ b(g, {
|
|
445
434
|
treatment: "insight",
|
|
446
435
|
"data-testid": `org-card-${e.orgId}`,
|
|
447
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ y(m, {
|
|
448
437
|
className: "pb-2",
|
|
449
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ b("div", {
|
|
450
439
|
className: "flex items-start justify-between gap-2",
|
|
451
|
-
children: [/* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ b("div", {
|
|
452
441
|
className: "min-w-0",
|
|
453
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ y(h, {
|
|
454
443
|
className: "text-lg truncate",
|
|
455
444
|
children: e.orgName
|
|
456
|
-
}), /* @__PURE__ */
|
|
445
|
+
}), /* @__PURE__ */ y("p", {
|
|
457
446
|
className: "text-xs text-text-muted truncate",
|
|
458
447
|
children: e.orgId
|
|
459
448
|
})]
|
|
460
|
-
}), /* @__PURE__ */
|
|
449
|
+
}), /* @__PURE__ */ b("div", {
|
|
461
450
|
className: "flex items-center gap-2 shrink-0",
|
|
462
|
-
children: [/* @__PURE__ */
|
|
451
|
+
children: [/* @__PURE__ */ y(d, {
|
|
463
452
|
className: e.managedByMsp ? "bg-action-primary-bg/10 text-primary border-action-primary-bg/30" : "bg-surface-secondary text-text-secondary border-border-seam",
|
|
464
|
-
children: e.managedByMsp ?
|
|
465
|
-
}),
|
|
453
|
+
children: e.managedByMsp ? C("collaborationConsole.badgeMspManaged", "MSP Delegated") : C("collaborationConsole.badgeDirect", "Direct Org")
|
|
454
|
+
}), w && /* @__PURE__ */ y(f, {
|
|
466
455
|
size: "sm",
|
|
467
456
|
variant: "outline",
|
|
468
|
-
onClick: () =>
|
|
469
|
-
children:
|
|
457
|
+
onClick: () => k(e.orgId),
|
|
458
|
+
children: C("collaborationConsole.inspectOrg", "Summary")
|
|
470
459
|
})]
|
|
471
460
|
})]
|
|
472
461
|
})
|
|
473
|
-
}), /* @__PURE__ */
|
|
462
|
+
}), /* @__PURE__ */ b(p, {
|
|
474
463
|
className: "space-y-4",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ b("div", {
|
|
476
465
|
className: "grid grid-cols-3 gap-2 rounded-lg border border-border-seam bg-surface-secondary/40 p-3 text-xs",
|
|
477
466
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
479
468
|
className: "text-text-muted",
|
|
480
|
-
children:
|
|
481
|
-
}), /* @__PURE__ */
|
|
469
|
+
children: C("collaborationConsole.seatsLabel", "Active Seats")
|
|
470
|
+
}), /* @__PURE__ */ b("p", {
|
|
482
471
|
className: "text-sm font-semibold text-text-primary",
|
|
483
472
|
children: [e.billingSummary.totalActiveSeats, e.billingSummary.monthlySeatBudget ? ` / ${e.billingSummary.monthlySeatBudget}` : ""]
|
|
484
473
|
})] }),
|
|
485
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
486
475
|
className: "text-text-muted",
|
|
487
|
-
children:
|
|
488
|
-
}), /* @__PURE__ */
|
|
476
|
+
children: C("collaborationConsole.projectsLabel", "Projects")
|
|
477
|
+
}), /* @__PURE__ */ y("p", {
|
|
489
478
|
className: "text-sm font-semibold text-text-primary",
|
|
490
479
|
children: e.billingSummary.totalProjects
|
|
491
480
|
})] }),
|
|
492
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
|
|
493
482
|
className: "text-text-muted",
|
|
494
|
-
children:
|
|
495
|
-
}), /* @__PURE__ */
|
|
483
|
+
children: C("collaborationConsole.billingModeLabel", "Billing Mode")
|
|
484
|
+
}), /* @__PURE__ */ y("p", {
|
|
496
485
|
className: "text-sm font-semibold text-text-primary",
|
|
497
486
|
children: e.billingSummary.billingMode ?? "DIRECT"
|
|
498
487
|
})] })
|
|
499
488
|
]
|
|
500
|
-
}), /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ y("div", {
|
|
501
490
|
className: "space-y-2",
|
|
502
491
|
children: e.workspaces.map((e) => {
|
|
503
|
-
let t = e.id ===
|
|
504
|
-
return /* @__PURE__ */
|
|
492
|
+
let t = e.id === w;
|
|
493
|
+
return /* @__PURE__ */ b("div", {
|
|
505
494
|
className: "flex items-center justify-between gap-2 rounded-lg border border-border-seam px-3 py-2",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ b("div", {
|
|
507
496
|
className: "min-w-0",
|
|
508
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ y("p", {
|
|
509
498
|
className: "text-sm font-medium text-text-primary truncate",
|
|
510
499
|
children: e.name
|
|
511
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ b("p", {
|
|
512
501
|
className: "text-xs text-text-secondary",
|
|
513
502
|
children: [
|
|
514
503
|
e.memberCount,
|
|
@@ -520,23 +509,23 @@ function x() {
|
|
|
520
509
|
" shares"
|
|
521
510
|
]
|
|
522
511
|
})]
|
|
523
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ b("div", {
|
|
524
513
|
className: "flex items-center gap-2 shrink-0",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
526
|
-
className: `text-xs border ${
|
|
514
|
+
children: [/* @__PURE__ */ y(d, {
|
|
515
|
+
className: `text-xs border ${S(e.status)}`,
|
|
527
516
|
children: e.status
|
|
528
|
-
}), t ? /* @__PURE__ */
|
|
517
|
+
}), t ? /* @__PURE__ */ y(d, {
|
|
529
518
|
variant: "secondary",
|
|
530
|
-
children:
|
|
531
|
-
}) : /* @__PURE__ */
|
|
519
|
+
children: C("collaborationConsole.currentWorkspace", "Active")
|
|
520
|
+
}) : /* @__PURE__ */ b(f, {
|
|
532
521
|
size: "sm",
|
|
533
522
|
variant: "outline",
|
|
534
|
-
onClick: () =>
|
|
523
|
+
onClick: () => Ue(e),
|
|
535
524
|
className: "gap-1",
|
|
536
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ y(de, {
|
|
537
526
|
size: 14,
|
|
538
527
|
"aria-hidden": "true"
|
|
539
|
-
}),
|
|
528
|
+
}), C("collaborationConsole.switchButton", "Switch")]
|
|
540
529
|
})]
|
|
541
530
|
})]
|
|
542
531
|
}, e.id);
|
|
@@ -544,76 +533,76 @@ function x() {
|
|
|
544
533
|
})]
|
|
545
534
|
})]
|
|
546
535
|
}, e.orgId))
|
|
547
|
-
}),
|
|
536
|
+
}), O && /* @__PURE__ */ b(g, {
|
|
548
537
|
"data-testid": "org-summary-panel",
|
|
549
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ b(m, {
|
|
550
539
|
className: "flex flex-row items-center justify-between",
|
|
551
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: [/* @__PURE__ */ b(h, {
|
|
552
541
|
className: "text-base",
|
|
553
542
|
children: [
|
|
554
|
-
|
|
543
|
+
C("collaborationConsole.orgDrilldownTitle", "Organization Billing & Access Summary"),
|
|
555
544
|
" ",
|
|
556
545
|
"— ",
|
|
557
|
-
Y.data?.orgName ??
|
|
546
|
+
Y.data?.orgName ?? O
|
|
558
547
|
]
|
|
559
|
-
}), /* @__PURE__ */
|
|
548
|
+
}), /* @__PURE__ */ y(f, {
|
|
560
549
|
size: "sm",
|
|
561
550
|
variant: "outline",
|
|
562
|
-
onClick: () =>
|
|
563
|
-
children:
|
|
551
|
+
onClick: () => k(null),
|
|
552
|
+
children: C("collaborationConsole.closeButton", "Close")
|
|
564
553
|
})]
|
|
565
|
-
}), /* @__PURE__ */
|
|
554
|
+
}), /* @__PURE__ */ y(p, { children: Y.isLoading ? /* @__PURE__ */ y(v, { className: "h-24 w-full" }) : Y.error ? /* @__PURE__ */ y("p", {
|
|
566
555
|
className: "text-sm text-status-error-text",
|
|
567
556
|
children: Y.error instanceof Error ? Y.error.message : "Failed to load summary"
|
|
568
|
-
}) : Y.data ? /* @__PURE__ */
|
|
557
|
+
}) : Y.data ? /* @__PURE__ */ b("div", {
|
|
569
558
|
className: "grid grid-cols-2 sm:grid-cols-5 gap-3 text-sm",
|
|
570
559
|
children: [
|
|
571
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ b("div", {
|
|
572
561
|
className: "rounded-lg border border-border-seam p-3",
|
|
573
|
-
children: [/* @__PURE__ */
|
|
562
|
+
children: [/* @__PURE__ */ y("p", {
|
|
574
563
|
className: "text-xs text-text-muted",
|
|
575
564
|
children: "Workspaces"
|
|
576
|
-
}), /* @__PURE__ */
|
|
565
|
+
}), /* @__PURE__ */ y("p", {
|
|
577
566
|
className: "text-lg font-semibold text-text-primary",
|
|
578
567
|
children: Y.data.billingSummary.totalWorkspaces
|
|
579
568
|
})]
|
|
580
569
|
}),
|
|
581
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ b("div", {
|
|
582
571
|
className: "rounded-lg border border-border-seam p-3",
|
|
583
|
-
children: [/* @__PURE__ */
|
|
572
|
+
children: [/* @__PURE__ */ y("p", {
|
|
584
573
|
className: "text-xs text-text-muted",
|
|
585
574
|
children: "Active Seats"
|
|
586
|
-
}), /* @__PURE__ */
|
|
575
|
+
}), /* @__PURE__ */ y("p", {
|
|
587
576
|
className: "text-lg font-semibold text-text-primary",
|
|
588
577
|
children: Y.data.billingSummary.totalActiveSeats
|
|
589
578
|
})]
|
|
590
579
|
}),
|
|
591
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ b("div", {
|
|
592
581
|
className: "rounded-lg border border-border-seam p-3",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
582
|
+
children: [/* @__PURE__ */ y("p", {
|
|
594
583
|
className: "text-xs text-text-muted",
|
|
595
584
|
children: "Resources"
|
|
596
|
-
}), /* @__PURE__ */
|
|
585
|
+
}), /* @__PURE__ */ y("p", {
|
|
597
586
|
className: "text-lg font-semibold text-text-primary",
|
|
598
587
|
children: Y.data.billingSummary.totalResources
|
|
599
588
|
})]
|
|
600
589
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
590
|
+
/* @__PURE__ */ b("div", {
|
|
602
591
|
className: "rounded-lg border border-border-seam p-3",
|
|
603
|
-
children: [/* @__PURE__ */
|
|
592
|
+
children: [/* @__PURE__ */ y("p", {
|
|
604
593
|
className: "text-xs text-text-muted",
|
|
605
594
|
children: "Products"
|
|
606
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ y("p", {
|
|
607
596
|
className: "text-lg font-semibold text-text-primary",
|
|
608
597
|
children: Y.data.billingSummary.subscribedProductCount
|
|
609
598
|
})]
|
|
610
599
|
}),
|
|
611
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ b("div", {
|
|
612
601
|
className: "rounded-lg border border-border-seam p-3",
|
|
613
|
-
children: [/* @__PURE__ */
|
|
602
|
+
children: [/* @__PURE__ */ y("p", {
|
|
614
603
|
className: "text-xs text-text-muted",
|
|
615
604
|
children: "Seat Utilization"
|
|
616
|
-
}), /* @__PURE__ */
|
|
605
|
+
}), /* @__PURE__ */ y("p", {
|
|
617
606
|
className: "text-lg font-semibold text-text-primary",
|
|
618
607
|
children: Y.data.billingSummary.seatUtilizationPercent !== null && Y.data.billingSummary.seatUtilizationPercent !== void 0 ? `${Y.data.billingSummary.seatUtilizationPercent}%` : "Unbounded"
|
|
619
608
|
})]
|
|
@@ -622,68 +611,68 @@ function x() {
|
|
|
622
611
|
}) : null })]
|
|
623
612
|
})]
|
|
624
613
|
}),
|
|
625
|
-
|
|
614
|
+
E === "shares" && /* @__PURE__ */ b("div", {
|
|
626
615
|
className: "space-y-4",
|
|
627
616
|
"data-testid": "panel-shares",
|
|
628
|
-
children: [
|
|
617
|
+
children: [je && /* @__PURE__ */ b(g, { children: [/* @__PURE__ */ y(m, { children: /* @__PURE__ */ y(h, {
|
|
629
618
|
className: "text-base",
|
|
630
|
-
children:
|
|
631
|
-
}) }), /* @__PURE__ */
|
|
632
|
-
onSubmit: (e) => void
|
|
619
|
+
children: C("collaborationConsole.createShareTitle", "Offer Cross-Workspace Share")
|
|
620
|
+
}) }), /* @__PURE__ */ y(p, { children: /* @__PURE__ */ b("form", {
|
|
621
|
+
onSubmit: (e) => void Ge(e),
|
|
633
622
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
634
623
|
children: [
|
|
635
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ b("div", {
|
|
636
625
|
className: "space-y-1",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
626
|
+
children: [/* @__PURE__ */ y("label", {
|
|
638
627
|
className: "text-xs font-medium text-text-secondary",
|
|
639
628
|
htmlFor: "share-target-ws",
|
|
640
|
-
children:
|
|
641
|
-
}), /* @__PURE__ */ _
|
|
629
|
+
children: C("collaborationConsole.targetWorkspaceLabel", "Target Workspace ID *")
|
|
630
|
+
}), /* @__PURE__ */ y(_, {
|
|
642
631
|
id: "share-target-ws",
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
632
|
+
value: Me,
|
|
633
|
+
onChange: (e) => Ne(e.target.value),
|
|
645
634
|
placeholder: "UUID of partner workspace",
|
|
646
635
|
required: !0
|
|
647
636
|
})]
|
|
648
637
|
}),
|
|
649
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ b("div", {
|
|
650
639
|
className: "space-y-1",
|
|
651
|
-
children: [/* @__PURE__ */
|
|
640
|
+
children: [/* @__PURE__ */ y("label", {
|
|
652
641
|
className: "text-xs font-medium text-text-secondary",
|
|
653
642
|
htmlFor: "share-resource-type",
|
|
654
|
-
children:
|
|
655
|
-
}), /* @__PURE__ */
|
|
643
|
+
children: C("collaborationConsole.resourceTypeLabel", "Resource Kind *")
|
|
644
|
+
}), /* @__PURE__ */ y("select", {
|
|
656
645
|
id: "share-resource-type",
|
|
657
|
-
value:
|
|
658
|
-
onChange: (e) =>
|
|
646
|
+
value: Pe,
|
|
647
|
+
onChange: (e) => Fe(e.target.value),
|
|
659
648
|
className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
|
|
660
|
-
children:
|
|
649
|
+
children: De.map((e) => /* @__PURE__ */ y("option", {
|
|
661
650
|
value: e.value,
|
|
662
651
|
children: e.label
|
|
663
652
|
}, e.value))
|
|
664
653
|
})]
|
|
665
654
|
}),
|
|
666
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ b("div", {
|
|
667
656
|
className: "space-y-1",
|
|
668
|
-
children: [/* @__PURE__ */
|
|
657
|
+
children: [/* @__PURE__ */ y("label", {
|
|
669
658
|
className: "text-xs font-medium text-text-secondary",
|
|
670
659
|
htmlFor: "share-resource-id",
|
|
671
|
-
children:
|
|
672
|
-
}), /* @__PURE__ */ _
|
|
660
|
+
children: C("collaborationConsole.resourceIdLabel", "Resource ID *")
|
|
661
|
+
}), /* @__PURE__ */ y(_, {
|
|
673
662
|
id: "share-resource-id",
|
|
674
|
-
value:
|
|
663
|
+
value: Ie,
|
|
675
664
|
onChange: (e) => j(e.target.value),
|
|
676
665
|
placeholder: "Project ID, Channel ID, or * for Mentions",
|
|
677
666
|
required: !0
|
|
678
667
|
})]
|
|
679
668
|
}),
|
|
680
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ b("div", {
|
|
681
670
|
className: "space-y-1",
|
|
682
|
-
children: [/* @__PURE__ */
|
|
671
|
+
children: [/* @__PURE__ */ y("label", {
|
|
683
672
|
className: "text-xs font-medium text-text-secondary",
|
|
684
673
|
htmlFor: "share-resource-name",
|
|
685
|
-
children:
|
|
686
|
-
}), /* @__PURE__ */ _
|
|
674
|
+
children: C("collaborationConsole.resourceNameLabel", "Display Name *")
|
|
675
|
+
}), /* @__PURE__ */ y(_, {
|
|
687
676
|
id: "share-resource-name",
|
|
688
677
|
value: M,
|
|
689
678
|
onChange: (e) => N(e.target.value),
|
|
@@ -691,107 +680,107 @@ function x() {
|
|
|
691
680
|
required: !0
|
|
692
681
|
})]
|
|
693
682
|
}),
|
|
694
|
-
/* @__PURE__ */
|
|
683
|
+
/* @__PURE__ */ b("div", {
|
|
695
684
|
className: "space-y-1",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ y("label", {
|
|
697
686
|
className: "text-xs font-medium text-text-secondary",
|
|
698
687
|
htmlFor: "share-access-level",
|
|
699
|
-
children:
|
|
700
|
-
}), /* @__PURE__ */
|
|
688
|
+
children: C("collaborationConsole.accessLevelLabel", "Access Level")
|
|
689
|
+
}), /* @__PURE__ */ y("select", {
|
|
701
690
|
id: "share-access-level",
|
|
702
691
|
value: P,
|
|
703
|
-
onChange: (e) =>
|
|
692
|
+
onChange: (e) => Le(e.target.value),
|
|
704
693
|
className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
|
|
705
|
-
children:
|
|
694
|
+
children: Oe.map((e) => /* @__PURE__ */ y("option", {
|
|
706
695
|
value: e.value,
|
|
707
696
|
children: e.label
|
|
708
697
|
}, e.value))
|
|
709
698
|
})]
|
|
710
699
|
}),
|
|
711
|
-
/* @__PURE__ */
|
|
700
|
+
/* @__PURE__ */ b("div", {
|
|
712
701
|
className: "flex items-end gap-2",
|
|
713
|
-
children: [/* @__PURE__ */
|
|
702
|
+
children: [/* @__PURE__ */ y(f, {
|
|
714
703
|
type: "submit",
|
|
715
704
|
disabled: X.createShare.isPending,
|
|
716
705
|
children: X.createShare.isPending ? "Sending..." : "Send Share Offer"
|
|
717
|
-
}), /* @__PURE__ */
|
|
706
|
+
}), /* @__PURE__ */ y(f, {
|
|
718
707
|
type: "button",
|
|
719
708
|
variant: "outline",
|
|
720
|
-
onClick: () =>
|
|
709
|
+
onClick: () => A(!1),
|
|
721
710
|
children: "Cancel"
|
|
722
711
|
})]
|
|
723
712
|
})
|
|
724
713
|
]
|
|
725
|
-
}) })] }),
|
|
714
|
+
}) })] }), Ve.isLoading ? /* @__PURE__ */ y(v, { className: "h-32 w-full rounded-card" }) : Q.length === 0 ? /* @__PURE__ */ y(g, { children: /* @__PURE__ */ b(p, {
|
|
726
715
|
className: "p-8 text-center",
|
|
727
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ y("p", {
|
|
728
717
|
className: "text-text-primary font-medium",
|
|
729
|
-
children:
|
|
730
|
-
}), /* @__PURE__ */
|
|
718
|
+
children: C("collaborationConsole.noShares", "No cross-workspace shares yet")
|
|
719
|
+
}), /* @__PURE__ */ y("p", {
|
|
731
720
|
className: "text-sm text-text-secondary mt-1",
|
|
732
|
-
children:
|
|
721
|
+
children: C("collaborationConsole.noSharesHint", "Share a channel, project, or cross-workspace mentions with a partner workspace. Target consent is always required.")
|
|
733
722
|
})]
|
|
734
|
-
}) }) : /* @__PURE__ */
|
|
723
|
+
}) }) : /* @__PURE__ */ y("div", {
|
|
735
724
|
className: "space-y-3",
|
|
736
725
|
children: Q.map((e) => {
|
|
737
|
-
let t = e.targetWorkspaceId ===
|
|
738
|
-
return /* @__PURE__ */
|
|
726
|
+
let t = e.targetWorkspaceId === w;
|
|
727
|
+
return /* @__PURE__ */ y(g, {
|
|
739
728
|
treatment: "insight",
|
|
740
|
-
children: /* @__PURE__ */
|
|
729
|
+
children: /* @__PURE__ */ b(p, {
|
|
741
730
|
className: "p-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3",
|
|
742
|
-
children: [/* @__PURE__ */
|
|
731
|
+
children: [/* @__PURE__ */ b("div", {
|
|
743
732
|
className: "space-y-1 min-w-0",
|
|
744
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ b("div", {
|
|
745
734
|
className: "flex flex-wrap items-center gap-2",
|
|
746
735
|
children: [
|
|
747
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ y(d, {
|
|
748
737
|
variant: "secondary",
|
|
749
738
|
children: e.resourceType
|
|
750
739
|
}),
|
|
751
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ y("span", {
|
|
752
741
|
className: "font-semibold text-text-primary truncate",
|
|
753
742
|
children: e.resourceName
|
|
754
743
|
}),
|
|
755
|
-
/* @__PURE__ */
|
|
756
|
-
className: `text-xs border ${
|
|
744
|
+
/* @__PURE__ */ y(d, {
|
|
745
|
+
className: `text-xs border ${S(e.status)}`,
|
|
757
746
|
children: e.status
|
|
758
747
|
}),
|
|
759
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ y(d, {
|
|
760
749
|
variant: "outline",
|
|
761
750
|
children: e.accessLevel
|
|
762
751
|
})
|
|
763
752
|
]
|
|
764
|
-
}), /* @__PURE__ */
|
|
753
|
+
}), /* @__PURE__ */ b("p", {
|
|
765
754
|
className: "text-xs text-text-secondary",
|
|
766
755
|
children: [
|
|
767
756
|
t ? "Inbound from " : "Outbound to ",
|
|
768
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ y("span", {
|
|
769
758
|
className: "font-medium text-text-primary",
|
|
770
759
|
children: t ? e.sourceWorkspaceName ?? e.workspaceId : e.targetWorkspaceName ?? e.targetWorkspaceId
|
|
771
760
|
}),
|
|
772
761
|
" ",
|
|
773
762
|
"· Consent scope: ",
|
|
774
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ y("code", { children: e.consentScope })
|
|
775
764
|
]
|
|
776
765
|
})]
|
|
777
|
-
}), /* @__PURE__ */
|
|
766
|
+
}), /* @__PURE__ */ b("div", {
|
|
778
767
|
className: "flex items-center gap-2 shrink-0",
|
|
779
|
-
children: [t && e.status ===
|
|
768
|
+
children: [t && e.status === le.Pending && /* @__PURE__ */ b(f, {
|
|
780
769
|
size: "sm",
|
|
781
|
-
onClick: () => void
|
|
770
|
+
onClick: () => void Ke(e.id),
|
|
782
771
|
disabled: X.acceptShare.isPending,
|
|
783
772
|
className: "gap-1",
|
|
784
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: [/* @__PURE__ */ y(c, {
|
|
785
774
|
size: 14,
|
|
786
775
|
"aria-hidden": "true"
|
|
787
776
|
}), "Accept Consent"]
|
|
788
|
-
}), e.status !==
|
|
777
|
+
}), e.status !== le.Revoked && /* @__PURE__ */ b(f, {
|
|
789
778
|
size: "sm",
|
|
790
779
|
variant: "outline",
|
|
791
|
-
onClick: () => void
|
|
780
|
+
onClick: () => void qe(e.id),
|
|
792
781
|
disabled: X.revokeShare.isPending,
|
|
793
782
|
className: "gap-1 text-status-error-text",
|
|
794
|
-
children: [/* @__PURE__ */
|
|
783
|
+
children: [/* @__PURE__ */ y(u, {
|
|
795
784
|
size: 14,
|
|
796
785
|
"aria-hidden": "true"
|
|
797
786
|
}), "Revoke"]
|
|
@@ -802,26 +791,26 @@ function x() {
|
|
|
802
791
|
})
|
|
803
792
|
})]
|
|
804
793
|
}),
|
|
805
|
-
|
|
794
|
+
E === "msp" && /* @__PURE__ */ b("div", {
|
|
806
795
|
className: "space-y-4",
|
|
807
796
|
"data-testid": "panel-msp",
|
|
808
|
-
children: [
|
|
797
|
+
children: [Re && /* @__PURE__ */ b(g, { children: [/* @__PURE__ */ y(m, { children: /* @__PURE__ */ y(h, {
|
|
809
798
|
className: "text-base",
|
|
810
|
-
children:
|
|
811
|
-
}) }), /* @__PURE__ */
|
|
812
|
-
onSubmit: (e) => void
|
|
799
|
+
children: C("collaborationConsole.createMspTitle", "Propose MSP Organization Link")
|
|
800
|
+
}) }), /* @__PURE__ */ y(p, { children: /* @__PURE__ */ b("form", {
|
|
801
|
+
onSubmit: (e) => void Je(e),
|
|
813
802
|
className: "space-y-4",
|
|
814
803
|
children: [
|
|
815
|
-
/* @__PURE__ */
|
|
804
|
+
/* @__PURE__ */ b("div", {
|
|
816
805
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
817
806
|
children: [
|
|
818
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ b("div", {
|
|
819
808
|
className: "space-y-1",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
809
|
+
children: [/* @__PURE__ */ y("label", {
|
|
821
810
|
className: "text-xs font-medium text-text-secondary",
|
|
822
811
|
htmlFor: "msp-client-org-id",
|
|
823
812
|
children: "Client Organization ID *"
|
|
824
|
-
}), /* @__PURE__ */ _
|
|
813
|
+
}), /* @__PURE__ */ y(_, {
|
|
825
814
|
id: "msp-client-org-id",
|
|
826
815
|
value: I,
|
|
827
816
|
onChange: (e) => L(e.target.value),
|
|
@@ -829,13 +818,13 @@ function x() {
|
|
|
829
818
|
required: !0
|
|
830
819
|
})]
|
|
831
820
|
}),
|
|
832
|
-
/* @__PURE__ */
|
|
821
|
+
/* @__PURE__ */ b("div", {
|
|
833
822
|
className: "space-y-1",
|
|
834
|
-
children: [/* @__PURE__ */
|
|
823
|
+
children: [/* @__PURE__ */ y("label", {
|
|
835
824
|
className: "text-xs font-medium text-text-secondary",
|
|
836
825
|
htmlFor: "msp-client-org-name",
|
|
837
826
|
children: "Client Organization Name *"
|
|
838
|
-
}), /* @__PURE__ */ _
|
|
827
|
+
}), /* @__PURE__ */ y(_, {
|
|
839
828
|
id: "msp-client-org-name",
|
|
840
829
|
value: R,
|
|
841
830
|
onChange: (e) => z(e.target.value),
|
|
@@ -843,43 +832,43 @@ function x() {
|
|
|
843
832
|
required: !0
|
|
844
833
|
})]
|
|
845
834
|
}),
|
|
846
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ b("div", {
|
|
847
836
|
className: "space-y-1",
|
|
848
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: [/* @__PURE__ */ y("label", {
|
|
849
838
|
className: "text-xs font-medium text-text-secondary",
|
|
850
839
|
htmlFor: "msp-client-ws",
|
|
851
840
|
children: "Primary Client Workspace ID (Optional)"
|
|
852
|
-
}), /* @__PURE__ */ _
|
|
841
|
+
}), /* @__PURE__ */ y(_, {
|
|
853
842
|
id: "msp-client-ws",
|
|
854
843
|
value: B,
|
|
855
844
|
onChange: (e) => V(e.target.value),
|
|
856
845
|
placeholder: "Optional workspace UUID"
|
|
857
846
|
})]
|
|
858
847
|
}),
|
|
859
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ b("div", {
|
|
860
849
|
className: "space-y-1",
|
|
861
|
-
children: [/* @__PURE__ */
|
|
850
|
+
children: [/* @__PURE__ */ y("label", {
|
|
862
851
|
className: "text-xs font-medium text-text-secondary",
|
|
863
852
|
htmlFor: "msp-billing-mode",
|
|
864
853
|
children: "Billing Aggregation Mode"
|
|
865
|
-
}), /* @__PURE__ */
|
|
854
|
+
}), /* @__PURE__ */ y("select", {
|
|
866
855
|
id: "msp-billing-mode",
|
|
867
856
|
value: H,
|
|
868
|
-
onChange: (e) =>
|
|
857
|
+
onChange: (e) => ze(e.target.value),
|
|
869
858
|
className: "w-full h-10 rounded-md border border-border-seam bg-surface-primary px-3 text-sm text-text-primary",
|
|
870
|
-
children:
|
|
859
|
+
children: ke.map((e) => /* @__PURE__ */ y("option", {
|
|
871
860
|
value: e.value,
|
|
872
861
|
children: e.label
|
|
873
862
|
}, e.value))
|
|
874
863
|
})]
|
|
875
864
|
}),
|
|
876
|
-
/* @__PURE__ */
|
|
865
|
+
/* @__PURE__ */ b("div", {
|
|
877
866
|
className: "space-y-1",
|
|
878
|
-
children: [/* @__PURE__ */
|
|
867
|
+
children: [/* @__PURE__ */ y("label", {
|
|
879
868
|
className: "text-xs font-medium text-text-secondary",
|
|
880
869
|
htmlFor: "msp-seat-budget",
|
|
881
870
|
children: "Monthly Seat Budget (Optional)"
|
|
882
|
-
}), /* @__PURE__ */ _
|
|
871
|
+
}), /* @__PURE__ */ y(_, {
|
|
883
872
|
id: "msp-seat-budget",
|
|
884
873
|
type: "number",
|
|
885
874
|
min: 1,
|
|
@@ -888,47 +877,47 @@ function x() {
|
|
|
888
877
|
placeholder: "e.g. 50"
|
|
889
878
|
})]
|
|
890
879
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
880
|
+
/* @__PURE__ */ b("div", {
|
|
892
881
|
className: "space-y-1",
|
|
893
|
-
children: [/* @__PURE__ */
|
|
882
|
+
children: [/* @__PURE__ */ y("label", {
|
|
894
883
|
className: "text-xs font-medium text-text-secondary",
|
|
895
884
|
htmlFor: "msp-notes",
|
|
896
885
|
children: "Agreement Notes"
|
|
897
|
-
}), /* @__PURE__ */ _
|
|
886
|
+
}), /* @__PURE__ */ y(_, {
|
|
898
887
|
id: "msp-notes",
|
|
899
888
|
value: G,
|
|
900
|
-
onChange: (e) =>
|
|
889
|
+
onChange: (e) => K(e.target.value),
|
|
901
890
|
placeholder: "Optional MSP engagement reference"
|
|
902
891
|
})]
|
|
903
892
|
})
|
|
904
893
|
]
|
|
905
894
|
}),
|
|
906
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ b("div", {
|
|
907
896
|
className: "space-y-2",
|
|
908
|
-
children: [/* @__PURE__ */
|
|
897
|
+
children: [/* @__PURE__ */ y("p", {
|
|
909
898
|
className: "text-xs font-medium text-text-secondary",
|
|
910
899
|
children: "Delegated Permission Scopes *"
|
|
911
|
-
}), /* @__PURE__ */
|
|
900
|
+
}), /* @__PURE__ */ y("div", {
|
|
912
901
|
className: "flex flex-wrap gap-2",
|
|
913
|
-
children:
|
|
914
|
-
let t =
|
|
915
|
-
return /* @__PURE__ */
|
|
902
|
+
children: Ee.map((e) => {
|
|
903
|
+
let t = q.includes(e.value);
|
|
904
|
+
return /* @__PURE__ */ y(f, {
|
|
916
905
|
type: "button",
|
|
917
906
|
size: "sm",
|
|
918
907
|
variant: t ? "default" : "outline",
|
|
919
|
-
onClick: () =>
|
|
908
|
+
onClick: () => We(e.value),
|
|
920
909
|
children: e.label
|
|
921
910
|
}, e.value);
|
|
922
911
|
})
|
|
923
912
|
})]
|
|
924
913
|
}),
|
|
925
|
-
/* @__PURE__ */
|
|
914
|
+
/* @__PURE__ */ b("div", {
|
|
926
915
|
className: "flex items-center gap-2",
|
|
927
|
-
children: [/* @__PURE__ */
|
|
916
|
+
children: [/* @__PURE__ */ y(f, {
|
|
928
917
|
type: "submit",
|
|
929
918
|
disabled: X.createMspLink.isPending,
|
|
930
919
|
children: X.createMspLink.isPending ? "Proposing..." : "Propose MSP Link"
|
|
931
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ y(f, {
|
|
932
921
|
type: "button",
|
|
933
922
|
variant: "outline",
|
|
934
923
|
onClick: () => F(!1),
|
|
@@ -936,42 +925,42 @@ function x() {
|
|
|
936
925
|
})]
|
|
937
926
|
})
|
|
938
927
|
]
|
|
939
|
-
}) })] }),
|
|
928
|
+
}) })] }), He.isLoading ? /* @__PURE__ */ y(v, { className: "h-32 w-full rounded-card" }) : $.length === 0 ? /* @__PURE__ */ y(g, { children: /* @__PURE__ */ b(p, {
|
|
940
929
|
className: "p-8 text-center",
|
|
941
|
-
children: [/* @__PURE__ */
|
|
930
|
+
children: [/* @__PURE__ */ y("p", {
|
|
942
931
|
className: "text-text-primary font-medium",
|
|
943
|
-
children:
|
|
944
|
-
}), /* @__PURE__ */
|
|
932
|
+
children: C("collaborationConsole.noMspLinks", "No MSP organization links yet")
|
|
933
|
+
}), /* @__PURE__ */ y("p", {
|
|
945
934
|
className: "text-sm text-text-secondary mt-1",
|
|
946
|
-
children:
|
|
935
|
+
children: C("collaborationConsole.noMspLinksHint", "Link managed client organizations to oversee workspaces, delegated roles, and consolidated seat usage from one console.")
|
|
947
936
|
})]
|
|
948
|
-
}) }) : /* @__PURE__ */
|
|
937
|
+
}) }) : /* @__PURE__ */ y("div", {
|
|
949
938
|
className: "space-y-3",
|
|
950
939
|
children: $.map((e) => {
|
|
951
|
-
let t = !!(
|
|
952
|
-
return /* @__PURE__ */
|
|
940
|
+
let t = !!(Ae && e.clientOrgId === Ae);
|
|
941
|
+
return /* @__PURE__ */ y(g, {
|
|
953
942
|
treatment: "insight",
|
|
954
|
-
children: /* @__PURE__ */
|
|
943
|
+
children: /* @__PURE__ */ b(p, {
|
|
955
944
|
className: "p-4 flex flex-col sm:flex-row sm:items-center justify-between gap-3",
|
|
956
|
-
children: [/* @__PURE__ */
|
|
945
|
+
children: [/* @__PURE__ */ b("div", {
|
|
957
946
|
className: "space-y-1 min-w-0",
|
|
958
947
|
children: [
|
|
959
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ b("div", {
|
|
960
949
|
className: "flex flex-wrap items-center gap-2",
|
|
961
950
|
children: [
|
|
962
|
-
/* @__PURE__ */
|
|
951
|
+
/* @__PURE__ */ y("span", {
|
|
963
952
|
className: "font-semibold text-text-primary",
|
|
964
953
|
children: e.clientOrgName
|
|
965
954
|
}),
|
|
966
|
-
/* @__PURE__ */
|
|
967
|
-
className: `text-xs border ${
|
|
955
|
+
/* @__PURE__ */ y(d, {
|
|
956
|
+
className: `text-xs border ${S(e.status)}`,
|
|
968
957
|
children: e.status
|
|
969
958
|
}),
|
|
970
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ y(d, {
|
|
971
960
|
variant: "outline",
|
|
972
961
|
children: e.billingMode
|
|
973
962
|
}),
|
|
974
|
-
e.monthlySeatBudget ? /* @__PURE__ */
|
|
963
|
+
e.monthlySeatBudget ? /* @__PURE__ */ b(d, {
|
|
975
964
|
variant: "secondary",
|
|
976
965
|
children: [
|
|
977
966
|
"Budget: ",
|
|
@@ -981,67 +970,67 @@ function x() {
|
|
|
981
970
|
}) : null
|
|
982
971
|
]
|
|
983
972
|
}),
|
|
984
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ b("p", {
|
|
985
974
|
className: "text-xs text-text-secondary",
|
|
986
975
|
children: [
|
|
987
976
|
"MSP Org: ",
|
|
988
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ y("code", { children: e.mspOrgId }),
|
|
989
978
|
" → Client Org:",
|
|
990
979
|
" ",
|
|
991
|
-
/* @__PURE__ */
|
|
980
|
+
/* @__PURE__ */ y("code", { children: e.clientOrgId })
|
|
992
981
|
]
|
|
993
982
|
}),
|
|
994
|
-
/* @__PURE__ */
|
|
983
|
+
/* @__PURE__ */ y("div", {
|
|
995
984
|
className: "flex flex-wrap gap-1 pt-1",
|
|
996
|
-
children: e.delegatedScopes.map((e) => /* @__PURE__ */
|
|
985
|
+
children: e.delegatedScopes.map((e) => /* @__PURE__ */ y(d, {
|
|
997
986
|
variant: "secondary",
|
|
998
987
|
className: "text-xs",
|
|
999
988
|
children: e
|
|
1000
989
|
}, e))
|
|
1001
990
|
})
|
|
1002
991
|
]
|
|
1003
|
-
}), /* @__PURE__ */
|
|
992
|
+
}), /* @__PURE__ */ b("div", {
|
|
1004
993
|
className: "flex flex-wrap items-center gap-2 shrink-0",
|
|
1005
994
|
children: [
|
|
1006
|
-
t && e.status === i.Pending && /* @__PURE__ */
|
|
995
|
+
t && e.status === i.Pending && /* @__PURE__ */ b(f, {
|
|
1007
996
|
size: "sm",
|
|
1008
|
-
onClick: () => void
|
|
997
|
+
onClick: () => void Ye(e.id),
|
|
1009
998
|
disabled: X.approveMspLink.isPending,
|
|
1010
999
|
className: "gap-1",
|
|
1011
|
-
children: [/* @__PURE__ */
|
|
1000
|
+
children: [/* @__PURE__ */ y(c, {
|
|
1012
1001
|
size: 14,
|
|
1013
1002
|
"aria-hidden": "true"
|
|
1014
1003
|
}), "Approve Link"]
|
|
1015
1004
|
}),
|
|
1016
|
-
e.status === i.Active && /* @__PURE__ */
|
|
1005
|
+
e.status === i.Active && /* @__PURE__ */ b(f, {
|
|
1017
1006
|
size: "sm",
|
|
1018
1007
|
variant: "outline",
|
|
1019
|
-
onClick: () => void
|
|
1008
|
+
onClick: () => void Xe(e.id, i.Suspended),
|
|
1020
1009
|
disabled: X.updateMspLink.isPending,
|
|
1021
1010
|
className: "gap-1",
|
|
1022
|
-
children: [/* @__PURE__ */
|
|
1011
|
+
children: [/* @__PURE__ */ y(_e, {
|
|
1023
1012
|
size: 14,
|
|
1024
1013
|
"aria-hidden": "true"
|
|
1025
1014
|
}), "Suspend"]
|
|
1026
1015
|
}),
|
|
1027
|
-
t && e.status === i.Suspended && /* @__PURE__ */
|
|
1016
|
+
t && e.status === i.Suspended && /* @__PURE__ */ b(f, {
|
|
1028
1017
|
size: "sm",
|
|
1029
1018
|
variant: "outline",
|
|
1030
|
-
onClick: () => void
|
|
1019
|
+
onClick: () => void Xe(e.id, i.Active),
|
|
1031
1020
|
disabled: X.updateMspLink.isPending,
|
|
1032
1021
|
className: "gap-1",
|
|
1033
|
-
children: [/* @__PURE__ */
|
|
1022
|
+
children: [/* @__PURE__ */ y(ve, {
|
|
1034
1023
|
size: 14,
|
|
1035
1024
|
"aria-hidden": "true"
|
|
1036
1025
|
}), "Resume"]
|
|
1037
1026
|
}),
|
|
1038
|
-
e.status !== i.Revoked && /* @__PURE__ */
|
|
1027
|
+
e.status !== i.Revoked && /* @__PURE__ */ b(f, {
|
|
1039
1028
|
size: "sm",
|
|
1040
1029
|
variant: "outline",
|
|
1041
|
-
onClick: () => void
|
|
1030
|
+
onClick: () => void Ze(e.id),
|
|
1042
1031
|
disabled: X.revokeMspLink.isPending,
|
|
1043
1032
|
className: "gap-1 text-status-error-text",
|
|
1044
|
-
children: [/* @__PURE__ */
|
|
1033
|
+
children: [/* @__PURE__ */ y(u, {
|
|
1045
1034
|
size: 14,
|
|
1046
1035
|
"aria-hidden": "true"
|
|
1047
1036
|
}), "Revoke"]
|
|
@@ -1056,4 +1045,4 @@ function x() {
|
|
|
1056
1045
|
]
|
|
1057
1046
|
});
|
|
1058
1047
|
}
|
|
1059
|
-
export {
|
|
1048
|
+
export { C as CollaborationConsolePage };
|