@parallelworks/tandem-web 0.142.0 → 0.144.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +156 -6
- package/_virtual/_virtual_i18n/es/common.js +156 -6
- package/_virtual/_virtual_i18n/ja/common.js +156 -6
- package/_virtual/_virtual_i18n/ko/common.js +156 -6
- package/_virtual/_virtual_i18n/zh/common.js +156 -6
- package/api/queries.js +85 -74
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +2 -0
- package/components/CodeHostSettings.js +25 -25
- package/components/CustomFields.js +349 -0
- package/components/DocProperties.js +8 -2
- package/components/GitHub.js +22 -22
- package/components/IssueBoard.js +48 -43
- package/components/IssueEvent.js +2 -0
- package/components/IssueFilters.js +210 -122
- package/components/IssueImport.js +1 -1
- package/components/IssueRow.js +96 -79
- package/components/IssueTemplates.js +216 -156
- package/components/IssueTypes.js +318 -0
- package/components/NewIssueDialog.js +254 -216
- package/components/SettingsNav.js +45 -35
- package/components/TeamForm.js +49 -35
- package/components/TeamRepositories.js +51 -51
- package/components/TeamWorkflow.js +8 -8
- package/components/Updates.js +8 -8
- package/components/icons.js +8 -8
- package/lib/boardMove.js +69 -47
- package/lib/customFields.js +113 -0
- package/lib/issueDisplay.js +27 -12
- package/lib/issueList.js +166 -62
- package/lib/issueTypes.js +50 -0
- package/lib/teamTree.js +24 -0
- package/lib/views.js +13 -11
- package/package.json +1 -1
- package/pages/issues.js +331 -291
- package/routeTree.gen.js +186 -174
- package/routes/_workspace/agents/index2.js +9 -9
- package/routes/_workspace/issues/_identifier2.js +433 -370
- package/routes/_workspace/projects/_projectId3.js +213 -201
- package/routes/_workspace/settings/audit-log3.js +2 -0
- package/routes/_workspace/settings/fields.js +6 -0
- package/routes/_workspace/settings/fields2.js +30 -0
- package/routes/_workspace/settings/fields3.js +5 -0
- package/routes/_workspace/settings/groups2.js +74 -74
- package/routes/_workspace/settings/import.js +6 -0
- package/routes/_workspace/settings/import2.js +330 -0
- package/routes/_workspace/settings/import3.js +4 -0
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +35 -35
- package/routes/_workspace/settings/roles2.js +24 -24
- package/routes/_workspace/settings/runners2.js +18 -18
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/slack2.js +8 -8
- package/routes/_workspace/settings/sso2.js +50 -50
- package/routes/_workspace/settings/tokens2.js +15 -15
- package/routes/_workspace/settings/webhooks2.js +42 -42
- package/routes/_workspace/teams/_key/settings2.js +138 -76
- package/routes/_workspace2.js +320 -318
|
@@ -2,46 +2,47 @@ import { api as e, unwrap as t } from "../../../api/client.js";
|
|
|
2
2
|
import { usePageTitle as n } from "../../../lib/pageTitle.js";
|
|
3
3
|
import { Link as r, useNavigate as i } from "../../../lib/router.js";
|
|
4
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { useConfirm as p } from "../../../lib/confirm.js";
|
|
6
|
+
import { AddIcon as m, AddUserIcon as h, CalendarIcon as g, LinkIcon as _, PriorityIcon as v, ProjectIcon as y, RemoveUserIcon as b, RenameIcon as x, UsersIcon as S, usePriorityNames as C } from "../../../components/icons.js";
|
|
7
|
+
import { projectStatuses as w } from "../../../lib/projectStates.js";
|
|
8
|
+
import { projectIssueFilter as T, tabs as E } from "./_projectId.js";
|
|
9
|
+
import { Route as D } from "./_projectId2.js";
|
|
10
|
+
import { copyItem as ee, useLinkItems as te } from "../../../lib/menus.js";
|
|
10
11
|
import { invalidateIssueViews as O } from "../../../api/mutations.js";
|
|
11
12
|
import { useTime as k } from "../../../lib/time.js";
|
|
12
|
-
import { HealthIcon as A, ProgressBar as
|
|
13
|
-
import { usePeople as
|
|
13
|
+
import { HealthIcon as A, ProgressBar as j, ProjectStatusIcon as M, healthOf as N } from "../../../components/Planning.js";
|
|
14
|
+
import { usePeople as P } from "../../../lib/people.js";
|
|
14
15
|
import { useCan as ne } from "../../../lib/roles.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { projectRef as
|
|
18
|
-
import { Editor as
|
|
19
|
-
import { FavoriteStar as
|
|
20
|
-
import { Timeline as F, TimelineItem as
|
|
21
|
-
import { useIssuePicker as
|
|
16
|
+
import { EntityIcon as re } from "../../../components/EntityIcon.js";
|
|
17
|
+
import { ProjectFields as ie } from "../../../components/CustomFields.js";
|
|
18
|
+
import { projectRef as ae, projectsUnder as oe } from "../../../lib/projects.js";
|
|
19
|
+
import { Editor as se } from "../../../components/Editor.js";
|
|
20
|
+
import { FavoriteStar as ce } from "../../../components/FavoriteStar.js";
|
|
21
|
+
import { Timeline as F, TimelineItem as le, activityIcon as I } from "../../../components/ActivityTimeline.js";
|
|
22
|
+
import { useIssuePicker as L } from "../../../lib/issuePicker.js";
|
|
22
23
|
import { IssueBreakdown as ue } from "../../../components/IssueBreakdown.js";
|
|
23
24
|
import { FollowButton as de } from "../../../components/FollowButton.js";
|
|
24
25
|
import { IconUpload as fe } from "../../../components/IconUpload.js";
|
|
25
|
-
import { StatusGroups as
|
|
26
|
+
import { StatusGroups as R } from "../../../components/IssueGroup.js";
|
|
26
27
|
import { ProjectAccessDialog as pe } from "../../../components/ProjectAccess.js";
|
|
27
28
|
import { Updates as me } from "../../../components/Updates.js";
|
|
28
|
-
import { Avatar as
|
|
29
|
-
import { useEffect as Ce, useState as
|
|
30
|
-
import { useErrorMessage as
|
|
29
|
+
import { Avatar as z, AvatarGroup as B, Button as V, Card as he, Combobox as H, DatePicker as ge, EmptyState as _e, ErrorText as U, Input as ve, PageHeader as ye, Select as be, Switch as xe, buttonClasses as W, menuDivider as G, useOpenMenu as Se } from "@parallelworks/ui";
|
|
30
|
+
import { useEffect as Ce, useState as K } from "react";
|
|
31
|
+
import { useErrorMessage as we } from "@parallelworks/problem/react";
|
|
31
32
|
import { useTranslations as q } from "use-intl";
|
|
32
33
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
33
|
-
import { useMutation as Z, useQuery as Q, useQueryClient as $, useSuspenseQuery as
|
|
34
|
-
import { MoreButton as
|
|
34
|
+
import { useMutation as Z, useQuery as Q, useQueryClient as $, useSuspenseQuery as Te } from "@tanstack/react-query";
|
|
35
|
+
import { MoreButton as Ee } from "@parallelworks/ui/list";
|
|
35
36
|
// src/routes/$workspace/projects/$projectId.tsx?tsr-split=component
|
|
36
|
-
var
|
|
37
|
+
var De = [
|
|
37
38
|
"assignees",
|
|
38
39
|
"labels",
|
|
39
40
|
"cycles"
|
|
40
41
|
];
|
|
41
|
-
function
|
|
42
|
-
let { workspace: s, projectId: u } =
|
|
43
|
-
n(
|
|
44
|
-
let
|
|
42
|
+
function Oe() {
|
|
43
|
+
let { workspace: s, projectId: u } = D.useParams(), f = q("planning"), m = q("common"), h = we(), { data: g } = Te(l(s, u)), _ = ae(g);
|
|
44
|
+
n(g.name);
|
|
45
|
+
let v = ne(s, "manage_projects", { project: g.id }), b = ne(s, "delete_projects", { project: g.id }), x = $(), S = i(), C = te(), { confirm: w, dialog: O } = p(), [k, A] = K(!1), { data: M } = Te(o), N = !!D.useSearch().own, { data: P } = Q(a(s, T(g.id, N))), { data: oe = [] } = Q(d(s)), F = oe.filter((e) => e.parentId === g.id), le = N || F.length === 0 ? g.progress : g.treeProgress, [I, L] = K("assignees"), R = Z({
|
|
45
46
|
mutationFn: async (n) => t(await e.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
|
|
46
47
|
params: { path: {
|
|
47
48
|
workspace: s,
|
|
@@ -49,9 +50,9 @@ function De() {
|
|
|
49
50
|
} },
|
|
50
51
|
body: n
|
|
51
52
|
})),
|
|
52
|
-
onSuccess: (e) =>
|
|
53
|
+
onSuccess: (e) => x.setQueryData(l(s, u).queryKey, c(e)),
|
|
53
54
|
onSettled: () => {
|
|
54
|
-
|
|
55
|
+
x.invalidateQueries({ queryKey: d(s).queryKey });
|
|
55
56
|
}
|
|
56
57
|
}), me = Z({
|
|
57
58
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
|
|
@@ -59,15 +60,15 @@ function De() {
|
|
|
59
60
|
projectId: u
|
|
60
61
|
} } })),
|
|
61
62
|
onSuccess: () => {
|
|
62
|
-
|
|
63
|
+
x.invalidateQueries({ queryKey: ["workspace", s] }), S({
|
|
63
64
|
to: "/$workspace/projects",
|
|
64
65
|
params: { workspace: s }
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
|
-
}),
|
|
68
|
+
}), z = () => [
|
|
68
69
|
{
|
|
69
70
|
label: f("viewIssues"),
|
|
70
|
-
onClick: () =>
|
|
71
|
+
onClick: () => S({
|
|
71
72
|
to: "/$workspace/projects/$projectId",
|
|
72
73
|
params: {
|
|
73
74
|
workspace: s,
|
|
@@ -76,43 +77,43 @@ function De() {
|
|
|
76
77
|
search: { tab: "issues" }
|
|
77
78
|
})
|
|
78
79
|
},
|
|
79
|
-
...
|
|
80
|
-
label:
|
|
81
|
-
onClick: () =>
|
|
80
|
+
...v ? [{
|
|
81
|
+
label: g.template ? f("stopTemplate") : f("useAsTemplate"),
|
|
82
|
+
onClick: () => R.mutate({ template: !g.template })
|
|
82
83
|
}] : [],
|
|
83
|
-
...
|
|
84
|
+
...M?.mode === "platform" ? [] : [{
|
|
84
85
|
label: f("manageAccess"),
|
|
85
86
|
onClick: () => A(!0)
|
|
86
87
|
}],
|
|
87
|
-
|
|
88
|
-
...
|
|
89
|
-
ee(
|
|
90
|
-
...
|
|
88
|
+
G,
|
|
89
|
+
...C(`/${s}/projects/${_}`),
|
|
90
|
+
ee(m("copyName"), g.name),
|
|
91
|
+
...b ? [G, {
|
|
91
92
|
label: f("deleteProject"),
|
|
92
93
|
destructive: !0,
|
|
93
|
-
onClick: () =>
|
|
94
|
-
title: f("deleteProjectTitle", { name:
|
|
94
|
+
onClick: () => w({
|
|
95
|
+
title: f("deleteProjectTitle", { name: g.name }),
|
|
95
96
|
description: f("deleteProjectDescription"),
|
|
96
97
|
confirmLabel: f("deleteProject"),
|
|
97
98
|
onConfirm: () => me.mutateAsync()
|
|
98
99
|
})
|
|
99
100
|
}] : []
|
|
100
|
-
],
|
|
101
|
+
], B = D.useSearch().tab ?? "overview", V = P?.issues ?? [];
|
|
101
102
|
return Ce(() => {
|
|
102
|
-
u !==
|
|
103
|
+
u !== _ && S({
|
|
103
104
|
to: "/$workspace/projects/$projectId",
|
|
104
105
|
params: {
|
|
105
106
|
workspace: s,
|
|
106
|
-
projectId:
|
|
107
|
+
projectId: _
|
|
107
108
|
},
|
|
108
109
|
search: (e) => e,
|
|
109
110
|
replace: !0
|
|
110
111
|
});
|
|
111
112
|
}, [
|
|
112
|
-
|
|
113
|
+
S,
|
|
113
114
|
s,
|
|
114
115
|
u,
|
|
115
|
-
|
|
116
|
+
_
|
|
116
117
|
]), /* @__PURE__ */ X("div", {
|
|
117
118
|
className: "flex h-full min-h-0 flex-col",
|
|
118
119
|
children: [
|
|
@@ -122,107 +123,118 @@ function De() {
|
|
|
122
123
|
label: f("projects"),
|
|
123
124
|
href: `/${s}/projects`
|
|
124
125
|
}, {
|
|
125
|
-
label:
|
|
126
|
-
icon:
|
|
127
|
-
icon:
|
|
128
|
-
color:
|
|
129
|
-
name:
|
|
130
|
-
}) : /* @__PURE__ */ Y(
|
|
126
|
+
label: g.name,
|
|
127
|
+
icon: g.icon || g.color ? /* @__PURE__ */ Y(re, {
|
|
128
|
+
icon: g.icon ?? "",
|
|
129
|
+
color: g.color ?? "",
|
|
130
|
+
name: g.name
|
|
131
|
+
}) : /* @__PURE__ */ Y(y, { className: "size-4 text-muted-foreground" })
|
|
131
132
|
}],
|
|
132
133
|
titleActions: /* @__PURE__ */ X(J, { children: [
|
|
133
|
-
/* @__PURE__ */ Y(
|
|
134
|
+
/* @__PURE__ */ Y(ce, {
|
|
134
135
|
workspace: s,
|
|
135
136
|
kind: "project",
|
|
136
|
-
target:
|
|
137
|
+
target: g.id
|
|
137
138
|
}),
|
|
138
139
|
/* @__PURE__ */ Y(de, {
|
|
139
140
|
workspace: s,
|
|
140
|
-
project:
|
|
141
|
+
project: g.id
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */ Y(
|
|
143
|
-
items:
|
|
144
|
-
label:
|
|
143
|
+
/* @__PURE__ */ Y(Ee, {
|
|
144
|
+
items: z,
|
|
145
|
+
label: m("moreActionsFor", { name: g.name }),
|
|
145
146
|
visible: !0
|
|
146
147
|
})
|
|
147
148
|
] }),
|
|
148
|
-
actions:
|
|
149
|
+
actions: R.isPending && /* @__PURE__ */ Y("span", {
|
|
149
150
|
className: "text-xs text-muted-foreground",
|
|
150
|
-
children:
|
|
151
|
+
children: m("saving")
|
|
151
152
|
})
|
|
152
153
|
}),
|
|
153
154
|
/* @__PURE__ */ Y("nav", {
|
|
154
155
|
"aria-label": f("projectSections"),
|
|
155
156
|
className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
156
|
-
children:
|
|
157
|
+
children: E.map((e) => /* @__PURE__ */ X(r, {
|
|
157
158
|
to: "/$workspace/projects/$projectId",
|
|
158
159
|
params: {
|
|
159
160
|
workspace: s,
|
|
160
161
|
projectId: u
|
|
161
162
|
},
|
|
162
163
|
search: e === "overview" ? {} : { tab: e },
|
|
163
|
-
"aria-current":
|
|
164
|
+
"aria-current": B === e ? "page" : void 0,
|
|
164
165
|
activeOptions: { exact: !0 },
|
|
165
166
|
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: [f(`projectTabs.${e}`), e === "issues" &&
|
|
167
|
+
children: [f(`projectTabs.${e}`), e === "issues" && V.length > 0 && /* @__PURE__ */ Y("span", {
|
|
167
168
|
className: "ml-1 tabular-nums",
|
|
168
|
-
children:
|
|
169
|
+
children: V.length
|
|
169
170
|
})]
|
|
170
171
|
}, e))
|
|
171
172
|
}),
|
|
172
173
|
/* @__PURE__ */ X("div", {
|
|
173
174
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
|
|
174
175
|
children: [/* @__PURE__ */ X("div", {
|
|
175
|
-
className:
|
|
176
|
+
className: B === "issues" ? "w-full min-w-0 pb-16 xl:flex-1 xl:overflow-y-auto" : "w-full min-w-0 px-4 pt-6 pb-16 md:px-8 md:pt-8 xl:flex-1 xl:overflow-y-auto",
|
|
176
177
|
children: [
|
|
177
|
-
|
|
178
|
+
B === "overview" && /* @__PURE__ */ X(J, { children: [
|
|
178
179
|
/* @__PURE__ */ X("div", {
|
|
179
180
|
className: "flex items-center gap-3",
|
|
180
181
|
children: [/* @__PURE__ */ Y(fe, {
|
|
181
182
|
workspace: s,
|
|
182
|
-
icon:
|
|
183
|
-
name:
|
|
184
|
-
onChange: (e) =>
|
|
183
|
+
icon: g.icon ?? "",
|
|
184
|
+
name: g.name,
|
|
185
|
+
onChange: (e) => R.mutateAsync({
|
|
185
186
|
icon: e,
|
|
186
187
|
color: ""
|
|
187
188
|
}),
|
|
188
|
-
disabled: !
|
|
189
|
+
disabled: !v,
|
|
189
190
|
size: 40
|
|
190
|
-
}), /* @__PURE__ */ Y(
|
|
191
|
-
project:
|
|
192
|
-
canWrite:
|
|
193
|
-
onSave: (e) =>
|
|
191
|
+
}), /* @__PURE__ */ Y(ke, {
|
|
192
|
+
project: g,
|
|
193
|
+
canWrite: v,
|
|
194
|
+
onSave: (e) => R.mutate({ name: e })
|
|
194
195
|
})]
|
|
195
196
|
}),
|
|
196
|
-
/* @__PURE__ */ Y(ke, {
|
|
197
|
-
project: h,
|
|
198
|
-
canWrite: _,
|
|
199
|
-
onSave: (e) => L.mutate({ summary: e })
|
|
200
|
-
}),
|
|
201
197
|
/* @__PURE__ */ Y(Ae, {
|
|
198
|
+
project: g,
|
|
199
|
+
canWrite: v,
|
|
200
|
+
onSave: (e) => R.mutate({ summary: e })
|
|
201
|
+
}),
|
|
202
|
+
/* @__PURE__ */ Y(je, {
|
|
202
203
|
workspace: s,
|
|
203
|
-
project:
|
|
204
|
-
canWrite:
|
|
205
|
-
update: (e) =>
|
|
204
|
+
project: g,
|
|
205
|
+
canWrite: v,
|
|
206
|
+
update: (e) => R.mutate(e)
|
|
206
207
|
}),
|
|
207
|
-
/* @__PURE__ */ Y(
|
|
208
|
+
/* @__PURE__ */ Y(Ne, {
|
|
208
209
|
workspace: s,
|
|
209
|
-
project:
|
|
210
|
+
project: g
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ Y("div", {
|
|
213
|
+
className: "mt-4",
|
|
214
|
+
children: /* @__PURE__ */ Y(ie, {
|
|
215
|
+
workspace: s,
|
|
216
|
+
project: g,
|
|
217
|
+
editable: v,
|
|
218
|
+
onChange: (e) => {
|
|
219
|
+
x.setQueryData(l(s, u).queryKey, c(e)), x.invalidateQueries({ queryKey: d(s).queryKey });
|
|
220
|
+
}
|
|
221
|
+
})
|
|
210
222
|
}),
|
|
211
|
-
|
|
223
|
+
R.isError && /* @__PURE__ */ Y(U, {
|
|
212
224
|
size: "md",
|
|
213
225
|
className: "mt-2",
|
|
214
|
-
children:
|
|
226
|
+
children: h(R.error)
|
|
215
227
|
}),
|
|
216
228
|
/* @__PURE__ */ X("section", {
|
|
217
229
|
className: "mt-6",
|
|
218
230
|
"aria-label": f("progressTitle"),
|
|
219
|
-
children: [/* @__PURE__ */ Y(
|
|
231
|
+
children: [/* @__PURE__ */ Y(j, { progress: le }), F.length > 0 && /* @__PURE__ */ X("div", {
|
|
220
232
|
className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
221
233
|
children: [/* @__PURE__ */ Y(xe, {
|
|
222
234
|
"aria-label": f("onlyOwnIssues"),
|
|
223
235
|
size: "sm",
|
|
224
|
-
checked:
|
|
225
|
-
onCheckedChange: (e) =>
|
|
236
|
+
checked: N,
|
|
237
|
+
onCheckedChange: (e) => S({
|
|
226
238
|
to: "/$workspace/projects/$projectId",
|
|
227
239
|
params: {
|
|
228
240
|
workspace: s,
|
|
@@ -240,84 +252,84 @@ function De() {
|
|
|
240
252
|
})]
|
|
241
253
|
})]
|
|
242
254
|
}),
|
|
243
|
-
/* @__PURE__ */ Y(
|
|
255
|
+
/* @__PURE__ */ Y(Fe, {
|
|
244
256
|
workspace: s,
|
|
245
257
|
projects: F
|
|
246
258
|
}),
|
|
247
|
-
|
|
259
|
+
V.length > 0 && /* @__PURE__ */ Y("section", {
|
|
248
260
|
className: "mt-8 xl:hidden",
|
|
249
261
|
"aria-label": f("issueBreakdown.label"),
|
|
250
262
|
children: /* @__PURE__ */ Y(ue, {
|
|
251
263
|
workspace: s,
|
|
252
|
-
issues:
|
|
253
|
-
tabs:
|
|
264
|
+
issues: V,
|
|
265
|
+
tabs: De,
|
|
254
266
|
tab: I,
|
|
255
|
-
onTabChange:
|
|
267
|
+
onTabChange: L
|
|
256
268
|
})
|
|
257
269
|
}),
|
|
258
270
|
/* @__PURE__ */ X("section", {
|
|
259
271
|
className: "mt-8",
|
|
260
272
|
children: [/* @__PURE__ */ Y("h2", {
|
|
261
273
|
className: "text-base font-semibold",
|
|
262
|
-
children:
|
|
274
|
+
children: m("description")
|
|
263
275
|
}), /* @__PURE__ */ Y(he, {
|
|
264
276
|
size: "fill",
|
|
265
277
|
padding: "sm",
|
|
266
278
|
className: "mt-2 min-h-16",
|
|
267
|
-
children: /* @__PURE__ */ Y(
|
|
268
|
-
value:
|
|
269
|
-
editable:
|
|
279
|
+
children: /* @__PURE__ */ Y(se, {
|
|
280
|
+
value: g.description,
|
|
281
|
+
editable: v,
|
|
270
282
|
placeholder: f("addDescription"),
|
|
271
|
-
label:
|
|
272
|
-
onBlur: (e) => e !==
|
|
283
|
+
label: m("description"),
|
|
284
|
+
onBlur: (e) => e !== g.description && R.mutate({ description: e }),
|
|
273
285
|
className: "min-h-12"
|
|
274
|
-
},
|
|
286
|
+
}, g.updatedAt)
|
|
275
287
|
})]
|
|
276
288
|
}),
|
|
277
|
-
/* @__PURE__ */ Y(
|
|
289
|
+
/* @__PURE__ */ Y(Ie, {
|
|
278
290
|
workspace: s,
|
|
279
|
-
project:
|
|
280
|
-
canWrite:
|
|
291
|
+
project: g,
|
|
292
|
+
canWrite: v
|
|
281
293
|
}),
|
|
282
|
-
/* @__PURE__ */ Y(
|
|
294
|
+
/* @__PURE__ */ Y(ze, {
|
|
283
295
|
workspace: s,
|
|
284
|
-
projectId:
|
|
296
|
+
projectId: g.id
|
|
285
297
|
})
|
|
286
298
|
] }),
|
|
287
|
-
|
|
299
|
+
B === "updates" && /* @__PURE__ */ Y(Re, {
|
|
288
300
|
workspace: s,
|
|
289
|
-
project:
|
|
290
|
-
canWrite:
|
|
301
|
+
project: g,
|
|
302
|
+
canWrite: v
|
|
291
303
|
}),
|
|
292
|
-
|
|
304
|
+
B === "issues" && /* @__PURE__ */ Y(Le, {
|
|
293
305
|
workspace: s,
|
|
294
|
-
project:
|
|
295
|
-
canWrite:
|
|
306
|
+
project: g,
|
|
307
|
+
canWrite: v
|
|
296
308
|
})
|
|
297
309
|
]
|
|
298
|
-
}),
|
|
310
|
+
}), B !== "updates" && V.length > 0 && /* @__PURE__ */ Y("aside", {
|
|
299
311
|
"aria-label": f("issueBreakdown.label"),
|
|
300
312
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
301
313
|
children: /* @__PURE__ */ Y(ue, {
|
|
302
314
|
workspace: s,
|
|
303
|
-
issues:
|
|
304
|
-
tabs:
|
|
315
|
+
issues: V,
|
|
316
|
+
tabs: De,
|
|
305
317
|
tab: I,
|
|
306
|
-
onTabChange:
|
|
318
|
+
onTabChange: L
|
|
307
319
|
})
|
|
308
320
|
})]
|
|
309
321
|
}),
|
|
310
322
|
O,
|
|
311
323
|
k && /* @__PURE__ */ Y(pe, {
|
|
312
324
|
workspace: s,
|
|
313
|
-
project:
|
|
325
|
+
project: g,
|
|
314
326
|
onClose: () => A(!1)
|
|
315
327
|
})
|
|
316
328
|
]
|
|
317
329
|
});
|
|
318
330
|
}
|
|
319
|
-
function
|
|
320
|
-
let r = q("planning"), [i, a] =
|
|
331
|
+
function ke({ project: e, canWrite: t, onSave: n }) {
|
|
332
|
+
let r = q("planning"), [i, a] = K(e.name), [o, s] = K(e.name);
|
|
321
333
|
return o !== e.name && (s(e.name), a(e.name)), t ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("h1", {
|
|
322
334
|
className: "sr-only",
|
|
323
335
|
children: e.name
|
|
@@ -333,8 +345,8 @@ function Oe({ project: e, canWrite: t, onSave: n }) {
|
|
|
333
345
|
children: e.name
|
|
334
346
|
});
|
|
335
347
|
}
|
|
336
|
-
function
|
|
337
|
-
let r = q("planning"), [i, a] =
|
|
348
|
+
function Ae({ project: e, canWrite: t, onSave: n }) {
|
|
349
|
+
let r = q("planning"), [i, a] = K(e.summary ?? ""), [o, s] = K(e.summary ?? "");
|
|
338
350
|
return o !== (e.summary ?? "") && (s(e.summary ?? ""), a(e.summary ?? "")), t ? /* @__PURE__ */ Y("input", {
|
|
339
351
|
value: i,
|
|
340
352
|
onChange: (e) => a(e.target.value),
|
|
@@ -349,10 +361,10 @@ function ke({ project: e, canWrite: t, onSave: n }) {
|
|
|
349
361
|
children: e.summary
|
|
350
362
|
}) : null;
|
|
351
363
|
}
|
|
352
|
-
function
|
|
353
|
-
let i = q("planning"), a = k(), { members: o, person: s } =
|
|
364
|
+
function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
365
|
+
let i = q("planning"), a = k(), { members: o, person: s } = P(e), { data: c = [] } = Q(f(e)), l = C(), [u, d] = K(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
|
|
354
366
|
let o = /* @__PURE__ */ X(J, { children: [
|
|
355
|
-
/* @__PURE__ */ Y(
|
|
367
|
+
/* @__PURE__ */ Y(g, { className: "size-3.5 text-muted-foreground" }),
|
|
356
368
|
/* @__PURE__ */ Y("span", {
|
|
357
369
|
className: "text-muted-foreground",
|
|
358
370
|
children: e
|
|
@@ -365,7 +377,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
365
377
|
"aria-label": e,
|
|
366
378
|
trigger: /* @__PURE__ */ Y("button", {
|
|
367
379
|
type: "button",
|
|
368
|
-
className:
|
|
380
|
+
className: W({ size: "sm" }),
|
|
369
381
|
children: o
|
|
370
382
|
})
|
|
371
383
|
}) : /* @__PURE__ */ Y("span", {
|
|
@@ -381,18 +393,18 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
381
393
|
value: t.status,
|
|
382
394
|
disabled: !n,
|
|
383
395
|
onValueChange: (e) => e && r({ status: e }),
|
|
384
|
-
items:
|
|
396
|
+
items: w.map((e) => ({
|
|
385
397
|
value: e,
|
|
386
398
|
label: i(`status.${e}`),
|
|
387
|
-
icon: /* @__PURE__ */ Y(
|
|
399
|
+
icon: /* @__PURE__ */ Y(M, { status: e })
|
|
388
400
|
})),
|
|
389
401
|
trigger: /* @__PURE__ */ X("button", {
|
|
390
402
|
type: "button",
|
|
391
|
-
className:
|
|
392
|
-
children: [/* @__PURE__ */ Y(
|
|
403
|
+
className: W({ size: "sm" }),
|
|
404
|
+
children: [/* @__PURE__ */ Y(M, { status: t.status }), i(`status.${t.status}`)]
|
|
393
405
|
})
|
|
394
406
|
}),
|
|
395
|
-
/* @__PURE__ */ Y(
|
|
407
|
+
/* @__PURE__ */ Y(H, {
|
|
396
408
|
"aria-label": i("lead"),
|
|
397
409
|
value: t.lead ?? "",
|
|
398
410
|
disabled: !n,
|
|
@@ -403,7 +415,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
403
415
|
}, ...o.map((e) => ({
|
|
404
416
|
value: e.user.username,
|
|
405
417
|
label: e.user.name,
|
|
406
|
-
icon: /* @__PURE__ */ Y(
|
|
418
|
+
icon: /* @__PURE__ */ Y(z, {
|
|
407
419
|
name: e.user.name,
|
|
408
420
|
src: e.user.avatarUrl,
|
|
409
421
|
size: "xs",
|
|
@@ -412,8 +424,8 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
412
424
|
}))],
|
|
413
425
|
trigger: /* @__PURE__ */ Y("button", {
|
|
414
426
|
type: "button",
|
|
415
|
-
className:
|
|
416
|
-
children: p ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
427
|
+
className: W({ size: "sm" }),
|
|
428
|
+
children: p ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(z, {
|
|
417
429
|
name: p.name,
|
|
418
430
|
src: p.avatarUrl,
|
|
419
431
|
size: "xs",
|
|
@@ -432,17 +444,17 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
432
444
|
items: l.map((e, t) => ({
|
|
433
445
|
value: String(t),
|
|
434
446
|
label: e,
|
|
435
|
-
icon: /* @__PURE__ */ Y(
|
|
447
|
+
icon: /* @__PURE__ */ Y(v, { priority: t })
|
|
436
448
|
})),
|
|
437
449
|
trigger: /* @__PURE__ */ X("button", {
|
|
438
450
|
type: "button",
|
|
439
|
-
className:
|
|
440
|
-
children: [/* @__PURE__ */ Y(
|
|
451
|
+
className: W({ size: "sm" }),
|
|
452
|
+
children: [/* @__PURE__ */ Y(v, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
|
|
441
453
|
})
|
|
442
454
|
}),
|
|
443
455
|
m(i("startDate"), t.startDate, "startDate"),
|
|
444
456
|
m(i("targetDate"), t.targetDate, "targetDate"),
|
|
445
|
-
/* @__PURE__ */ Y(
|
|
457
|
+
/* @__PURE__ */ Y(H, {
|
|
446
458
|
"aria-label": i("members"),
|
|
447
459
|
open: u === "members",
|
|
448
460
|
onOpenChange: (e) => d(e ? "members" : null),
|
|
@@ -451,7 +463,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
451
463
|
items: o.map((e) => ({
|
|
452
464
|
value: e.user.username,
|
|
453
465
|
label: e.user.name,
|
|
454
|
-
icon: /* @__PURE__ */ Y(
|
|
466
|
+
icon: /* @__PURE__ */ Y(z, {
|
|
455
467
|
name: e.user.name,
|
|
456
468
|
src: e.user.avatarUrl,
|
|
457
469
|
size: "xs",
|
|
@@ -464,26 +476,26 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
464
476
|
trigger: /* @__PURE__ */ X("button", {
|
|
465
477
|
type: "button",
|
|
466
478
|
disabled: !n,
|
|
467
|
-
className:
|
|
468
|
-
children: [t.members.length > 0 ? /* @__PURE__ */ Y(
|
|
479
|
+
className: W({ size: "sm" }),
|
|
480
|
+
children: [t.members.length > 0 ? /* @__PURE__ */ Y(B, {
|
|
469
481
|
size: "xs",
|
|
470
482
|
max: 4,
|
|
471
483
|
showOverflow: !1,
|
|
472
484
|
children: t.members.map((e) => {
|
|
473
485
|
let t = s(e);
|
|
474
|
-
return /* @__PURE__ */ Y(
|
|
486
|
+
return /* @__PURE__ */ Y(z, {
|
|
475
487
|
name: t.name,
|
|
476
488
|
src: t.avatarUrl,
|
|
477
489
|
decorative: !0
|
|
478
490
|
}, e);
|
|
479
491
|
})
|
|
480
|
-
}) : /* @__PURE__ */ Y(
|
|
492
|
+
}) : /* @__PURE__ */ Y(S, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
481
493
|
className: t.members.length ? "" : "text-muted-foreground",
|
|
482
494
|
children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
|
|
483
495
|
})]
|
|
484
496
|
})
|
|
485
497
|
}),
|
|
486
|
-
/* @__PURE__ */ Y(
|
|
498
|
+
/* @__PURE__ */ Y(H, {
|
|
487
499
|
"aria-label": i("teams"),
|
|
488
500
|
open: u === "teams",
|
|
489
501
|
onOpenChange: (e) => d(e ? "teams" : null),
|
|
@@ -493,7 +505,7 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
493
505
|
value: e.id,
|
|
494
506
|
label: e.name,
|
|
495
507
|
hint: e.key,
|
|
496
|
-
icon: /* @__PURE__ */ Y(
|
|
508
|
+
icon: /* @__PURE__ */ Y(re, {
|
|
497
509
|
icon: e.icon,
|
|
498
510
|
color: e.color,
|
|
499
511
|
name: e.name
|
|
@@ -505,20 +517,20 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
505
517
|
trigger: /* @__PURE__ */ X("button", {
|
|
506
518
|
type: "button",
|
|
507
519
|
disabled: !n,
|
|
508
|
-
className:
|
|
509
|
-
children: [/* @__PURE__ */ Y(
|
|
520
|
+
className: W({ size: "sm" }),
|
|
521
|
+
children: [/* @__PURE__ */ Y(S, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
510
522
|
className: t.teamIds.length ? "" : "text-muted-foreground",
|
|
511
523
|
children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
|
|
512
524
|
})]
|
|
513
525
|
})
|
|
514
526
|
}),
|
|
515
|
-
/* @__PURE__ */ Y(
|
|
527
|
+
/* @__PURE__ */ Y(Pe, {
|
|
516
528
|
workspace: e,
|
|
517
529
|
project: t,
|
|
518
530
|
canWrite: n,
|
|
519
531
|
onChange: (e) => r({ parentId: e })
|
|
520
532
|
}),
|
|
521
|
-
/* @__PURE__ */ Y(
|
|
533
|
+
/* @__PURE__ */ Y(Me, {
|
|
522
534
|
workspace: e,
|
|
523
535
|
project: t,
|
|
524
536
|
canWrite: n,
|
|
@@ -527,11 +539,11 @@ function Ae({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
527
539
|
]
|
|
528
540
|
});
|
|
529
541
|
}
|
|
530
|
-
function
|
|
542
|
+
function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
531
543
|
let i = q("planning"), { data: a = [] } = Q(d(e)), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
532
544
|
for (let t of a) t.blockedBy.includes(e) && !o.has(t.id) && (o.add(t.id), s(t.id));
|
|
533
545
|
};
|
|
534
|
-
return s(t.id), /* @__PURE__ */ Y(
|
|
546
|
+
return s(t.id), /* @__PURE__ */ Y(H, {
|
|
535
547
|
multiple: !0,
|
|
536
548
|
disabled: !n,
|
|
537
549
|
items: a.filter((e) => e.id !== t.id && !o.has(e.id) && !e.template).map((e) => ({
|
|
@@ -545,22 +557,22 @@ function je({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
545
557
|
trigger: /* @__PURE__ */ X("button", {
|
|
546
558
|
type: "button",
|
|
547
559
|
disabled: !n,
|
|
548
|
-
className:
|
|
549
|
-
children: [/* @__PURE__ */ Y(
|
|
560
|
+
className: W({ size: "sm" }),
|
|
561
|
+
children: [/* @__PURE__ */ Y(_, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
550
562
|
className: t.blockedBy.length ? "" : "text-muted-foreground",
|
|
551
563
|
children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
|
|
552
564
|
})]
|
|
553
565
|
})
|
|
554
566
|
});
|
|
555
567
|
}
|
|
556
|
-
function
|
|
568
|
+
function Ne({ workspace: e, project: t }) {
|
|
557
569
|
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
570
|
if (s.length === 0 && c.length === 0) return null;
|
|
559
571
|
let l = t.targetDate ? s.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], u = (t) => /* @__PURE__ */ Y(r, {
|
|
560
572
|
to: "/$workspace/projects/$projectId",
|
|
561
573
|
params: {
|
|
562
574
|
workspace: e,
|
|
563
|
-
projectId:
|
|
575
|
+
projectId: ae(t)
|
|
564
576
|
},
|
|
565
577
|
className: "font-medium hover:underline",
|
|
566
578
|
children: t.name
|
|
@@ -590,9 +602,9 @@ function Me({ workspace: e, project: t }) {
|
|
|
590
602
|
]
|
|
591
603
|
});
|
|
592
604
|
}
|
|
593
|
-
function
|
|
594
|
-
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(
|
|
595
|
-
return /* @__PURE__ */ Y(
|
|
605
|
+
function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
606
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(oe(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
|
|
607
|
+
return /* @__PURE__ */ Y(H, {
|
|
596
608
|
disabled: !n,
|
|
597
609
|
items: [{
|
|
598
610
|
value: "",
|
|
@@ -608,16 +620,16 @@ function Ne({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
608
620
|
trigger: /* @__PURE__ */ X("button", {
|
|
609
621
|
type: "button",
|
|
610
622
|
disabled: !n,
|
|
611
|
-
className:
|
|
612
|
-
children: [/* @__PURE__ */ Y(
|
|
623
|
+
className: W({ size: "sm" }),
|
|
624
|
+
children: [/* @__PURE__ */ Y(y, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
613
625
|
className: s ? "" : "text-muted-foreground",
|
|
614
626
|
children: s ? i("underProject", { name: s.name }) : i("parentProject")
|
|
615
627
|
})]
|
|
616
628
|
})
|
|
617
629
|
});
|
|
618
630
|
}
|
|
619
|
-
function
|
|
620
|
-
let n = q("planning"), i = k(), { person: a } =
|
|
631
|
+
function Fe({ workspace: e, projects: t }) {
|
|
632
|
+
let n = q("planning"), i = k(), { person: a } = P(e);
|
|
621
633
|
return t.length === 0 ? null : /* @__PURE__ */ X("section", {
|
|
622
634
|
className: "mt-8",
|
|
623
635
|
children: [/* @__PURE__ */ Y("h2", {
|
|
@@ -626,16 +638,16 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
626
638
|
}), /* @__PURE__ */ Y("ul", {
|
|
627
639
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
628
640
|
children: t.map((t) => {
|
|
629
|
-
let o =
|
|
641
|
+
let o = N(t), s = t.lead ? a(t.lead) : void 0;
|
|
630
642
|
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(r, {
|
|
631
643
|
to: "/$workspace/projects/$projectId",
|
|
632
644
|
params: {
|
|
633
645
|
workspace: e,
|
|
634
|
-
projectId:
|
|
646
|
+
projectId: ae(t)
|
|
635
647
|
},
|
|
636
648
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
|
|
637
649
|
children: [
|
|
638
|
-
/* @__PURE__ */ Y(
|
|
650
|
+
/* @__PURE__ */ Y(M, { status: t.status }),
|
|
639
651
|
/* @__PURE__ */ Y("span", {
|
|
640
652
|
className: "min-w-0 flex-1 truncate font-medium",
|
|
641
653
|
children: t.name
|
|
@@ -644,7 +656,7 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
644
656
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
645
657
|
children: [/* @__PURE__ */ Y(A, { state: o }), n(`health.${o}`)]
|
|
646
658
|
}),
|
|
647
|
-
s && /* @__PURE__ */ Y(
|
|
659
|
+
s && /* @__PURE__ */ Y(z, {
|
|
648
660
|
name: s.name,
|
|
649
661
|
src: s.avatarUrl,
|
|
650
662
|
size: "xs"
|
|
@@ -655,7 +667,7 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
655
667
|
}),
|
|
656
668
|
/* @__PURE__ */ Y("span", {
|
|
657
669
|
className: "w-28",
|
|
658
|
-
children: /* @__PURE__ */ Y(
|
|
670
|
+
children: /* @__PURE__ */ Y(j, {
|
|
659
671
|
progress: t.treeProgress,
|
|
660
672
|
compact: !0
|
|
661
673
|
})
|
|
@@ -666,8 +678,8 @@ function Pe({ workspace: e, projects: t }) {
|
|
|
666
678
|
})]
|
|
667
679
|
});
|
|
668
680
|
}
|
|
669
|
-
function
|
|
670
|
-
let a = q("planning"), o = q("common"), s =
|
|
681
|
+
function Ie({ workspace: n, project: r, canWrite: i }) {
|
|
682
|
+
let a = q("planning"), o = q("common"), s = we(), c = k(), l = $(), u = Se(), [d, f] = K(!1), [p, h] = K(""), [g, _] = K(""), [v, y] = K(null), b = {
|
|
671
683
|
workspace: n,
|
|
672
684
|
projectId: r.id
|
|
673
685
|
}, x = () => {
|
|
@@ -680,7 +692,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
680
692
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
|
|
681
693
|
params: { path: b },
|
|
682
694
|
body: {
|
|
683
|
-
name:
|
|
695
|
+
name: p,
|
|
684
696
|
...g && { targetDate: g }
|
|
685
697
|
}
|
|
686
698
|
})),
|
|
@@ -724,7 +736,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
724
736
|
position: t + 1
|
|
725
737
|
})
|
|
726
738
|
},
|
|
727
|
-
|
|
739
|
+
G,
|
|
728
740
|
{
|
|
729
741
|
label: o("delete"),
|
|
730
742
|
destructive: !0,
|
|
@@ -739,12 +751,12 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
739
751
|
children: [/* @__PURE__ */ Y("h2", {
|
|
740
752
|
className: "text-base font-semibold",
|
|
741
753
|
children: a("milestones")
|
|
742
|
-
}), i && !d && /* @__PURE__ */ X(
|
|
754
|
+
}), i && !d && /* @__PURE__ */ X(V, {
|
|
743
755
|
type: "button",
|
|
744
756
|
size: "sm",
|
|
745
757
|
onClick: () => f(!0),
|
|
746
758
|
className: "ml-auto",
|
|
747
|
-
children: [/* @__PURE__ */ Y(
|
|
759
|
+
children: [/* @__PURE__ */ Y(m, { className: "size-3.5" }), a("addMilestone")]
|
|
748
760
|
})]
|
|
749
761
|
}),
|
|
750
762
|
/* @__PURE__ */ X(he, {
|
|
@@ -785,12 +797,12 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
785
797
|
}),
|
|
786
798
|
/* @__PURE__ */ Y("span", {
|
|
787
799
|
className: "w-44 shrink-0",
|
|
788
|
-
children: /* @__PURE__ */ Y(
|
|
800
|
+
children: /* @__PURE__ */ Y(j, {
|
|
789
801
|
progress: e.progress,
|
|
790
802
|
compact: !0
|
|
791
803
|
})
|
|
792
804
|
}),
|
|
793
|
-
/* @__PURE__ */ Y(
|
|
805
|
+
/* @__PURE__ */ Y(Ee, {
|
|
794
806
|
items: () => E(e, t),
|
|
795
807
|
label: o("moreActionsFor", { name: e.name })
|
|
796
808
|
})
|
|
@@ -803,12 +815,12 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
803
815
|
d && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X("form", {
|
|
804
816
|
className: "flex flex-wrap items-center gap-2 px-3 py-2",
|
|
805
817
|
onSubmit: (e) => {
|
|
806
|
-
e.preventDefault(),
|
|
818
|
+
e.preventDefault(), p.trim() && S.mutate();
|
|
807
819
|
},
|
|
808
820
|
children: [
|
|
809
821
|
/* @__PURE__ */ Y(ve, {
|
|
810
822
|
autoFocus: !0,
|
|
811
|
-
value:
|
|
823
|
+
value: p,
|
|
812
824
|
onChange: (e) => h(e.target.value),
|
|
813
825
|
placeholder: a("milestoneName"),
|
|
814
826
|
"aria-label": a("milestoneName"),
|
|
@@ -820,14 +832,14 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
820
832
|
"aria-label": a("targetDate"),
|
|
821
833
|
className: "w-auto"
|
|
822
834
|
}),
|
|
823
|
-
/* @__PURE__ */ Y(
|
|
835
|
+
/* @__PURE__ */ Y(V, {
|
|
824
836
|
type: "submit",
|
|
825
837
|
variant: "primary",
|
|
826
|
-
disabled: !
|
|
838
|
+
disabled: !p.trim(),
|
|
827
839
|
loading: S.isPending,
|
|
828
840
|
children: a("addMilestone")
|
|
829
841
|
}),
|
|
830
|
-
/* @__PURE__ */ Y(
|
|
842
|
+
/* @__PURE__ */ Y(V, {
|
|
831
843
|
type: "button",
|
|
832
844
|
variant: "ghost",
|
|
833
845
|
onClick: () => f(!1),
|
|
@@ -837,7 +849,7 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
837
849
|
}) })
|
|
838
850
|
]
|
|
839
851
|
}),
|
|
840
|
-
D && /* @__PURE__ */ Y(
|
|
852
|
+
D && /* @__PURE__ */ Y(U, {
|
|
841
853
|
size: "md",
|
|
842
854
|
className: "mt-2",
|
|
843
855
|
children: s(D)
|
|
@@ -845,8 +857,8 @@ function Fe({ workspace: n, project: r, canWrite: i }) {
|
|
|
845
857
|
]
|
|
846
858
|
});
|
|
847
859
|
}
|
|
848
|
-
function
|
|
849
|
-
let o = q("planning"), s =
|
|
860
|
+
function Le({ workspace: n, project: r, canWrite: i }) {
|
|
861
|
+
let o = q("planning"), s = we(), c = $(), l = !!D.useSearch().own, { data: u } = Te(a(n, T(r.id, l))), d = L(n, (e) => e.project?.id !== r.id), f = u.issues, p = Z({
|
|
850
862
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
851
863
|
params: { path: {
|
|
852
864
|
workspace: n,
|
|
@@ -861,36 +873,36 @@ function Ie({ workspace: n, project: r, canWrite: i }) {
|
|
|
861
873
|
children: [
|
|
862
874
|
i && /* @__PURE__ */ Y("div", {
|
|
863
875
|
className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
|
|
864
|
-
children: /* @__PURE__ */ Y(
|
|
876
|
+
children: /* @__PURE__ */ Y(H, {
|
|
865
877
|
"aria-label": o("addIssues"),
|
|
866
878
|
align: "end",
|
|
867
879
|
...d,
|
|
868
880
|
value: null,
|
|
869
|
-
onValueChange: (e) => e !== null &&
|
|
881
|
+
onValueChange: (e) => e !== null && p.mutate(e),
|
|
870
882
|
placeholder: o("findIssue"),
|
|
871
|
-
trigger: /* @__PURE__ */ X(
|
|
883
|
+
trigger: /* @__PURE__ */ X(V, {
|
|
872
884
|
type: "button",
|
|
873
885
|
size: "sm",
|
|
874
|
-
children: [/* @__PURE__ */ Y(
|
|
886
|
+
children: [/* @__PURE__ */ Y(m, { className: "size-3.5" }), o("addIssues")]
|
|
875
887
|
})
|
|
876
888
|
})
|
|
877
889
|
}),
|
|
878
|
-
|
|
890
|
+
p.isError && /* @__PURE__ */ Y(U, {
|
|
879
891
|
size: "md",
|
|
880
892
|
className: "px-4 pt-2 md:px-5",
|
|
881
|
-
children: s(
|
|
893
|
+
children: s(p.error)
|
|
882
894
|
}),
|
|
883
895
|
f.length === 0 ? /* @__PURE__ */ Y(_e, {
|
|
884
896
|
title: o("noIssuesInProject"),
|
|
885
897
|
className: "mt-6"
|
|
886
|
-
}) : /* @__PURE__ */ Y(
|
|
898
|
+
}) : /* @__PURE__ */ Y(R, {
|
|
887
899
|
workspace: n,
|
|
888
900
|
issues: f
|
|
889
901
|
})
|
|
890
902
|
]
|
|
891
903
|
});
|
|
892
904
|
}
|
|
893
|
-
function
|
|
905
|
+
function Re({ workspace: n, project: r, canWrite: i }) {
|
|
894
906
|
let a = q("planning"), o = $(), { data: s = [] } = Q(u(n, r.id)), c = Z({
|
|
895
907
|
mutationFn: async ({ health: i, body: a }) => t(await e.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/updates", {
|
|
896
908
|
params: { path: {
|
|
@@ -921,7 +933,7 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
921
933
|
});
|
|
922
934
|
return /* @__PURE__ */ Y(me, {
|
|
923
935
|
workspace: n,
|
|
924
|
-
state:
|
|
936
|
+
state: N(r),
|
|
925
937
|
health: r.health,
|
|
926
938
|
updates: s,
|
|
927
939
|
canWrite: i,
|
|
@@ -930,8 +942,8 @@ function Le({ workspace: n, project: r, canWrite: i }) {
|
|
|
930
942
|
remove: l
|
|
931
943
|
});
|
|
932
944
|
}
|
|
933
|
-
function
|
|
934
|
-
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = k(), o =
|
|
945
|
+
function ze({ workspace: e, projectId: t }) {
|
|
946
|
+
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = k(), o = C(), { data: c = [] } = Q(s(e, t)), { actorName: l, person: u } = P(e);
|
|
935
947
|
if (c.length === 0) return null;
|
|
936
948
|
let d = (e) => {
|
|
937
949
|
let t = {
|
|
@@ -986,40 +998,40 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
986
998
|
}];
|
|
987
999
|
let f = [], p = (e) => e ? a.day(String(e)) : "";
|
|
988
1000
|
return d.name && f.push({
|
|
989
|
-
icon: /* @__PURE__ */ Y(
|
|
1001
|
+
icon: /* @__PURE__ */ Y(x, {}),
|
|
990
1002
|
text: n.rich("renamed", {
|
|
991
1003
|
...t,
|
|
992
1004
|
from: String(d.name.from)
|
|
993
1005
|
})
|
|
994
1006
|
}), d.status && f.push({
|
|
995
|
-
icon: /* @__PURE__ */ Y(
|
|
1007
|
+
icon: /* @__PURE__ */ Y(M, { status: d.status.to }),
|
|
996
1008
|
text: n.rich("status", {
|
|
997
1009
|
...t,
|
|
998
1010
|
status: r(`status.${d.status.to}`)
|
|
999
1011
|
})
|
|
1000
1012
|
}), d.priority && f.push({
|
|
1001
|
-
icon: /* @__PURE__ */ Y(
|
|
1013
|
+
icon: /* @__PURE__ */ Y(v, { priority: Number(d.priority.to) }),
|
|
1002
1014
|
text: n.rich("priority", {
|
|
1003
1015
|
...t,
|
|
1004
1016
|
priority: o[Number(d.priority.to)] ?? ""
|
|
1005
1017
|
})
|
|
1006
1018
|
}), d.lead && f.push(d.lead.to ? {
|
|
1007
|
-
icon: /* @__PURE__ */ Y(
|
|
1019
|
+
icon: /* @__PURE__ */ Y(h, {}),
|
|
1008
1020
|
text: n.rich("lead", {
|
|
1009
1021
|
...t,
|
|
1010
1022
|
lead: u(String(d.lead.to)).name
|
|
1011
1023
|
})
|
|
1012
1024
|
} : {
|
|
1013
|
-
icon: /* @__PURE__ */ Y(
|
|
1025
|
+
icon: /* @__PURE__ */ Y(b, {}),
|
|
1014
1026
|
text: n.rich("leadRemoved", t)
|
|
1015
1027
|
}), d.startDate && f.push({
|
|
1016
|
-
icon: /* @__PURE__ */ Y(
|
|
1028
|
+
icon: /* @__PURE__ */ Y(g, {}),
|
|
1017
1029
|
text: d.startDate.to ? n.rich("startDate", {
|
|
1018
1030
|
...t,
|
|
1019
1031
|
date: p(d.startDate.to)
|
|
1020
1032
|
}) : n.rich("startDateRemoved", t)
|
|
1021
1033
|
}), d.targetDate && f.push({
|
|
1022
|
-
icon: /* @__PURE__ */ Y(
|
|
1034
|
+
icon: /* @__PURE__ */ Y(g, {}),
|
|
1023
1035
|
text: d.targetDate.to ? n.rich("targetDate", {
|
|
1024
1036
|
...t,
|
|
1025
1037
|
date: p(d.targetDate.to)
|
|
@@ -1037,7 +1049,7 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
1037
1049
|
children: n("title")
|
|
1038
1050
|
}), /* @__PURE__ */ Y(F, {
|
|
1039
1051
|
className: "mt-3",
|
|
1040
|
-
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(
|
|
1052
|
+
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(le, {
|
|
1041
1053
|
workspace: e,
|
|
1042
1054
|
icon: n,
|
|
1043
1055
|
actor: t.actor,
|
|
@@ -1047,4 +1059,4 @@ function Re({ workspace: e, projectId: t }) {
|
|
|
1047
1059
|
})]
|
|
1048
1060
|
});
|
|
1049
1061
|
}
|
|
1050
|
-
export {
|
|
1062
|
+
export { Oe as component };
|