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