@burdenoff/microfe-workspaces 2026.531.3 → 2026.531.4
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/WorkspacesRoutes.js +25 -21
- package/dist/WorkspacesRoutes.js.map +1 -1
- package/dist/components/MemberListItem.js +2 -1
- package/dist/components/MemberListItem.js.map +1 -1
- package/dist/components/ProjectMemberPickerDialog.js +211 -0
- package/dist/components/ProjectMemberPickerDialog.js.map +1 -0
- package/dist/hooks/useMemberMutations.js +3 -3
- package/dist/hooks/useMemberMutations.js.map +1 -1
- package/dist/hooks/useProjectMemberMutations.js +104 -0
- package/dist/hooks/useProjectMemberMutations.js.map +1 -0
- package/dist/hooks/useProjectMembers.js +42 -0
- package/dist/hooks/useProjectMembers.js.map +1 -0
- package/dist/hooks/useWorkspaceMembers.js +60 -24
- package/dist/hooks/useWorkspaceMembers.js.map +1 -1
- package/dist/hooks/useWorkspacePermissions.js +4 -0
- package/dist/hooks/useWorkspacePermissions.js.map +1 -1
- package/dist/hooks/useWorkspacesEventEmitter.js.map +1 -1
- package/dist/index.js +16 -16
- package/dist/pages/MembersListPage.js +2 -1
- package/dist/pages/MembersListPage.js.map +1 -1
- package/dist/pages/ProjectDetailPage.js +248 -212
- package/dist/pages/ProjectDetailPage.js.map +1 -1
- package/dist/pages/ProjectMembersPage.js +265 -0
- package/dist/pages/ProjectMembersPage.js.map +1 -0
- package/package.json +1 -1
|
@@ -5,387 +5,423 @@ import { tWithFallback as r } from "../utils/i18n.js";
|
|
|
5
5
|
import { useWorkspacesPageView as ee } from "../hooks/useWorkspacesPageView.js";
|
|
6
6
|
import { nativeImpact as te, nativeNotify as i } from "../utils/nativeBridge.js";
|
|
7
7
|
import { useWorkspacePermissions as ne } from "../hooks/useWorkspacePermissions.js";
|
|
8
|
-
import { useProject as re, useProjectMembersCount as
|
|
9
|
-
import { useArchiveProject as
|
|
10
|
-
import { formatDate as
|
|
11
|
-
import { getProjectDisplayTags as
|
|
12
|
-
import { useWorkspaceActivity as
|
|
13
|
-
import { ProjectTagsWidget as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
8
|
+
import { useProject as re, useProjectMembersCount as ie } from "../hooks/useProjects.js";
|
|
9
|
+
import { useArchiveProject as ae, useDeleteProject as oe, useTagProject as se, useUnarchiveProject as ce, useUntagProject as le, useUpdateProject as ue } from "../hooks/useProjectMutations.js";
|
|
10
|
+
import { formatDate as a } from "../utils/formatters.js";
|
|
11
|
+
import { getProjectDisplayTags as de, toProjectTag as o } from "../utils/projectTags.js";
|
|
12
|
+
import { useWorkspaceActivity as s } from "../hooks/useWorkspaceActivity.js";
|
|
13
|
+
import { ProjectTagsWidget as c } from "../components/tags/ProjectTagsWidget.js";
|
|
14
|
+
import { ProjectMemberPickerDialog as l } from "../components/ProjectMemberPickerDialog.js";
|
|
15
|
+
import { useMemo as u, useState as d } from "react";
|
|
16
|
+
import { Activity as f, Archive as p, ArrowLeft as m, Clock as h, FolderKanban as g, MoreVertical as fe, UserPlus as pe, Users as _ } from "lucide-react";
|
|
17
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
18
|
+
import { AlertDialog as me, AlertDialogAction as he, AlertDialogCancel as ge, AlertDialogContent as _e, AlertDialogDescription as ve, AlertDialogFooter as ye, AlertDialogHeader as be, AlertDialogTitle as xe, Badge as b, Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, DropdownMenu as E, DropdownMenuContent as D, DropdownMenuItem as O, DropdownMenuSeparator as k, DropdownMenuTrigger as A, Skeleton as j } from "@burdenoff/fe-libs/ui";
|
|
19
|
+
import { useNavigate as M, useParams as Se } from "react-router-dom";
|
|
20
|
+
import { useI18n as Ce } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
21
|
//#region src/pages/ProjectDetailPage.tsx
|
|
21
|
-
function
|
|
22
|
-
let { t:
|
|
22
|
+
function N() {
|
|
23
|
+
let { t: N } = Ce(), { workspaceId: P, projectId: F } = Se();
|
|
23
24
|
ee("workspaces.project-detail", {
|
|
24
|
-
workspaceId:
|
|
25
|
-
projectId:
|
|
25
|
+
workspaceId: P,
|
|
26
|
+
projectId: F,
|
|
26
27
|
requireParams: !0
|
|
27
28
|
});
|
|
28
|
-
let
|
|
29
|
-
tags:
|
|
30
|
-
tagAssignments:
|
|
31
|
-
}), [
|
|
32
|
-
|
|
33
|
-
G(Y);
|
|
34
|
-
}, [Y]);
|
|
35
|
-
let Le = f(() => W, [W]);
|
|
36
|
-
if (Ie) return /* @__PURE__ */ x("div", {
|
|
29
|
+
let I = M(), { basePath: L = "/workspaces" } = e(), { withCurrentSearch: R } = n(), { data: z, isLoading: we, error: Te } = re(F || "", P), [Ee, B] = d(!1), [V, H] = d(!1), { mutate: De, isPending: U } = ae(P), { mutate: Oe, isPending: W } = ce(P), { mutate: ke, isPending: G } = oe(P), { mutateAsync: Ae, isPending: je } = se(P), { mutateAsync: Me, isPending: Ne } = le(P), { mutateAsync: Pe, isPending: Fe } = ue(P), { canViewProject: Ie, canDeleteProject: K, canArchiveProject: q, canListProjectMembers: J, canAddProjectMember: Y, isLoading: Le } = ne(), { data: Re } = ie(F || "", P), X = u(() => de({
|
|
30
|
+
tags: z?.tags ?? [],
|
|
31
|
+
tagAssignments: z?.tagAssignments
|
|
32
|
+
}), [z?.tags, z?.tagAssignments]), { data: ze } = s(P), Be = (ze ?? []).filter((e) => e.resourceId === F || e.resourceType?.toLowerCase() === "project").length, Ve = X;
|
|
33
|
+
if (Le) return /* @__PURE__ */ y("div", {
|
|
37
34
|
className: "space-y-4 p-6",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
35
|
+
children: [/* @__PURE__ */ v(j, { className: "h-10 w-1/3" }), /* @__PURE__ */ v(j, { className: "h-64" })]
|
|
39
36
|
});
|
|
40
|
-
if (!
|
|
37
|
+
if (!Ie) return /* @__PURE__ */ v("div", {
|
|
41
38
|
className: "flex items-center justify-center min-h-[400px]",
|
|
42
|
-
children: /* @__PURE__ */
|
|
39
|
+
children: /* @__PURE__ */ y("div", {
|
|
43
40
|
className: "text-center space-y-2",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
45
42
|
className: "text-lg font-semibold",
|
|
46
|
-
children: r(
|
|
47
|
-
}), /* @__PURE__ */
|
|
43
|
+
children: r(N, "projectDetail.accessDenied", "Access Denied")
|
|
44
|
+
}), /* @__PURE__ */ v("p", {
|
|
48
45
|
className: "text-sm text-muted-foreground",
|
|
49
|
-
children: r(
|
|
46
|
+
children: r(N, "projectDetail.noPermissionToViewProject", "You don't have permission to view this project.")
|
|
50
47
|
})]
|
|
51
48
|
})
|
|
52
49
|
});
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
50
|
+
let Z = () => {
|
|
51
|
+
I(R(`${L}/${P}/projects`));
|
|
52
|
+
}, He = () => {
|
|
53
|
+
z && (z.archived ? Oe(z.id, { onError: (e) => {
|
|
57
54
|
console.error("Failed to unarchive project:", e);
|
|
58
|
-
} }) :
|
|
55
|
+
} }) : De(z.id, { onError: (e) => {
|
|
59
56
|
console.error("Failed to archive project:", e);
|
|
60
57
|
} }));
|
|
61
|
-
},
|
|
62
|
-
|
|
58
|
+
}, Ue = () => {
|
|
59
|
+
z && (te("medium"), ke(z.id, {
|
|
63
60
|
onSuccess: () => {
|
|
64
|
-
i("success"),
|
|
61
|
+
i("success"), B(!1), I(R(`${L}/${P}/projects`));
|
|
65
62
|
},
|
|
66
63
|
onError: (e) => {
|
|
67
64
|
i("error"), console.error("Failed to delete project:", e);
|
|
68
65
|
}
|
|
69
66
|
}));
|
|
67
|
+
}, Q = () => {
|
|
68
|
+
I(R(`${L}/${P}/projects/${F}/members`));
|
|
70
69
|
}, $ = async (e) => {
|
|
71
|
-
if (!
|
|
72
|
-
let t = e.map((e) =>
|
|
70
|
+
if (!z) return;
|
|
71
|
+
let t = e.map((e) => o(e));
|
|
73
72
|
try {
|
|
74
|
-
await
|
|
75
|
-
id:
|
|
73
|
+
await Pe({
|
|
74
|
+
id: z.id,
|
|
76
75
|
input: { tags: t }
|
|
77
76
|
});
|
|
78
77
|
} catch (e) {
|
|
79
78
|
i("warning"), console.error("Failed to sync legacy project tag mirror after updating structured project tags:", e);
|
|
80
79
|
}
|
|
81
80
|
};
|
|
82
|
-
return
|
|
81
|
+
return we ? /* @__PURE__ */ y("div", {
|
|
83
82
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
84
83
|
children: [
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ v(j, { className: "h-10 w-32" }),
|
|
85
|
+
/* @__PURE__ */ v(j, { className: "h-10 w-1/3" }),
|
|
86
|
+
/* @__PURE__ */ y("div", {
|
|
88
87
|
className: "grid grid-cols-1 md:grid-cols-3 gap-4",
|
|
89
88
|
children: [
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ v(j, { className: "h-32" }),
|
|
90
|
+
/* @__PURE__ */ v(j, { className: "h-32" }),
|
|
91
|
+
/* @__PURE__ */ v(j, { className: "h-32" })
|
|
93
92
|
]
|
|
94
93
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ v(j, { className: "h-48" })
|
|
96
95
|
]
|
|
97
|
-
}) :
|
|
96
|
+
}) : Te || !z ? /* @__PURE__ */ y("div", {
|
|
98
97
|
className: "space-y-4 p-6",
|
|
99
|
-
children: [/* @__PURE__ */ x
|
|
98
|
+
children: [/* @__PURE__ */ y(x, {
|
|
100
99
|
variant: "ghost",
|
|
101
|
-
onClick:
|
|
100
|
+
onClick: Z,
|
|
102
101
|
className: "gap-2",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
104
|
-
}), /* @__PURE__ */
|
|
102
|
+
children: [/* @__PURE__ */ v(m, { size: 20 }), r(N, "projectDetail.backToProjects", "Back to Projects")]
|
|
103
|
+
}), /* @__PURE__ */ y("div", {
|
|
105
104
|
className: "text-center py-12",
|
|
106
105
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ v("div", {
|
|
108
107
|
className: "rounded-full bg-muted p-6 mb-4 inline-block",
|
|
109
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ v(g, {
|
|
110
109
|
size: 48,
|
|
111
110
|
className: "text-muted-foreground"
|
|
112
111
|
})
|
|
113
112
|
}),
|
|
114
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ v("h3", {
|
|
115
114
|
className: "text-lg font-semibold mb-2",
|
|
116
|
-
children: r(
|
|
115
|
+
children: r(N, "projectDetail.projectNotFound", "Project not found")
|
|
117
116
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ v("p", {
|
|
119
118
|
className: "text-muted-foreground max-w-sm mx-auto mb-4",
|
|
120
|
-
children: r(
|
|
119
|
+
children: r(N, "projectDetail.projectNotFoundDescription", "The project you're looking for doesn't exist or you don't have permission to view it.")
|
|
121
120
|
}),
|
|
122
|
-
/* @__PURE__ */ x
|
|
123
|
-
onClick:
|
|
124
|
-
children: [/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ y(x, {
|
|
122
|
+
onClick: Z,
|
|
123
|
+
children: [/* @__PURE__ */ v(m, {
|
|
125
124
|
size: 16,
|
|
126
125
|
className: "mr-2"
|
|
127
|
-
}), r(
|
|
126
|
+
}), r(N, "projectDetail.backToProjects", "Back to Projects")]
|
|
128
127
|
})
|
|
129
128
|
]
|
|
130
129
|
})]
|
|
131
|
-
}) : /* @__PURE__ */
|
|
130
|
+
}) : /* @__PURE__ */ y("div", {
|
|
132
131
|
className: "space-y-4 sm:space-y-6 p-3 sm:p-6",
|
|
133
132
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ y("div", {
|
|
135
134
|
className: "flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */ x
|
|
135
|
+
children: [/* @__PURE__ */ y("div", { children: [
|
|
136
|
+
/* @__PURE__ */ y(x, {
|
|
138
137
|
variant: "ghost",
|
|
139
|
-
onClick:
|
|
138
|
+
onClick: Z,
|
|
140
139
|
className: "gap-2 mb-2 -ml-2",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ v(m, { size: 20 }), r(N, "projectDetail.backToProjects", "Back to Projects")]
|
|
142
141
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ y("div", {
|
|
144
143
|
className: "flex items-center gap-3",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ v("div", {
|
|
146
145
|
className: "p-3 rounded-lg bg-primary/10",
|
|
147
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ v(g, {
|
|
148
147
|
className: "text-primary",
|
|
149
148
|
size: 28
|
|
150
149
|
})
|
|
151
|
-
}), /* @__PURE__ */
|
|
150
|
+
}), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("h1", {
|
|
152
151
|
className: "text-2xl sm:text-3xl font-bold",
|
|
153
|
-
children:
|
|
154
|
-
}), /* @__PURE__ */
|
|
152
|
+
children: z.name
|
|
153
|
+
}), /* @__PURE__ */ v("p", {
|
|
155
154
|
className: "text-sm text-muted-foreground font-mono",
|
|
156
|
-
children:
|
|
155
|
+
children: z.key
|
|
157
156
|
})] })]
|
|
158
157
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ y("div", {
|
|
160
159
|
className: "flex items-center gap-2 mt-3",
|
|
161
|
-
children: [/* @__PURE__ */ b
|
|
162
|
-
className: `border ${t(
|
|
163
|
-
children:
|
|
164
|
-
}),
|
|
160
|
+
children: [/* @__PURE__ */ v(b, {
|
|
161
|
+
className: `border ${t(z.status)}`,
|
|
162
|
+
children: z.status
|
|
163
|
+
}), z.archived && /* @__PURE__ */ y(b, {
|
|
165
164
|
variant: "outline",
|
|
166
165
|
className: "border-workspace-archived-border text-workspace-archived-text",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ v(p, {
|
|
168
167
|
size: 12,
|
|
169
168
|
className: "mr-1"
|
|
170
|
-
}), r(
|
|
169
|
+
}), r(N, "projectDetail.archived", "Archived")]
|
|
171
170
|
})]
|
|
172
171
|
})
|
|
173
|
-
] }), /* @__PURE__ */
|
|
172
|
+
] }), /* @__PURE__ */ v("div", {
|
|
174
173
|
className: "flex items-center gap-2",
|
|
175
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ y(E, { children: [/* @__PURE__ */ v(A, {
|
|
176
175
|
asChild: !0,
|
|
177
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ v(x, {
|
|
178
177
|
variant: "outline",
|
|
179
178
|
size: "icon",
|
|
180
|
-
"aria-label": r(
|
|
181
|
-
children: /* @__PURE__ */
|
|
179
|
+
"aria-label": r(N, "projectDetail.openProjectActionsAriaLabel", "Open project actions"),
|
|
180
|
+
children: /* @__PURE__ */ v(fe, { size: 20 })
|
|
182
181
|
})
|
|
183
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ y(D, {
|
|
184
183
|
align: "end",
|
|
185
184
|
children: [
|
|
186
|
-
|
|
187
|
-
onClick:
|
|
188
|
-
disabled:
|
|
189
|
-
children: [/* @__PURE__ */
|
|
185
|
+
q && /* @__PURE__ */ y(O, {
|
|
186
|
+
onClick: He,
|
|
187
|
+
disabled: U || W,
|
|
188
|
+
children: [/* @__PURE__ */ v(p, {
|
|
190
189
|
size: 16,
|
|
191
190
|
className: "mr-2"
|
|
192
|
-
}),
|
|
191
|
+
}), U || W ? r(N, "projectDetail.processing", "Processing...") : z.archived ? r(N, "projectDetail.unarchive", "Unarchive") : r(N, "projectDetail.archive", "Archive")]
|
|
193
192
|
}),
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
onClick: () =>
|
|
193
|
+
q && K && /* @__PURE__ */ v(k, {}),
|
|
194
|
+
K && /* @__PURE__ */ v(O, {
|
|
195
|
+
onClick: () => B(!0),
|
|
197
196
|
className: "text-destructive",
|
|
198
|
-
children: r(
|
|
197
|
+
children: r(N, "projectDetail.deleteProject", "Delete Project")
|
|
199
198
|
})
|
|
200
199
|
]
|
|
201
200
|
})] })
|
|
202
201
|
})]
|
|
203
202
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ y("div", {
|
|
205
204
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
205
|
+
children: [/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, {
|
|
207
206
|
className: "flex flex-row items-center justify-between pb-2",
|
|
208
|
-
children: /* @__PURE__ */
|
|
207
|
+
children: /* @__PURE__ */ y(T, {
|
|
209
208
|
className: "flex items-center gap-2 text-base",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ v(_, {
|
|
211
210
|
size: 20,
|
|
212
211
|
className: "text-muted-foreground"
|
|
213
|
-
}), r(
|
|
212
|
+
}), r(N, "projectDetail.membersCardTitle", "Members")]
|
|
214
213
|
})
|
|
215
|
-
}), /* @__PURE__ */
|
|
216
|
-
className: "
|
|
217
|
-
children:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
214
|
+
}), /* @__PURE__ */ y(C, {
|
|
215
|
+
className: "space-y-4",
|
|
216
|
+
children: [
|
|
217
|
+
/* @__PURE__ */ v("p", {
|
|
218
|
+
className: "text-3xl font-bold",
|
|
219
|
+
children: Re ?? 0
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ v("p", {
|
|
222
|
+
className: "text-sm text-muted-foreground",
|
|
223
|
+
children: r(N, "projectDetail.projectMembers", "Project members")
|
|
224
|
+
}),
|
|
225
|
+
Y || J ? /* @__PURE__ */ y("div", {
|
|
226
|
+
className: "flex flex-wrap gap-2",
|
|
227
|
+
children: [Y ? /* @__PURE__ */ y(x, {
|
|
228
|
+
size: "sm",
|
|
229
|
+
onClick: () => H(!0),
|
|
230
|
+
children: [/* @__PURE__ */ v(pe, {
|
|
231
|
+
size: 16,
|
|
232
|
+
className: "mr-2"
|
|
233
|
+
}), r(N, "projectDetail.addProjectMember", "Add Member")]
|
|
234
|
+
}) : null, J ? /* @__PURE__ */ y(x, {
|
|
235
|
+
variant: "outline",
|
|
236
|
+
size: "sm",
|
|
237
|
+
onClick: Q,
|
|
238
|
+
children: [/* @__PURE__ */ v(_, {
|
|
239
|
+
size: 16,
|
|
240
|
+
className: "mr-2"
|
|
241
|
+
}), r(N, "projectDetail.manageProjectMembers", "Manage Members")]
|
|
242
|
+
}) : null]
|
|
243
|
+
}) : null
|
|
244
|
+
]
|
|
245
|
+
})] }), /* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, {
|
|
222
246
|
className: "flex flex-row items-center justify-between pb-2",
|
|
223
|
-
children: /* @__PURE__ */
|
|
247
|
+
children: /* @__PURE__ */ y(T, {
|
|
224
248
|
className: "flex items-center gap-2 text-base",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ v(f, {
|
|
226
250
|
size: 20,
|
|
227
251
|
className: "text-muted-foreground"
|
|
228
|
-
}), r(
|
|
252
|
+
}), r(N, "projectDetail.activityCardTitle", "Activity")]
|
|
229
253
|
})
|
|
230
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ y(C, { children: [/* @__PURE__ */ v("p", {
|
|
231
255
|
className: "text-3xl font-bold",
|
|
232
|
-
children:
|
|
233
|
-
}), /* @__PURE__ */
|
|
256
|
+
children: Be
|
|
257
|
+
}), /* @__PURE__ */ v("p", {
|
|
234
258
|
className: "text-sm text-muted-foreground",
|
|
235
|
-
children: r(
|
|
259
|
+
children: r(N, "projectDetail.recentActivityItems", "Recent activity items")
|
|
236
260
|
})] })] })]
|
|
237
261
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.tagsTitle", "Tags") }) }), /* @__PURE__ */ y(C, {
|
|
239
263
|
className: "space-y-3",
|
|
240
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ v("p", {
|
|
241
265
|
className: "text-sm text-muted-foreground",
|
|
242
|
-
children: r(
|
|
243
|
-
}), /* @__PURE__ */
|
|
266
|
+
children: r(N, "projectDetail.tagsDescription", "Use universal tags to classify and filter this project across the workspace.")
|
|
267
|
+
}), /* @__PURE__ */ v(c, {
|
|
244
268
|
entityType: "Project",
|
|
245
|
-
entityId:
|
|
246
|
-
workspaceId:
|
|
247
|
-
tags:
|
|
269
|
+
entityId: z.id,
|
|
270
|
+
workspaceId: P,
|
|
271
|
+
tags: Ve,
|
|
248
272
|
onAdd: async (e) => {
|
|
249
|
-
if (
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
try {
|
|
253
|
-
await Ee({
|
|
254
|
-
entityId: H.id,
|
|
273
|
+
if (z) try {
|
|
274
|
+
await Ae({
|
|
275
|
+
entityId: z.id,
|
|
255
276
|
tagId: e.id
|
|
256
|
-
});
|
|
277
|
+
}), await $([...X, o(e)]);
|
|
257
278
|
} catch (e) {
|
|
258
|
-
throw
|
|
279
|
+
throw i("error"), e;
|
|
259
280
|
}
|
|
260
|
-
await $(n);
|
|
261
281
|
},
|
|
262
282
|
onRemove: async (e) => {
|
|
263
|
-
if (!
|
|
264
|
-
let t =
|
|
265
|
-
G(n);
|
|
283
|
+
if (!z) return;
|
|
284
|
+
let t = z.tagAssignments?.find((t) => t.tagId === e)?.id;
|
|
266
285
|
try {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
entityId: H.id,
|
|
286
|
+
await Me({
|
|
287
|
+
entityId: z.id,
|
|
270
288
|
tagId: e,
|
|
271
289
|
assignmentId: t
|
|
272
|
-
});
|
|
290
|
+
}), await $(X.filter((t) => t.tagId !== e && t.id !== e));
|
|
273
291
|
} catch (e) {
|
|
274
|
-
throw
|
|
292
|
+
throw i("error"), e;
|
|
275
293
|
}
|
|
276
|
-
await $(n);
|
|
277
294
|
},
|
|
278
|
-
className:
|
|
295
|
+
className: je || Ne || Fe ? "pointer-events-none opacity-75" : void 0
|
|
279
296
|
})]
|
|
280
297
|
})] }),
|
|
281
|
-
/* @__PURE__ */
|
|
298
|
+
/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.projectInformation", "Project Information") }) }), /* @__PURE__ */ y(C, {
|
|
282
299
|
className: "space-y-4",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
300
|
+
children: [/* @__PURE__ */ y("div", {
|
|
284
301
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
|
|
285
302
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ y("div", {
|
|
287
304
|
className: "space-y-1",
|
|
288
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ y("span", {
|
|
289
306
|
className: "text-muted-foreground flex items-center gap-2",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
291
|
-
}), /* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ v(g, { size: 14 }), r(N, "projectDetail.projectId", "Project ID")]
|
|
308
|
+
}), /* @__PURE__ */ v("span", {
|
|
292
309
|
className: "font-mono text-xs block",
|
|
293
|
-
children:
|
|
310
|
+
children: z.id
|
|
294
311
|
})]
|
|
295
312
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ y("div", {
|
|
297
314
|
className: "space-y-1",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ y("span", {
|
|
299
316
|
className: "text-muted-foreground flex items-center gap-2",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
301
|
-
}), /* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ v(g, { size: 14 }), r(N, "projectDetail.projectKey", "Project Key")]
|
|
318
|
+
}), /* @__PURE__ */ v("span", {
|
|
302
319
|
className: "font-medium",
|
|
303
|
-
children:
|
|
320
|
+
children: z.key
|
|
304
321
|
})]
|
|
305
322
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ y("div", {
|
|
307
324
|
className: "space-y-1",
|
|
308
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ y("span", {
|
|
309
326
|
className: "text-muted-foreground flex items-center gap-2",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
311
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ v(h, { size: 14 }), r(N, "projectDetail.created", "Created")]
|
|
328
|
+
}), /* @__PURE__ */ v("span", { children: a(z.createdAt) })]
|
|
312
329
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ y("div", {
|
|
314
331
|
className: "space-y-1",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ y("span", {
|
|
316
333
|
className: "text-muted-foreground flex items-center gap-2",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
318
|
-
}), /* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ v(h, { size: 14 }), r(N, "projectDetail.lastUpdated", "Last Updated")]
|
|
335
|
+
}), /* @__PURE__ */ v("span", { children: a(z.updatedAt) })]
|
|
319
336
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ y("div", {
|
|
321
338
|
className: "space-y-1",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ y("span", {
|
|
323
340
|
className: "text-muted-foreground flex items-center gap-2",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
325
|
-
}), /* @__PURE__ */
|
|
341
|
+
children: [/* @__PURE__ */ v(_, { size: 14 }), r(N, "projectDetail.workspaceId", "Workspace ID")]
|
|
342
|
+
}), /* @__PURE__ */ v("span", {
|
|
326
343
|
className: "font-mono text-xs block",
|
|
327
|
-
children:
|
|
344
|
+
children: z.workspaceId
|
|
328
345
|
})]
|
|
329
346
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ y("div", {
|
|
331
348
|
className: "space-y-1",
|
|
332
|
-
children: [/* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ y("span", {
|
|
333
350
|
className: "text-muted-foreground flex items-center gap-2",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
335
|
-
}), /* @__PURE__ */
|
|
351
|
+
children: [/* @__PURE__ */ v(_, { size: 14 }), r(N, "projectDetail.creatorId", "Creator ID")]
|
|
352
|
+
}), /* @__PURE__ */ v("span", {
|
|
336
353
|
className: "font-mono text-xs block",
|
|
337
|
-
children:
|
|
354
|
+
children: z.creatorId
|
|
338
355
|
})]
|
|
339
356
|
})
|
|
340
357
|
]
|
|
341
|
-
}),
|
|
358
|
+
}), z.config && Object.keys(z.config).length > 0 && /* @__PURE__ */ y("div", {
|
|
342
359
|
className: "pt-4 border-t",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
360
|
+
children: [/* @__PURE__ */ v("h4", {
|
|
344
361
|
className: "text-sm font-medium mb-2",
|
|
345
|
-
children: r(
|
|
346
|
-
}), /* @__PURE__ */
|
|
362
|
+
children: r(N, "projectDetail.configuration", "Configuration")
|
|
363
|
+
}), /* @__PURE__ */ v("pre", {
|
|
347
364
|
className: "text-xs bg-muted p-3 rounded-lg overflow-auto",
|
|
348
|
-
children: JSON.stringify(
|
|
365
|
+
children: JSON.stringify(z.config, null, 2)
|
|
349
366
|
})]
|
|
350
367
|
})]
|
|
351
368
|
})] }),
|
|
352
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ y(S, { children: [/* @__PURE__ */ v(w, { children: /* @__PURE__ */ v(T, { children: r(N, "projectDetail.quickActions", "Quick Actions") }) }), /* @__PURE__ */ v(C, { children: /* @__PURE__ */ y("div", {
|
|
353
370
|
className: "flex flex-wrap gap-2",
|
|
354
|
-
children: [
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
+
children: [
|
|
372
|
+
J ? /* @__PURE__ */ y(x, {
|
|
373
|
+
variant: "outline",
|
|
374
|
+
size: "sm",
|
|
375
|
+
onClick: Q,
|
|
376
|
+
children: [/* @__PURE__ */ v(_, {
|
|
377
|
+
size: 16,
|
|
378
|
+
className: "mr-2"
|
|
379
|
+
}), r(N, "projectDetail.projectMembersPage", "Project Members")]
|
|
380
|
+
}) : null,
|
|
381
|
+
/* @__PURE__ */ y(x, {
|
|
382
|
+
variant: "outline",
|
|
383
|
+
size: "sm",
|
|
384
|
+
onClick: () => I(R(`${L}/${P}/members`)),
|
|
385
|
+
children: [/* @__PURE__ */ v(_, {
|
|
386
|
+
size: 16,
|
|
387
|
+
className: "mr-2"
|
|
388
|
+
}), r(N, "projectDetail.workspaceMembers", "Workspace Members")]
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ y(x, {
|
|
391
|
+
variant: "outline",
|
|
392
|
+
size: "sm",
|
|
393
|
+
onClick: () => I(R(`${L}/${P}/activity`)),
|
|
394
|
+
children: [/* @__PURE__ */ v(f, {
|
|
395
|
+
size: 16,
|
|
396
|
+
className: "mr-2"
|
|
397
|
+
}), r(N, "projectDetail.workspaceActivity", "Workspace Activity")]
|
|
398
|
+
})
|
|
399
|
+
]
|
|
371
400
|
}) })] }),
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
open:
|
|
374
|
-
onOpenChange:
|
|
375
|
-
children: /* @__PURE__ */
|
|
376
|
-
disabled:
|
|
377
|
-
children: r(
|
|
378
|
-
}), /* @__PURE__ */
|
|
379
|
-
onClick:
|
|
380
|
-
disabled:
|
|
401
|
+
/* @__PURE__ */ v(me, {
|
|
402
|
+
open: Ee,
|
|
403
|
+
onOpenChange: B,
|
|
404
|
+
children: /* @__PURE__ */ y(_e, { children: [/* @__PURE__ */ y(be, { children: [/* @__PURE__ */ v(xe, { children: r(N, "projectDetail.deleteDialogTitle", "Delete Project") }), /* @__PURE__ */ v(ve, { children: r(N, "projectDetail.deleteConfirmPrefix", "Are you sure you want to delete \"") + z.name + r(N, "projectDetail.deleteConfirmSuffix", "\"? This action cannot be undone and all project data will be permanently removed.") })] }), /* @__PURE__ */ y(ye, { children: [/* @__PURE__ */ v(ge, {
|
|
405
|
+
disabled: G,
|
|
406
|
+
children: r(N, "projectDetail.cancel", "Cancel")
|
|
407
|
+
}), /* @__PURE__ */ v(he, {
|
|
408
|
+
onClick: Ue,
|
|
409
|
+
disabled: G,
|
|
381
410
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
382
|
-
children:
|
|
411
|
+
children: G ? r(N, "projectDetail.deleting", "Deleting...") : r(N, "projectDetail.deleteProject", "Delete Project")
|
|
383
412
|
})] })] })
|
|
384
|
-
})
|
|
413
|
+
}),
|
|
414
|
+
P && F && V ? /* @__PURE__ */ v(l, {
|
|
415
|
+
open: V,
|
|
416
|
+
onOpenChange: H,
|
|
417
|
+
workspaceId: P,
|
|
418
|
+
projectId: F,
|
|
419
|
+
projectName: z.name
|
|
420
|
+
}) : null
|
|
385
421
|
]
|
|
386
422
|
});
|
|
387
423
|
}
|
|
388
424
|
//#endregion
|
|
389
|
-
export {
|
|
425
|
+
export { N as ProjectDetailPage };
|
|
390
426
|
|
|
391
427
|
//# sourceMappingURL=ProjectDetailPage.js.map
|