@burdenoff/microfe-workspaces 2026.1108.1 → 2026.1110.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/WorkspacesRoot.js +10 -9
- package/dist/WorkspacesRoutes.js +1 -2
- package/dist/components/CreateProjectDialog.js +22 -22
- package/dist/components/CreateWorkspaceDialog.js +8 -9
- package/dist/components/InviteMemberDialog.js +18 -23
- package/dist/components/MemberListItem.js +16 -17
- package/dist/components/ProjectCard.js +14 -15
- package/dist/components/ProjectMemberPickerDialog.js +92 -93
- package/dist/components/RenameProjectDialog.js +12 -17
- package/dist/components/WorkspaceCard.js +6 -7
- package/dist/components/WorkspaceContextPathSync.js +4 -5
- package/dist/components/WorkspacesErrorBoundary.js +6 -11
- package/dist/components/index.js +8 -7
- package/dist/components/tags/ProjectTagsWidget.js +56 -57
- package/dist/components/tags/WorkspaceTagsEditor.js +2 -3
- package/dist/constants/permissions.js +1 -2
- package/dist/generated/global-operations.js +1 -2
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/hooks/index.js +9 -8
- package/dist/hooks/useMemberMutations.js +165 -166
- package/dist/hooks/useOpenWorkspace.js +1 -2
- package/dist/hooks/useOrgsWithPermission.js +2 -3
- package/dist/hooks/usePendingInvitations.d.ts +1 -1
- package/dist/hooks/usePendingInvitations.js +2 -3
- package/dist/hooks/useProjectMemberMutations.js +23 -24
- package/dist/hooks/useProjectMembers.d.ts +2 -2
- package/dist/hooks/useProjectMembers.js +2 -3
- package/dist/hooks/useProjectMutations.js +68 -69
- package/dist/hooks/useProjects.d.ts +3 -3
- package/dist/hooks/useProjects.js +5 -6
- package/dist/hooks/useScopedNavigation.js +1 -2
- package/dist/hooks/useTenants.d.ts +2 -2
- package/dist/hooks/useTenants.js +3 -4
- package/dist/hooks/useTr.js +1 -2
- package/dist/hooks/useWorkspaceActivity.d.ts +1 -1
- package/dist/hooks/useWorkspaceActivity.js +2 -3
- package/dist/hooks/useWorkspaceMembers.d.ts +5 -5
- package/dist/hooks/useWorkspaceMembers.js +7 -8
- package/dist/hooks/useWorkspaceMutations.js +70 -71
- package/dist/hooks/useWorkspacePermissions.js +1 -2
- package/dist/hooks/useWorkspaceRoles.d.ts +1 -1
- package/dist/hooks/useWorkspaceRoles.js +3 -4
- package/dist/hooks/useWorkspaces.d.ts +3 -3
- package/dist/hooks/useWorkspaces.js +4 -5
- package/dist/hooks/useWorkspacesEventEmitter.js +1 -2
- package/dist/hooks/useWorkspacesPageView.js +1 -2
- package/dist/index.js +15 -15
- package/dist/pages/ActivityListPage.js +28 -29
- package/dist/pages/CreateWorkspacePage.js +137 -138
- package/dist/pages/InviteAcceptancePage.js +65 -66
- package/dist/pages/MembersListPage.js +203 -204
- package/dist/pages/PendingInvitesPage.js +63 -64
- package/dist/pages/ProjectDetailPage.js +71 -72
- package/dist/pages/ProjectMembersPage.js +116 -117
- package/dist/pages/ProjectsListPage.js +62 -67
- package/dist/pages/WorkspaceDetailPage.js +153 -154
- package/dist/pages/WorkspaceInvitePage.js +88 -92
- package/dist/pages/WorkspaceSettingsPage.js +32 -33
- package/dist/pages/WorkspacesListPage.js +40 -41
- package/dist/pages/dashboard/DashboardCustomizer.js +98 -94
- package/dist/pages/dashboard/DashboardGrid.js +1 -2
- package/dist/pages/dashboard/DashboardPage.js +12 -13
- package/dist/pages/dashboard/WidgetWrapper.js +21 -21
- package/dist/pages/dashboard/config.js +3 -4
- package/dist/pages/dashboard/hooks/useDashboardData.d.ts +5 -5
- package/dist/pages/dashboard/hooks/useDashboardData.js +9 -10
- package/dist/pages/dashboard/hooks/useDashboardPreferences.js +7 -8
- package/dist/pages/dashboard/reorder.js +11 -14
- package/dist/pages/dashboard/widgets/AgentsWidget.js +13 -14
- package/dist/pages/dashboard/widgets/GroupsWidget.js +9 -10
- package/dist/pages/dashboard/widgets/MembersWidget.js +10 -11
- package/dist/pages/dashboard/widgets/ProjectsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/QuickActionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/RecentActivityWidget.js +22 -23
- package/dist/pages/dashboard/widgets/SessionsWidget.js +28 -29
- package/dist/pages/dashboard/widgets/StorageWidget.js +19 -20
- package/dist/pages/dashboard/widgets/TagCloudWidget.js +9 -10
- package/dist/pages/dashboard/widgets/TipsWidget.js +5 -6
- package/dist/pages/dashboard/widgets/UpcomingEventsWidget.js +17 -18
- package/dist/pages/dashboard/widgets/VibesWidget.js +13 -14
- package/dist/pages/dashboard/widgets/WelcomeWidget.js +12 -13
- package/dist/pages/dashboard/widgets/WorkflowRunsWidget.js +16 -17
- package/dist/pages/dashboard/widgets/WorkflowStatsWidget.js +11 -12
- package/dist/pages/dashboard/widgets/WorkflowsOverviewWidget.js +17 -18
- package/dist/pages/dashboard/widgets/WorkspacesWidget.js +7 -8
- package/dist/pages/dashboard/widgets/tipsCatalog.js +1 -2
- package/dist/providers/WorkspacesProvider.js +1 -2
- package/dist/store/workspacesStore.d.ts +1 -1
- package/dist/store/workspacesStore.js +1 -2
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.js +1 -2
- package/dist/utils/formatters.js +1 -2
- package/dist/utils/i18n.js +1 -2
- package/dist/utils/invitationDisplay.js +1 -2
- package/dist/utils/nativeBridge.js +1 -2
- package/dist/utils/pinnedRequest.js +2 -3
- package/dist/utils/projectTags.js +2 -3
- package/dist/utils/slug.js +1 -2
- package/dist/utils/telemetryError.js +13 -16
- package/dist/utils/tokenHelpers.js +1 -2
- package/dist/utils/workspaceBulkInviteCsv.js +3 -8
- package/package.json +72 -55
|
@@ -1,257 +1,257 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCreateWorkspace as e } from "../hooks/useWorkspaceMutations.js";
|
|
2
2
|
import { useOpenWorkspace as t } from "../hooks/useOpenWorkspace.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { generateSlug as
|
|
8
|
-
import {
|
|
9
|
-
import { useEffect as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { jsx as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { Link as b, useNavigate as
|
|
15
|
-
import { useUpgradePrompt as
|
|
16
|
-
import { AccessDenied as
|
|
17
|
-
import { useForm as
|
|
18
|
-
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
let { t:
|
|
22
|
-
name:
|
|
23
|
-
slug:
|
|
24
|
-
tenantId:
|
|
25
|
-
organizationId:
|
|
26
|
-
}), [
|
|
27
|
-
schema:
|
|
3
|
+
import { useMyOrganizations as ee, useMyTenants as te } from "../hooks/useTenants.js";
|
|
4
|
+
import { useOrgsWithPermission as n } from "../hooks/useOrgsWithPermission.js";
|
|
5
|
+
import { useWorkspacesContext as r } from "../providers/WorkspacesProvider.js";
|
|
6
|
+
import { useWorkspacesPageView as ne } from "../hooks/useWorkspacesPageView.js";
|
|
7
|
+
import { generateSlug as re } from "../utils/slug.js";
|
|
8
|
+
import { tWithFallback as i } from "../utils/i18n.js";
|
|
9
|
+
import { useEffect as a, useMemo as o } from "react";
|
|
10
|
+
import { AlertCircle as s, ArrowLeft as c } from "lucide-react";
|
|
11
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
12
|
+
import { Button as d, CardContent as f, CardDescription as p, CardHeader as m, CardTitle as h, GlassCard as g, PagePurpose as _, Skeleton as v } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { useI18n as y } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { Link as b, useNavigate as x } from "react-router";
|
|
15
|
+
import { useUpgradePrompt as S } from "@burdenoff/fe-libs/shared/hooks";
|
|
16
|
+
import { AccessDenied as C, UpgradeInlineBanner as w } from "@burdenoff/fe-libs/shared/components";
|
|
17
|
+
import { useForm as ie, z as T } from "@burdenoff/fe-libs/form";
|
|
18
|
+
// src/pages/CreateWorkspacePage.tsx
|
|
19
|
+
function E() {
|
|
20
|
+
ne("workspaces.create");
|
|
21
|
+
let { t: E } = y(), { isFree: ae, approachingLimits: oe, plan: se } = S({ resource: "workspaces" }), D = oe[0], O = !!D && typeof D.limit == "number" && D.current >= D.limit, k = ae && !!D, A = o(() => T.object({
|
|
22
|
+
name: T.string().min(2, i(E, "createWorkspace.validation.nameMin", "Name must be at least 2 characters")).max(100),
|
|
23
|
+
slug: T.string().min(2, i(E, "createWorkspace.validation.slugMin", "Slug must be at least 2 characters")).max(50).regex(/^[a-z0-9-]+$/, i(E, "createWorkspace.validation.slugFormat", "Slug can only contain lowercase letters, numbers, and hyphens")),
|
|
24
|
+
tenantId: T.string().min(1, i(E, "createWorkspace.validation.tenantRequired", "Please select a tenant")),
|
|
25
|
+
organizationId: T.string().min(1, i(E, "createWorkspace.validation.organizationRequired", "Please select an organization"))
|
|
26
|
+
}), [E]), j = x(), { basePath: M = "/" } = r(), { mutate: N, isPending: P } = e(), F = t(), { data: I, isLoading: L, error: R } = te(), { data: z, isLoading: B, error: V } = ee(), H = o(() => I?.items ?? [], [I]), U = o(() => z?.items ?? [], [z]), W = o(() => H.find((e) => e.type === "SHARED" || e.slug === "burdenoff-shared")?.id ?? H[0]?.id ?? "", [H]), G = ie({
|
|
27
|
+
schema: A,
|
|
28
28
|
defaultValues: {
|
|
29
29
|
name: "",
|
|
30
30
|
slug: "",
|
|
31
31
|
tenantId: "",
|
|
32
32
|
organizationId: ""
|
|
33
33
|
}
|
|
34
|
-
}),
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
}), K = G.watch("tenantId"), q = G.watch("name"), ce = o(() => U.map((e) => e.id), [U]), { allowedIds: J, loading: Y, isError: X } = n(ce, "workspace", "create"), Z = o(() => K ? U.filter((e) => e.tenantId === K) : [], [K, U]), Q = o(() => X ? Z : Z.filter((e) => J.has(e.id)), [
|
|
35
|
+
Z,
|
|
36
|
+
J,
|
|
37
|
+
X
|
|
38
38
|
]);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
!
|
|
39
|
+
a(() => {
|
|
40
|
+
G.setValue("slug", q ? re(q) : "");
|
|
41
|
+
}, [q, G]), a(() => {
|
|
42
|
+
G.setValue("organizationId", "");
|
|
43
|
+
}, [K, G]), a(() => {
|
|
44
|
+
!G.getValues("tenantId") && W && G.setValue("tenantId", W, {
|
|
45
45
|
shouldDirty: !1,
|
|
46
46
|
shouldTouch: !1
|
|
47
47
|
});
|
|
48
|
-
}, [
|
|
49
|
-
let e =
|
|
50
|
-
|
|
48
|
+
}, [W, G]), a(() => {
|
|
49
|
+
let e = G.getValues("organizationId");
|
|
50
|
+
!Q.some((t) => t.id === e) && Q[0]?.id && G.setValue("organizationId", Q[0].id, {
|
|
51
51
|
shouldDirty: !1,
|
|
52
52
|
shouldTouch: !1
|
|
53
53
|
});
|
|
54
|
-
}, [
|
|
55
|
-
let
|
|
56
|
-
|
|
54
|
+
}, [Q, G]);
|
|
55
|
+
let le = (e) => {
|
|
56
|
+
N({
|
|
57
57
|
name: e.name,
|
|
58
58
|
slug: e.slug,
|
|
59
59
|
tenantId: e.tenantId,
|
|
60
60
|
organizationId: e.organizationId
|
|
61
61
|
}, { onSuccess: (e) => {
|
|
62
|
-
|
|
62
|
+
F(e);
|
|
63
63
|
} });
|
|
64
|
-
},
|
|
65
|
-
return !
|
|
64
|
+
}, $ = J.size > 0, ue = L || B || Y, de = !R && !V && U.length > 0;
|
|
65
|
+
return !ue && !X && de && !$ ? /* @__PURE__ */ u("div", {
|
|
66
66
|
className: "p-6",
|
|
67
|
-
children: [/* @__PURE__ */
|
|
68
|
-
to: `${
|
|
67
|
+
children: [/* @__PURE__ */ u(b, {
|
|
68
|
+
to: `${M}/list`,
|
|
69
69
|
className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors mb-6",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
-
}), /* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ l(c, { size: 20 }), i(E, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
|
|
71
|
+
}), /* @__PURE__ */ l(C, {
|
|
72
72
|
variant: "card",
|
|
73
|
-
title:
|
|
74
|
-
description:
|
|
75
|
-
details:
|
|
73
|
+
title: i(E, "createWorkspace.permissionRequiredTitle", "Permission Required"),
|
|
74
|
+
description: i(E, "createWorkspace.permissionRequiredDescription", "You don't have permission to create workspaces in any of your organizations."),
|
|
75
|
+
details: i(E, "createWorkspace.permissionRequiredDetails", "Required: workspace:create"),
|
|
76
76
|
primaryAction: {
|
|
77
|
-
label:
|
|
78
|
-
onClick: () =>
|
|
77
|
+
label: i(E, "createWorkspace.goBack", "Go Back"),
|
|
78
|
+
onClick: () => j(`${M}/list`)
|
|
79
79
|
}
|
|
80
80
|
})]
|
|
81
|
-
}) : /* @__PURE__ */
|
|
81
|
+
}) : /* @__PURE__ */ u("div", {
|
|
82
82
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
83
83
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
85
|
-
to: `${
|
|
84
|
+
/* @__PURE__ */ u(b, {
|
|
85
|
+
to: `${M}/list`,
|
|
86
86
|
className: "inline-flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ l(c, { size: 20 }), i(E, "createWorkspace.backToWorkspaces", "Back to Workspaces")]
|
|
88
88
|
}),
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ l("div", {
|
|
90
90
|
className: "max-w-2xl mx-auto w-full",
|
|
91
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ l(_, { children: i(E, "createWorkspace.purpose", "Create a workspace to give a team, client or initiative its own dedicated space — with its own projects, members, agents and activity, kept separate from the rest. Give it a clear name, pick the organization that owns it, and you can invite people and add projects right after.") })
|
|
92
92
|
}),
|
|
93
|
-
|
|
93
|
+
k && /* @__PURE__ */ l("div", {
|
|
94
94
|
className: "max-w-2xl mx-auto w-full",
|
|
95
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ l(w, {
|
|
96
96
|
resource: "workspaces",
|
|
97
|
-
current:
|
|
98
|
-
limit:
|
|
99
|
-
severity:
|
|
100
|
-
message:
|
|
97
|
+
current: D.current,
|
|
98
|
+
limit: D.limit ?? void 0,
|
|
99
|
+
severity: O ? "critical" : void 0,
|
|
100
|
+
message: O ? i(E, "createWorkspace.upgradeCapMessage", `You've used all workspaces in the ${se?.planName ?? "free"} plan.`) : i(E, "createWorkspace.upgradeApproachingMessage", "Upgrade to create more workspaces.")
|
|
101
101
|
})
|
|
102
102
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ u(g, {
|
|
104
104
|
treatment: "glass",
|
|
105
105
|
glow: !0,
|
|
106
106
|
className: "max-w-2xl mx-auto border-border-seam",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ u(m, { children: [/* @__PURE__ */ l(h, { children: i(E, "createWorkspace.title", "Create New Workspace") }), /* @__PURE__ */ l(p, { children: i(E, "createWorkspace.subtitle", "Set up a new workspace for your team") })] }), /* @__PURE__ */ u(f, { children: [X && /* @__PURE__ */ u("div", {
|
|
108
108
|
role: "alert",
|
|
109
109
|
className: "mb-4 flex items-start gap-2 rounded-md border border-warning/30 bg-warning/10 p-3 text-sm text-text-primary",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ l(s, {
|
|
111
111
|
size: 16,
|
|
112
112
|
className: "mt-0.5 shrink-0 text-warning"
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
}), /* @__PURE__ */
|
|
115
|
-
onSubmit:
|
|
113
|
+
}), /* @__PURE__ */ l("span", { children: i(E, "createWorkspace.permissionCheckUnavailable", "We couldn't verify your workspace-create permissions just now, so the organization list isn't filtered. If you submit and don't have access, the request will be rejected and you can retry.") })]
|
|
114
|
+
}), /* @__PURE__ */ u("form", {
|
|
115
|
+
onSubmit: G.handleSubmit(le),
|
|
116
116
|
className: "space-y-6",
|
|
117
117
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ u("div", {
|
|
119
119
|
className: "space-y-2",
|
|
120
120
|
children: [
|
|
121
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ l("label", {
|
|
122
122
|
htmlFor: "workspace-name",
|
|
123
123
|
className: "text-sm font-medium text-text-primary",
|
|
124
|
-
children:
|
|
124
|
+
children: i(E, "createWorkspace.nameLabel", "Workspace Name *")
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ l("input", {
|
|
127
127
|
id: "workspace-name",
|
|
128
|
-
placeholder:
|
|
128
|
+
placeholder: i(E, "createWorkspace.namePlaceholder", "My Workspace"),
|
|
129
129
|
className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
130
|
-
...
|
|
130
|
+
...G.register("name")
|
|
131
131
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ l("p", {
|
|
133
133
|
className: "text-xs text-text-secondary",
|
|
134
|
-
children:
|
|
134
|
+
children: i(E, "createWorkspace.nameHint", "A descriptive name for your workspace")
|
|
135
135
|
}),
|
|
136
|
-
|
|
136
|
+
G.formState.errors.name?.message && /* @__PURE__ */ l("p", {
|
|
137
137
|
className: "text-sm text-status-error-text",
|
|
138
|
-
children:
|
|
138
|
+
children: G.formState.errors.name.message
|
|
139
139
|
})
|
|
140
140
|
]
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ u("div", {
|
|
143
143
|
className: "space-y-2",
|
|
144
144
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ l("label", {
|
|
146
146
|
htmlFor: "workspace-slug",
|
|
147
147
|
className: "text-sm font-medium text-text-primary",
|
|
148
|
-
children:
|
|
148
|
+
children: i(E, "createWorkspace.slugLabel", "Slug *")
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ l("input", {
|
|
151
151
|
id: "workspace-slug",
|
|
152
|
-
placeholder:
|
|
152
|
+
placeholder: i(E, "createWorkspace.slugPlaceholder", "my-workspace"),
|
|
153
153
|
className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
154
|
-
...
|
|
154
|
+
...G.register("slug")
|
|
155
155
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ l("p", {
|
|
157
157
|
className: "text-xs text-text-secondary",
|
|
158
|
-
children:
|
|
158
|
+
children: i(E, "createWorkspace.slugHint", "URL-friendly identifier (auto-generated, but you can edit it)")
|
|
159
159
|
}),
|
|
160
|
-
|
|
160
|
+
G.formState.errors.slug?.message && /* @__PURE__ */ l("p", {
|
|
161
161
|
className: "text-sm text-status-error-text",
|
|
162
|
-
children:
|
|
162
|
+
children: G.formState.errors.slug.message
|
|
163
163
|
})
|
|
164
164
|
]
|
|
165
165
|
}),
|
|
166
|
-
|
|
166
|
+
H.length === 1 ? null : /* @__PURE__ */ u("div", {
|
|
167
167
|
className: "space-y-2",
|
|
168
168
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ l("label", {
|
|
170
170
|
htmlFor: "workspace-tenant",
|
|
171
171
|
className: "text-sm font-medium text-text-primary",
|
|
172
|
-
children:
|
|
172
|
+
children: i(E, "createWorkspace.tenantLabel", "Tenant *")
|
|
173
173
|
}),
|
|
174
|
-
|
|
174
|
+
L ? /* @__PURE__ */ l(v, { className: "h-10 w-full" }) : R ? /* @__PURE__ */ u("div", {
|
|
175
175
|
className: "flex items-center gap-2 text-sm text-status-error-text",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
177
|
-
}) :
|
|
176
|
+
children: [/* @__PURE__ */ l(s, { size: 16 }), i(E, "createWorkspace.failedToLoadTenants", "Failed to load tenants")]
|
|
177
|
+
}) : H.length === 0 ? /* @__PURE__ */ l("div", {
|
|
178
178
|
className: "text-sm text-text-secondary",
|
|
179
|
-
children:
|
|
180
|
-
}) : /* @__PURE__ */
|
|
179
|
+
children: i(E, "createWorkspace.noTenantsAvailable", "No tenants available. Contact your administrator.")
|
|
180
|
+
}) : /* @__PURE__ */ u("select", {
|
|
181
181
|
id: "workspace-tenant",
|
|
182
182
|
className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
183
|
-
...
|
|
184
|
-
children: [/* @__PURE__ */
|
|
183
|
+
...G.register("tenantId"),
|
|
184
|
+
children: [/* @__PURE__ */ l("option", {
|
|
185
185
|
value: "",
|
|
186
|
-
children:
|
|
187
|
-
}),
|
|
186
|
+
children: i(E, "createWorkspace.selectTenantPlaceholder", "Select a tenant")
|
|
187
|
+
}), H.map((e) => /* @__PURE__ */ l("option", {
|
|
188
188
|
value: e.id,
|
|
189
189
|
children: e.name
|
|
190
190
|
}, e.id))]
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ l("p", {
|
|
193
193
|
className: "text-xs text-text-secondary",
|
|
194
|
-
children:
|
|
194
|
+
children: i(E, "createWorkspace.tenantHint", "Select which tenant this workspace belongs to")
|
|
195
195
|
}),
|
|
196
|
-
|
|
196
|
+
G.formState.errors.tenantId?.message && /* @__PURE__ */ l("p", {
|
|
197
197
|
className: "text-sm text-status-error-text",
|
|
198
|
-
children:
|
|
198
|
+
children: G.formState.errors.tenantId.message
|
|
199
199
|
})
|
|
200
200
|
]
|
|
201
201
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ u("div", {
|
|
203
203
|
className: "space-y-2",
|
|
204
204
|
children: [
|
|
205
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ l("label", {
|
|
206
206
|
htmlFor: "workspace-organization",
|
|
207
207
|
className: "text-sm font-medium text-text-primary",
|
|
208
|
-
children:
|
|
208
|
+
children: i(E, "createWorkspace.organizationLabel", "Organization *")
|
|
209
209
|
}),
|
|
210
|
-
|
|
210
|
+
B || Y ? /* @__PURE__ */ l(v, { className: "h-10 w-full" }) : V ? /* @__PURE__ */ u("div", {
|
|
211
211
|
className: "flex items-center gap-2 text-sm text-status-error-text",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
}) :
|
|
212
|
+
children: [/* @__PURE__ */ l(s, { size: 16 }), i(E, "createWorkspace.failedToLoadOrganizations", "Failed to load organizations")]
|
|
213
|
+
}) : K ? Q.length === 0 ? /* @__PURE__ */ l("div", {
|
|
214
214
|
className: "text-sm text-text-secondary",
|
|
215
|
-
children:
|
|
216
|
-
}) : /* @__PURE__ */
|
|
215
|
+
children: i(E, "createWorkspace.noOrganizationsFound", "No organizations found for this tenant")
|
|
216
|
+
}) : /* @__PURE__ */ u("select", {
|
|
217
217
|
id: "workspace-organization",
|
|
218
218
|
className: "h-10 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
219
|
-
disabled: !
|
|
220
|
-
...
|
|
221
|
-
children: [/* @__PURE__ */
|
|
219
|
+
disabled: !K,
|
|
220
|
+
...G.register("organizationId"),
|
|
221
|
+
children: [/* @__PURE__ */ l("option", {
|
|
222
222
|
value: "",
|
|
223
|
-
children:
|
|
224
|
-
}),
|
|
223
|
+
children: i(E, "createWorkspace.selectOrganizationPlaceholder", "Select an organization")
|
|
224
|
+
}), Q.map((e) => /* @__PURE__ */ l("option", {
|
|
225
225
|
value: e.id,
|
|
226
226
|
children: e.name
|
|
227
227
|
}, e.id))]
|
|
228
|
-
}) : /* @__PURE__ */
|
|
228
|
+
}) : /* @__PURE__ */ l("div", {
|
|
229
229
|
className: "text-sm text-text-secondary",
|
|
230
|
-
children:
|
|
230
|
+
children: i(E, "createWorkspace.selectTenantFirst", "Please select a tenant first")
|
|
231
231
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ l("p", {
|
|
233
233
|
className: "text-xs text-text-secondary",
|
|
234
|
-
children:
|
|
234
|
+
children: i(E, "createWorkspace.organizationHint", "Select which organization owns this workspace")
|
|
235
235
|
}),
|
|
236
|
-
|
|
236
|
+
G.formState.errors.organizationId?.message && /* @__PURE__ */ l("p", {
|
|
237
237
|
className: "text-sm text-status-error-text",
|
|
238
|
-
children:
|
|
238
|
+
children: G.formState.errors.organizationId.message
|
|
239
239
|
})
|
|
240
240
|
]
|
|
241
241
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ u("div", {
|
|
243
243
|
className: "flex justify-end gap-3 pt-4",
|
|
244
|
-
children: [/* @__PURE__ */ d
|
|
244
|
+
children: [/* @__PURE__ */ l(d, {
|
|
245
245
|
type: "button",
|
|
246
246
|
variant: "outline",
|
|
247
|
-
onClick: () =>
|
|
248
|
-
disabled:
|
|
249
|
-
children:
|
|
250
|
-
}), /* @__PURE__ */ d
|
|
247
|
+
onClick: () => j(`${M}/list`),
|
|
248
|
+
disabled: P,
|
|
249
|
+
children: i(E, "createWorkspace.cancel", "Cancel")
|
|
250
|
+
}), /* @__PURE__ */ l(d, {
|
|
251
251
|
type: "submit",
|
|
252
|
-
disabled:
|
|
253
|
-
title:
|
|
254
|
-
children:
|
|
252
|
+
disabled: P || L || B || Y || O,
|
|
253
|
+
title: O ? i(E, "createWorkspace.disabledAtCap", "Workspace limit reached — upgrade your plan to create more.") : void 0,
|
|
254
|
+
children: P ? i(E, "createWorkspace.creating", "Creating...") : i(E, "createWorkspace.submit", "Create Workspace")
|
|
255
255
|
})]
|
|
256
256
|
})
|
|
257
257
|
]
|
|
@@ -260,5 +260,4 @@ function w() {
|
|
|
260
260
|
]
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
|
-
|
|
264
|
-
export { w as CreateWorkspacePage };
|
|
263
|
+
export { E as CreateWorkspacePage };
|