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