@parallelworks/tandem-web 0.139.0 → 0.139.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/components/AppRoot.js +9 -8
- package/components/settings.js +10 -10
- package/hostedApp.js +47 -45
- package/lib/pageTitle.js +22 -10
- package/package.json +1 -1
- package/pages/areas.js +112 -112
- package/pages/decisions.js +36 -36
- package/pages/issues.js +34 -34
- package/pages/projects.js +109 -109
- package/pages/triage.js +64 -64
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +185 -185
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +484 -484
- package/routes/_workspace/knowledge/_term2.js +166 -166
- package/routes/_workspace/knowledge/index2.js +33 -33
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +215 -215
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +38 -38
- package/routes/_workspace/teams/_key/settings2.js +131 -131
- package/routes/docs/route2.js +5 -5
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
package/pages/projects.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { usePageTitle as e } from "../lib/pageTitle.js";
|
|
2
|
+
import { Link as t, useNavigate as n } from "../lib/router.js";
|
|
3
|
+
import { projectsQuery as r, teamsQuery as i } from "../api/queries.js";
|
|
4
|
+
import { ChevronDownIcon as a, ListViewIcon as o, PriorityIcon as s, ProjectIcon as c, TimelineIcon as l, usePriorityNames as u } from "../components/icons.js";
|
|
5
|
+
import { healthStates as d, projectStatuses as f } from "../lib/projectStates.js";
|
|
6
|
+
import { storeLayout as p, storedLayout as m } from "../lib/projectList.js";
|
|
7
|
+
import { useFavorites as h } from "../lib/favorites.js";
|
|
8
|
+
import { copyItem as g, useLinkItems as _ } from "../lib/menus.js";
|
|
9
|
+
import { useTime as v } from "../lib/time.js";
|
|
10
|
+
import { HealthIcon as y, ProgressBar as b, ProjectStatusIcon as x, healthOf as S } from "../components/Planning.js";
|
|
11
|
+
import { usePeople as C } from "../lib/people.js";
|
|
12
12
|
import { useCan as w } from "../lib/roles.js";
|
|
13
13
|
import { EntityIcon as T } from "../components/EntityIcon.js";
|
|
14
14
|
import { projectRef as E, projectTree as D, projectsUnder as O } from "../lib/projects.js";
|
|
@@ -24,64 +24,64 @@ import { useSuspenseQuery as B } from "@tanstack/react-query";
|
|
|
24
24
|
import { MoreButton as V } from "@parallelworks/ui/list";
|
|
25
25
|
// src/pages/projects.tsx
|
|
26
26
|
function H() {
|
|
27
|
-
let { workspace:
|
|
28
|
-
...
|
|
29
|
-
team:
|
|
30
|
-
} :
|
|
31
|
-
|
|
32
|
-
let
|
|
27
|
+
let { workspace: t, key: a } = ue({ strict: !1 }), s = de({ strict: !1 }), u = a ? {
|
|
28
|
+
...s,
|
|
29
|
+
team: a
|
|
30
|
+
} : s, d = L("planning"), v = L("common"), { data: y } = B(r(t)), { data: b } = B(i(t)), x = b.find((e) => e.key === u.team);
|
|
31
|
+
e(x ? d("teamProjects", { team: x.name }) : d("projects"));
|
|
32
|
+
let C = a ? "list" : "timeline", T = u.view ?? m(!!a) ?? C, D = y.filter((e) => (!x || e.teamIds.includes(x.id)) && !!e.template == (T === "templates")), k = w(t, "manage_projects"), [j, M] = F(!1), N = fe(), P = n(), I = le(), V = _(), H = u.parent ? y.find((e) => e.id === u.parent) : void 0, U = H && new Set(O(y, H.id).map((e) => e.id)), W = D.filter((e) => (!u.status || e.status === u.status) && (!u.health || S(e) === u.health) && (!U || U.has(e.id))), G = (e) => {
|
|
33
33
|
let { team: n, ...r } = Object.fromEntries(Object.entries({
|
|
34
|
-
...
|
|
35
|
-
...
|
|
34
|
+
...u,
|
|
35
|
+
...e
|
|
36
36
|
}).filter(([, e]) => e !== void 0));
|
|
37
|
-
return P(
|
|
37
|
+
return P(a ? {
|
|
38
38
|
to: "/$workspace/teams/$key/projects",
|
|
39
39
|
params: {
|
|
40
|
-
workspace:
|
|
41
|
-
key:
|
|
40
|
+
workspace: t,
|
|
41
|
+
key: a
|
|
42
42
|
},
|
|
43
43
|
search: r,
|
|
44
44
|
replace: !0
|
|
45
45
|
} : {
|
|
46
46
|
to: "/$workspace/projects",
|
|
47
|
-
params: { workspace:
|
|
47
|
+
params: { workspace: t },
|
|
48
48
|
search: r,
|
|
49
49
|
replace: !0
|
|
50
50
|
});
|
|
51
|
-
}, K =
|
|
51
|
+
}, K = h(t), q = L("favorites"), J = (e) => [
|
|
52
52
|
{
|
|
53
|
-
label:
|
|
53
|
+
label: v("open"),
|
|
54
54
|
onClick: () => P({
|
|
55
55
|
to: "/$workspace/projects/$projectId",
|
|
56
56
|
params: {
|
|
57
|
-
workspace:
|
|
58
|
-
projectId: E(
|
|
57
|
+
workspace: t,
|
|
58
|
+
projectId: E(e)
|
|
59
59
|
}
|
|
60
60
|
})
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
label:
|
|
63
|
+
label: d("viewIssues"),
|
|
64
64
|
onClick: () => P({
|
|
65
65
|
to: "/$workspace/projects/$projectId",
|
|
66
66
|
params: {
|
|
67
|
-
workspace:
|
|
68
|
-
projectId: E(
|
|
67
|
+
workspace: t,
|
|
68
|
+
projectId: E(e)
|
|
69
69
|
},
|
|
70
70
|
search: { tab: "issues" }
|
|
71
71
|
})
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
label: K.find("project",
|
|
75
|
-
onClick: () => K.toggle("project",
|
|
74
|
+
label: K.find("project", e.id) ? q("remove") : q("add"),
|
|
75
|
+
onClick: () => K.toggle("project", e.id)
|
|
76
76
|
},
|
|
77
77
|
ce,
|
|
78
|
-
...V(`/${
|
|
79
|
-
|
|
80
|
-
], Y = (
|
|
81
|
-
workspace:
|
|
82
|
-
project:
|
|
83
|
-
onContextMenu: (
|
|
84
|
-
menu: () => J(
|
|
78
|
+
...V(`/${t}/projects/${E(e)}`),
|
|
79
|
+
g(v("copyName"), e.name)
|
|
80
|
+
], Y = (e) => ({
|
|
81
|
+
workspace: t,
|
|
82
|
+
project: e,
|
|
83
|
+
onContextMenu: (t) => I(t, J(e)),
|
|
84
|
+
menu: () => J(e)
|
|
85
85
|
});
|
|
86
86
|
return /* @__PURE__ */ z("div", {
|
|
87
87
|
className: "flex h-full min-h-0 flex-col",
|
|
@@ -91,10 +91,10 @@ function H() {
|
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ R("h1", {
|
|
93
93
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
94
|
-
children:
|
|
94
|
+
children: x ? d("teamProjects", { team: x.name }) : d("projects")
|
|
95
95
|
}),
|
|
96
|
-
!
|
|
97
|
-
workspace:
|
|
96
|
+
!x && /* @__PURE__ */ R(ee, {
|
|
97
|
+
workspace: t,
|
|
98
98
|
kind: "page",
|
|
99
99
|
target: "projects"
|
|
100
100
|
}),
|
|
@@ -104,25 +104,25 @@ function H() {
|
|
|
104
104
|
...T !== "templates" && {
|
|
105
105
|
layouts: [{
|
|
106
106
|
value: "list",
|
|
107
|
-
label:
|
|
108
|
-
icon: /* @__PURE__ */ R(
|
|
107
|
+
label: d("views.list"),
|
|
108
|
+
icon: /* @__PURE__ */ R(o, {})
|
|
109
109
|
}, {
|
|
110
110
|
value: "timeline",
|
|
111
|
-
label:
|
|
112
|
-
icon: /* @__PURE__ */ R(
|
|
111
|
+
label: d("views.timeline"),
|
|
112
|
+
icon: /* @__PURE__ */ R(l, {})
|
|
113
113
|
}],
|
|
114
114
|
layout: T,
|
|
115
115
|
onLayoutChange: (e) => {
|
|
116
|
-
|
|
116
|
+
p(!!a, e), G({ view: e });
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
changed: T !==
|
|
119
|
+
changed: T !== C,
|
|
120
120
|
children: /* @__PURE__ */ z("div", {
|
|
121
121
|
className: "flex items-center justify-between gap-3",
|
|
122
122
|
children: [/* @__PURE__ */ R("span", {
|
|
123
123
|
id: N,
|
|
124
124
|
className: "text-sm",
|
|
125
|
-
children:
|
|
125
|
+
children: d("showTemplates")
|
|
126
126
|
}), /* @__PURE__ */ R(oe, {
|
|
127
127
|
size: "sm",
|
|
128
128
|
checked: T === "templates",
|
|
@@ -133,7 +133,7 @@ function H() {
|
|
|
133
133
|
})
|
|
134
134
|
}),
|
|
135
135
|
k && /* @__PURE__ */ R(ae, {
|
|
136
|
-
label:
|
|
136
|
+
label: d("newProject"),
|
|
137
137
|
onClick: () => M(!0)
|
|
138
138
|
})
|
|
139
139
|
]
|
|
@@ -142,41 +142,41 @@ function H() {
|
|
|
142
142
|
className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
143
143
|
children: [
|
|
144
144
|
/* @__PURE__ */ R(se, {
|
|
145
|
-
label:
|
|
145
|
+
label: d("filterStatus"),
|
|
146
146
|
multiple: !1,
|
|
147
147
|
all: { count: D.length },
|
|
148
|
-
options:
|
|
148
|
+
options: f.map((e) => ({
|
|
149
149
|
value: e,
|
|
150
|
-
label:
|
|
150
|
+
label: d(`status.${e}`),
|
|
151
151
|
count: D.filter((t) => t.status === e).length
|
|
152
152
|
})),
|
|
153
|
-
value:
|
|
153
|
+
value: u.status ? [u.status] : [],
|
|
154
154
|
onValueChange: ([e]) => G({ status: e })
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
u.health && /* @__PURE__ */ R(A, {
|
|
157
157
|
variant: "outline",
|
|
158
158
|
size: "sm",
|
|
159
159
|
"aria-pressed": !0,
|
|
160
160
|
onClick: () => G({ health: void 0 }),
|
|
161
|
-
children:
|
|
161
|
+
children: d("healthFilter", { health: d(`health.${u.health}`) })
|
|
162
162
|
}),
|
|
163
163
|
D.some((e) => e.parentId) && /* @__PURE__ */ R(re, {
|
|
164
164
|
items: [{
|
|
165
165
|
value: "",
|
|
166
|
-
label:
|
|
167
|
-
}, ...
|
|
166
|
+
label: d("anyParent")
|
|
167
|
+
}, ...y.filter((e) => y.some((t) => t.parentId === e.id)).map((e) => ({
|
|
168
168
|
value: e.id,
|
|
169
169
|
label: e.name
|
|
170
170
|
}))],
|
|
171
|
-
value:
|
|
171
|
+
value: u.parent ?? "",
|
|
172
172
|
onValueChange: (e) => G({ parent: e || void 0 }),
|
|
173
|
-
placeholder:
|
|
174
|
-
"aria-label":
|
|
173
|
+
placeholder: d("parentProject"),
|
|
174
|
+
"aria-label": d("parentProject"),
|
|
175
175
|
trigger: /* @__PURE__ */ R(A, {
|
|
176
176
|
variant: "outline",
|
|
177
177
|
size: "sm",
|
|
178
178
|
className: H ? "border-(--theme-link) text-(--theme-app)" : void 0,
|
|
179
|
-
children: H ?
|
|
179
|
+
children: H ? d("underProject", { name: H.name }) : d("parentProject")
|
|
180
180
|
})
|
|
181
181
|
})
|
|
182
182
|
]
|
|
@@ -188,18 +188,18 @@ function H() {
|
|
|
188
188
|
children: W.length === 0 ? /* @__PURE__ */ R("div", {
|
|
189
189
|
className: "p-6",
|
|
190
190
|
children: /* @__PURE__ */ R(ie, {
|
|
191
|
-
icon: /* @__PURE__ */ R(
|
|
192
|
-
title:
|
|
193
|
-
...!
|
|
194
|
-
...k && !
|
|
191
|
+
icon: /* @__PURE__ */ R(c, {}),
|
|
192
|
+
title: u.status || u.health ? d("noProjectsWithStatus") : d(T === "templates" ? "noTemplates" : "noProjects"),
|
|
193
|
+
...!u.status && !u.health && { description: d(T === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
|
|
194
|
+
...k && !u.status && !u.health && T !== "templates" && { action: /* @__PURE__ */ R(A, {
|
|
195
195
|
type: "button",
|
|
196
196
|
variant: "primary",
|
|
197
197
|
onClick: () => M(!0),
|
|
198
|
-
children:
|
|
198
|
+
children: d("newProject")
|
|
199
199
|
}) }
|
|
200
200
|
})
|
|
201
201
|
}) : T === "timeline" ? /* @__PURE__ */ R(ge, {
|
|
202
|
-
workspace:
|
|
202
|
+
workspace: t,
|
|
203
203
|
projects: W,
|
|
204
204
|
rowProps: Y
|
|
205
205
|
}) : /* @__PURE__ */ R(pe, {
|
|
@@ -207,15 +207,15 @@ function H() {
|
|
|
207
207
|
rowProps: Y
|
|
208
208
|
})
|
|
209
209
|
}), /* @__PURE__ */ R(_e, {
|
|
210
|
-
workspace:
|
|
210
|
+
workspace: t,
|
|
211
211
|
projects: D,
|
|
212
|
-
health:
|
|
213
|
-
onHealth: (e) => G({ health: e ===
|
|
212
|
+
health: u.health,
|
|
213
|
+
onHealth: (e) => G({ health: e === u.health ? void 0 : e })
|
|
214
214
|
})]
|
|
215
215
|
}),
|
|
216
216
|
j && /* @__PURE__ */ R(ne, {
|
|
217
|
-
workspace:
|
|
218
|
-
teamId:
|
|
217
|
+
workspace: t,
|
|
218
|
+
teamId: x?.id,
|
|
219
219
|
onClose: () => M(!1)
|
|
220
220
|
})
|
|
221
221
|
]
|
|
@@ -266,29 +266,29 @@ function W({ project: e }) {
|
|
|
266
266
|
icon: e.icon ?? "",
|
|
267
267
|
color: e.color ?? "",
|
|
268
268
|
name: e.name
|
|
269
|
-
}) : /* @__PURE__ */ R(
|
|
269
|
+
}) : /* @__PURE__ */ R(c, { className: "size-4 text-muted-foreground" });
|
|
270
270
|
}
|
|
271
|
-
function G({ workspace:
|
|
272
|
-
let f = L("planning"), p = L("common"), m =
|
|
271
|
+
function G({ workspace: e, project: n, onContextMenu: r, menu: i, depth: o = 0, childCount: c = 0, folded: l = !1, onFold: d }) {
|
|
272
|
+
let f = L("planning"), p = L("common"), m = v(), h = u(), { person: g } = C(e), _ = n.lead ? g(n.lead) : void 0, w = S(n);
|
|
273
273
|
return /* @__PURE__ */ z("li", {
|
|
274
274
|
className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
|
|
275
275
|
children: [
|
|
276
276
|
/* @__PURE__ */ R("span", {
|
|
277
277
|
className: "flex shrink-0 justify-end pl-2 md:pl-3",
|
|
278
|
-
style: { width: `${
|
|
278
|
+
style: { width: `${o * 1.25 + 2}rem` },
|
|
279
279
|
children: c > 0 && /* @__PURE__ */ R("button", {
|
|
280
280
|
type: "button",
|
|
281
281
|
onClick: d,
|
|
282
|
-
"aria-expanded": !
|
|
283
|
-
"aria-label": f(
|
|
282
|
+
"aria-expanded": !l,
|
|
283
|
+
"aria-label": f(l ? "showSubProjects" : "hideSubProjects", { name: n.name }),
|
|
284
284
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
285
|
-
children: /* @__PURE__ */ R(
|
|
285
|
+
children: /* @__PURE__ */ R(a, { className: `size-3.5 transition-transform ${l ? "-rotate-90" : ""}` })
|
|
286
286
|
})
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */ z(
|
|
288
|
+
/* @__PURE__ */ z(t, {
|
|
289
289
|
to: "/$workspace/projects/$projectId",
|
|
290
290
|
params: {
|
|
291
|
-
workspace:
|
|
291
|
+
workspace: e,
|
|
292
292
|
projectId: E(n)
|
|
293
293
|
},
|
|
294
294
|
onContextMenu: r,
|
|
@@ -309,7 +309,7 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
|
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ z("span", {
|
|
311
311
|
className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
|
|
312
|
-
children: [/* @__PURE__ */ R(
|
|
312
|
+
children: [/* @__PURE__ */ R(y, { state: w }), f(`health.${w}`)]
|
|
313
313
|
}),
|
|
314
314
|
/* @__PURE__ */ R(M, {
|
|
315
315
|
content: h[n.priority],
|
|
@@ -317,16 +317,16 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
|
|
|
317
317
|
role: "img",
|
|
318
318
|
"aria-label": h[n.priority],
|
|
319
319
|
className: "flex",
|
|
320
|
-
children: /* @__PURE__ */ R(
|
|
320
|
+
children: /* @__PURE__ */ R(s, { priority: n.priority })
|
|
321
321
|
})
|
|
322
322
|
}),
|
|
323
323
|
/* @__PURE__ */ R("span", {
|
|
324
324
|
className: "flex",
|
|
325
|
-
children:
|
|
326
|
-
content: f("leadIs", { name:
|
|
325
|
+
children: _ && /* @__PURE__ */ R(M, {
|
|
326
|
+
content: f("leadIs", { name: _.name }),
|
|
327
327
|
children: /* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(k, {
|
|
328
|
-
name:
|
|
329
|
-
src:
|
|
328
|
+
name: _.name,
|
|
329
|
+
src: _.avatarUrl,
|
|
330
330
|
size: "sm"
|
|
331
331
|
}) })
|
|
332
332
|
})
|
|
@@ -335,7 +335,7 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
|
|
|
335
335
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
336
336
|
children: n.targetDate ? m.day(n.targetDate) : ""
|
|
337
337
|
}),
|
|
338
|
-
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(
|
|
338
|
+
/* @__PURE__ */ R("span", { children: /* @__PURE__ */ R(b, {
|
|
339
339
|
progress: c > 0 ? n.treeProgress : n.progress,
|
|
340
340
|
compact: !0
|
|
341
341
|
}) }),
|
|
@@ -345,13 +345,13 @@ function G({ workspace: t, project: n, onContextMenu: r, menu: a, depth: s = 0,
|
|
|
345
345
|
role: "img",
|
|
346
346
|
"aria-label": f(`status.${n.status}`),
|
|
347
347
|
className: "flex",
|
|
348
|
-
children: /* @__PURE__ */ R(
|
|
348
|
+
children: /* @__PURE__ */ R(x, { status: n.status })
|
|
349
349
|
})
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
352
|
}),
|
|
353
353
|
/* @__PURE__ */ R(V, {
|
|
354
|
-
items:
|
|
354
|
+
items: i,
|
|
355
355
|
label: p("moreActionsFor", { name: n.name })
|
|
356
356
|
})
|
|
357
357
|
]
|
|
@@ -364,7 +364,7 @@ var K = 864e5, q = 5, J = 64, Y = 256, X = 56, Z = (e) => Date.parse(`${e}T00:00
|
|
|
364
364
|
let e = /* @__PURE__ */ new Date();
|
|
365
365
|
return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
366
366
|
}, he = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * K;
|
|
367
|
-
function ge({ workspace:
|
|
367
|
+
function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
368
368
|
let i = L("planning"), a = I(), o = P(null), [s, c] = F({
|
|
369
369
|
left: 0,
|
|
370
370
|
width: 0
|
|
@@ -493,10 +493,10 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
|
|
|
493
493
|
style: { width: h },
|
|
494
494
|
children: [o && !d && !f && /* @__PURE__ */ R(M, {
|
|
495
495
|
content: `${n.name}, ${y(i, a)}`,
|
|
496
|
-
children: /* @__PURE__ */ z(
|
|
496
|
+
children: /* @__PURE__ */ z(t, {
|
|
497
497
|
to: "/$workspace/projects/$projectId",
|
|
498
498
|
params: {
|
|
499
|
-
workspace:
|
|
499
|
+
workspace: e,
|
|
500
500
|
projectId: E(n)
|
|
501
501
|
},
|
|
502
502
|
className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
|
|
@@ -519,10 +519,10 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
|
|
|
519
519
|
})]
|
|
520
520
|
})]
|
|
521
521
|
})
|
|
522
|
-
}), (d || f) && /* @__PURE__ */ z(
|
|
522
|
+
}), (d || f) && /* @__PURE__ */ z(t, {
|
|
523
523
|
to: "/$workspace/projects/$projectId",
|
|
524
524
|
params: {
|
|
525
|
-
workspace:
|
|
525
|
+
workspace: e,
|
|
526
526
|
projectId: E(n)
|
|
527
527
|
},
|
|
528
528
|
className: "absolute top-1/2 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground hover:text-foreground",
|
|
@@ -550,12 +550,12 @@ function ge({ workspace: t, projects: n, rowProps: r }) {
|
|
|
550
550
|
})
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
function $({ workspace:
|
|
554
|
-
let i = L("planning"), { person: a } =
|
|
555
|
-
return /* @__PURE__ */ z(
|
|
553
|
+
function $({ workspace: e, project: n, onContextMenu: r }) {
|
|
554
|
+
let i = L("planning"), { person: a } = C(e), o = n.lead ? a(n.lead) : void 0, s = S(n);
|
|
555
|
+
return /* @__PURE__ */ z(t, {
|
|
556
556
|
to: "/$workspace/projects/$projectId",
|
|
557
557
|
params: {
|
|
558
|
-
workspace:
|
|
558
|
+
workspace: e,
|
|
559
559
|
projectId: E(n)
|
|
560
560
|
},
|
|
561
561
|
onContextMenu: r,
|
|
@@ -572,7 +572,7 @@ function $({ workspace: t, project: n, onContextMenu: r }) {
|
|
|
572
572
|
children: /* @__PURE__ */ R("span", {
|
|
573
573
|
role: "img",
|
|
574
574
|
"aria-label": i(`health.${s}`),
|
|
575
|
-
children: /* @__PURE__ */ R(
|
|
575
|
+
children: /* @__PURE__ */ R(y, { state: s })
|
|
576
576
|
})
|
|
577
577
|
}),
|
|
578
578
|
o && /* @__PURE__ */ R(k, {
|
|
@@ -584,8 +584,8 @@ function $({ workspace: t, project: n, onContextMenu: r }) {
|
|
|
584
584
|
]
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
|
-
function _e({ workspace: e, projects: t, health: n, onHealth:
|
|
588
|
-
let a = L("planning"), { data: o } = B(
|
|
587
|
+
function _e({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
588
|
+
let a = L("planning"), { data: o } = B(i(e)), { person: s } = C(e), [c, l] = F("health"), u = (e) => t.filter(e).length, f = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", p = [...new Set(t.map((e) => e.lead ?? ""))];
|
|
589
589
|
return /* @__PURE__ */ z("aside", {
|
|
590
590
|
"aria-label": a("breakdown"),
|
|
591
591
|
className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
|
|
@@ -606,16 +606,16 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
606
606
|
}), /* @__PURE__ */ z("ul", {
|
|
607
607
|
className: "mt-2",
|
|
608
608
|
children: [
|
|
609
|
-
c === "health" &&
|
|
609
|
+
c === "health" && d.map((e) => ({
|
|
610
610
|
h: e,
|
|
611
|
-
n:
|
|
611
|
+
n: u((t) => S(t) === e)
|
|
612
612
|
})).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */ R("li", { children: /* @__PURE__ */ z("button", {
|
|
613
613
|
type: "button",
|
|
614
614
|
"aria-pressed": n === e,
|
|
615
|
-
onClick: () =>
|
|
615
|
+
onClick: () => r(e),
|
|
616
616
|
className: `${f} hover:bg-muted aria-pressed:bg-muted`,
|
|
617
617
|
children: [
|
|
618
|
-
/* @__PURE__ */ R(
|
|
618
|
+
/* @__PURE__ */ R(y, { state: e }),
|
|
619
619
|
/* @__PURE__ */ R("span", {
|
|
620
620
|
className: "flex-1 text-left",
|
|
621
621
|
children: a(`health.${e}`)
|
|
@@ -628,7 +628,7 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
628
628
|
}) }, e)),
|
|
629
629
|
c === "teams" && o.filter((e) => !e.archivedAt).map((e) => ({
|
|
630
630
|
team: e,
|
|
631
|
-
n:
|
|
631
|
+
n: u((t) => t.teamIds.includes(e.id))
|
|
632
632
|
})).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */ z("li", {
|
|
633
633
|
className: f,
|
|
634
634
|
children: [
|
|
@@ -664,7 +664,7 @@ function _e({ workspace: e, projects: t, health: n, onHealth: i }) {
|
|
|
664
664
|
}),
|
|
665
665
|
/* @__PURE__ */ R("span", {
|
|
666
666
|
className: "text-muted-foreground tabular-nums",
|
|
667
|
-
children:
|
|
667
|
+
children: u((t) => (t.lead ?? "") === e)
|
|
668
668
|
})
|
|
669
669
|
]
|
|
670
670
|
}, e || "none");
|