@parallelworks/tandem-web 0.171.1 → 0.171.3
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 +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +201 -164
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +97 -92
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +36 -34
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +99 -97
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/triageSeen.js +2 -2
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +202 -212
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { projectIssueFilter as e, tabs as t } from "./_projectId.js";
|
|
2
|
+
import { api as n, unwrap as r } from "../../../api/client.js";
|
|
3
|
+
import { invalidateIssueViews as i } from "../../../api/mutations.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 { Timeline as p, TimelineItem as m, activityIcon as h } from "../../../components/ActivityTimeline.js";
|
|
6
|
+
import { ProjectFields as g } from "../../../components/CustomFields.js";
|
|
7
|
+
import { Editor as ee } from "../../../components/Editor.js";
|
|
8
|
+
import { EntityIcon as te } from "../../../components/EntityIcon.js";
|
|
9
|
+
import { FavoriteStar as _ } from "../../../components/FavoriteStar.js";
|
|
10
|
+
import { FollowButton as v } from "../../../components/FollowButton.js";
|
|
11
|
+
import { IconUpload as y } from "../../../components/IconUpload.js";
|
|
12
|
+
import { IssueBreakdown as b } from "../../../components/IssueBreakdown.js";
|
|
13
|
+
import { StatusGroups as x } from "../../../components/IssueGroup.js";
|
|
14
|
+
import { AddIcon as S, AddUserIcon as C, CalendarIcon as w, LinkIcon as T, PriorityIcon as E, ProjectIcon as ne, RemoveUserIcon as re, RenameIcon as ie, UsersIcon as D, usePriorityNames as ae } from "../../../components/icons.js";
|
|
10
15
|
import { HealthIcon as O, ProgressBar as k, ProjectStatusIcon as A, healthOf as j } from "../../../components/Planning.js";
|
|
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 { FollowButton as de } from "../../../components/FollowButton.js";
|
|
25
|
-
import { IconUpload as fe } from "../../../components/IconUpload.js";
|
|
26
|
-
import { StatusGroups as R } from "../../../components/IssueGroup.js";
|
|
27
|
-
import { ProjectAccessDialog as pe } from "../../../components/ProjectAccess.js";
|
|
28
|
-
import { Updates as me } from "../../../components/Updates.js";
|
|
16
|
+
import { ProjectAccessDialog as oe } from "../../../components/ProjectAccess.js";
|
|
17
|
+
import { Updates as M } from "../../../components/Updates.js";
|
|
18
|
+
import { useConfirm as se } from "../../../lib/confirm.js";
|
|
19
|
+
import { useIssuePicker as ce } from "../../../lib/issuePicker.js";
|
|
20
|
+
import { copyItem as le, useLinkItems as ue } from "../../../lib/menus.js";
|
|
21
|
+
import { usePageTitle as de } from "../../../lib/pageTitle.js";
|
|
22
|
+
import { usePeople as N } from "../../../lib/people.js";
|
|
23
|
+
import { projectStatuses as fe } from "../../../lib/projectStates.js";
|
|
24
|
+
import { projectRef as P, projectsUnder as F } from "../../../lib/projects.js";
|
|
25
|
+
import { useCan as pe } from "../../../lib/roles.js";
|
|
26
|
+
import { Link as I, useNavigate as me } from "../../../lib/router.js";
|
|
27
|
+
import { useTime as L } from "../../../lib/time.js";
|
|
28
|
+
import { Route as R } from "./_projectId2.js";
|
|
29
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
30
|
import { useEffect as Ce, useState as K } from "react";
|
|
31
31
|
import { useErrorMessage as we } from "@parallelworks/problem/react";
|
|
@@ -40,80 +40,80 @@ var De = [
|
|
|
40
40
|
"cycles"
|
|
41
41
|
];
|
|
42
42
|
function Oe() {
|
|
43
|
-
let { workspace:
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
mutationFn: async (
|
|
43
|
+
let { workspace: i, projectId: s } = R.useParams(), u = q("planning"), f = q("common"), p = we(), { data: m } = Te(l(i, s)), h = P(m);
|
|
44
|
+
de(m.name);
|
|
45
|
+
let x = pe(i, "manage_projects", { project: m.id }), S = pe(i, "delete_projects", { project: m.id }), C = $(), w = me(), T = ue(), { confirm: E, dialog: re } = se(), [ie, D] = K(!1), { data: ae } = Te(o), O = !!R.useSearch().own, { data: A } = Q(a(i, e(m.id, O))), { data: j = [] } = Q(d(i)), M = j.filter((e) => e.parentId === m.id), ce = O || M.length === 0 ? m.progress : m.treeProgress, [N, fe] = K("assignees"), F = Z({
|
|
46
|
+
mutationFn: async (e) => r(await n.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}", {
|
|
47
47
|
params: { path: {
|
|
48
|
-
workspace:
|
|
49
|
-
projectId:
|
|
48
|
+
workspace: i,
|
|
49
|
+
projectId: s
|
|
50
50
|
} },
|
|
51
|
-
body:
|
|
51
|
+
body: e
|
|
52
52
|
})),
|
|
53
|
-
onSuccess: (e) =>
|
|
53
|
+
onSuccess: (e) => C.setQueryData(l(i, s).queryKey, c(e)),
|
|
54
54
|
onSettled: () => {
|
|
55
|
-
|
|
55
|
+
C.invalidateQueries({ queryKey: d(i).queryKey });
|
|
56
56
|
}
|
|
57
|
-
}),
|
|
58
|
-
mutationFn: async () =>
|
|
59
|
-
workspace:
|
|
60
|
-
projectId:
|
|
57
|
+
}), L = Z({
|
|
58
|
+
mutationFn: async () => r(await n.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}", { params: { path: {
|
|
59
|
+
workspace: i,
|
|
60
|
+
projectId: s
|
|
61
61
|
} } })),
|
|
62
62
|
onSuccess: () => {
|
|
63
|
-
|
|
63
|
+
C.invalidateQueries({ queryKey: ["workspace", i] }), w({
|
|
64
64
|
to: "/$workspace/projects",
|
|
65
|
-
params: { workspace:
|
|
65
|
+
params: { workspace: i }
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
}), z = () => [
|
|
69
69
|
{
|
|
70
|
-
label:
|
|
71
|
-
onClick: () =>
|
|
70
|
+
label: u("viewIssues"),
|
|
71
|
+
onClick: () => w({
|
|
72
72
|
to: "/$workspace/projects/$projectId",
|
|
73
73
|
params: {
|
|
74
|
-
workspace:
|
|
75
|
-
projectId:
|
|
74
|
+
workspace: i,
|
|
75
|
+
projectId: s
|
|
76
76
|
},
|
|
77
77
|
search: { tab: "issues" }
|
|
78
78
|
})
|
|
79
79
|
},
|
|
80
|
-
...
|
|
81
|
-
label:
|
|
82
|
-
onClick: () =>
|
|
80
|
+
...x ? [{
|
|
81
|
+
label: m.template ? u("stopTemplate") : u("useAsTemplate"),
|
|
82
|
+
onClick: () => F.mutate({ template: !m.template })
|
|
83
83
|
}] : [],
|
|
84
|
-
...
|
|
85
|
-
label:
|
|
86
|
-
onClick: () =>
|
|
84
|
+
...ae?.mode === "platform" ? [] : [{
|
|
85
|
+
label: u("manageAccess"),
|
|
86
|
+
onClick: () => D(!0)
|
|
87
87
|
}],
|
|
88
88
|
G,
|
|
89
|
-
...
|
|
90
|
-
|
|
91
|
-
...
|
|
92
|
-
label:
|
|
89
|
+
...T(`/${i}/projects/${h}`),
|
|
90
|
+
le(f("copyName"), m.name),
|
|
91
|
+
...S ? [G, {
|
|
92
|
+
label: u("deleteProject"),
|
|
93
93
|
destructive: !0,
|
|
94
|
-
onClick: () =>
|
|
95
|
-
title:
|
|
96
|
-
description:
|
|
97
|
-
confirmLabel:
|
|
98
|
-
onConfirm: () =>
|
|
94
|
+
onClick: () => E({
|
|
95
|
+
title: u("deleteProjectTitle", { name: m.name }),
|
|
96
|
+
description: u("deleteProjectDescription"),
|
|
97
|
+
confirmLabel: u("deleteProject"),
|
|
98
|
+
onConfirm: () => L.mutateAsync()
|
|
99
99
|
})
|
|
100
100
|
}] : []
|
|
101
|
-
], B =
|
|
101
|
+
], B = R.useSearch().tab ?? "overview", V = A?.issues ?? [];
|
|
102
102
|
return Ce(() => {
|
|
103
|
-
|
|
103
|
+
s !== h && w({
|
|
104
104
|
to: "/$workspace/projects/$projectId",
|
|
105
105
|
params: {
|
|
106
|
-
workspace:
|
|
107
|
-
projectId:
|
|
106
|
+
workspace: i,
|
|
107
|
+
projectId: h
|
|
108
108
|
},
|
|
109
109
|
search: (e) => e,
|
|
110
110
|
replace: !0
|
|
111
111
|
});
|
|
112
112
|
}, [
|
|
113
|
-
|
|
113
|
+
w,
|
|
114
|
+
i,
|
|
114
115
|
s,
|
|
115
|
-
|
|
116
|
-
v
|
|
116
|
+
h
|
|
117
117
|
]), /* @__PURE__ */ X("div", {
|
|
118
118
|
className: "flex h-full min-h-0 flex-col",
|
|
119
119
|
children: [
|
|
@@ -121,57 +121,57 @@ function Oe() {
|
|
|
121
121
|
heading: !1,
|
|
122
122
|
breadcrumbs: [
|
|
123
123
|
{
|
|
124
|
-
label:
|
|
125
|
-
href: `/${
|
|
124
|
+
label: u("projects"),
|
|
125
|
+
href: `/${i}/projects`
|
|
126
126
|
},
|
|
127
|
-
...Be(
|
|
127
|
+
...Be(j, m).map((e) => ({
|
|
128
128
|
label: e.name,
|
|
129
|
-
href: `/${
|
|
129
|
+
href: `/${i}/projects/${P(e)}`
|
|
130
130
|
})),
|
|
131
131
|
{
|
|
132
|
-
label:
|
|
133
|
-
icon:
|
|
134
|
-
icon:
|
|
135
|
-
color:
|
|
136
|
-
name:
|
|
137
|
-
}) : /* @__PURE__ */ Y(
|
|
132
|
+
label: m.name,
|
|
133
|
+
icon: m.icon || m.color ? /* @__PURE__ */ Y(te, {
|
|
134
|
+
icon: m.icon ?? "",
|
|
135
|
+
color: m.color ?? "",
|
|
136
|
+
name: m.name
|
|
137
|
+
}) : /* @__PURE__ */ Y(ne, { className: "size-4 text-muted-foreground" })
|
|
138
138
|
}
|
|
139
139
|
],
|
|
140
140
|
titleActions: /* @__PURE__ */ X(J, { children: [
|
|
141
|
-
/* @__PURE__ */ Y(
|
|
142
|
-
workspace:
|
|
141
|
+
/* @__PURE__ */ Y(_, {
|
|
142
|
+
workspace: i,
|
|
143
143
|
kind: "project",
|
|
144
|
-
target:
|
|
144
|
+
target: m.id
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */ Y(
|
|
147
|
-
workspace:
|
|
148
|
-
project:
|
|
146
|
+
/* @__PURE__ */ Y(v, {
|
|
147
|
+
workspace: i,
|
|
148
|
+
project: m.id
|
|
149
149
|
}),
|
|
150
150
|
/* @__PURE__ */ Y(Ee, {
|
|
151
151
|
items: z,
|
|
152
|
-
label:
|
|
152
|
+
label: f("moreActionsFor", { name: m.name }),
|
|
153
153
|
visible: !0
|
|
154
154
|
})
|
|
155
155
|
] }),
|
|
156
|
-
actions:
|
|
156
|
+
actions: F.isPending && /* @__PURE__ */ Y("span", {
|
|
157
157
|
className: "text-xs text-muted-foreground",
|
|
158
|
-
children:
|
|
158
|
+
children: f("saving")
|
|
159
159
|
})
|
|
160
160
|
}),
|
|
161
161
|
/* @__PURE__ */ Y("nav", {
|
|
162
|
-
"aria-label":
|
|
162
|
+
"aria-label": u("projectSections"),
|
|
163
163
|
className: "flex shrink-0 gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
164
|
-
children:
|
|
164
|
+
children: t.map((e) => /* @__PURE__ */ X(I, {
|
|
165
165
|
to: "/$workspace/projects/$projectId",
|
|
166
166
|
params: {
|
|
167
|
-
workspace:
|
|
168
|
-
projectId:
|
|
167
|
+
workspace: i,
|
|
168
|
+
projectId: s
|
|
169
169
|
},
|
|
170
170
|
search: e === "overview" ? {} : { tab: e },
|
|
171
171
|
"aria-current": B === e ? "page" : void 0,
|
|
172
172
|
activeOptions: { exact: !0 },
|
|
173
173
|
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",
|
|
174
|
-
children: [
|
|
174
|
+
children: [u(`projectTabs.${e}`), e === "issues" && V.length > 0 && /* @__PURE__ */ Y("span", {
|
|
175
175
|
className: "ml-1 tabular-nums",
|
|
176
176
|
children: V.length
|
|
177
177
|
})]
|
|
@@ -185,67 +185,67 @@ function Oe() {
|
|
|
185
185
|
B === "overview" && /* @__PURE__ */ X(J, { children: [
|
|
186
186
|
/* @__PURE__ */ X("div", {
|
|
187
187
|
className: "flex items-center gap-3",
|
|
188
|
-
children: [/* @__PURE__ */ Y(
|
|
189
|
-
workspace:
|
|
190
|
-
icon:
|
|
191
|
-
name:
|
|
192
|
-
onChange: (e) =>
|
|
188
|
+
children: [/* @__PURE__ */ Y(y, {
|
|
189
|
+
workspace: i,
|
|
190
|
+
icon: m.icon ?? "",
|
|
191
|
+
name: m.name,
|
|
192
|
+
onChange: (e) => F.mutateAsync({
|
|
193
193
|
icon: e,
|
|
194
194
|
color: ""
|
|
195
195
|
}),
|
|
196
|
-
disabled: !
|
|
196
|
+
disabled: !x,
|
|
197
197
|
size: 40
|
|
198
198
|
}), /* @__PURE__ */ Y(ke, {
|
|
199
|
-
project:
|
|
200
|
-
canWrite:
|
|
201
|
-
onSave: (e) =>
|
|
199
|
+
project: m,
|
|
200
|
+
canWrite: x,
|
|
201
|
+
onSave: (e) => F.mutate({ name: e })
|
|
202
202
|
})]
|
|
203
203
|
}),
|
|
204
204
|
/* @__PURE__ */ Y(Ae, {
|
|
205
|
-
project:
|
|
206
|
-
canWrite:
|
|
207
|
-
onSave: (e) =>
|
|
205
|
+
project: m,
|
|
206
|
+
canWrite: x,
|
|
207
|
+
onSave: (e) => F.mutate({ summary: e })
|
|
208
208
|
}),
|
|
209
209
|
/* @__PURE__ */ Y(je, {
|
|
210
|
-
workspace:
|
|
211
|
-
project:
|
|
212
|
-
canWrite:
|
|
213
|
-
update: (e) =>
|
|
210
|
+
workspace: i,
|
|
211
|
+
project: m,
|
|
212
|
+
canWrite: x,
|
|
213
|
+
update: (e) => F.mutate(e)
|
|
214
214
|
}),
|
|
215
215
|
/* @__PURE__ */ Y(Ne, {
|
|
216
|
-
workspace:
|
|
217
|
-
project:
|
|
216
|
+
workspace: i,
|
|
217
|
+
project: m
|
|
218
218
|
}),
|
|
219
219
|
/* @__PURE__ */ Y("div", {
|
|
220
220
|
className: "mt-4",
|
|
221
|
-
children: /* @__PURE__ */ Y(
|
|
222
|
-
workspace:
|
|
223
|
-
project:
|
|
224
|
-
editable:
|
|
221
|
+
children: /* @__PURE__ */ Y(g, {
|
|
222
|
+
workspace: i,
|
|
223
|
+
project: m,
|
|
224
|
+
editable: x,
|
|
225
225
|
onChange: (e) => {
|
|
226
|
-
|
|
226
|
+
C.setQueryData(l(i, s).queryKey, c(e)), C.invalidateQueries({ queryKey: d(i).queryKey });
|
|
227
227
|
}
|
|
228
228
|
})
|
|
229
229
|
}),
|
|
230
|
-
|
|
230
|
+
F.isError && /* @__PURE__ */ Y(U, {
|
|
231
231
|
size: "md",
|
|
232
232
|
className: "mt-2",
|
|
233
|
-
children:
|
|
233
|
+
children: p(F.error)
|
|
234
234
|
}),
|
|
235
235
|
/* @__PURE__ */ X("section", {
|
|
236
236
|
className: "mt-6",
|
|
237
|
-
"aria-label":
|
|
238
|
-
children: [/* @__PURE__ */ Y(k, { progress:
|
|
237
|
+
"aria-label": u("progressTitle"),
|
|
238
|
+
children: [/* @__PURE__ */ Y(k, { progress: ce }), M.length > 0 && /* @__PURE__ */ X("div", {
|
|
239
239
|
className: "mt-2 flex items-center gap-2 text-xs text-muted-foreground",
|
|
240
240
|
children: [/* @__PURE__ */ Y(xe, {
|
|
241
|
-
"aria-label":
|
|
241
|
+
"aria-label": u("onlyOwnIssues"),
|
|
242
242
|
size: "sm",
|
|
243
|
-
checked:
|
|
244
|
-
onCheckedChange: (e) =>
|
|
243
|
+
checked: O,
|
|
244
|
+
onCheckedChange: (e) => w({
|
|
245
245
|
to: "/$workspace/projects/$projectId",
|
|
246
246
|
params: {
|
|
247
|
-
workspace:
|
|
248
|
-
projectId:
|
|
247
|
+
workspace: i,
|
|
248
|
+
projectId: s
|
|
249
249
|
},
|
|
250
250
|
search: ({ own: t, ...n }) => e ? {
|
|
251
251
|
...n,
|
|
@@ -255,82 +255,82 @@ function Oe() {
|
|
|
255
255
|
})
|
|
256
256
|
}), /* @__PURE__ */ Y("span", {
|
|
257
257
|
"aria-hidden": "true",
|
|
258
|
-
children:
|
|
258
|
+
children: u("onlyOwnIssues")
|
|
259
259
|
})]
|
|
260
260
|
})]
|
|
261
261
|
}),
|
|
262
262
|
/* @__PURE__ */ Y(Fe, {
|
|
263
|
-
workspace:
|
|
264
|
-
projects:
|
|
263
|
+
workspace: i,
|
|
264
|
+
projects: M
|
|
265
265
|
}),
|
|
266
266
|
V.length > 0 && /* @__PURE__ */ Y("section", {
|
|
267
267
|
className: "mt-8 xl:hidden",
|
|
268
|
-
"aria-label":
|
|
269
|
-
children: /* @__PURE__ */ Y(
|
|
270
|
-
workspace:
|
|
268
|
+
"aria-label": u("issueBreakdown.label"),
|
|
269
|
+
children: /* @__PURE__ */ Y(b, {
|
|
270
|
+
workspace: i,
|
|
271
271
|
issues: V,
|
|
272
272
|
tabs: De,
|
|
273
|
-
tab:
|
|
274
|
-
onTabChange:
|
|
273
|
+
tab: N,
|
|
274
|
+
onTabChange: fe
|
|
275
275
|
})
|
|
276
276
|
}),
|
|
277
277
|
/* @__PURE__ */ X("section", {
|
|
278
278
|
className: "mt-8",
|
|
279
279
|
children: [/* @__PURE__ */ Y("h2", {
|
|
280
280
|
className: "text-base font-semibold",
|
|
281
|
-
children:
|
|
281
|
+
children: f("description")
|
|
282
282
|
}), /* @__PURE__ */ Y(he, {
|
|
283
283
|
size: "fill",
|
|
284
284
|
padding: "sm",
|
|
285
285
|
className: "mt-2 min-h-16",
|
|
286
|
-
children: /* @__PURE__ */ Y(
|
|
287
|
-
value:
|
|
288
|
-
editable:
|
|
289
|
-
placeholder:
|
|
290
|
-
label:
|
|
291
|
-
onBlur: (e) => e !==
|
|
286
|
+
children: /* @__PURE__ */ Y(ee, {
|
|
287
|
+
value: m.description,
|
|
288
|
+
editable: x,
|
|
289
|
+
placeholder: u("addDescription"),
|
|
290
|
+
label: f("description"),
|
|
291
|
+
onBlur: (e) => e !== m.description && F.mutate({ description: e }),
|
|
292
292
|
className: "min-h-12"
|
|
293
|
-
},
|
|
293
|
+
}, m.updatedAt)
|
|
294
294
|
})]
|
|
295
295
|
}),
|
|
296
296
|
/* @__PURE__ */ Y(Ie, {
|
|
297
|
-
workspace:
|
|
298
|
-
project:
|
|
299
|
-
canWrite:
|
|
297
|
+
workspace: i,
|
|
298
|
+
project: m,
|
|
299
|
+
canWrite: x
|
|
300
300
|
}),
|
|
301
301
|
/* @__PURE__ */ Y(ze, {
|
|
302
|
-
workspace:
|
|
303
|
-
projectId:
|
|
302
|
+
workspace: i,
|
|
303
|
+
projectId: m.id
|
|
304
304
|
})
|
|
305
305
|
] }),
|
|
306
306
|
B === "updates" && /* @__PURE__ */ Y(Re, {
|
|
307
|
-
workspace:
|
|
308
|
-
project:
|
|
309
|
-
canWrite:
|
|
307
|
+
workspace: i,
|
|
308
|
+
project: m,
|
|
309
|
+
canWrite: x
|
|
310
310
|
}),
|
|
311
311
|
B === "issues" && /* @__PURE__ */ Y(Le, {
|
|
312
|
-
workspace:
|
|
313
|
-
project:
|
|
314
|
-
canWrite:
|
|
312
|
+
workspace: i,
|
|
313
|
+
project: m,
|
|
314
|
+
canWrite: x
|
|
315
315
|
})
|
|
316
316
|
]
|
|
317
317
|
}), B !== "updates" && V.length > 0 && /* @__PURE__ */ Y("aside", {
|
|
318
|
-
"aria-label":
|
|
318
|
+
"aria-label": u("issueBreakdown.label"),
|
|
319
319
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
320
|
-
children: /* @__PURE__ */ Y(
|
|
321
|
-
workspace:
|
|
320
|
+
children: /* @__PURE__ */ Y(b, {
|
|
321
|
+
workspace: i,
|
|
322
322
|
issues: V,
|
|
323
323
|
tabs: De,
|
|
324
|
-
tab:
|
|
325
|
-
onTabChange:
|
|
324
|
+
tab: N,
|
|
325
|
+
onTabChange: fe
|
|
326
326
|
})
|
|
327
327
|
})]
|
|
328
328
|
}),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
workspace:
|
|
332
|
-
project:
|
|
333
|
-
onClose: () =>
|
|
329
|
+
re,
|
|
330
|
+
ie && /* @__PURE__ */ Y(oe, {
|
|
331
|
+
workspace: i,
|
|
332
|
+
project: m,
|
|
333
|
+
onClose: () => D(!1)
|
|
334
334
|
})
|
|
335
335
|
]
|
|
336
336
|
});
|
|
@@ -369,9 +369,9 @@ function Ae({ project: e, canWrite: t, onSave: n }) {
|
|
|
369
369
|
}) : null;
|
|
370
370
|
}
|
|
371
371
|
function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
372
|
-
let i = q("planning"), a =
|
|
372
|
+
let i = q("planning"), a = L(), { members: o, person: s } = N(e), { data: c = [] } = Q(f(e)), l = ae(), [u, d] = K(null), p = t.lead ? s(t.lead) : void 0, m = (e, t, i) => {
|
|
373
373
|
let o = /* @__PURE__ */ X(J, { children: [
|
|
374
|
-
/* @__PURE__ */ Y(
|
|
374
|
+
/* @__PURE__ */ Y(w, { className: "size-3.5 text-muted-foreground" }),
|
|
375
375
|
/* @__PURE__ */ Y("span", {
|
|
376
376
|
className: "text-muted-foreground",
|
|
377
377
|
children: e
|
|
@@ -400,7 +400,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
400
400
|
value: t.status,
|
|
401
401
|
disabled: !n,
|
|
402
402
|
onValueChange: (e) => e && r({ status: e }),
|
|
403
|
-
items:
|
|
403
|
+
items: fe.map((e) => ({
|
|
404
404
|
value: e,
|
|
405
405
|
label: i(`status.${e}`),
|
|
406
406
|
icon: /* @__PURE__ */ Y(A, { status: e })
|
|
@@ -451,12 +451,12 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
451
451
|
items: l.map((e, t) => ({
|
|
452
452
|
value: String(t),
|
|
453
453
|
label: e,
|
|
454
|
-
icon: /* @__PURE__ */ Y(
|
|
454
|
+
icon: /* @__PURE__ */ Y(E, { priority: t })
|
|
455
455
|
})),
|
|
456
456
|
trigger: /* @__PURE__ */ X("button", {
|
|
457
457
|
type: "button",
|
|
458
458
|
className: W({ size: "sm" }),
|
|
459
|
-
children: [/* @__PURE__ */ Y(
|
|
459
|
+
children: [/* @__PURE__ */ Y(E, { priority: t.priority }), t.priority ? l[t.priority] : i("noPriority")]
|
|
460
460
|
})
|
|
461
461
|
}),
|
|
462
462
|
m(i("startDate"), t.startDate, "startDate"),
|
|
@@ -496,7 +496,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
496
496
|
decorative: !0
|
|
497
497
|
}, e);
|
|
498
498
|
})
|
|
499
|
-
}) : /* @__PURE__ */ Y(
|
|
499
|
+
}) : /* @__PURE__ */ Y(D, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
500
500
|
className: t.members.length ? "" : "text-muted-foreground",
|
|
501
501
|
children: t.members.length ? i("memberCount", { count: t.members.length }) : i("members")
|
|
502
502
|
})]
|
|
@@ -512,7 +512,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
512
512
|
value: e.id,
|
|
513
513
|
label: e.name,
|
|
514
514
|
hint: e.key,
|
|
515
|
-
icon: /* @__PURE__ */ Y(
|
|
515
|
+
icon: /* @__PURE__ */ Y(te, {
|
|
516
516
|
icon: e.icon,
|
|
517
517
|
color: e.color,
|
|
518
518
|
name: e.name
|
|
@@ -525,7 +525,7 @@ function je({ workspace: e, project: t, canWrite: n, update: r }) {
|
|
|
525
525
|
type: "button",
|
|
526
526
|
disabled: !n,
|
|
527
527
|
className: W({ size: "sm" }),
|
|
528
|
-
children: [/* @__PURE__ */ Y(
|
|
528
|
+
children: [/* @__PURE__ */ Y(D, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
529
529
|
className: t.teamIds.length ? "" : "text-muted-foreground",
|
|
530
530
|
children: t.teamIds.length ? c.filter((e) => t.teamIds.includes(e.id)).map((e) => e.key).join(", ") : i("teams")
|
|
531
531
|
})]
|
|
@@ -565,7 +565,7 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
565
565
|
type: "button",
|
|
566
566
|
disabled: !n,
|
|
567
567
|
className: W({ size: "sm" }),
|
|
568
|
-
children: [/* @__PURE__ */ Y(
|
|
568
|
+
children: [/* @__PURE__ */ Y(T, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
569
569
|
className: t.blockedBy.length ? "" : "text-muted-foreground",
|
|
570
570
|
children: t.blockedBy.length ? i("waitsOnCount", { count: t.blockedBy.length }) : i("waitsOn")
|
|
571
571
|
})]
|
|
@@ -573,44 +573,44 @@ function Me({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
575
|
function Ne({ workspace: e, project: t }) {
|
|
576
|
-
let n = q("planning"),
|
|
577
|
-
if (
|
|
578
|
-
let
|
|
576
|
+
let n = q("planning"), r = L(), { data: i = [] } = Q(d(e)), a = (e) => i.filter((t) => e.includes(t.id)), o = a(t.blockedBy), s = a(t.blocks);
|
|
577
|
+
if (o.length === 0 && s.length === 0) return null;
|
|
578
|
+
let c = t.targetDate ? o.filter((e) => e.targetDate && e.targetDate > (t.targetDate ?? "")) : [], l = (t) => /* @__PURE__ */ Y(I, {
|
|
579
579
|
to: "/$workspace/projects/$projectId",
|
|
580
580
|
params: {
|
|
581
581
|
workspace: e,
|
|
582
|
-
projectId:
|
|
582
|
+
projectId: P(t)
|
|
583
583
|
},
|
|
584
584
|
className: "font-medium hover:underline",
|
|
585
585
|
children: t.name
|
|
586
|
-
}, t.id),
|
|
586
|
+
}, t.id), u = (e) => e.flatMap((e, t) => t === 0 ? [l(e)] : [/* @__PURE__ */ Y("span", { children: ", " }, `${e.id},`), l(e)]);
|
|
587
587
|
return /* @__PURE__ */ X("div", {
|
|
588
588
|
className: "mt-3 space-y-1 text-xs text-muted-foreground",
|
|
589
589
|
children: [
|
|
590
|
-
|
|
590
|
+
o.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
591
591
|
n("waitsOnLabel"),
|
|
592
592
|
" ",
|
|
593
|
-
|
|
593
|
+
u(o)
|
|
594
594
|
] }),
|
|
595
|
-
|
|
595
|
+
s.length > 0 && /* @__PURE__ */ X("p", { children: [
|
|
596
596
|
n("blocksLabel"),
|
|
597
597
|
" ",
|
|
598
|
-
|
|
598
|
+
u(s)
|
|
599
599
|
] }),
|
|
600
|
-
|
|
600
|
+
c.map((e) => /* @__PURE__ */ Y("p", {
|
|
601
601
|
role: "status",
|
|
602
602
|
className: "text-warning",
|
|
603
603
|
children: n("dueBeforeBlocker", {
|
|
604
|
-
date:
|
|
604
|
+
date: r.day(t.targetDate ?? ""),
|
|
605
605
|
name: e.name,
|
|
606
|
-
blockerDate:
|
|
606
|
+
blockerDate: r.day(e.targetDate ?? "")
|
|
607
607
|
})
|
|
608
608
|
}, e.id))
|
|
609
609
|
]
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
612
|
function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
613
|
-
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(
|
|
613
|
+
let i = q("planning"), { data: a = [] } = Q(d(e)), o = new Set(F(a, t.id).map((e) => e.id)), s = a.find((e) => e.id === t.parentId);
|
|
614
614
|
return /* @__PURE__ */ Y(H, {
|
|
615
615
|
disabled: !n,
|
|
616
616
|
items: [{
|
|
@@ -628,7 +628,7 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
628
628
|
type: "button",
|
|
629
629
|
disabled: !n,
|
|
630
630
|
className: W({ size: "sm" }),
|
|
631
|
-
children: [/* @__PURE__ */ Y(
|
|
631
|
+
children: [/* @__PURE__ */ Y(ne, { className: "size-3.5 text-muted-foreground" }), /* @__PURE__ */ Y("span", {
|
|
632
632
|
className: s ? "" : "text-muted-foreground",
|
|
633
633
|
children: s ? i("underProject", { name: s.name }) : i("parentProject")
|
|
634
634
|
})]
|
|
@@ -636,7 +636,7 @@ function Pe({ workspace: e, project: t, canWrite: n, onChange: r }) {
|
|
|
636
636
|
});
|
|
637
637
|
}
|
|
638
638
|
function Fe({ workspace: e, projects: t }) {
|
|
639
|
-
let n = q("planning"),
|
|
639
|
+
let n = q("planning"), r = L(), { person: i } = N(e);
|
|
640
640
|
return t.length === 0 ? null : /* @__PURE__ */ X("section", {
|
|
641
641
|
className: "mt-8",
|
|
642
642
|
children: [/* @__PURE__ */ Y("h2", {
|
|
@@ -645,12 +645,12 @@ function Fe({ workspace: e, projects: t }) {
|
|
|
645
645
|
}), /* @__PURE__ */ Y("ul", {
|
|
646
646
|
className: "mt-2 divide-y divide-border rounded-lg border border-border",
|
|
647
647
|
children: t.map((t) => {
|
|
648
|
-
let
|
|
649
|
-
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(
|
|
648
|
+
let a = j(t), o = t.lead ? i(t.lead) : void 0;
|
|
649
|
+
return /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X(I, {
|
|
650
650
|
to: "/$workspace/projects/$projectId",
|
|
651
651
|
params: {
|
|
652
652
|
workspace: e,
|
|
653
|
-
projectId:
|
|
653
|
+
projectId: P(t)
|
|
654
654
|
},
|
|
655
655
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2.5 text-sm hover:bg-muted/60",
|
|
656
656
|
children: [
|
|
@@ -661,16 +661,16 @@ function Fe({ workspace: e, projects: t }) {
|
|
|
661
661
|
}),
|
|
662
662
|
/* @__PURE__ */ X("span", {
|
|
663
663
|
className: "flex items-center gap-1.5 text-xs text-muted-foreground",
|
|
664
|
-
children: [/* @__PURE__ */ Y(O, { state:
|
|
664
|
+
children: [/* @__PURE__ */ Y(O, { state: a }), n(`health.${a}`)]
|
|
665
665
|
}),
|
|
666
|
-
|
|
667
|
-
name:
|
|
668
|
-
src:
|
|
666
|
+
o && /* @__PURE__ */ Y(z, {
|
|
667
|
+
name: o.name,
|
|
668
|
+
src: o.avatarUrl,
|
|
669
669
|
size: "xs"
|
|
670
670
|
}),
|
|
671
671
|
/* @__PURE__ */ Y("span", {
|
|
672
672
|
className: "w-20 text-xs text-muted-foreground tabular-nums",
|
|
673
|
-
children: t.targetDate ?
|
|
673
|
+
children: t.targetDate ? r.day(t.targetDate) : ""
|
|
674
674
|
}),
|
|
675
675
|
/* @__PURE__ */ Y("span", {
|
|
676
676
|
className: "w-28",
|
|
@@ -685,60 +685,60 @@ function Fe({ workspace: e, projects: t }) {
|
|
|
685
685
|
})]
|
|
686
686
|
});
|
|
687
687
|
}
|
|
688
|
-
function Ie({ workspace:
|
|
689
|
-
let o = q("planning"), s = q("common"), c = we(), l =
|
|
690
|
-
workspace:
|
|
691
|
-
projectId:
|
|
692
|
-
},
|
|
688
|
+
function Ie({ workspace: e, project: t, canWrite: a }) {
|
|
689
|
+
let o = q("planning"), s = q("common"), c = we(), l = L(), u = $(), d = Se(), [f, p] = K(!1), [m, h] = K(""), [g, ee] = K(""), [te, _] = K(null), v = {
|
|
690
|
+
workspace: e,
|
|
691
|
+
projectId: t.id
|
|
692
|
+
}, y = () => {
|
|
693
693
|
u.invalidateQueries({ queryKey: [
|
|
694
694
|
"workspace",
|
|
695
|
-
|
|
695
|
+
e,
|
|
696
696
|
"projects"
|
|
697
|
-
] }),
|
|
698
|
-
},
|
|
699
|
-
mutationFn: async () =>
|
|
700
|
-
params: { path:
|
|
697
|
+
] }), i(u, e);
|
|
698
|
+
}, b = Z({
|
|
699
|
+
mutationFn: async () => r(await n.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones", {
|
|
700
|
+
params: { path: v },
|
|
701
701
|
body: {
|
|
702
|
-
name:
|
|
703
|
-
...
|
|
702
|
+
name: m,
|
|
703
|
+
...g && { targetDate: g }
|
|
704
704
|
}
|
|
705
705
|
})),
|
|
706
706
|
onSuccess: () => {
|
|
707
|
-
|
|
707
|
+
h(""), ee(""), p(!1);
|
|
708
708
|
},
|
|
709
|
-
onSettled:
|
|
710
|
-
}),
|
|
711
|
-
mutationFn: async ({ id:
|
|
709
|
+
onSettled: y
|
|
710
|
+
}), x = Z({
|
|
711
|
+
mutationFn: async ({ id: e, ...t }) => r(await n.PATCH("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", {
|
|
712
712
|
params: { path: {
|
|
713
|
-
...
|
|
714
|
-
milestoneId:
|
|
713
|
+
...v,
|
|
714
|
+
milestoneId: e
|
|
715
715
|
} },
|
|
716
|
-
body:
|
|
716
|
+
body: t
|
|
717
717
|
})),
|
|
718
|
-
onSettled:
|
|
719
|
-
}),
|
|
720
|
-
mutationFn: async (
|
|
721
|
-
...
|
|
722
|
-
milestoneId:
|
|
718
|
+
onSettled: y
|
|
719
|
+
}), C = Z({
|
|
720
|
+
mutationFn: async (e) => r(await n.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/milestones/{milestoneId}", { params: { path: {
|
|
721
|
+
...v,
|
|
722
|
+
milestoneId: e
|
|
723
723
|
} } })),
|
|
724
|
-
onSettled:
|
|
725
|
-
}),
|
|
724
|
+
onSettled: y
|
|
725
|
+
}), w = t.milestones, T = (e, t) => a ? [
|
|
726
726
|
{
|
|
727
727
|
label: o("rename"),
|
|
728
|
-
onClick: () =>
|
|
728
|
+
onClick: () => _(e.id)
|
|
729
729
|
},
|
|
730
730
|
{
|
|
731
731
|
label: o("moveUp"),
|
|
732
732
|
disabled: t === 0,
|
|
733
|
-
onClick: () =>
|
|
733
|
+
onClick: () => x.mutate({
|
|
734
734
|
id: e.id,
|
|
735
735
|
position: t - 1
|
|
736
736
|
})
|
|
737
737
|
},
|
|
738
738
|
{
|
|
739
739
|
label: o("moveDown"),
|
|
740
|
-
disabled: t ===
|
|
741
|
-
onClick: () =>
|
|
740
|
+
disabled: t === w.length - 1,
|
|
741
|
+
onClick: () => x.mutate({
|
|
742
742
|
id: e.id,
|
|
743
743
|
position: t + 1
|
|
744
744
|
})
|
|
@@ -747,9 +747,9 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
747
747
|
{
|
|
748
748
|
label: s("delete"),
|
|
749
749
|
destructive: !0,
|
|
750
|
-
onClick: () =>
|
|
750
|
+
onClick: () => C.mutate(e.id)
|
|
751
751
|
}
|
|
752
|
-
] : [
|
|
752
|
+
] : [le(s("copyName"), e.name)], E = b.error ?? x.error ?? C.error;
|
|
753
753
|
return /* @__PURE__ */ X("section", {
|
|
754
754
|
className: "mt-10",
|
|
755
755
|
children: [
|
|
@@ -761,9 +761,9 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
761
761
|
}), a && !f && /* @__PURE__ */ X(V, {
|
|
762
762
|
type: "button",
|
|
763
763
|
size: "sm",
|
|
764
|
-
onClick: () =>
|
|
764
|
+
onClick: () => p(!0),
|
|
765
765
|
className: "ml-auto",
|
|
766
|
-
children: [/* @__PURE__ */ Y(
|
|
766
|
+
children: [/* @__PURE__ */ Y(S, { className: "size-3.5" }), o("addMilestone")]
|
|
767
767
|
})]
|
|
768
768
|
}),
|
|
769
769
|
/* @__PURE__ */ X(he, {
|
|
@@ -774,153 +774,153 @@ function Ie({ workspace: n, project: i, canWrite: a }) {
|
|
|
774
774
|
render: /* @__PURE__ */ Y("ul", {}),
|
|
775
775
|
className: "mt-3",
|
|
776
776
|
children: [
|
|
777
|
-
|
|
778
|
-
onContextMenu: (
|
|
777
|
+
w.map((n, r) => /* @__PURE__ */ X("li", {
|
|
778
|
+
onContextMenu: (e) => d(e, T(n, r)),
|
|
779
779
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 py-2 pr-2 pl-3 md:flex-nowrap",
|
|
780
780
|
children: [
|
|
781
|
-
|
|
781
|
+
te === n.id ? /* @__PURE__ */ Y(ve, {
|
|
782
782
|
autoFocus: !0,
|
|
783
|
-
defaultValue:
|
|
783
|
+
defaultValue: n.name,
|
|
784
784
|
"aria-label": o("milestoneName"),
|
|
785
|
-
onBlur: (
|
|
786
|
-
let
|
|
787
|
-
|
|
788
|
-
id:
|
|
789
|
-
name:
|
|
790
|
-
}),
|
|
785
|
+
onBlur: (e) => {
|
|
786
|
+
let t = e.target.value.trim();
|
|
787
|
+
t && t !== n.name && x.mutate({
|
|
788
|
+
id: n.id,
|
|
789
|
+
name: t
|
|
790
|
+
}), _(null);
|
|
791
791
|
},
|
|
792
792
|
onKeyDown: (e) => {
|
|
793
|
-
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" &&
|
|
793
|
+
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && _(null);
|
|
794
794
|
},
|
|
795
795
|
size: "sm",
|
|
796
796
|
className: "min-w-0 flex-1"
|
|
797
|
-
}) : /* @__PURE__ */ Y(
|
|
797
|
+
}) : /* @__PURE__ */ Y(I, {
|
|
798
798
|
to: "/$workspace/projects/$projectId/milestones/$milestoneId",
|
|
799
799
|
params: {
|
|
800
|
-
workspace:
|
|
801
|
-
projectId:
|
|
802
|
-
milestoneId:
|
|
800
|
+
workspace: e,
|
|
801
|
+
projectId: P(t),
|
|
802
|
+
milestoneId: n.id
|
|
803
803
|
},
|
|
804
804
|
className: "min-w-0 flex-1 basis-full truncate rounded-sm text-sm font-medium hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary md:basis-auto",
|
|
805
|
-
children:
|
|
805
|
+
children: n.name
|
|
806
806
|
}),
|
|
807
807
|
/* @__PURE__ */ Y("span", {
|
|
808
808
|
className: "w-24 shrink-0 text-xs text-muted-foreground",
|
|
809
|
-
children:
|
|
809
|
+
children: n.targetDate && l.day(n.targetDate)
|
|
810
810
|
}),
|
|
811
811
|
/* @__PURE__ */ Y("span", {
|
|
812
812
|
className: "w-44 shrink-0",
|
|
813
813
|
children: /* @__PURE__ */ Y(k, {
|
|
814
|
-
progress:
|
|
814
|
+
progress: n.progress,
|
|
815
815
|
compact: !0
|
|
816
816
|
})
|
|
817
817
|
}),
|
|
818
818
|
/* @__PURE__ */ Y(Ee, {
|
|
819
|
-
items: () =>
|
|
820
|
-
label: s("moreActionsFor", { name:
|
|
819
|
+
items: () => T(n, r),
|
|
820
|
+
label: s("moreActionsFor", { name: n.name })
|
|
821
821
|
})
|
|
822
822
|
]
|
|
823
|
-
},
|
|
824
|
-
|
|
823
|
+
}, n.id)),
|
|
824
|
+
w.length === 0 && !f && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ Y(_e, {
|
|
825
825
|
variant: "bare",
|
|
826
826
|
title: o("noMilestones")
|
|
827
827
|
}) }),
|
|
828
828
|
f && /* @__PURE__ */ Y("li", { children: /* @__PURE__ */ X("form", {
|
|
829
829
|
className: "flex flex-wrap items-center gap-2 px-3 py-2",
|
|
830
830
|
onSubmit: (e) => {
|
|
831
|
-
e.preventDefault(),
|
|
831
|
+
e.preventDefault(), m.trim() && b.mutate();
|
|
832
832
|
},
|
|
833
833
|
children: [
|
|
834
834
|
/* @__PURE__ */ Y(ve, {
|
|
835
835
|
autoFocus: !0,
|
|
836
|
-
value:
|
|
837
|
-
onChange: (e) =>
|
|
836
|
+
value: m,
|
|
837
|
+
onChange: (e) => h(e.target.value),
|
|
838
838
|
placeholder: o("milestoneName"),
|
|
839
839
|
"aria-label": o("milestoneName"),
|
|
840
840
|
className: "min-w-0 flex-1"
|
|
841
841
|
}),
|
|
842
842
|
/* @__PURE__ */ Y(ge, {
|
|
843
|
-
value:
|
|
844
|
-
onValueChange:
|
|
843
|
+
value: g,
|
|
844
|
+
onValueChange: ee,
|
|
845
845
|
"aria-label": o("targetDate"),
|
|
846
846
|
className: "w-auto"
|
|
847
847
|
}),
|
|
848
848
|
/* @__PURE__ */ Y(V, {
|
|
849
849
|
type: "submit",
|
|
850
850
|
variant: "primary",
|
|
851
|
-
disabled: !
|
|
852
|
-
loading:
|
|
851
|
+
disabled: !m.trim(),
|
|
852
|
+
loading: b.isPending,
|
|
853
853
|
children: o("addMilestone")
|
|
854
854
|
}),
|
|
855
855
|
/* @__PURE__ */ Y(V, {
|
|
856
856
|
type: "button",
|
|
857
857
|
variant: "ghost",
|
|
858
|
-
onClick: () =>
|
|
858
|
+
onClick: () => p(!1),
|
|
859
859
|
children: s("cancel")
|
|
860
860
|
})
|
|
861
861
|
]
|
|
862
862
|
}) })
|
|
863
863
|
]
|
|
864
864
|
}),
|
|
865
|
-
|
|
865
|
+
E && /* @__PURE__ */ Y(U, {
|
|
866
866
|
size: "md",
|
|
867
867
|
className: "mt-2",
|
|
868
|
-
children: c(
|
|
868
|
+
children: c(E)
|
|
869
869
|
})
|
|
870
870
|
]
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
function Le({ workspace:
|
|
874
|
-
let
|
|
875
|
-
mutationFn: async (
|
|
873
|
+
function Le({ workspace: t, project: o, canWrite: s }) {
|
|
874
|
+
let c = q("planning"), l = we(), u = $(), d = !!R.useSearch().own, { data: f } = Te(a(t, e(o.id, d))), p = ce(t, (e) => e.project?.id !== o.id), m = f.issues, h = Z({
|
|
875
|
+
mutationFn: async (e) => r(await n.PATCH("/api/v1/workspaces/{workspace}/issues/{identifier}", {
|
|
876
876
|
params: { path: {
|
|
877
|
-
workspace:
|
|
878
|
-
identifier:
|
|
877
|
+
workspace: t,
|
|
878
|
+
identifier: e
|
|
879
879
|
} },
|
|
880
|
-
body: { projectId:
|
|
880
|
+
body: { projectId: o.id }
|
|
881
881
|
})),
|
|
882
|
-
onSettled: (e,
|
|
882
|
+
onSettled: (e, n, r) => i(u, t, r)
|
|
883
883
|
});
|
|
884
884
|
return /* @__PURE__ */ X("section", {
|
|
885
|
-
"aria-label":
|
|
885
|
+
"aria-label": c("issues"),
|
|
886
886
|
children: [
|
|
887
|
-
|
|
887
|
+
s && /* @__PURE__ */ Y("div", {
|
|
888
888
|
className: "flex min-h-11 items-center justify-end border-b border-border px-4 py-2 md:px-5",
|
|
889
889
|
children: /* @__PURE__ */ Y(H, {
|
|
890
|
-
"aria-label":
|
|
890
|
+
"aria-label": c("addIssues"),
|
|
891
891
|
align: "end",
|
|
892
|
-
...
|
|
892
|
+
...p,
|
|
893
893
|
value: null,
|
|
894
|
-
onValueChange: (e) => e !== null &&
|
|
895
|
-
placeholder:
|
|
894
|
+
onValueChange: (e) => e !== null && h.mutate(e),
|
|
895
|
+
placeholder: c("findIssue"),
|
|
896
896
|
trigger: /* @__PURE__ */ X(V, {
|
|
897
897
|
type: "button",
|
|
898
898
|
size: "sm",
|
|
899
|
-
children: [/* @__PURE__ */ Y(
|
|
899
|
+
children: [/* @__PURE__ */ Y(S, { className: "size-3.5" }), c("addIssues")]
|
|
900
900
|
})
|
|
901
901
|
})
|
|
902
902
|
}),
|
|
903
|
-
|
|
903
|
+
h.isError && /* @__PURE__ */ Y(U, {
|
|
904
904
|
size: "md",
|
|
905
905
|
className: "px-4 pt-2 md:px-5",
|
|
906
|
-
children:
|
|
906
|
+
children: l(h.error)
|
|
907
907
|
}),
|
|
908
|
-
|
|
909
|
-
title:
|
|
908
|
+
m.length === 0 ? /* @__PURE__ */ Y(_e, {
|
|
909
|
+
title: c("noIssuesInProject"),
|
|
910
910
|
className: "mt-6"
|
|
911
|
-
}) : /* @__PURE__ */ Y(
|
|
912
|
-
workspace:
|
|
913
|
-
issues:
|
|
911
|
+
}) : /* @__PURE__ */ Y(x, {
|
|
912
|
+
workspace: t,
|
|
913
|
+
issues: m
|
|
914
914
|
})
|
|
915
915
|
]
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
|
-
function Re({ workspace:
|
|
919
|
-
let a = q("planning"), o = $(), { data: s = [] } = Q(u(
|
|
920
|
-
mutationFn: async ({ health: i, body: a }) =>
|
|
918
|
+
function Re({ workspace: e, project: t, canWrite: i }) {
|
|
919
|
+
let a = q("planning"), o = $(), { data: s = [] } = Q(u(e, t.id)), c = Z({
|
|
920
|
+
mutationFn: async ({ health: i, body: a }) => r(await n.POST("/api/v1/workspaces/{workspace}/projects/{projectId}/updates", {
|
|
921
921
|
params: { path: {
|
|
922
|
-
workspace:
|
|
923
|
-
projectId:
|
|
922
|
+
workspace: e,
|
|
923
|
+
projectId: t.id
|
|
924
924
|
} },
|
|
925
925
|
body: {
|
|
926
926
|
health: i,
|
|
@@ -929,25 +929,25 @@ function Re({ workspace: n, project: r, canWrite: i }) {
|
|
|
929
929
|
})),
|
|
930
930
|
onSuccess: () => o.invalidateQueries({ queryKey: [
|
|
931
931
|
"workspace",
|
|
932
|
-
|
|
932
|
+
e,
|
|
933
933
|
"projects"
|
|
934
934
|
] })
|
|
935
935
|
}), l = Z({
|
|
936
|
-
mutationFn: async (i) =>
|
|
937
|
-
workspace:
|
|
938
|
-
projectId:
|
|
936
|
+
mutationFn: async (i) => r(await n.DELETE("/api/v1/workspaces/{workspace}/projects/{projectId}/updates/{updateId}", { params: { path: {
|
|
937
|
+
workspace: e,
|
|
938
|
+
projectId: t.id,
|
|
939
939
|
updateId: i
|
|
940
940
|
} } })),
|
|
941
941
|
onSuccess: () => o.invalidateQueries({ queryKey: [
|
|
942
942
|
"workspace",
|
|
943
|
-
|
|
943
|
+
e,
|
|
944
944
|
"projects"
|
|
945
945
|
] })
|
|
946
946
|
});
|
|
947
|
-
return /* @__PURE__ */ Y(
|
|
948
|
-
workspace:
|
|
949
|
-
state: j(
|
|
950
|
-
health:
|
|
947
|
+
return /* @__PURE__ */ Y(M, {
|
|
948
|
+
workspace: e,
|
|
949
|
+
state: j(t),
|
|
950
|
+
health: t.health,
|
|
951
951
|
updates: s,
|
|
952
952
|
canWrite: i,
|
|
953
953
|
placeholder: a("updatePlaceholder"),
|
|
@@ -956,7 +956,7 @@ function Re({ workspace: n, project: r, canWrite: i }) {
|
|
|
956
956
|
});
|
|
957
957
|
}
|
|
958
958
|
function ze({ workspace: e, projectId: t }) {
|
|
959
|
-
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a =
|
|
959
|
+
let n = q("planning.activity"), r = q("planning"), i = q("planning.health"), a = L(), o = ae(), { data: c = [] } = Q(s(e, t)), { actorName: l, person: u } = N(e);
|
|
960
960
|
if (c.length === 0) return null;
|
|
961
961
|
let d = (e) => {
|
|
962
962
|
let t = {
|
|
@@ -965,7 +965,7 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
965
965
|
className: "font-medium text-foreground",
|
|
966
966
|
children: e
|
|
967
967
|
})
|
|
968
|
-
}, s = e.data, c =
|
|
968
|
+
}, s = e.data, c = h(e.type, e.data);
|
|
969
969
|
switch (e.type) {
|
|
970
970
|
case "project.created": return [{
|
|
971
971
|
icon: c,
|
|
@@ -1011,7 +1011,7 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1011
1011
|
}];
|
|
1012
1012
|
let f = [], p = (e) => e ? a.day(String(e)) : "";
|
|
1013
1013
|
return d.name && f.push({
|
|
1014
|
-
icon: /* @__PURE__ */ Y(
|
|
1014
|
+
icon: /* @__PURE__ */ Y(ie, {}),
|
|
1015
1015
|
text: n.rich("renamed", {
|
|
1016
1016
|
...t,
|
|
1017
1017
|
from: String(d.name.from)
|
|
@@ -1023,28 +1023,28 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1023
1023
|
status: r(`status.${d.status.to}`)
|
|
1024
1024
|
})
|
|
1025
1025
|
}), d.priority && f.push({
|
|
1026
|
-
icon: /* @__PURE__ */ Y(
|
|
1026
|
+
icon: /* @__PURE__ */ Y(E, { priority: Number(d.priority.to) }),
|
|
1027
1027
|
text: n.rich("priority", {
|
|
1028
1028
|
...t,
|
|
1029
1029
|
priority: o[Number(d.priority.to)] ?? ""
|
|
1030
1030
|
})
|
|
1031
1031
|
}), d.lead && f.push(d.lead.to ? {
|
|
1032
|
-
icon: /* @__PURE__ */ Y(
|
|
1032
|
+
icon: /* @__PURE__ */ Y(C, {}),
|
|
1033
1033
|
text: n.rich("lead", {
|
|
1034
1034
|
...t,
|
|
1035
1035
|
lead: u(String(d.lead.to)).name
|
|
1036
1036
|
})
|
|
1037
1037
|
} : {
|
|
1038
|
-
icon: /* @__PURE__ */ Y(
|
|
1038
|
+
icon: /* @__PURE__ */ Y(re, {}),
|
|
1039
1039
|
text: n.rich("leadRemoved", t)
|
|
1040
1040
|
}), d.startDate && f.push({
|
|
1041
|
-
icon: /* @__PURE__ */ Y(
|
|
1041
|
+
icon: /* @__PURE__ */ Y(w, {}),
|
|
1042
1042
|
text: d.startDate.to ? n.rich("startDate", {
|
|
1043
1043
|
...t,
|
|
1044
1044
|
date: p(d.startDate.to)
|
|
1045
1045
|
}) : n.rich("startDateRemoved", t)
|
|
1046
1046
|
}), d.targetDate && f.push({
|
|
1047
|
-
icon: /* @__PURE__ */ Y(
|
|
1047
|
+
icon: /* @__PURE__ */ Y(w, {}),
|
|
1048
1048
|
text: d.targetDate.to ? n.rich("targetDate", {
|
|
1049
1049
|
...t,
|
|
1050
1050
|
date: p(d.targetDate.to)
|
|
@@ -1060,9 +1060,9 @@ function ze({ workspace: e, projectId: t }) {
|
|
|
1060
1060
|
children: [/* @__PURE__ */ Y("h2", {
|
|
1061
1061
|
className: "text-base font-semibold",
|
|
1062
1062
|
children: n("title")
|
|
1063
|
-
}), /* @__PURE__ */ Y(
|
|
1063
|
+
}), /* @__PURE__ */ Y(p, {
|
|
1064
1064
|
className: "mt-3",
|
|
1065
|
-
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(
|
|
1065
|
+
children: [...c].reverse().flatMap((t) => d(t).map(({ icon: n, text: r }, i) => /* @__PURE__ */ Y(m, {
|
|
1066
1066
|
workspace: e,
|
|
1067
1067
|
icon: n,
|
|
1068
1068
|
actor: t.actor,
|