@parallelworks/tandem-web 0.166.0 → 0.167.0
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/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/api/mutations.js +1 -0
- package/api/queries.js +165 -137
- package/components/ActivityTimeline.js +4 -1
- package/components/ActorAvatar.js +29 -0
- package/components/IssueEvent.js +1 -0
- package/components/IssueGroupList.js +51 -28
- package/lib/groupList.js +15 -5
- package/lib/pagedGroups.js +130 -0
- package/lib/projectList.js +1 -1
- package/lib/projectStates.js +4 -1
- package/lib/triage.js +20 -5
- package/package.json +1 -1
- package/pages/issues.js +431 -388
- package/pages/projects.js +198 -189
- package/pages/triage.js +234 -201
- package/routes/_workspace/notifications2.js +205 -226
- package/routes/_workspace/projects/_projectId3.js +198 -182
- package/routes/_workspace/teams/_key/triage3.js +4 -3
- package/routes/_workspace/triage3.js +4 -3
- package/routes/_workspace2.js +424 -418
|
@@ -26,12 +26,12 @@ import { IconUpload as fe } from "../../../components/IconUpload.js";
|
|
|
26
26
|
import { StatusGroups as R } from "../../../components/IssueGroup.js";
|
|
27
27
|
import { ProjectAccessDialog as pe } from "../../../components/ProjectAccess.js";
|
|
28
28
|
import { Updates as me } from "../../../components/Updates.js";
|
|
29
|
-
import { Avatar as z, AvatarGroup as B, Button as V, Card as he, Combobox as H, DatePicker as ge, EmptyState as _e, ErrorText as U, Input as ve, PageHeader as ye, Select as be, Switch as xe, buttonClasses as W, menuDivider as
|
|
30
|
-
import { useEffect as
|
|
31
|
-
import { useErrorMessage as
|
|
32
|
-
import { useTranslations as
|
|
33
|
-
import { Fragment as
|
|
34
|
-
import { useMutation as
|
|
29
|
+
import { Avatar as z, AvatarGroup as B, Button as V, Card as he, Combobox as H, DatePicker as ge, EmptyState as _e, ErrorText as U, Input as ve, PageHeader as ye, Select as be, Switch as xe, buttonClasses as W, menuDivider as G, useOpenMenu as Se } from "@parallelworks/ui";
|
|
30
|
+
import { useEffect as Ce, useState as K } from "react";
|
|
31
|
+
import { useErrorMessage as we } from "@parallelworks/problem/react";
|
|
32
|
+
import { useTranslations as q } from "use-intl";
|
|
33
|
+
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
34
|
+
import { useMutation as Z, useQuery as Q, useQueryClient as $, useSuspenseQuery as Te } from "@tanstack/react-query";
|
|
35
35
|
import { MoreButton as Ee } from "@parallelworks/ui/list";
|
|
36
36
|
// src/routes/$workspace/projects/$projectId.tsx?tsr-split=component
|
|
37
37
|
var De = [
|
|
@@ -40,9 +40,9 @@ var De = [
|
|
|
40
40
|
"cycles"
|
|
41
41
|
];
|
|
42
42
|
function Oe() {
|
|
43
|
-
let { workspace: s, projectId: u } = P.useParams(), f =
|
|
43
|
+
let { workspace: s, projectId: u } = P.useParams(), f = q("planning"), p = q("common"), g = we(), { data: _ } = Te(l(s, u)), v = M(_);
|
|
44
44
|
n(_.name);
|
|
45
|
-
let y = te(s, "manage_projects", { project: _.id }), b = te(s, "delete_projects", { project: _.id }), S =
|
|
45
|
+
let y = te(s, "manage_projects", { project: _.id }), b = te(s, "delete_projects", { project: _.id }), S = $(), C = i(), w = h(), { confirm: T, dialog: E } = ne(), [D, O] = K(!1), { data: A } = Te(o), j = !!P.useSearch().own, { data: N } = Q(a(s, oe(_.id, j))), { data: ae = [] } = Q(d(s)), F = ae.filter((e) => e.parentId === _.id), le = j || F.length === 0 ? _.progress : _.treeProgress, [I, L] = K("assignees"), R = Z({
|
|
46
46
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
|
|
47
47
|
params: { path: {
|
|
48
48
|
workspace: s,
|
|
@@ -54,7 +54,7 @@ function Oe() {
|
|
|
54
54
|
onSettled: () => {
|
|
55
55
|
S.invalidateQueries({ queryKey: d(s).queryKey });
|
|
56
56
|
}
|
|
57
|
-
}), me =
|
|
57
|
+
}), me = Z({
|
|
58
58
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
|
|
59
59
|
workspace: s,
|
|
60
60
|
projectId: u
|
|
@@ -85,10 +85,10 @@ function Oe() {
|
|
|
85
85
|
label: f("manageAccess"),
|
|
86
86
|
onClick: () => O(!0)
|
|
87
87
|
}],
|
|
88
|
-
|
|
88
|
+
G,
|
|
89
89
|
...w(`/${s}/projects/${v}`),
|
|
90
90
|
m(p("copyName"), _.name),
|
|
91
|
-
...b ? [
|
|
91
|
+
...b ? [G, {
|
|
92
92
|
label: f("deleteProject"),
|
|
93
93
|
destructive: !0,
|
|
94
94
|
onClick: () => T({
|
|
@@ -99,7 +99,7 @@ function Oe() {
|
|
|
99
99
|
})
|
|
100
100
|
}] : []
|
|
101
101
|
], B = P.useSearch().tab ?? "overview", V = N?.issues ?? [];
|
|
102
|
-
return
|
|
102
|
+
return Ce(() => {
|
|
103
103
|
u !== v && C({
|
|
104
104
|
to: "/$workspace/projects/$projectId",
|
|
105
105
|
params: {
|
|
@@ -114,47 +114,54 @@ function Oe() {
|
|
|
114
114
|
s,
|
|
115
115
|
u,
|
|
116
116
|
v
|
|
117
|
-
]), /* @__PURE__ */
|
|
117
|
+
]), /* @__PURE__ */ X("div", {
|
|
118
118
|
className: "flex h-full min-h-0 flex-col",
|
|
119
119
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ Y(ye, {
|
|
121
121
|
heading: !1,
|
|
122
|
-
breadcrumbs: [
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
122
|
+
breadcrumbs: [
|
|
123
|
+
{
|
|
124
|
+
label: f("projects"),
|
|
125
|
+
href: `/${s}/projects`
|
|
126
|
+
},
|
|
127
|
+
...Be(ae, _).map((e) => ({
|
|
128
|
+
label: e.name,
|
|
129
|
+
href: `/${s}/projects/${M(e)}`
|
|
130
|
+
})),
|
|
131
|
+
{
|
|
132
|
+
label: _.name,
|
|
133
|
+
icon: _.icon || _.color ? /* @__PURE__ */ Y(ee, {
|
|
134
|
+
icon: _.icon ?? "",
|
|
135
|
+
color: _.color ?? "",
|
|
136
|
+
name: _.name
|
|
137
|
+
}) : /* @__PURE__ */ Y(x, { className: "size-4 text-muted-foreground" })
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
titleActions: /* @__PURE__ */ X(J, { children: [
|
|
141
|
+
/* @__PURE__ */ Y(ce, {
|
|
135
142
|
workspace: s,
|
|
136
143
|
kind: "project",
|
|
137
144
|
target: _.id
|
|
138
145
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ Y(de, {
|
|
140
147
|
workspace: s,
|
|
141
148
|
project: _.id
|
|
142
149
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ Y(Ee, {
|
|
144
151
|
items: z,
|
|
145
152
|
label: p("moreActionsFor", { name: _.name }),
|
|
146
153
|
visible: !0
|
|
147
154
|
})
|
|
148
155
|
] }),
|
|
149
|
-
actions: R.isPending && /* @__PURE__ */
|
|
156
|
+
actions: R.isPending && /* @__PURE__ */ Y("span", {
|
|
150
157
|
className: "text-xs text-muted-foreground",
|
|
151
158
|
children: p("saving")
|
|
152
159
|
})
|
|
153
160
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ Y("nav", {
|
|
155
162
|
"aria-label": f("projectSections"),
|
|
156
163
|
className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
157
|
-
children: se.map((e) => /* @__PURE__ */
|
|
164
|
+
children: se.map((e) => /* @__PURE__ */ X(r, {
|
|
158
165
|
to: "/$workspace/projects/$projectId",
|
|
159
166
|
params: {
|
|
160
167
|
workspace: s,
|
|
@@ -164,21 +171,21 @@ function Oe() {
|
|
|
164
171
|
"aria-current": B === e ? "page" : void 0,
|
|
165
172
|
activeOptions: { exact: !0 },
|
|
166
173
|
className: "h-7 rounded-full px-3 text-xs leading-7 text-muted-foreground hover:bg-muted hover:text-foreground aria-[current=page]:bg-muted aria-[current=page]:text-foreground",
|
|
167
|
-
children: [f(`projectTabs.${e}`), e === "issues" && V.length > 0 && /* @__PURE__ */
|
|
174
|
+
children: [f(`projectTabs.${e}`), e === "issues" && V.length > 0 && /* @__PURE__ */ Y("span", {
|
|
168
175
|
className: "ml-1 tabular-nums",
|
|
169
176
|
children: V.length
|
|
170
177
|
})]
|
|
171
178
|
}, e))
|
|
172
179
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ X("div", {
|
|
174
181
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
182
|
+
children: [/* @__PURE__ */ X("div", {
|
|
176
183
|
className: B === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
|
|
177
184
|
children: [
|
|
178
|
-
B === "overview" && /* @__PURE__ */
|
|
179
|
-
/* @__PURE__ */
|
|
185
|
+
B === "overview" && /* @__PURE__ */ X(J, { children: [
|
|
186
|
+
/* @__PURE__ */ X("div", {
|
|
180
187
|
className: "flex items-center gap-3",
|
|
181
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ Y(fe, {
|
|
182
189
|
workspace: s,
|
|
183
190
|
icon: _.icon ?? "",
|
|
184
191
|
name: _.name,
|
|
@@ -188,30 +195,30 @@ function Oe() {
|
|
|
188
195
|
}),
|
|
189
196
|
disabled: !y,
|
|
190
197
|
size: 40
|
|
191
|
-
}), /* @__PURE__ */
|
|
198
|
+
}), /* @__PURE__ */ Y(ke, {
|
|
192
199
|
project: _,
|
|
193
200
|
canWrite: y,
|
|
194
201
|
onSave: (e) => R.mutate({ name: e })
|
|
195
202
|
})]
|
|
196
203
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ Y(Ae, {
|
|
198
205
|
project: _,
|
|
199
206
|
canWrite: y,
|
|
200
207
|
onSave: (e) => R.mutate({ summary: e })
|
|
201
208
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ Y(je, {
|
|
203
210
|
workspace: s,
|
|
204
211
|
project: _,
|
|
205
212
|
canWrite: y,
|
|
206
213
|
update: (e) => R.mutate(e)
|
|
207
214
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ Y(Ne, {
|
|
209
216
|
workspace: s,
|
|
210
217
|
project: _
|
|
211
218
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ Y("div", {
|
|
213
220
|
className: "mt-4",
|
|
214
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ Y(re, {
|
|
215
222
|
workspace: s,
|
|
216
223
|
project: _,
|
|
217
224
|
editable: y,
|
|
@@ -220,17 +227,17 @@ function Oe() {
|
|
|
220
227
|
}
|
|
221
228
|
})
|
|
222
229
|
}),
|
|
223
|
-
R.isError && /* @__PURE__ */
|
|
230
|
+
R.isError && /* @__PURE__ */ Y(U, {
|
|
224
231
|
size: "md",
|
|
225
232
|
className: "mt-2",
|
|
226
233
|
children: g(R.error)
|
|
227
234
|
}),
|
|
228
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ X("section", {
|
|
229
236
|
className: "mt-6",
|
|
230
237
|
"aria-label": f("progressTitle"),
|
|
231
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ Y(k, { progress: le }), F.length > 0 && /* @__PURE__ */ X("div", {
|
|
232
239
|
className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ Y(xe, {
|
|
234
241
|
"aria-label": f("onlyOwnIssues"),
|
|
235
242
|
size: "sm",
|
|
236
243
|
checked: j,
|
|
@@ -246,20 +253,20 @@ function Oe() {
|
|
|
246
253
|
} : n,
|
|
247
254
|
replace: !0
|
|
248
255
|
})
|
|
249
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ Y("span", {
|
|
250
257
|
"aria-hidden": "true",
|
|
251
258
|
children: f("onlyOwnIssues")
|
|
252
259
|
})]
|
|
253
260
|
})]
|
|
254
261
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ Y(Fe, {
|
|
256
263
|
workspace: s,
|
|
257
264
|
projects: F
|
|
258
265
|
}),
|
|
259
|
-
V.length > 0 && /* @__PURE__ */
|
|
266
|
+
V.length > 0 && /* @__PURE__ */ Y("section", {
|
|
260
267
|
className: "mt-8 xl:hidden",
|
|
261
268
|
"aria-label": f("issueBreakdown.label"),
|
|
262
|
-
children: /* @__PURE__ */
|
|
269
|
+
children: /* @__PURE__ */ Y(ue, {
|
|
263
270
|
workspace: s,
|
|
264
271
|
issues: V,
|
|
265
272
|
tabs: De,
|
|
@@ -267,16 +274,16 @@ function Oe() {
|
|
|
267
274
|
onTabChange: L
|
|
268
275
|
})
|
|
269
276
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ X("section", {
|
|
271
278
|
className: "mt-8",
|
|
272
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ Y("h2", {
|
|
273
280
|
className: "text-base font-semibold",
|
|
274
281
|
children: p("description")
|
|
275
|
-
}), /* @__PURE__ */
|
|
282
|
+
}), /* @__PURE__ */ Y(he, {
|
|
276
283
|
size: "fill",
|
|
277
284
|
padding: "sm",
|
|
278
285
|
className: "mt-2 min-h-16",
|
|
279
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ Y(ie, {
|
|
280
287
|
value: _.description,
|
|
281
288
|
editable: y,
|
|
282
289
|
placeholder: f("addDescription"),
|
|
@@ -286,31 +293,31 @@ function Oe() {
|
|
|
286
293
|
}, _.updatedAt)
|
|
287
294
|
})]
|
|
288
295
|
}),
|
|
289
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ Y(Ie, {
|
|
290
297
|
workspace: s,
|
|
291
298
|
project: _,
|
|
292
299
|
canWrite: y
|
|
293
300
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ Y(ze, {
|
|
295
302
|
workspace: s,
|
|
296
303
|
projectId: _.id
|
|
297
304
|
})
|
|
298
305
|
] }),
|
|
299
|
-
B === "updates" && /* @__PURE__ */
|
|
306
|
+
B === "updates" && /* @__PURE__ */ Y(Re, {
|
|
300
307
|
workspace: s,
|
|
301
308
|
project: _,
|
|
302
309
|
canWrite: y
|
|
303
310
|
}),
|
|
304
|
-
B === "issues" && /* @__PURE__ */
|
|
311
|
+
B === "issues" && /* @__PURE__ */ Y(Le, {
|
|
305
312
|
workspace: s,
|
|
306
313
|
project: _,
|
|
307
314
|
canWrite: y
|
|
308
315
|
})
|
|
309
316
|
]
|
|
310
|
-
}), B !== "updates" && V.length > 0 && /* @__PURE__ */
|
|
317
|
+
}), B !== "updates" && V.length > 0 && /* @__PURE__ */ Y("aside", {
|
|
311
318
|
"aria-label": f("issueBreakdown.label"),
|
|
312
319
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
313
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ Y(ue, {
|
|
314
321
|
workspace: s,
|
|
315
322
|
issues: V,
|
|
316
323
|
tabs: De,
|
|
@@ -320,7 +327,7 @@ function Oe() {
|
|
|
320
327
|
})]
|
|
321
328
|
}),
|
|
322
329
|
E,
|
|
323
|
-
D && /* @__PURE__ */
|
|
330
|
+
D && /* @__PURE__ */ Y(pe, {
|
|
324
331
|
workspace: s,
|
|
325
332
|
project: _,
|
|
326
333
|
onClose: () => O(!1)
|
|
@@ -329,25 +336,25 @@ function Oe() {
|
|
|
329
336
|
});
|
|
330
337
|
}
|
|
331
338
|
function ke({ project: e, canWrite: t, onSave: n }) {
|
|
332
|
-
let r =
|
|
333
|
-
return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */
|
|
339
|
+
let r = q("planning"), [i, a] = K(e.name), [o, s] = K(e.name);
|
|
340
|
+
return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h1", {
|
|
334
341
|
className: "sr-only",
|
|
335
342
|
children: e.name
|
|
336
|
-
}), /* @__PURE__ */
|
|
343
|
+
}), /* @__PURE__ */ Y("input", {
|
|
337
344
|
value: i,
|
|
338
345
|
onChange: (e) => a(e.target.value),
|
|
339
346
|
onBlur: () => i.trim() && i !== e.name && n(i),
|
|
340
347
|
onKeyDown: (e) => e.key === "Enter" && e.currentTarget.blur(),
|
|
341
348
|
"aria-label": r("projectName"),
|
|
342
349
|
className: "min-w-0 flex-1 rounded-md bg-transparent text-xl font-semibold tracking-tight outline-none focus-visible:outline-2 focus-visible:outline-primary"
|
|
343
|
-
})] }) : /* @__PURE__ */
|
|
350
|
+
})] }) : /* @__PURE__ */ Y("h1", {
|
|
344
351
|
className: "text-xl font-semibold tracking-tight",
|
|
345
352
|
children: e.name
|
|
346
353
|
});
|
|
347
354
|
}
|
|
348
355
|
function Ae({ project: e, canWrite: t, onSave: n }) {
|
|
349
|
-
let r =
|
|
350
|
-
return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */
|
|
356
|
+
let r = q("planning"), [i, a] = K(e.summary ?? ""), [o, s] = K(e.summary ?? "");
|
|
357
|
+
return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */ Y("input", {
|
|
351
358
|
value: i,
|
|
352
359
|
onChange: (e) => a(e.target.value),
|
|
353
360
|
onBlur: () => i !== (e.summary ?? "") && n(i),
|
|
@@ -356,39 +363,39 @@ function Ae({ project: e, canWrite: t, onSave: n }) {
|
|
|
356
363
|
"aria-label": r("summary"),
|
|
357
364
|
placeholder: r("summaryPlaceholder"),
|
|
358
365
|
className: "mt-1 w-full rounded-md bg-transparent text-sm text-muted-foreground outline-none placeholder:text-muted-foreground/60 focus-visible:text-foreground"
|
|
359
|
-
}) : e.summary ? /* @__PURE__ */
|
|
366
|
+
}) : e.summary ? /* @__PURE__ */ Y("p", {
|
|
360
367
|
className: "mt-1 text-sm text-muted-foreground",
|
|
361
368
|
children: e.summary
|
|
362
369
|
}) : null;
|
|
363
370
|
}
|
|
364
371
|
function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
365
|
-
let i =
|
|
366
|
-
let o = /* @__PURE__ */
|
|
367
|
-
/* @__PURE__ */
|
|
368
|
-
/* @__PURE__ */
|
|
372
|
+
let i = q("planning"), a = D(), { members: o, person: s } = E(e), { data: c = [] } = Q(f(e)), l = T(), [u, d] = K(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
|
|
373
|
+
let o = /* @__PURE__ */ X(J, { children: [
|
|
374
|
+
/* @__PURE__ */ Y(v, { className: "size-3.5 text-muted-foreground" }),
|
|
375
|
+
/* @__PURE__ */ Y("span", {
|
|
369
376
|
className: "text-muted-foreground",
|
|
370
377
|
children: e
|
|
371
378
|
}),
|
|
372
379
|
t && a.day(t)
|
|
373
380
|
] });
|
|
374
|
-
return n ? /* @__PURE__ */
|
|
381
|
+
return n ? /* @__PURE__ */ Y(ge, {
|
|
375
382
|
value: t ?? "",
|
|
376
383
|
onValueChange: (e) => r({ [i]: e }),
|
|
377
384
|
"aria-label": e,
|
|
378
|
-
trigger: /* @__PURE__ */
|
|
385
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
379
386
|
type: "button",
|
|
380
387
|
className: W({ size: "sm" }),
|
|
381
388
|
children: o
|
|
382
389
|
})
|
|
383
|
-
}) : /* @__PURE__ */
|
|
390
|
+
}) : /* @__PURE__ */ Y("span", {
|
|
384
391
|
className: "inline-flex h-7 items-center gap-1.5 rounded-md border border-border bg-card px-2.5 text-xs font-medium",
|
|
385
392
|
children: o
|
|
386
393
|
});
|
|
387
394
|
};
|
|
388
|
-
return /* @__PURE__ */
|
|
395
|
+
return /* @__PURE__ */ X("div", {
|
|
389
396
|
className: "mt-3 flex flex-wrap items-center gap-1.5",
|
|
390
397
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ Y(be, {
|
|
392
399
|
"aria-label": i("statusLabel"),
|
|
393
400
|
value: t.status,
|
|
394
401
|
disabled: !n,
|
|
@@ -396,15 +403,15 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
396
403
|
items: ae.map((e) => ({
|
|
397
404
|
value: e,
|
|
398
405
|
label: i(`status.${e}`),
|
|
399
|
-
icon: /* @__PURE__ */
|
|
406
|
+
icon: /* @__PURE__ */ Y(A, { status: e })
|
|
400
407
|
})),
|
|
401
|
-
trigger: /* @__PURE__ */
|
|
408
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
402
409
|
type: "button",
|
|
403
410
|
className: W({ size: "sm" }),
|
|
404
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ Y(A, { status: t.status }), i(`status.${t.status}`)]
|
|
405
412
|
})
|
|
406
413
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
414
|
+
/* @__PURE__ */ Y(H, {
|
|
408
415
|
"aria-label": i("lead"),
|
|
409
416
|
value: t.lead ?? "",
|
|
410
417
|
disabled: !n,
|
|
@@ -415,28 +422,28 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
415
422
|
}, ...o.map((e) => ({
|
|
416
423
|
value: e.user.username,
|
|
417
424
|
label: e.user.name,
|
|
418
|
-
icon: /* @__PURE__ */
|
|
425
|
+
icon: /* @__PURE__ */ Y(z, {
|
|
419
426
|
name: e.user.name,
|
|
420
427
|
src: e.user.avatarUrl,
|
|
421
428
|
size: "xs",
|
|
422
429
|
decorative: !0
|
|
423
430
|
})
|
|
424
431
|
}))],
|
|
425
|
-
trigger: /* @__PURE__ */
|
|
432
|
+
trigger: /* @__PURE__ */ Y("button", {
|
|
426
433
|
type: "button",
|
|
427
434
|
className: W({ size: "sm" }),
|
|
428
|
-
children: p ? /* @__PURE__ */
|
|
435
|
+
children: p ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(z, {
|
|
429
436
|
name: p.name,
|
|
430
437
|
src: p.avatarUrl,
|
|
431
438
|
size: "xs",
|
|
432
439
|
decorative: !0
|
|
433
|
-
}), i("leadIs", { name: p.name })] }) : /* @__PURE__ */
|
|
440
|
+
}), i("leadIs", { name: p.name })] }) : /* @__PURE__ */ Y("span", {
|
|
434
441
|
className: "text-muted-foreground",
|
|
435
442
|
children: i("noLead")
|
|
436
443
|
})
|
|
437
444
|
})
|
|
438
445
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
446
|
+
/* @__PURE__ */ Y(be, {
|
|
440
447
|
"aria-label": i("priority"),
|
|
441
448
|
value: String(t.priority),
|
|
442
449
|
disabled: !n,
|
|
@@ -444,17 +451,17 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
444
451
|
items: l.map((e, t) => ({
|
|
445
452
|
value: String(t),
|
|
446
453
|
label: e,
|
|
447
|
-
icon: /* @__PURE__ */
|
|
454
|
+
icon: /* @__PURE__ */ Y(b, { priority: t })
|
|
448
455
|
})),
|
|
449
|
-
trigger: /* @__PURE__ */
|
|
456
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
450
457
|
type: "button",
|
|
451
458
|
className: W({ size: "sm" }),
|
|
452
|
-
children: [/* @__PURE__ */
|
|
459
|
+
children: [/* @__PURE__ */ Y(b, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
|
|
453
460
|
})
|
|
454
461
|
}),
|
|
455
462
|
m(i("startDate"), t.startDate, "startDate"),
|
|
456
463
|
m(i("targetDate"), t.targetDate, "targetDate"),
|
|
457
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ Y(H, {
|
|
458
465
|
"aria-label": i("members"),
|
|
459
466
|
open: u === "members",
|
|
460
467
|
onOpenChange: (e) => d(e ? "members" : null),
|
|
@@ -463,7 +470,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
463
470
|
items: o.map((e) => ({
|
|
464
471
|
value: e.user.username,
|
|
465
472
|
label: e.user.name,
|
|
466
|
-
icon: /* @__PURE__ */
|
|
473
|
+
icon: /* @__PURE__ */ Y(z, {
|
|
467
474
|
name: e.user.name,
|
|
468
475
|
src: e.user.avatarUrl,
|
|
469
476
|
size: "xs",
|
|
@@ -473,29 +480,29 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
473
480
|
value: t.members,
|
|
474
481
|
onValueChange: (e) => r({ members: e }),
|
|
475
482
|
placeholder: i("members"),
|
|
476
|
-
trigger: /* @__PURE__ */
|
|
483
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
477
484
|
type: "button",
|
|
478
485
|
disabled: !n,
|
|
479
486
|
className: W({ size: "sm" }),
|
|
480
|
-
children: [t.members.length > 0 ? /* @__PURE__ */
|
|
487
|
+
children: [t.members.length > 0 ? /* @__PURE__ */ Y(B, {
|
|
481
488
|
size: "xs",
|
|
482
489
|
max: 4,
|
|
483
490
|
showOverflow: !1,
|
|
484
491
|
children: t.members.map((e) => {
|
|
485
492
|
let t = s(e);
|
|
486
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ Y(z, {
|
|
487
494
|
name: t.name,
|
|
488
495
|
src: t.avatarUrl,
|
|
489
496
|
decorative: !0
|
|
490
497
|
}, e);
|
|
491
498
|
})
|
|
492
|
-
}) : /* @__PURE__ */
|
|
499
|
+
}) : /* @__PURE__ */ Y(w, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
493
500
|
className: t.members.length ? "" : "text-muted-foreground",
|
|
494
501
|
children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
|
|
495
502
|
})]
|
|
496
503
|
})
|
|
497
504
|
}),
|
|
498
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ Y(H, {
|
|
499
506
|
"aria-label": i("teams"),
|
|
500
507
|
open: u === "teams",
|
|
501
508
|
onOpenChange: (e) => d(e ? "teams" : null),
|
|
@@ -505,7 +512,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
505
512
|
value: e.id,
|
|
506
513
|
label: e.name,
|
|
507
514
|
hint: e.key,
|
|
508
|
-
icon: /* @__PURE__ */
|
|
515
|
+
icon: /* @__PURE__ */ Y(ee, {
|
|
509
516
|
icon: e.icon,
|
|
510
517
|
color: e.color,
|
|
511
518
|
name: e.name
|
|
@@ -514,23 +521,23 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
514
521
|
value: t.teamIds,
|
|
515
522
|
onValueChange: (e) => r({ teamIds: e }),
|
|
516
523
|
placeholder: i("teams"),
|
|
517
|
-
trigger: /* @__PURE__ */
|
|
524
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
518
525
|
type: "button",
|
|
519
526
|
disabled: !n,
|
|
520
527
|
className: W({ size: "sm" }),
|
|
521
|
-
children: [/* @__PURE__ */
|
|
528
|
+
children: [/* @__PURE__ */ Y(w, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
522
529
|
className: t.teamIds.length ? "" : "text-muted-foreground",
|
|
523
530
|
children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
|
|
524
531
|
})]
|
|
525
532
|
})
|
|
526
533
|
}),
|
|
527
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ Y(Pe, {
|
|
528
535
|
workspace: e,
|
|
529
536
|
project: t,
|
|
530
537
|
canWrite: n,
|
|
531
538
|
onChange: (e) => r({ parentId: e })
|
|
532
539
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
540
|
+
/* @__PURE__ */ Y(Me, {
|
|
534
541
|
workspace: e,
|
|
535
542
|
project: t,
|
|
536
543
|
canWrite: n,
|
|
@@ -540,10 +547,10 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
540
547
|
});
|
|
541
548
|
}
|
|
542
549
|
function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
543
|
-
let i =
|
|
550
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
544
551
|
for (let t of a) t.blockedBy.includes(e) && !o.has(t.id) && (o.add(t.id), s(t.id));
|
|
545
552
|
};
|
|
546
|
-
return s(t.id), /* @__PURE__ */
|
|
553
|
+
return s(t.id), /* @__PURE__ */ Y(H, {
|
|
547
554
|
multiple: !0,
|
|
548
555
|
disabled: !n,
|
|
549
556
|
items: a.filter((e) => e.id !== t.id && !o.has(e.id) && !e.template).map((e) => ({
|
|
@@ -554,11 +561,11 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
554
561
|
onValueChange: r,
|
|
555
562
|
placeholder: i("waitsOn"),
|
|
556
563
|
"aria-label": i("waitsOn"),
|
|
557
|
-
trigger: /* @__PURE__ */
|
|
564
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
558
565
|
type: "button",
|
|
559
566
|
disabled: !n,
|
|
560
567
|
className: W({ size: "sm" }),
|
|
561
|
-
children: [/* @__PURE__ */
|
|
568
|
+
children: [/* @__PURE__ */ Y(y, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
562
569
|
className: t.blockedBy.length ? "" : "text-muted-foreground",
|
|
563
570
|
children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
|
|
564
571
|
})]
|
|
@@ -566,9 +573,9 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
566
573
|
});
|
|
567
574
|
}
|
|
568
575
|
function Ne({ workspace: e, project: t }) {
|
|
569
|
-
let n =
|
|
576
|
+
let n = q("planning"), i = D(), { data: a = [] } = Q(d(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
|
|
570
577
|
if (s.length === 0 && c.length === 0) return null;
|
|
571
|
-
let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], u = (t) => /* @__PURE__ */
|
|
578
|
+
let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], u = (t) => /* @__PURE__ */ Y(r, {
|
|
572
579
|
to: "/$workspace/projects/$projectId",
|
|
573
580
|
params: {
|
|
574
581
|
workspace: e,
|
|
@@ -576,21 +583,21 @@ function Ne({ workspace: e, project: t }) {
|
|
|
576
583
|
},
|
|
577
584
|
className: "font-medium hover:underline",
|
|
578
585
|
children: t.name
|
|
579
|
-
}, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [u(e)] : [/* @__PURE__ */
|
|
580
|
-
return /* @__PURE__ */
|
|
586
|
+
}, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [u(e)] : [/* @__PURE__ */ Y("span", { children: ", " }, `${e.id},`), u(e)]);
|
|
587
|
+
return /* @__PURE__ */ X("div", {
|
|
581
588
|
className: "mt-3 space-y-1 text-xs text-muted-foreground",
|
|
582
589
|
children: [
|
|
583
|
-
s.length > 0 && /* @__PURE__ */
|
|
590
|
+
s.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
584
591
|
n("waitsOnLabel"),
|
|
585
592
|
" ",
|
|
586
593
|
f(s)
|
|
587
594
|
] }),
|
|
588
|
-
c.length > 0 && /* @__PURE__ */
|
|
595
|
+
c.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
589
596
|
n("blocksLabel"),
|
|
590
597
|
" ",
|
|
591
598
|
f(c)
|
|
592
599
|
] }),
|
|
593
|
-
l.map((e) => /* @__PURE__ */
|
|
600
|
+
l.map((e) => /* @__PURE__ */ Y("p", {
|
|
594
601
|
role: "status",
|
|
595
602
|
className: "text-warning",
|
|
596
603
|
children: n("dueBeforeBlocker", {
|
|
@@ -603,8 +610,8 @@ function Ne({ workspace: e, project: t }) {
|
|
|
603
610
|
});
|
|
604
611
|
}
|
|
605
612
|
function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
606
|
-
let i =
|
|
607
|
-
return /* @__PURE__ */
|
|
613
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(N(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
|
|
614
|
+
return /* @__PURE__ */ Y(H, {
|
|
608
615
|
disabled: !n,
|
|
609
616
|
items: [{
|
|
610
617
|
value: "",
|
|
@@ -617,11 +624,11 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
617
624
|
onValueChange: (e) => r(e ?? ""),
|
|
618
625
|
placeholder: i("parentProject"),
|
|
619
626
|
"aria-label": i("parentProject"),
|
|
620
|
-
trigger: /* @__PURE__ */
|
|
627
|
+
trigger: /* @__PURE__ */ X("button", {
|
|
621
628
|
type: "button",
|
|
622
629
|
disabled: !n,
|
|
623
630
|
className: W({ size: "sm" }),
|
|
624
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ Y(x, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
625
632
|
className: s ? "" : "text-muted-foreground",
|
|
626
633
|
children: s ? i("underProject", { name: s.name }) : i("parentProject")
|
|
627
634
|
})]
|
|
@@ -629,17 +636,17 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
629
636
|
});
|
|
630
637
|
}
|
|
631
638
|
function Fe({ workspace: e, projects: t }) {
|
|
632
|
-
let n =
|
|
633
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
639
|
+
let n = q("planning"), i = D(), { person: a } = E(e);
|
|
640
|
+
return t.length === 0 ? null : /* @__PURE__ */ X("section", {
|
|
634
641
|
className: "mt-8",
|
|
635
|
-
children: [/* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ Y("h2", {
|
|
636
643
|
className: "text-base font-semibold",
|
|
637
644
|
children: n("subProjects")
|
|
638
|
-
}), /* @__PURE__ */
|
|
645
|
+
}), /* @__PURE__ */ Y("ul", {
|
|
639
646
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
640
647
|
children: t.map((t) => {
|
|
641
648
|
let o = j(t), s = t.lead ? a(t.lead) : void 0;
|
|
642
|
-
return /* @__PURE__ */
|
|
649
|
+
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(r, {
|
|
643
650
|
to: "/$workspace/projects/$projectId",
|
|
644
651
|
params: {
|
|
645
652
|
workspace: e,
|
|
@@ -647,27 +654,27 @@ function Fe({ workspace: e, projects: t }) {
|
|
|
647
654
|
},
|
|
648
655
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
|
|
649
656
|
children: [
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ Y(A, { status: t.status }),
|
|
658
|
+
/* @__PURE__ */ Y("span", {
|
|
652
659
|
className: "min-w-0 flex-1 truncate font-medium",
|
|
653
660
|
children: t.name
|
|
654
661
|
}),
|
|
655
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ X("span", {
|
|
656
663
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
664
|
+
children: [/* @__PURE__ */ Y(O, { state: o }), n(`health.${o}`)]
|
|
658
665
|
}),
|
|
659
|
-
s && /* @__PURE__ */
|
|
666
|
+
s && /* @__PURE__ */ Y(z, {
|
|
660
667
|
name: s.name,
|
|
661
668
|
src: s.avatarUrl,
|
|
662
669
|
size: "xs"
|
|
663
670
|
}),
|
|
664
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ Y("span", {
|
|
665
672
|
className: "w-20 text-xs text-muted-foreground tabular-nums",
|
|
666
673
|
children: t.targetDate ? i.day(t.targetDate) : ""
|
|
667
674
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
675
|
+
/* @__PURE__ */ Y("span", {
|
|
669
676
|
className: "w-28",
|
|
670
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ Y(k, {
|
|
671
678
|
progress: t.treeProgress,
|
|
672
679
|
compact: !0
|
|
673
680
|
})
|
|
@@ -679,7 +686,7 @@ function Fe({ workspace: e, projects: t }) {
|
|
|
679
686
|
});
|
|
680
687
|
}
|
|
681
688
|
function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
682
|
-
let o =
|
|
689
|
+
let o = q("planning"), s = q("common"), c = we(), l = D(), u = $(), d = Se(), [f, h] = K(!1), [_, v] = K(""), [y, b] = K(""), [x, S] = K(null), C = {
|
|
683
690
|
workspace: n,
|
|
684
691
|
projectId: i.id
|
|
685
692
|
}, w = () => {
|
|
@@ -688,7 +695,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
688
695
|
n,
|
|
689
696
|
"projects"
|
|
690
697
|
] }), p(u, n);
|
|
691
|
-
}, T =
|
|
698
|
+
}, T = Z({
|
|
692
699
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
|
|
693
700
|
params: { path: C },
|
|
694
701
|
body: {
|
|
@@ -700,7 +707,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
700
707
|
v(""), b(""), h(!1);
|
|
701
708
|
},
|
|
702
709
|
onSettled: w
|
|
703
|
-
}), E =
|
|
710
|
+
}), E = Z({
|
|
704
711
|
mutationFn: async ({ id: n, ...r }) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", {
|
|
705
712
|
params: { path: {
|
|
706
713
|
...C,
|
|
@@ -709,7 +716,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
709
716
|
body: r
|
|
710
717
|
})),
|
|
711
718
|
onSettled: w
|
|
712
|
-
}), O =
|
|
719
|
+
}), O = Z({
|
|
713
720
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", { params: { path: {
|
|
714
721
|
...C,
|
|
715
722
|
milestoneId: n
|
|
@@ -736,42 +743,42 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
736
743
|
position: t + 1
|
|
737
744
|
})
|
|
738
745
|
},
|
|
739
|
-
|
|
746
|
+
G,
|
|
740
747
|
{
|
|
741
748
|
label: s("delete"),
|
|
742
749
|
destructive: !0,
|
|
743
750
|
onClick: () => O.mutate(e.id)
|
|
744
751
|
}
|
|
745
752
|
] : [m(s("copyName"), e.name)], N = T.error ?? E.error ?? O.error;
|
|
746
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ X("section", {
|
|
747
754
|
className: "mt-10",
|
|
748
755
|
children: [
|
|
749
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ X("div", {
|
|
750
757
|
className: "flex items-center gap-2",
|
|
751
|
-
children: [/* @__PURE__ */
|
|
758
|
+
children: [/* @__PURE__ */ Y("h2", {
|
|
752
759
|
className: "text-base font-semibold",
|
|
753
760
|
children: o("milestones")
|
|
754
|
-
}), a && !f && /* @__PURE__ */
|
|
761
|
+
}), a && !f && /* @__PURE__ */ X(V, {
|
|
755
762
|
type: "button",
|
|
756
763
|
size: "sm",
|
|
757
764
|
onClick: () => h(!0),
|
|
758
765
|
className: "ml-auto",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
766
|
+
children: [/* @__PURE__ */ Y(g, { className: "size-3.5" }), o("addMilestone")]
|
|
760
767
|
})]
|
|
761
768
|
}),
|
|
762
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ X(he, {
|
|
763
770
|
size: "fill",
|
|
764
771
|
padding: "none",
|
|
765
772
|
divided: !0,
|
|
766
773
|
interactive: !1,
|
|
767
|
-
render: /* @__PURE__ */
|
|
774
|
+
render: /* @__PURE__ */ Y("ul", {}),
|
|
768
775
|
className: "mt-3",
|
|
769
776
|
children: [
|
|
770
|
-
A.map((e, t) => /* @__PURE__ */
|
|
777
|
+
A.map((e, t) => /* @__PURE__ */ X("li", {
|
|
771
778
|
onContextMenu: (n) => d(n, j(e, t)),
|
|
772
779
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 py-2 pr-2 pl-3 md:flex-nowrap",
|
|
773
780
|
children: [
|
|
774
|
-
x === e.id ? /* @__PURE__ */
|
|
781
|
+
x === e.id ? /* @__PURE__ */ Y(ve, {
|
|
775
782
|
autoFocus: !0,
|
|
776
783
|
defaultValue: e.name,
|
|
777
784
|
"aria-label": o("milestoneName"),
|
|
@@ -787,7 +794,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
787
794
|
},
|
|
788
795
|
size: "sm",
|
|
789
796
|
className: "min-w-0 flex-1"
|
|
790
|
-
}) : /* @__PURE__ */
|
|
797
|
+
}) : /* @__PURE__ */ Y(r, {
|
|
791
798
|
to: "/$workspace/projects/$projectId/milestones/$milestoneId",
|
|
792
799
|
params: {
|
|
793
800
|
workspace: n,
|
|
@@ -797,34 +804,34 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
797
804
|
className: "min-w-0 flex-1 basis-full truncate rounded-sm text-sm font-medium hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary md:basis-auto",
|
|
798
805
|
children: e.name
|
|
799
806
|
}),
|
|
800
|
-
/* @__PURE__ */
|
|
807
|
+
/* @__PURE__ */ Y("span", {
|
|
801
808
|
className: "w-24 shrink-0 text-xs text-muted-foreground",
|
|
802
809
|
children: e.targetDate && l.day(e.targetDate)
|
|
803
810
|
}),
|
|
804
|
-
/* @__PURE__ */
|
|
811
|
+
/* @__PURE__ */ Y("span", {
|
|
805
812
|
className: "w-44 shrink-0",
|
|
806
|
-
children: /* @__PURE__ */
|
|
813
|
+
children: /* @__PURE__ */ Y(k, {
|
|
807
814
|
progress: e.progress,
|
|
808
815
|
compact: !0
|
|
809
816
|
})
|
|
810
817
|
}),
|
|
811
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ Y(Ee, {
|
|
812
819
|
items: () => j(e, t),
|
|
813
820
|
label: s("moreActionsFor", { name: e.name })
|
|
814
821
|
})
|
|
815
822
|
]
|
|
816
823
|
}, e.id)),
|
|
817
|
-
A.length === 0 && !f && /* @__PURE__ */
|
|
824
|
+
A.length === 0 && !f && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(_e, {
|
|
818
825
|
variant: "bare",
|
|
819
826
|
title: o("noMilestones")
|
|
820
827
|
}) }),
|
|
821
|
-
f && /* @__PURE__ */
|
|
828
|
+
f && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X("form", {
|
|
822
829
|
className: "flex flex-wrap items-center gap-2 px-3 py-2",
|
|
823
830
|
onSubmit: (e) => {
|
|
824
831
|
e.preventDefault(), _.trim() && T.mutate();
|
|
825
832
|
},
|
|
826
833
|
children: [
|
|
827
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ Y(ve, {
|
|
828
835
|
autoFocus: !0,
|
|
829
836
|
value: _,
|
|
830
837
|
onChange: (e) => v(e.target.value),
|
|
@@ -832,20 +839,20 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
832
839
|
"aria-label": o("milestoneName"),
|
|
833
840
|
className: "min-w-0 flex-1"
|
|
834
841
|
}),
|
|
835
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ Y(ge, {
|
|
836
843
|
value: y,
|
|
837
844
|
onValueChange: b,
|
|
838
845
|
"aria-label": o("targetDate"),
|
|
839
846
|
className: "w-auto"
|
|
840
847
|
}),
|
|
841
|
-
/* @__PURE__ */
|
|
848
|
+
/* @__PURE__ */ Y(V, {
|
|
842
849
|
type: "submit",
|
|
843
850
|
variant: "primary",
|
|
844
851
|
disabled: !_.trim(),
|
|
845
852
|
loading: T.isPending,
|
|
846
853
|
children: o("addMilestone")
|
|
847
854
|
}),
|
|
848
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ Y(V, {
|
|
849
856
|
type: "button",
|
|
850
857
|
variant: "ghost",
|
|
851
858
|
onClick: () => h(!1),
|
|
@@ -855,7 +862,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
855
862
|
}) })
|
|
856
863
|
]
|
|
857
864
|
}),
|
|
858
|
-
N && /* @__PURE__ */
|
|
865
|
+
N && /* @__PURE__ */ Y(U, {
|
|
859
866
|
size: "md",
|
|
860
867
|
className: "mt-2",
|
|
861
868
|
children: c(N)
|
|
@@ -864,7 +871,7 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
864
871
|
});
|
|
865
872
|
}
|
|
866
873
|
function Le({ workspace: n, project: r, canWrite: i }) {
|
|
867
|
-
let o =
|
|
874
|
+
let o = q("planning"), s = we(), c = $(), l = !!P.useSearch().own, { data: u } = Te(a(n, oe(r.id, l))), d = L(n, (e) => e.project?.id !== r.id), f = u.issues, m = Z({
|
|
868
875
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
869
876
|
params: { path: {
|
|
870
877
|
workspace: n,
|
|
@@ -874,34 +881,34 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
874
881
|
})),
|
|
875
882
|
onSettled: (e, t, r) => p(c, n, r)
|
|
876
883
|
});
|
|
877
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ X("section", {
|
|
878
885
|
"aria-label": o("issues"),
|
|
879
886
|
children: [
|
|
880
|
-
i && /* @__PURE__ */
|
|
887
|
+
i && /* @__PURE__ */ Y("div", {
|
|
881
888
|
className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
|
|
882
|
-
children: /* @__PURE__ */
|
|
889
|
+
children: /* @__PURE__ */ Y(H, {
|
|
883
890
|
"aria-label": o("addIssues"),
|
|
884
891
|
align: "end",
|
|
885
892
|
...d,
|
|
886
893
|
value: null,
|
|
887
894
|
onValueChange: (e) => e !== null && m.mutate(e),
|
|
888
895
|
placeholder: o("findIssue"),
|
|
889
|
-
trigger: /* @__PURE__ */
|
|
896
|
+
trigger: /* @__PURE__ */ X(V, {
|
|
890
897
|
type: "button",
|
|
891
898
|
size: "sm",
|
|
892
|
-
children: [/* @__PURE__ */
|
|
899
|
+
children: [/* @__PURE__ */ Y(g, { className: "size-3.5" }), o("addIssues")]
|
|
893
900
|
})
|
|
894
901
|
})
|
|
895
902
|
}),
|
|
896
|
-
m.isError && /* @__PURE__ */
|
|
903
|
+
m.isError && /* @__PURE__ */ Y(U, {
|
|
897
904
|
size: "md",
|
|
898
905
|
className: "px-4 pt-2 md:px-5",
|
|
899
906
|
children: s(m.error)
|
|
900
907
|
}),
|
|
901
|
-
f.length === 0 ? /* @__PURE__ */
|
|
908
|
+
f.length === 0 ? /* @__PURE__ */ Y(_e, {
|
|
902
909
|
title: o("noIssuesInProject"),
|
|
903
910
|
className: "mt-6"
|
|
904
|
-
}) : /* @__PURE__ */
|
|
911
|
+
}) : /* @__PURE__ */ Y(R, {
|
|
905
912
|
workspace: n,
|
|
906
913
|
issues: f
|
|
907
914
|
})
|
|
@@ -909,7 +916,7 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
909
916
|
});
|
|
910
917
|
}
|
|
911
918
|
function Re({ workspace: n, project: r, canWrite: i }) {
|
|
912
|
-
let a =
|
|
919
|
+
let a = q("planning"), o = $(), { data: s = [] } = Q(u(n, r.id)), c = Z({
|
|
913
920
|
mutationFn: async ({ health: i, body: a }) => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/updates", {
|
|
914
921
|
params: { path: {
|
|
915
922
|
workspace: n,
|
|
@@ -925,7 +932,7 @@ function Re({ workspace: n, project: r, canWrite: i }) {
|
|
|
925
932
|
n,
|
|
926
933
|
"projects"
|
|
927
934
|
] })
|
|
928
|
-
}), l =
|
|
935
|
+
}), l = Z({
|
|
929
936
|
mutationFn: async (i) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/updates/{updateId}", { params: { path: {
|
|
930
937
|
workspace: n,
|
|
931
938
|
projectId: r.id,
|
|
@@ -937,7 +944,7 @@ function Re({ workspace: n, project: r, canWrite: i }) {
|
|
|
937
944
|
"projects"
|
|
938
945
|
] })
|
|
939
946
|
});
|
|
940
|
-
return /* @__PURE__ */
|
|
947
|
+
return /* @__PURE__ */ Y(me, {
|
|
941
948
|
workspace: n,
|
|
942
949
|
state: j(r),
|
|
943
950
|
health: r.health,
|
|
@@ -949,12 +956,12 @@ function Re({ workspace: n, project: r, canWrite: i }) {
|
|
|
949
956
|
});
|
|
950
957
|
}
|
|
951
958
|
function ze({ workspace: e, projectId: t }) {
|
|
952
|
-
let n =
|
|
959
|
+
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = D(), o = T(), { data: c = [] } = Q(s(e, t)), { actorName: l, person: u } = E(e);
|
|
953
960
|
if (c.length === 0) return null;
|
|
954
961
|
let d = (e) => {
|
|
955
962
|
let t = {
|
|
956
963
|
actor: l(e.actor),
|
|
957
|
-
b: (e) => /* @__PURE__ */
|
|
964
|
+
b: (e) => /* @__PURE__ */ Y("span", {
|
|
958
965
|
className: "font-medium text-foreground",
|
|
959
966
|
children: e
|
|
960
967
|
})
|
|
@@ -1004,40 +1011,40 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1004
1011
|
}];
|
|
1005
1012
|
let f = [], p = (e) => e ? a.day(String(e)) : "";
|
|
1006
1013
|
return d.name && f.push({
|
|
1007
|
-
icon: /* @__PURE__ */
|
|
1014
|
+
icon: /* @__PURE__ */ Y(C, {}),
|
|
1008
1015
|
text: n.rich("renamed", {
|
|
1009
1016
|
...t,
|
|
1010
1017
|
from: String(d.name.from)
|
|
1011
1018
|
})
|
|
1012
1019
|
}), d.status && f.push({
|
|
1013
|
-
icon: /* @__PURE__ */
|
|
1020
|
+
icon: /* @__PURE__ */ Y(A, { status: d.status.to }),
|
|
1014
1021
|
text: n.rich("status", {
|
|
1015
1022
|
...t,
|
|
1016
1023
|
status: r(`status.${d.status.to}`)
|
|
1017
1024
|
})
|
|
1018
1025
|
}), d.priority && f.push({
|
|
1019
|
-
icon: /* @__PURE__ */
|
|
1026
|
+
icon: /* @__PURE__ */ Y(b, { priority: Number(d.priority.to) }),
|
|
1020
1027
|
text: n.rich("priority", {
|
|
1021
1028
|
...t,
|
|
1022
1029
|
priority: o[Number(d.priority.to)] ?? ""
|
|
1023
1030
|
})
|
|
1024
1031
|
}), d.lead && f.push(d.lead.to ? {
|
|
1025
|
-
icon: /* @__PURE__ */
|
|
1032
|
+
icon: /* @__PURE__ */ Y(_, {}),
|
|
1026
1033
|
text: n.rich("lead", {
|
|
1027
1034
|
...t,
|
|
1028
1035
|
lead: u(String(d.lead.to)).name
|
|
1029
1036
|
})
|
|
1030
1037
|
} : {
|
|
1031
|
-
icon: /* @__PURE__ */
|
|
1038
|
+
icon: /* @__PURE__ */ Y(S, {}),
|
|
1032
1039
|
text: n.rich("leadRemoved", t)
|
|
1033
1040
|
}), d.startDate && f.push({
|
|
1034
|
-
icon: /* @__PURE__ */
|
|
1041
|
+
icon: /* @__PURE__ */ Y(v, {}),
|
|
1035
1042
|
text: d.startDate.to ? n.rich("startDate", {
|
|
1036
1043
|
...t,
|
|
1037
1044
|
date: p(d.startDate.to)
|
|
1038
1045
|
}) : n.rich("startDateRemoved", t)
|
|
1039
1046
|
}), d.targetDate && f.push({
|
|
1040
|
-
icon: /* @__PURE__ */
|
|
1047
|
+
icon: /* @__PURE__ */ Y(v, {}),
|
|
1041
1048
|
text: d.targetDate.to ? n.rich("targetDate", {
|
|
1042
1049
|
...t,
|
|
1043
1050
|
date: p(d.targetDate.to)
|
|
@@ -1047,15 +1054,15 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1047
1054
|
text: n.rich("updated", t)
|
|
1048
1055
|
}];
|
|
1049
1056
|
};
|
|
1050
|
-
return /* @__PURE__ */
|
|
1057
|
+
return /* @__PURE__ */ X("section", {
|
|
1051
1058
|
className: "mt-8",
|
|
1052
1059
|
"aria-label": n("title"),
|
|
1053
|
-
children: [/* @__PURE__ */
|
|
1060
|
+
children: [/* @__PURE__ */ Y("h2", {
|
|
1054
1061
|
className: "text-base font-semibold",
|
|
1055
1062
|
children: n("title")
|
|
1056
|
-
}), /* @__PURE__ */
|
|
1063
|
+
}), /* @__PURE__ */ Y(F, {
|
|
1057
1064
|
className: "mt-3",
|
|
1058
|
-
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */
|
|
1065
|
+
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(le, {
|
|
1059
1066
|
workspace: e,
|
|
1060
1067
|
icon: n,
|
|
1061
1068
|
actor: t.actor,
|
|
@@ -1065,4 +1072,13 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1065
1072
|
})]
|
|
1066
1073
|
});
|
|
1067
1074
|
}
|
|
1075
|
+
function Be(e, t) {
|
|
1076
|
+
let n = [], r = /* @__PURE__ */ new Set([t.id]), i = t.parentId;
|
|
1077
|
+
for (; i && !r.has(i);) {
|
|
1078
|
+
let t = e.find((e) => e.id === i);
|
|
1079
|
+
if (!t) break;
|
|
1080
|
+
r.add(t.id), n.unshift(t), i = t.parentId;
|
|
1081
|
+
}
|
|
1082
|
+
return n;
|
|
1083
|
+
}
|
|
1068
1084
|
export { Oe as component };
|