@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
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { useCan as
|
|
15
|
-
import { useConfirm as
|
|
16
|
-
import { EntityIcon as
|
|
17
|
-
import { projectRef as
|
|
18
|
-
import { Editor as
|
|
19
|
-
import { FavoriteStar as
|
|
20
|
-
import { Timeline as
|
|
21
|
-
import { useIssuePicker as
|
|
2
|
+
import { usePageTitle as n } from "../../../lib/pageTitle.js";
|
|
3
|
+
import { Link as r, useNavigate as i } from "../../../lib/router.js";
|
|
4
|
+
import { issuesQuery as a, meQuery as o, projectEventsQuery as s, projectOf as c, projectQuery as l, projectUpdatesQuery as u, projectsQuery as d, teamsQuery as f } from "../../../api/queries.js";
|
|
5
|
+
import { AddIcon as p, AddUserIcon as m, CalendarIcon as h, LinkIcon as g, PriorityIcon as _, ProjectIcon as v, RemoveUserIcon as y, RenameIcon as b, UsersIcon as x, usePriorityNames as S } from "../../../components/icons.js";
|
|
6
|
+
import { projectStatuses as C } from "../../../lib/projectStates.js";
|
|
7
|
+
import { projectIssueFilter as w, tabs as T } from "./_projectId.js";
|
|
8
|
+
import { Route as E } from "./_projectId2.js";
|
|
9
|
+
import { copyItem as ee, useLinkItems as D } from "../../../lib/menus.js";
|
|
10
|
+
import { invalidateIssueViews as O } from "../../../api/mutations.js";
|
|
11
|
+
import { useTime as k } from "../../../lib/time.js";
|
|
12
|
+
import { HealthIcon as A, ProgressBar as te, ProjectStatusIcon as j, healthOf as M } from "../../../components/Planning.js";
|
|
13
|
+
import { usePeople as N } from "../../../lib/people.js";
|
|
14
|
+
import { useCan as ne } from "../../../lib/roles.js";
|
|
15
|
+
import { useConfirm as re } from "../../../lib/confirm.js";
|
|
16
|
+
import { EntityIcon as ie } from "../../../components/EntityIcon.js";
|
|
17
|
+
import { projectRef as P, projectsUnder as ae } from "../../../lib/projects.js";
|
|
18
|
+
import { Editor as oe } from "../../../components/Editor.js";
|
|
19
|
+
import { FavoriteStar as se } from "../../../components/FavoriteStar.js";
|
|
20
|
+
import { Timeline as F, TimelineItem as ce, activityIcon as I } from "../../../components/ActivityTimeline.js";
|
|
21
|
+
import { useIssuePicker as le } from "../../../lib/issuePicker.js";
|
|
22
22
|
import { IssueBreakdown as ue } from "../../../components/IssueBreakdown.js";
|
|
23
23
|
import { FollowButton as de } from "../../../components/FollowButton.js";
|
|
24
24
|
import { IconUpload as fe } from "../../../components/IconUpload.js";
|
|
@@ -39,131 +39,131 @@ var Ee = [
|
|
|
39
39
|
"cycles"
|
|
40
40
|
];
|
|
41
41
|
function De() {
|
|
42
|
-
let { workspace:
|
|
43
|
-
|
|
44
|
-
let
|
|
42
|
+
let { workspace: s, projectId: u } = E.useParams(), f = q("planning"), p = q("common"), m = K(), { data: h } = we(l(s, u)), g = P(h);
|
|
43
|
+
n(h.name);
|
|
44
|
+
let _ = ne(s, "manage_projects", { project: h.id }), y = ne(s, "delete_projects", { project: h.id }), b = $(), x = i(), S = D(), { confirm: C, dialog: O } = re(), [k, A] = G(!1), { data: j } = we(o), M = !!E.useSearch().own, { data: N } = Q(a(s, w(h.id, M))), { data: ae = [] } = Q(d(s)), F = ae.filter((e) => e.parentId === h.id), ce = M || F.length === 0 ? h.progress : h.treeProgress, [I, le] = G("assignees"), L = Z({
|
|
45
45
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
|
|
46
46
|
params: { path: {
|
|
47
|
-
workspace:
|
|
48
|
-
projectId:
|
|
47
|
+
workspace: s,
|
|
48
|
+
projectId: u
|
|
49
49
|
} },
|
|
50
50
|
body: n
|
|
51
51
|
})),
|
|
52
|
-
onSuccess: (e) =>
|
|
52
|
+
onSuccess: (e) => b.setQueryData(l(s, u).queryKey, c(e)),
|
|
53
53
|
onSettled: () => {
|
|
54
|
-
|
|
54
|
+
b.invalidateQueries({ queryKey: d(s).queryKey });
|
|
55
55
|
}
|
|
56
56
|
}), me = Z({
|
|
57
57
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
|
|
58
|
-
workspace:
|
|
59
|
-
projectId:
|
|
58
|
+
workspace: s,
|
|
59
|
+
projectId: u
|
|
60
60
|
} } })),
|
|
61
61
|
onSuccess: () => {
|
|
62
|
-
|
|
62
|
+
b.invalidateQueries({ queryKey: ["workspace", s] }), x({
|
|
63
63
|
to: "/$workspace/projects",
|
|
64
|
-
params: { workspace:
|
|
64
|
+
params: { workspace: s }
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
}), R = () => [
|
|
68
68
|
{
|
|
69
|
-
label:
|
|
70
|
-
onClick: () =>
|
|
69
|
+
label: f("viewIssues"),
|
|
70
|
+
onClick: () => x({
|
|
71
71
|
to: "/$workspace/projects/$projectId",
|
|
72
72
|
params: {
|
|
73
|
-
workspace:
|
|
74
|
-
projectId:
|
|
73
|
+
workspace: s,
|
|
74
|
+
projectId: u
|
|
75
75
|
},
|
|
76
76
|
search: { tab: "issues" }
|
|
77
77
|
})
|
|
78
78
|
},
|
|
79
|
-
...
|
|
80
|
-
label:
|
|
81
|
-
onClick: () => L.mutate({ template: !
|
|
79
|
+
..._ ? [{
|
|
80
|
+
label: h.template ? f("stopTemplate") : f("useAsTemplate"),
|
|
81
|
+
onClick: () => L.mutate({ template: !h.template })
|
|
82
82
|
}] : [],
|
|
83
|
-
...
|
|
84
|
-
label:
|
|
85
|
-
onClick: () =>
|
|
83
|
+
...j?.mode === "platform" ? [] : [{
|
|
84
|
+
label: f("manageAccess"),
|
|
85
|
+
onClick: () => A(!0)
|
|
86
86
|
}],
|
|
87
87
|
W,
|
|
88
|
-
...
|
|
89
|
-
|
|
90
|
-
...
|
|
91
|
-
label:
|
|
88
|
+
...S(`/${s}/projects/${g}`),
|
|
89
|
+
ee(p("copyName"), h.name),
|
|
90
|
+
...y ? [W, {
|
|
91
|
+
label: f("deleteProject"),
|
|
92
92
|
destructive: !0,
|
|
93
|
-
onClick: () =>
|
|
94
|
-
title:
|
|
95
|
-
description:
|
|
96
|
-
confirmLabel:
|
|
93
|
+
onClick: () => C({
|
|
94
|
+
title: f("deleteProjectTitle", { name: h.name }),
|
|
95
|
+
description: f("deleteProjectDescription"),
|
|
96
|
+
confirmLabel: f("deleteProject"),
|
|
97
97
|
onConfirm: () => me.mutateAsync()
|
|
98
98
|
})
|
|
99
99
|
}] : []
|
|
100
|
-
], z =
|
|
100
|
+
], z = E.useSearch().tab ?? "overview", B = N?.issues ?? [];
|
|
101
101
|
return Ce(() => {
|
|
102
|
-
|
|
102
|
+
u !== g && x({
|
|
103
103
|
to: "/$workspace/projects/$projectId",
|
|
104
104
|
params: {
|
|
105
|
-
workspace:
|
|
106
|
-
projectId:
|
|
105
|
+
workspace: s,
|
|
106
|
+
projectId: g
|
|
107
107
|
},
|
|
108
108
|
search: (e) => e,
|
|
109
109
|
replace: !0
|
|
110
110
|
});
|
|
111
111
|
}, [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
x,
|
|
113
|
+
s,
|
|
114
|
+
u,
|
|
115
|
+
g
|
|
116
116
|
]), /* @__PURE__ */ X("div", {
|
|
117
117
|
className: "flex h-full min-h-0 flex-col",
|
|
118
118
|
children: [
|
|
119
119
|
/* @__PURE__ */ Y(ye, {
|
|
120
120
|
heading: !1,
|
|
121
121
|
breadcrumbs: [{
|
|
122
|
-
label:
|
|
123
|
-
href: `/${
|
|
122
|
+
label: f("projects"),
|
|
123
|
+
href: `/${s}/projects`
|
|
124
124
|
}, {
|
|
125
|
-
label:
|
|
126
|
-
icon:
|
|
127
|
-
icon:
|
|
128
|
-
color:
|
|
129
|
-
name:
|
|
130
|
-
}) : /* @__PURE__ */ Y(
|
|
125
|
+
label: h.name,
|
|
126
|
+
icon: h.icon || h.color ? /* @__PURE__ */ Y(ie, {
|
|
127
|
+
icon: h.icon ?? "",
|
|
128
|
+
color: h.color ?? "",
|
|
129
|
+
name: h.name
|
|
130
|
+
}) : /* @__PURE__ */ Y(v, { className: "size-4 text-muted-foreground" })
|
|
131
131
|
}],
|
|
132
132
|
titleActions: /* @__PURE__ */ X(J, { children: [
|
|
133
|
-
/* @__PURE__ */ Y(
|
|
134
|
-
workspace:
|
|
133
|
+
/* @__PURE__ */ Y(se, {
|
|
134
|
+
workspace: s,
|
|
135
135
|
kind: "project",
|
|
136
|
-
target:
|
|
136
|
+
target: h.id
|
|
137
137
|
}),
|
|
138
138
|
/* @__PURE__ */ Y(de, {
|
|
139
|
-
workspace:
|
|
140
|
-
project:
|
|
139
|
+
workspace: s,
|
|
140
|
+
project: h.id
|
|
141
141
|
}),
|
|
142
142
|
/* @__PURE__ */ Y(Te, {
|
|
143
143
|
items: R,
|
|
144
|
-
label:
|
|
144
|
+
label: p("moreActionsFor", { name: h.name }),
|
|
145
145
|
visible: !0
|
|
146
146
|
})
|
|
147
147
|
] }),
|
|
148
148
|
actions: L.isPending && /* @__PURE__ */ Y("span", {
|
|
149
149
|
className: "text-xs text-muted-foreground",
|
|
150
|
-
children:
|
|
150
|
+
children: p("saving")
|
|
151
151
|
})
|
|
152
152
|
}),
|
|
153
153
|
/* @__PURE__ */ Y("nav", {
|
|
154
|
-
"aria-label":
|
|
154
|
+
"aria-label": f("projectSections"),
|
|
155
155
|
className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
156
|
-
children:
|
|
156
|
+
children: T.map((e) => /* @__PURE__ */ X(r, {
|
|
157
157
|
to: "/$workspace/projects/$projectId",
|
|
158
158
|
params: {
|
|
159
|
-
workspace:
|
|
160
|
-
projectId:
|
|
159
|
+
workspace: s,
|
|
160
|
+
projectId: u
|
|
161
161
|
},
|
|
162
162
|
search: e === "overview" ? {} : { tab: e },
|
|
163
163
|
"aria-current": z === e ? "page" : void 0,
|
|
164
164
|
activeOptions: { exact: !0 },
|
|
165
165
|
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",
|
|
166
|
-
children: [
|
|
166
|
+
children: [f(`projectTabs.${e}`), e === "issues" && B.length > 0 && /* @__PURE__ */ Y("span", {
|
|
167
167
|
className: "ml-1 tabular-nums",
|
|
168
168
|
children: B.length
|
|
169
169
|
})]
|
|
@@ -178,55 +178,55 @@ function De() {
|
|
|
178
178
|
/* @__PURE__ */ X("div", {
|
|
179
179
|
className: "flex items-center gap-3",
|
|
180
180
|
children: [/* @__PURE__ */ Y(fe, {
|
|
181
|
-
workspace:
|
|
182
|
-
icon:
|
|
183
|
-
name:
|
|
181
|
+
workspace: s,
|
|
182
|
+
icon: h.icon ?? "",
|
|
183
|
+
name: h.name,
|
|
184
184
|
onChange: (e) => L.mutateAsync({
|
|
185
185
|
icon: e,
|
|
186
186
|
color: ""
|
|
187
187
|
}),
|
|
188
|
-
disabled: !
|
|
188
|
+
disabled: !_,
|
|
189
189
|
size: 40
|
|
190
190
|
}), /* @__PURE__ */ Y(Oe, {
|
|
191
|
-
project:
|
|
192
|
-
canWrite:
|
|
191
|
+
project: h,
|
|
192
|
+
canWrite: _,
|
|
193
193
|
onSave: (e) => L.mutate({ name: e })
|
|
194
194
|
})]
|
|
195
195
|
}),
|
|
196
196
|
/* @__PURE__ */ Y(ke, {
|
|
197
|
-
project:
|
|
198
|
-
canWrite:
|
|
197
|
+
project: h,
|
|
198
|
+
canWrite: _,
|
|
199
199
|
onSave: (e) => L.mutate({ summary: e })
|
|
200
200
|
}),
|
|
201
201
|
/* @__PURE__ */ Y(Ae, {
|
|
202
|
-
workspace:
|
|
203
|
-
project:
|
|
204
|
-
canWrite:
|
|
202
|
+
workspace: s,
|
|
203
|
+
project: h,
|
|
204
|
+
canWrite: _,
|
|
205
205
|
update: (e) => L.mutate(e)
|
|
206
206
|
}),
|
|
207
207
|
/* @__PURE__ */ Y(Me, {
|
|
208
|
-
workspace:
|
|
209
|
-
project:
|
|
208
|
+
workspace: s,
|
|
209
|
+
project: h
|
|
210
210
|
}),
|
|
211
211
|
L.isError && /* @__PURE__ */ Y(H, {
|
|
212
212
|
size: "md",
|
|
213
213
|
className: "mt-2",
|
|
214
|
-
children:
|
|
214
|
+
children: m(L.error)
|
|
215
215
|
}),
|
|
216
216
|
/* @__PURE__ */ X("section", {
|
|
217
217
|
className: "mt-6",
|
|
218
|
-
"aria-label":
|
|
219
|
-
children: [/* @__PURE__ */ Y(
|
|
218
|
+
"aria-label": f("progressTitle"),
|
|
219
|
+
children: [/* @__PURE__ */ Y(te, { progress: ce }), F.length > 0 && /* @__PURE__ */ X("div", {
|
|
220
220
|
className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
221
221
|
children: [/* @__PURE__ */ Y(xe, {
|
|
222
|
-
"aria-label":
|
|
222
|
+
"aria-label": f("onlyOwnIssues"),
|
|
223
223
|
size: "sm",
|
|
224
|
-
checked:
|
|
225
|
-
onCheckedChange: (e) =>
|
|
224
|
+
checked: M,
|
|
225
|
+
onCheckedChange: (e) => x({
|
|
226
226
|
to: "/$workspace/projects/$projectId",
|
|
227
227
|
params: {
|
|
228
|
-
workspace:
|
|
229
|
-
projectId:
|
|
228
|
+
workspace: s,
|
|
229
|
+
projectId: u
|
|
230
230
|
},
|
|
231
231
|
search: ({ own: t, ...n }) => e ? {
|
|
232
232
|
...n,
|
|
@@ -236,82 +236,82 @@ function De() {
|
|
|
236
236
|
})
|
|
237
237
|
}), /* @__PURE__ */ Y("span", {
|
|
238
238
|
"aria-hidden": "true",
|
|
239
|
-
children:
|
|
239
|
+
children: f("onlyOwnIssues")
|
|
240
240
|
})]
|
|
241
241
|
})]
|
|
242
242
|
}),
|
|
243
243
|
/* @__PURE__ */ Y(Pe, {
|
|
244
|
-
workspace:
|
|
245
|
-
projects:
|
|
244
|
+
workspace: s,
|
|
245
|
+
projects: F
|
|
246
246
|
}),
|
|
247
247
|
B.length > 0 && /* @__PURE__ */ Y("section", {
|
|
248
248
|
className: "mt-8 xl:hidden",
|
|
249
|
-
"aria-label":
|
|
249
|
+
"aria-label": f("issueBreakdown.label"),
|
|
250
250
|
children: /* @__PURE__ */ Y(ue, {
|
|
251
|
-
workspace:
|
|
251
|
+
workspace: s,
|
|
252
252
|
issues: B,
|
|
253
253
|
tabs: Ee,
|
|
254
|
-
tab:
|
|
255
|
-
onTabChange:
|
|
254
|
+
tab: I,
|
|
255
|
+
onTabChange: le
|
|
256
256
|
})
|
|
257
257
|
}),
|
|
258
258
|
/* @__PURE__ */ X("section", {
|
|
259
259
|
className: "mt-8",
|
|
260
260
|
children: [/* @__PURE__ */ Y("h2", {
|
|
261
261
|
className: "text-base font-semibold",
|
|
262
|
-
children:
|
|
262
|
+
children: p("description")
|
|
263
263
|
}), /* @__PURE__ */ Y(he, {
|
|
264
264
|
size: "fill",
|
|
265
265
|
padding: "sm",
|
|
266
266
|
className: "mt-2 min-h-16",
|
|
267
|
-
children: /* @__PURE__ */ Y(
|
|
268
|
-
value:
|
|
269
|
-
editable:
|
|
270
|
-
placeholder:
|
|
271
|
-
label:
|
|
272
|
-
onBlur: (e) => e !==
|
|
267
|
+
children: /* @__PURE__ */ Y(oe, {
|
|
268
|
+
value: h.description,
|
|
269
|
+
editable: _,
|
|
270
|
+
placeholder: f("addDescription"),
|
|
271
|
+
label: p("description"),
|
|
272
|
+
onBlur: (e) => e !== h.description && L.mutate({ description: e }),
|
|
273
273
|
className: "min-h-12"
|
|
274
|
-
},
|
|
274
|
+
}, h.updatedAt)
|
|
275
275
|
})]
|
|
276
276
|
}),
|
|
277
277
|
/* @__PURE__ */ Y(Fe, {
|
|
278
|
-
workspace:
|
|
279
|
-
project:
|
|
280
|
-
canWrite:
|
|
278
|
+
workspace: s,
|
|
279
|
+
project: h,
|
|
280
|
+
canWrite: _
|
|
281
281
|
}),
|
|
282
282
|
/* @__PURE__ */ Y(Re, {
|
|
283
|
-
workspace:
|
|
284
|
-
projectId:
|
|
283
|
+
workspace: s,
|
|
284
|
+
projectId: h.id
|
|
285
285
|
})
|
|
286
286
|
] }),
|
|
287
287
|
z === "updates" && /* @__PURE__ */ Y(Le, {
|
|
288
|
-
workspace:
|
|
289
|
-
project:
|
|
290
|
-
canWrite:
|
|
288
|
+
workspace: s,
|
|
289
|
+
project: h,
|
|
290
|
+
canWrite: _
|
|
291
291
|
}),
|
|
292
292
|
z === "issues" && /* @__PURE__ */ Y(Ie, {
|
|
293
|
-
workspace:
|
|
294
|
-
project:
|
|
295
|
-
canWrite:
|
|
293
|
+
workspace: s,
|
|
294
|
+
project: h,
|
|
295
|
+
canWrite: _
|
|
296
296
|
})
|
|
297
297
|
]
|
|
298
298
|
}), z !== "updates" && B.length > 0 && /* @__PURE__ */ Y("aside", {
|
|
299
|
-
"aria-label":
|
|
299
|
+
"aria-label": f("issueBreakdown.label"),
|
|
300
300
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
301
301
|
children: /* @__PURE__ */ Y(ue, {
|
|
302
|
-
workspace:
|
|
302
|
+
workspace: s,
|
|
303
303
|
issues: B,
|
|
304
304
|
tabs: Ee,
|
|
305
|
-
tab:
|
|
306
|
-
onTabChange:
|
|
305
|
+
tab: I,
|
|
306
|
+
onTabChange: le
|
|
307
307
|
})
|
|
308
308
|
})]
|
|
309
309
|
}),
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
workspace:
|
|
313
|
-
project:
|
|
314
|
-
onClose: () =>
|
|
310
|
+
O,
|
|
311
|
+
k && /* @__PURE__ */ Y(pe, {
|
|
312
|
+
workspace: s,
|
|
313
|
+
project: h,
|
|
314
|
+
onClose: () => A(!1)
|
|
315
315
|
})
|
|
316
316
|
]
|
|
317
317
|
});
|
|
@@ -350,9 +350,9 @@ function ke({ project: e, canWrite: t, onSave: n }) {
|
|
|
350
350
|
}) : null;
|
|
351
351
|
}
|
|
352
352
|
function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
353
|
-
let i = q("planning"), a =
|
|
353
|
+
let i = q("planning"), a = k(), { members: o, person: s } = N(e), { data: c = [] } = Q(f(e)), l = S(), [u, d] = G(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
|
|
354
354
|
let o = /* @__PURE__ */ X(J, { children: [
|
|
355
|
-
/* @__PURE__ */ Y(
|
|
355
|
+
/* @__PURE__ */ Y(h, { className: "size-3.5 text-muted-foreground" }),
|
|
356
356
|
/* @__PURE__ */ Y("span", {
|
|
357
357
|
className: "text-muted-foreground",
|
|
358
358
|
children: e
|
|
@@ -381,15 +381,15 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
381
381
|
value: t.status,
|
|
382
382
|
disabled: !n,
|
|
383
383
|
onValueChange: (e) => e && r({ status: e }),
|
|
384
|
-
items:
|
|
384
|
+
items: C.map((e) => ({
|
|
385
385
|
value: e,
|
|
386
386
|
label: i(`status.${e}`),
|
|
387
|
-
icon: /* @__PURE__ */ Y(
|
|
387
|
+
icon: /* @__PURE__ */ Y(j, { status: e })
|
|
388
388
|
})),
|
|
389
389
|
trigger: /* @__PURE__ */ X("button", {
|
|
390
390
|
type: "button",
|
|
391
391
|
className: U({ size: "sm" }),
|
|
392
|
-
children: [/* @__PURE__ */ Y(
|
|
392
|
+
children: [/* @__PURE__ */ Y(j, { status: t.status }), i(`status.${t.status}`)]
|
|
393
393
|
})
|
|
394
394
|
}),
|
|
395
395
|
/* @__PURE__ */ Y(V, {
|
|
@@ -432,20 +432,20 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
432
432
|
items: l.map((e, t) => ({
|
|
433
433
|
value: String(t),
|
|
434
434
|
label: e,
|
|
435
|
-
icon: /* @__PURE__ */ Y(
|
|
435
|
+
icon: /* @__PURE__ */ Y(_, { priority: t })
|
|
436
436
|
})),
|
|
437
437
|
trigger: /* @__PURE__ */ X("button", {
|
|
438
438
|
type: "button",
|
|
439
439
|
className: U({ size: "sm" }),
|
|
440
|
-
children: [/* @__PURE__ */ Y(
|
|
440
|
+
children: [/* @__PURE__ */ Y(_, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
|
|
441
441
|
})
|
|
442
442
|
}),
|
|
443
|
-
|
|
444
|
-
|
|
443
|
+
m(i("startDate"), t.startDate, "startDate"),
|
|
444
|
+
m(i("targetDate"), t.targetDate, "targetDate"),
|
|
445
445
|
/* @__PURE__ */ Y(V, {
|
|
446
446
|
"aria-label": i("members"),
|
|
447
447
|
open: u === "members",
|
|
448
|
-
onOpenChange: (e) =>
|
|
448
|
+
onOpenChange: (e) => d(e ? "members" : null),
|
|
449
449
|
multiple: !0,
|
|
450
450
|
disabled: !n,
|
|
451
451
|
items: o.map((e) => ({
|
|
@@ -477,7 +477,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
477
477
|
decorative: !0
|
|
478
478
|
}, e);
|
|
479
479
|
})
|
|
480
|
-
}) : /* @__PURE__ */ Y(
|
|
480
|
+
}) : /* @__PURE__ */ Y(x, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
481
481
|
className: t.members.length ? "" : "text-muted-foreground",
|
|
482
482
|
children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
|
|
483
483
|
})]
|
|
@@ -486,14 +486,14 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
486
486
|
/* @__PURE__ */ Y(V, {
|
|
487
487
|
"aria-label": i("teams"),
|
|
488
488
|
open: u === "teams",
|
|
489
|
-
onOpenChange: (e) =>
|
|
489
|
+
onOpenChange: (e) => d(e ? "teams" : null),
|
|
490
490
|
multiple: !0,
|
|
491
491
|
disabled: !n,
|
|
492
492
|
items: c.filter((e) => !e.archivedAt).map((e) => ({
|
|
493
493
|
value: e.id,
|
|
494
494
|
label: e.name,
|
|
495
495
|
hint: e.key,
|
|
496
|
-
icon: /* @__PURE__ */ Y(
|
|
496
|
+
icon: /* @__PURE__ */ Y(ie, {
|
|
497
497
|
icon: e.icon,
|
|
498
498
|
color: e.color,
|
|
499
499
|
name: e.name
|
|
@@ -506,7 +506,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
506
506
|
type: "button",
|
|
507
507
|
disabled: !n,
|
|
508
508
|
className: U({ size: "sm" }),
|
|
509
|
-
children: [/* @__PURE__ */ Y(
|
|
509
|
+
children: [/* @__PURE__ */ Y(x, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
510
510
|
className: t.teamIds.length ? "" : "text-muted-foreground",
|
|
511
511
|
children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
|
|
512
512
|
})]
|
|
@@ -528,7 +528,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
531
|
-
let i = q("planning"), { data: a = [] } = Q(
|
|
531
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
532
532
|
for (let t of a) t.blockedBy.includes(e) && !o.has(t.id) && (o.add(t.id), s(t.id));
|
|
533
533
|
};
|
|
534
534
|
return s(t.id), /* @__PURE__ */ Y(V, {
|
|
@@ -546,7 +546,7 @@ function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
546
546
|
type: "button",
|
|
547
547
|
disabled: !n,
|
|
548
548
|
className: U({ size: "sm" }),
|
|
549
|
-
children: [/* @__PURE__ */ Y(
|
|
549
|
+
children: [/* @__PURE__ */ Y(g, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
550
550
|
className: t.blockedBy.length ? "" : "text-muted-foreground",
|
|
551
551
|
children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
|
|
552
552
|
})]
|
|
@@ -554,34 +554,34 @@ function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
function Me({ workspace: e, project: t }) {
|
|
557
|
-
let
|
|
557
|
+
let n = q("planning"), i = k(), { data: a = [] } = Q(d(e)), o = (e) => a.filter((t) => e.includes(t.id)), s = o(t.blockedBy), c = o(t.blocks);
|
|
558
558
|
if (s.length === 0 && c.length === 0) return null;
|
|
559
|
-
let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [],
|
|
559
|
+
let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], u = (t) => /* @__PURE__ */ Y(r, {
|
|
560
560
|
to: "/$workspace/projects/$projectId",
|
|
561
561
|
params: {
|
|
562
562
|
workspace: e,
|
|
563
|
-
projectId:
|
|
563
|
+
projectId: P(t)
|
|
564
564
|
},
|
|
565
565
|
className: "font-medium hover:underline",
|
|
566
566
|
children: t.name
|
|
567
|
-
}, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [
|
|
567
|
+
}, t.id), f = (e) => e.flatMap((e, t) => t === 0 ? [u(e)] : [/* @__PURE__ */ Y("span", { children: ", " }, `${e.id},`), u(e)]);
|
|
568
568
|
return /* @__PURE__ */ X("div", {
|
|
569
569
|
className: "mt-3 space-y-1 text-xs text-muted-foreground",
|
|
570
570
|
children: [
|
|
571
571
|
s.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
572
|
-
|
|
572
|
+
n("waitsOnLabel"),
|
|
573
573
|
" ",
|
|
574
574
|
f(s)
|
|
575
575
|
] }),
|
|
576
576
|
c.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
577
|
-
|
|
577
|
+
n("blocksLabel"),
|
|
578
578
|
" ",
|
|
579
579
|
f(c)
|
|
580
580
|
] }),
|
|
581
581
|
l.map((e) => /* @__PURE__ */ Y("p", {
|
|
582
582
|
role: "status",
|
|
583
583
|
className: "text-warning",
|
|
584
|
-
children:
|
|
584
|
+
children: n("dueBeforeBlocker", {
|
|
585
585
|
date: i.day(t.targetDate ?? ""),
|
|
586
586
|
name: e.name,
|
|
587
587
|
blockerDate: i.day(e.targetDate ?? "")
|
|
@@ -591,7 +591,7 @@ function Me({ workspace: e, project: t }) {
|
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
593
|
function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
594
|
-
let i = q("planning"), { data: a = [] } = Q(
|
|
594
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(ae(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
|
|
595
595
|
return /* @__PURE__ */ Y(V, {
|
|
596
596
|
disabled: !n,
|
|
597
597
|
items: [{
|
|
@@ -609,7 +609,7 @@ function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
609
609
|
type: "button",
|
|
610
610
|
disabled: !n,
|
|
611
611
|
className: U({ size: "sm" }),
|
|
612
|
-
children: [/* @__PURE__ */ Y(
|
|
612
|
+
children: [/* @__PURE__ */ Y(v, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
613
613
|
className: s ? "" : "text-muted-foreground",
|
|
614
614
|
children: s ? i("underProject", { name: s.name }) : i("parentProject")
|
|
615
615
|
})]
|
|
@@ -617,32 +617,32 @@ function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
619
|
function Pe({ workspace: e, projects: t }) {
|
|
620
|
-
let
|
|
620
|
+
let n = q("planning"), i = k(), { person: a } = N(e);
|
|
621
621
|
return t.length === 0 ? null : /* @__PURE__ */ X("section", {
|
|
622
622
|
className: "mt-8",
|
|
623
623
|
children: [/* @__PURE__ */ Y("h2", {
|
|
624
624
|
className: "text-base font-semibold",
|
|
625
|
-
children:
|
|
625
|
+
children: n("subProjects")
|
|
626
626
|
}), /* @__PURE__ */ Y("ul", {
|
|
627
627
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
628
628
|
children: t.map((t) => {
|
|
629
|
-
let o =
|
|
630
|
-
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(
|
|
629
|
+
let o = M(t), s = t.lead ? a(t.lead) : void 0;
|
|
630
|
+
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(r, {
|
|
631
631
|
to: "/$workspace/projects/$projectId",
|
|
632
632
|
params: {
|
|
633
633
|
workspace: e,
|
|
634
|
-
projectId:
|
|
634
|
+
projectId: P(t)
|
|
635
635
|
},
|
|
636
636
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
|
|
637
637
|
children: [
|
|
638
|
-
/* @__PURE__ */ Y(
|
|
638
|
+
/* @__PURE__ */ Y(j, { status: t.status }),
|
|
639
639
|
/* @__PURE__ */ Y("span", {
|
|
640
640
|
className: "min-w-0 flex-1 truncate font-medium",
|
|
641
641
|
children: t.name
|
|
642
642
|
}),
|
|
643
643
|
/* @__PURE__ */ X("span", {
|
|
644
644
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
645
|
-
children: [/* @__PURE__ */ Y(
|
|
645
|
+
children: [/* @__PURE__ */ Y(A, { state: o }), n(`health.${o}`)]
|
|
646
646
|
}),
|
|
647
647
|
s && /* @__PURE__ */ Y(R, {
|
|
648
648
|
name: s.name,
|
|
@@ -655,7 +655,7 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
655
655
|
}),
|
|
656
656
|
/* @__PURE__ */ Y("span", {
|
|
657
657
|
className: "w-28",
|
|
658
|
-
children: /* @__PURE__ */ Y(
|
|
658
|
+
children: /* @__PURE__ */ Y(te, {
|
|
659
659
|
progress: t.treeProgress,
|
|
660
660
|
compact: !0
|
|
661
661
|
})
|
|
@@ -667,7 +667,7 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
669
|
function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
670
|
-
let a = q("planning"), o = q("common"), s = K(), c =
|
|
670
|
+
let a = q("planning"), o = q("common"), s = K(), c = k(), l = $(), u = Se(), [d, f] = G(!1), [m, h] = G(""), [g, _] = G(""), [v, y] = G(null), b = {
|
|
671
671
|
workspace: n,
|
|
672
672
|
projectId: r.id
|
|
673
673
|
}, x = () => {
|
|
@@ -675,7 +675,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
675
675
|
"workspace",
|
|
676
676
|
n,
|
|
677
677
|
"projects"
|
|
678
|
-
] }),
|
|
678
|
+
] }), O(l, n);
|
|
679
679
|
}, S = Z({
|
|
680
680
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
|
|
681
681
|
params: { path: b },
|
|
@@ -685,7 +685,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
685
685
|
}
|
|
686
686
|
})),
|
|
687
687
|
onSuccess: () => {
|
|
688
|
-
h(""), _(""),
|
|
688
|
+
h(""), _(""), f(!1);
|
|
689
689
|
},
|
|
690
690
|
onSettled: x
|
|
691
691
|
}), C = Z({
|
|
@@ -697,13 +697,13 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
697
697
|
body: r
|
|
698
698
|
})),
|
|
699
699
|
onSettled: x
|
|
700
|
-
}),
|
|
700
|
+
}), w = Z({
|
|
701
701
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", { params: { path: {
|
|
702
702
|
...b,
|
|
703
703
|
milestoneId: n
|
|
704
704
|
} } })),
|
|
705
705
|
onSettled: x
|
|
706
|
-
}),
|
|
706
|
+
}), T = r.milestones, E = (e, t) => i ? [
|
|
707
707
|
{
|
|
708
708
|
label: a("rename"),
|
|
709
709
|
onClick: () => y(e.id)
|
|
@@ -718,7 +718,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
718
718
|
},
|
|
719
719
|
{
|
|
720
720
|
label: a("moveDown"),
|
|
721
|
-
disabled: t ===
|
|
721
|
+
disabled: t === T.length - 1,
|
|
722
722
|
onClick: () => C.mutate({
|
|
723
723
|
id: e.id,
|
|
724
724
|
position: t + 1
|
|
@@ -728,9 +728,9 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
728
728
|
{
|
|
729
729
|
label: o("delete"),
|
|
730
730
|
destructive: !0,
|
|
731
|
-
onClick: () =>
|
|
731
|
+
onClick: () => w.mutate(e.id)
|
|
732
732
|
}
|
|
733
|
-
] : [
|
|
733
|
+
] : [ee(o("copyName"), e.name)], D = S.error ?? C.error ?? w.error;
|
|
734
734
|
return /* @__PURE__ */ X("section", {
|
|
735
735
|
className: "mt-10",
|
|
736
736
|
children: [
|
|
@@ -742,9 +742,9 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
742
742
|
}), i && !d && /* @__PURE__ */ X(B, {
|
|
743
743
|
type: "button",
|
|
744
744
|
size: "sm",
|
|
745
|
-
onClick: () =>
|
|
745
|
+
onClick: () => f(!0),
|
|
746
746
|
className: "ml-auto",
|
|
747
|
-
children: [/* @__PURE__ */ Y(
|
|
747
|
+
children: [/* @__PURE__ */ Y(p, { className: "size-3.5" }), a("addMilestone")]
|
|
748
748
|
})]
|
|
749
749
|
}),
|
|
750
750
|
/* @__PURE__ */ X(he, {
|
|
@@ -755,8 +755,8 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
755
755
|
render: /* @__PURE__ */ Y("ul", {}),
|
|
756
756
|
className: "mt-3",
|
|
757
757
|
children: [
|
|
758
|
-
|
|
759
|
-
onContextMenu: (n) => u(n,
|
|
758
|
+
T.map((e, t) => /* @__PURE__ */ X("li", {
|
|
759
|
+
onContextMenu: (n) => u(n, E(e, t)),
|
|
760
760
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 py-2 pr-2 pl-3 md:flex-nowrap",
|
|
761
761
|
children: [
|
|
762
762
|
v === e.id ? /* @__PURE__ */ Y(ve, {
|
|
@@ -785,18 +785,18 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
785
785
|
}),
|
|
786
786
|
/* @__PURE__ */ Y("span", {
|
|
787
787
|
className: "w-44 shrink-0",
|
|
788
|
-
children: /* @__PURE__ */ Y(
|
|
788
|
+
children: /* @__PURE__ */ Y(te, {
|
|
789
789
|
progress: e.progress,
|
|
790
790
|
compact: !0
|
|
791
791
|
})
|
|
792
792
|
}),
|
|
793
793
|
/* @__PURE__ */ Y(Te, {
|
|
794
|
-
items: () =>
|
|
794
|
+
items: () => E(e, t),
|
|
795
795
|
label: o("moreActionsFor", { name: e.name })
|
|
796
796
|
})
|
|
797
797
|
]
|
|
798
798
|
}, e.id)),
|
|
799
|
-
|
|
799
|
+
T.length === 0 && !d && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(_e, {
|
|
800
800
|
variant: "bare",
|
|
801
801
|
title: a("noMilestones")
|
|
802
802
|
}) }),
|
|
@@ -830,23 +830,23 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
830
830
|
/* @__PURE__ */ Y(B, {
|
|
831
831
|
type: "button",
|
|
832
832
|
variant: "ghost",
|
|
833
|
-
onClick: () =>
|
|
833
|
+
onClick: () => f(!1),
|
|
834
834
|
children: o("cancel")
|
|
835
835
|
})
|
|
836
836
|
]
|
|
837
837
|
}) })
|
|
838
838
|
]
|
|
839
839
|
}),
|
|
840
|
-
|
|
840
|
+
D && /* @__PURE__ */ Y(H, {
|
|
841
841
|
size: "md",
|
|
842
842
|
className: "mt-2",
|
|
843
|
-
children: s(
|
|
843
|
+
children: s(D)
|
|
844
844
|
})
|
|
845
845
|
]
|
|
846
846
|
});
|
|
847
847
|
}
|
|
848
|
-
function Ie({ workspace: n, project: r, canWrite:
|
|
849
|
-
let o = q("planning"), s = K(), c = $(), l = !!
|
|
848
|
+
function Ie({ workspace: n, project: r, canWrite: i }) {
|
|
849
|
+
let o = q("planning"), s = K(), c = $(), l = !!E.useSearch().own, { data: u } = we(a(n, w(r.id, l))), d = le(n, (e) => e.project?.id !== r.id), f = u.issues, m = Z({
|
|
850
850
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
851
851
|
params: { path: {
|
|
852
852
|
workspace: n,
|
|
@@ -854,12 +854,12 @@ function Ie({ workspace: n, project: r, canWrite: a }) {
|
|
|
854
854
|
} },
|
|
855
855
|
body: { projectId: r.id }
|
|
856
856
|
})),
|
|
857
|
-
onSettled: (e, t, r) =>
|
|
857
|
+
onSettled: (e, t, r) => O(c, n, r)
|
|
858
858
|
});
|
|
859
859
|
return /* @__PURE__ */ X("section", {
|
|
860
860
|
"aria-label": o("issues"),
|
|
861
861
|
children: [
|
|
862
|
-
|
|
862
|
+
i && /* @__PURE__ */ Y("div", {
|
|
863
863
|
className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
|
|
864
864
|
children: /* @__PURE__ */ Y(V, {
|
|
865
865
|
"aria-label": o("addIssues"),
|
|
@@ -871,7 +871,7 @@ function Ie({ workspace: n, project: r, canWrite: a }) {
|
|
|
871
871
|
trigger: /* @__PURE__ */ X(B, {
|
|
872
872
|
type: "button",
|
|
873
873
|
size: "sm",
|
|
874
|
-
children: [/* @__PURE__ */ Y(
|
|
874
|
+
children: [/* @__PURE__ */ Y(p, { className: "size-3.5" }), o("addIssues")]
|
|
875
875
|
})
|
|
876
876
|
})
|
|
877
877
|
}),
|
|
@@ -880,18 +880,18 @@ function Ie({ workspace: n, project: r, canWrite: a }) {
|
|
|
880
880
|
className: "px-4 pt-2 md:px-5",
|
|
881
881
|
children: s(m.error)
|
|
882
882
|
}),
|
|
883
|
-
|
|
883
|
+
f.length === 0 ? /* @__PURE__ */ Y(_e, {
|
|
884
884
|
title: o("noIssuesInProject"),
|
|
885
885
|
className: "mt-6"
|
|
886
886
|
}) : /* @__PURE__ */ Y(L, {
|
|
887
887
|
workspace: n,
|
|
888
|
-
issues:
|
|
888
|
+
issues: f
|
|
889
889
|
})
|
|
890
890
|
]
|
|
891
891
|
});
|
|
892
892
|
}
|
|
893
893
|
function Le({ workspace: n, project: r, canWrite: i }) {
|
|
894
|
-
let a = q("planning"), o = $(), { data: s = [] } = Q(
|
|
894
|
+
let a = q("planning"), o = $(), { data: s = [] } = Q(u(n, r.id)), c = Z({
|
|
895
895
|
mutationFn: async ({ health: i, body: a }) => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/updates", {
|
|
896
896
|
params: { path: {
|
|
897
897
|
workspace: n,
|
|
@@ -907,7 +907,7 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
907
907
|
n,
|
|
908
908
|
"projects"
|
|
909
909
|
] })
|
|
910
|
-
}),
|
|
910
|
+
}), l = Z({
|
|
911
911
|
mutationFn: async (i) => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/updates/{updateId}", { params: { path: {
|
|
912
912
|
workspace: n,
|
|
913
913
|
projectId: r.id,
|
|
@@ -921,17 +921,17 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
921
921
|
});
|
|
922
922
|
return /* @__PURE__ */ Y(me, {
|
|
923
923
|
workspace: n,
|
|
924
|
-
state:
|
|
924
|
+
state: M(r),
|
|
925
925
|
health: r.health,
|
|
926
926
|
updates: s,
|
|
927
927
|
canWrite: i,
|
|
928
928
|
placeholder: a("updatePlaceholder"),
|
|
929
929
|
post: c,
|
|
930
|
-
remove:
|
|
930
|
+
remove: l
|
|
931
931
|
});
|
|
932
932
|
}
|
|
933
933
|
function Re({ workspace: e, projectId: t }) {
|
|
934
|
-
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a =
|
|
934
|
+
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = k(), o = S(), { data: c = [] } = Q(s(e, t)), { actorName: l, person: u } = N(e);
|
|
935
935
|
if (c.length === 0) return null;
|
|
936
936
|
let d = (e) => {
|
|
937
937
|
let t = {
|
|
@@ -940,7 +940,7 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
940
940
|
className: "font-medium text-foreground",
|
|
941
941
|
children: e
|
|
942
942
|
})
|
|
943
|
-
},
|
|
943
|
+
}, s = e.data, c = I(e.type, e.data);
|
|
944
944
|
switch (e.type) {
|
|
945
945
|
case "project.created": return [{
|
|
946
946
|
icon: c,
|
|
@@ -950,7 +950,7 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
950
950
|
icon: c,
|
|
951
951
|
text: n.rich("updatePosted", {
|
|
952
952
|
...t,
|
|
953
|
-
health:
|
|
953
|
+
health: s.health ? i(s.health) : ""
|
|
954
954
|
})
|
|
955
955
|
}];
|
|
956
956
|
case "project.update_deleted": return [{
|
|
@@ -961,68 +961,68 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
961
961
|
icon: c,
|
|
962
962
|
text: n.rich("milestoneAdded", {
|
|
963
963
|
...t,
|
|
964
|
-
name:
|
|
964
|
+
name: s.name ?? ""
|
|
965
965
|
})
|
|
966
966
|
}];
|
|
967
967
|
case "project.milestone_updated": return [{
|
|
968
968
|
icon: c,
|
|
969
969
|
text: n.rich("milestoneChanged", {
|
|
970
970
|
...t,
|
|
971
|
-
name:
|
|
971
|
+
name: s.name ?? ""
|
|
972
972
|
})
|
|
973
973
|
}];
|
|
974
974
|
case "project.milestone_deleted": return [{
|
|
975
975
|
icon: c,
|
|
976
976
|
text: n.rich("milestoneRemoved", {
|
|
977
977
|
...t,
|
|
978
|
-
name:
|
|
978
|
+
name: s.name ?? ""
|
|
979
979
|
})
|
|
980
980
|
}];
|
|
981
981
|
}
|
|
982
|
-
let d =
|
|
982
|
+
let d = s.changes;
|
|
983
983
|
if (!d) return [{
|
|
984
984
|
icon: c,
|
|
985
985
|
text: n.rich("updated", t)
|
|
986
986
|
}];
|
|
987
|
-
let f = [],
|
|
987
|
+
let f = [], p = (e) => e ? a.day(String(e)) : "";
|
|
988
988
|
return d.name && f.push({
|
|
989
|
-
icon: /* @__PURE__ */ Y(
|
|
989
|
+
icon: /* @__PURE__ */ Y(b, {}),
|
|
990
990
|
text: n.rich("renamed", {
|
|
991
991
|
...t,
|
|
992
992
|
from: String(d.name.from)
|
|
993
993
|
})
|
|
994
994
|
}), d.status && f.push({
|
|
995
|
-
icon: /* @__PURE__ */ Y(
|
|
995
|
+
icon: /* @__PURE__ */ Y(j, { status: d.status.to }),
|
|
996
996
|
text: n.rich("status", {
|
|
997
997
|
...t,
|
|
998
998
|
status: r(`status.${d.status.to}`)
|
|
999
999
|
})
|
|
1000
1000
|
}), d.priority && f.push({
|
|
1001
|
-
icon: /* @__PURE__ */ Y(
|
|
1001
|
+
icon: /* @__PURE__ */ Y(_, { priority: Number(d.priority.to) }),
|
|
1002
1002
|
text: n.rich("priority", {
|
|
1003
1003
|
...t,
|
|
1004
|
-
priority:
|
|
1004
|
+
priority: o[Number(d.priority.to)] ?? ""
|
|
1005
1005
|
})
|
|
1006
1006
|
}), d.lead && f.push(d.lead.to ? {
|
|
1007
|
-
icon: /* @__PURE__ */ Y(
|
|
1007
|
+
icon: /* @__PURE__ */ Y(m, {}),
|
|
1008
1008
|
text: n.rich("lead", {
|
|
1009
1009
|
...t,
|
|
1010
1010
|
lead: u(String(d.lead.to)).name
|
|
1011
1011
|
})
|
|
1012
1012
|
} : {
|
|
1013
|
-
icon: /* @__PURE__ */ Y(
|
|
1013
|
+
icon: /* @__PURE__ */ Y(y, {}),
|
|
1014
1014
|
text: n.rich("leadRemoved", t)
|
|
1015
1015
|
}), d.startDate && f.push({
|
|
1016
|
-
icon: /* @__PURE__ */ Y(
|
|
1016
|
+
icon: /* @__PURE__ */ Y(h, {}),
|
|
1017
1017
|
text: d.startDate.to ? n.rich("startDate", {
|
|
1018
1018
|
...t,
|
|
1019
|
-
date:
|
|
1019
|
+
date: p(d.startDate.to)
|
|
1020
1020
|
}) : n.rich("startDateRemoved", t)
|
|
1021
1021
|
}), d.targetDate && f.push({
|
|
1022
|
-
icon: /* @__PURE__ */ Y(
|
|
1022
|
+
icon: /* @__PURE__ */ Y(h, {}),
|
|
1023
1023
|
text: d.targetDate.to ? n.rich("targetDate", {
|
|
1024
1024
|
...t,
|
|
1025
|
-
date:
|
|
1025
|
+
date: p(d.targetDate.to)
|
|
1026
1026
|
}) : n.rich("targetDateRemoved", t)
|
|
1027
1027
|
}), f.length > 0 ? f : [{
|
|
1028
1028
|
icon: c,
|
|
@@ -1035,9 +1035,9 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
1035
1035
|
children: [/* @__PURE__ */ Y("h2", {
|
|
1036
1036
|
className: "text-base font-semibold",
|
|
1037
1037
|
children: n("title")
|
|
1038
|
-
}), /* @__PURE__ */ Y(
|
|
1038
|
+
}), /* @__PURE__ */ Y(F, {
|
|
1039
1039
|
className: "mt-3",
|
|
1040
|
-
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(
|
|
1040
|
+
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(ce, {
|
|
1041
1041
|
workspace: e,
|
|
1042
1042
|
icon: n,
|
|
1043
1043
|
actor: t.actor,
|