@parallelworks/tandem-web 0.167.0 → 0.168.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +1 -0
- package/_virtual/_virtual_i18n/es/common.js +1 -0
- package/_virtual/_virtual_i18n/ja/common.js +1 -0
- package/_virtual/_virtual_i18n/ko/common.js +1 -0
- package/_virtual/_virtual_i18n/zh/common.js +1 -0
- package/components/status.js +12 -2
- package/package.json +1 -1
- package/routes/__root.js +3 -3
- package/routes/_workspace/agents/_slug2.js +146 -148
- package/routes/_workspace/people/_username2.js +74 -77
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +39 -38
- package/routes/_workspace/teams/_key/cycles/_number2.js +92 -94
- package/routes/_workspace/teams/_key2.js +2 -5
|
@@ -1,196 +1,194 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { NotFound as n } from "../../../../../components/status.js";
|
|
3
|
+
import { usePageTitle as r } from "../../../../../lib/pageTitle.js";
|
|
4
|
+
import { useNavigate as i } from "../../../../../lib/router.js";
|
|
5
|
+
import { cyclesQuery as a, issuesQuery as o, teamsQuery as s } from "../../../../../api/queries.js";
|
|
6
|
+
import { invalidateIssueViews as ee } from "../../../../../api/mutations.js";
|
|
6
7
|
import { CloseIcon as te, CycleIcon as ne } from "../../../../../components/icons.js";
|
|
7
|
-
import { addDays as
|
|
8
|
-
import { ProgressBar as
|
|
9
|
-
import { useCan as
|
|
10
|
-
import { teamPath as
|
|
11
|
-
import { Route as
|
|
12
|
-
import { FavoriteStar as
|
|
13
|
-
import { BurnUp as
|
|
14
|
-
import { IssueBreakdown as
|
|
15
|
-
import { StatusGroups as
|
|
16
|
-
import { Button as
|
|
17
|
-
import { useState as
|
|
18
|
-
import { useErrorMessage as
|
|
19
|
-
import { useTranslations as
|
|
20
|
-
import { jsx as
|
|
21
|
-
import { useMutation as
|
|
8
|
+
import { addDays as c, today as l, useTime as u } from "../../../../../lib/time.js";
|
|
9
|
+
import { ProgressBar as d } from "../../../../../components/Planning.js";
|
|
10
|
+
import { useCan as f } from "../../../../../lib/roles.js";
|
|
11
|
+
import { teamPath as p } from "../../../../../lib/teamPaths.js";
|
|
12
|
+
import { Route as m } from "./_number.js";
|
|
13
|
+
import { FavoriteStar as h } from "../../../../../components/FavoriteStar.js";
|
|
14
|
+
import { BurnUp as g } from "../../../../../components/Reports.js";
|
|
15
|
+
import { IssueBreakdown as _, breakdownKeys as re } from "../../../../../components/IssueBreakdown.js";
|
|
16
|
+
import { StatusGroups as ie } from "../../../../../components/IssueGroup.js";
|
|
17
|
+
import { Button as ae, Card as oe, EmptyState as se, ErrorText as v, IconButton as y, PageHeader as b } from "@parallelworks/ui";
|
|
18
|
+
import { useState as x } from "react";
|
|
19
|
+
import { useErrorMessage as S } from "@parallelworks/problem/react";
|
|
20
|
+
import { useTranslations as C } from "use-intl";
|
|
21
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
22
|
+
import { useMutation as E, useQuery as D, useQueryClient as O, useSuspenseQuery as k } from "@tanstack/react-query";
|
|
22
23
|
// src/routes/$workspace/teams/$key/cycles/$number.tsx?tsr-split=component
|
|
23
|
-
var
|
|
24
|
+
var A = [
|
|
24
25
|
"assignees",
|
|
25
26
|
"labels",
|
|
26
27
|
"priority",
|
|
27
28
|
"projects"
|
|
28
29
|
];
|
|
29
|
-
function
|
|
30
|
-
let { workspace:
|
|
31
|
-
|
|
30
|
+
function j() {
|
|
31
|
+
let { workspace: j, key: M, number: N } = m.useParams(), P = C("planning"), F = S(), I = u(), ce = i(), { data: L } = k(s(j)), { data: R } = k(a(j, M)), z = R.find((e) => String(e.number) === N), B = L.find((e) => e.key === M);
|
|
32
|
+
r(z && (z.name ? P("cycleNamed", {
|
|
32
33
|
number: z.number,
|
|
33
34
|
name: z.name
|
|
34
|
-
}) :
|
|
35
|
-
let V =
|
|
36
|
-
...
|
|
35
|
+
}) : P("cycle", { number: z.number })), B?.name);
|
|
36
|
+
let V = f(j, "manage_cycles", { team: M }), H = O(), [U, W] = x(null), [G, K] = x("assignees"), [q, J] = x(null), { data: le } = D({
|
|
37
|
+
...o(j, { cycle: z?.id ?? "" }),
|
|
37
38
|
enabled: !!z
|
|
38
|
-
}), Y =
|
|
39
|
+
}), Y = E({
|
|
39
40
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles/{number}/move-unfinished", { params: { path: {
|
|
40
|
-
workspace:
|
|
41
|
-
key:
|
|
42
|
-
number: Number(
|
|
41
|
+
workspace: j,
|
|
42
|
+
key: M,
|
|
43
|
+
number: Number(N)
|
|
43
44
|
} } })),
|
|
44
45
|
onSuccess: (e) => W(e.moved),
|
|
45
|
-
onSettled: () =>
|
|
46
|
+
onSettled: () => ee(H, j)
|
|
46
47
|
});
|
|
47
|
-
if (!z) return /* @__PURE__ */
|
|
48
|
-
|
|
49
|
-
children: N("noSuchCycle")
|
|
50
|
-
});
|
|
51
|
-
let X = ce?.issues ?? [], Z = q ? X.filter((e) => h(e, q.tab).includes(q.key)) : X, Q = X.filter((e) => e.status.category !== "completed" && e.status.category !== "canceled").length, le = z.state === "past" || z.state === "current" && re(ie(), 2) >= z.endsOn, $ = z.name ? N("cycleNamed", {
|
|
48
|
+
if (!z) return /* @__PURE__ */ w(n, { title: P("noSuchCycle") });
|
|
49
|
+
let X = le?.issues ?? [], Z = q ? X.filter((e) => re(e, q.tab).includes(q.key)) : X, Q = X.filter((e) => e.status.category !== "completed" && e.status.category !== "canceled").length, ue = z.state === "past" || z.state === "current" && c(l(), 2) >= z.endsOn, $ = z.name ? P("cycleNamed", {
|
|
52
50
|
number: z.number,
|
|
53
51
|
name: z.name
|
|
54
|
-
}) :
|
|
55
|
-
return /* @__PURE__ */
|
|
52
|
+
}) : P("cycle", { number: z.number });
|
|
53
|
+
return /* @__PURE__ */ T("div", {
|
|
56
54
|
className: "flex h-full min-h-0 flex-col",
|
|
57
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ w(b, {
|
|
58
56
|
heading: !1,
|
|
59
57
|
breadcrumbs: [
|
|
60
58
|
{
|
|
61
|
-
label: B?.name ??
|
|
62
|
-
href:
|
|
59
|
+
label: B?.name ?? M,
|
|
60
|
+
href: p(j, M, "issues")
|
|
63
61
|
},
|
|
64
62
|
{
|
|
65
|
-
label:
|
|
66
|
-
href:
|
|
63
|
+
label: P("cycles"),
|
|
64
|
+
href: p(j, M, "cycles")
|
|
67
65
|
},
|
|
68
66
|
{ label: $ }
|
|
69
67
|
],
|
|
70
|
-
titleActions: /* @__PURE__ */
|
|
71
|
-
workspace:
|
|
68
|
+
titleActions: /* @__PURE__ */ w(h, {
|
|
69
|
+
workspace: j,
|
|
72
70
|
kind: "cycle",
|
|
73
71
|
target: z.id
|
|
74
72
|
})
|
|
75
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ T("div", {
|
|
76
74
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
|
|
77
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: [/* @__PURE__ */ T("div", {
|
|
78
76
|
className: "w-full min-w-0 px-4 py-6 md:px-8 md:py-8 xl:flex-1 xl:overflow-y-auto",
|
|
79
77
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ T("div", {
|
|
81
79
|
className: "flex flex-wrap items-center gap-3",
|
|
82
80
|
children: [
|
|
83
|
-
/* @__PURE__ */
|
|
84
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ w(ne, { className: `size-5 shrink-0 ${z.state === "current" ? "text-status-started" : "text-muted-foreground"}` }),
|
|
82
|
+
/* @__PURE__ */ w("h1", {
|
|
85
83
|
className: "text-xl font-semibold tracking-tight",
|
|
86
84
|
children: $
|
|
87
85
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ w("span", {
|
|
89
87
|
className: "rounded-md border border-border px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
90
|
-
children:
|
|
88
|
+
children: P(`states.${z.state}`)
|
|
91
89
|
}),
|
|
92
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ w("span", {
|
|
93
91
|
className: "text-sm text-muted-foreground",
|
|
94
|
-
children:
|
|
92
|
+
children: I.dayRange(z.startsOn, z.endsOn)
|
|
95
93
|
}),
|
|
96
|
-
z.carriedIn > 0 && /* @__PURE__ */
|
|
94
|
+
z.carriedIn > 0 && /* @__PURE__ */ w("span", {
|
|
97
95
|
className: "text-sm text-muted-foreground",
|
|
98
|
-
children:
|
|
96
|
+
children: P("carriedIn", { count: z.carriedIn })
|
|
99
97
|
}),
|
|
100
|
-
z.carriedOut > 0 && /* @__PURE__ */
|
|
98
|
+
z.carriedOut > 0 && /* @__PURE__ */ w("span", {
|
|
101
99
|
className: "text-sm text-muted-foreground",
|
|
102
|
-
children:
|
|
100
|
+
children: P("carriedOut", { count: z.carriedOut })
|
|
103
101
|
}),
|
|
104
|
-
V && Q > 0 &&
|
|
102
|
+
V && Q > 0 && ue && /* @__PURE__ */ w(ae, {
|
|
105
103
|
type: "button",
|
|
106
104
|
onClick: () => Y.mutate(),
|
|
107
105
|
loading: Y.isPending,
|
|
108
106
|
className: "ml-auto",
|
|
109
|
-
children:
|
|
107
|
+
children: P("moveUnfinished", { count: Q })
|
|
110
108
|
})
|
|
111
109
|
]
|
|
112
110
|
}),
|
|
113
|
-
Y.isError && /* @__PURE__ */
|
|
111
|
+
Y.isError && /* @__PURE__ */ w(v, {
|
|
114
112
|
size: "md",
|
|
115
113
|
className: "mt-2",
|
|
116
|
-
children:
|
|
114
|
+
children: F(Y.error)
|
|
117
115
|
}),
|
|
118
|
-
U !== null && Y.data && /* @__PURE__ */
|
|
116
|
+
U !== null && Y.data && /* @__PURE__ */ T("p", {
|
|
119
117
|
className: "mt-2 text-sm text-muted-foreground",
|
|
120
118
|
role: "status",
|
|
121
119
|
children: [
|
|
122
|
-
|
|
120
|
+
P("moved", { count: U }),
|
|
123
121
|
" ",
|
|
124
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ w("button", {
|
|
125
123
|
type: "button",
|
|
126
124
|
className: "text-primary hover:underline",
|
|
127
|
-
onClick: () =>
|
|
125
|
+
onClick: () => ce({
|
|
128
126
|
to: "/$workspace/teams/$key/cycles/$number",
|
|
129
127
|
params: {
|
|
130
|
-
workspace:
|
|
131
|
-
key:
|
|
128
|
+
workspace: j,
|
|
129
|
+
key: M,
|
|
132
130
|
number: String(Y.data.cycle.number)
|
|
133
131
|
}
|
|
134
132
|
}),
|
|
135
|
-
children:
|
|
133
|
+
children: P("openCycle", { number: Y.data.cycle.number })
|
|
136
134
|
})
|
|
137
135
|
]
|
|
138
136
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ w("section", {
|
|
140
138
|
className: "mt-6",
|
|
141
|
-
"aria-label":
|
|
142
|
-
children: /* @__PURE__ */
|
|
139
|
+
"aria-label": P("progressTitle"),
|
|
140
|
+
children: /* @__PURE__ */ w(d, { progress: z.progress })
|
|
143
141
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ w("section", {
|
|
145
143
|
className: "mt-6 rounded-xl border border-border bg-card p-4",
|
|
146
|
-
children: /* @__PURE__ */
|
|
147
|
-
workspace:
|
|
148
|
-
teamKey:
|
|
144
|
+
children: /* @__PURE__ */ w(g, {
|
|
145
|
+
workspace: j,
|
|
146
|
+
teamKey: M,
|
|
149
147
|
cycle: z
|
|
150
148
|
})
|
|
151
149
|
}),
|
|
152
|
-
X.length > 0 && /* @__PURE__ */
|
|
150
|
+
X.length > 0 && /* @__PURE__ */ w("div", {
|
|
153
151
|
className: "mt-8 xl:hidden",
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
-
workspace:
|
|
152
|
+
children: /* @__PURE__ */ w(_, {
|
|
153
|
+
workspace: j,
|
|
156
154
|
issues: X,
|
|
157
|
-
tabs:
|
|
155
|
+
tabs: A,
|
|
158
156
|
tab: G,
|
|
159
157
|
onTabChange: K,
|
|
160
158
|
focus: q,
|
|
161
159
|
onFocus: (e) => J(e)
|
|
162
160
|
})
|
|
163
161
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ T("section", {
|
|
165
163
|
className: "mt-8",
|
|
166
|
-
children: [q && /* @__PURE__ */
|
|
164
|
+
children: [q && /* @__PURE__ */ T("div", {
|
|
167
165
|
className: "mb-3 flex items-center gap-2 text-sm text-muted-foreground",
|
|
168
166
|
role: "status",
|
|
169
|
-
children: [
|
|
167
|
+
children: [P("issueBreakdown.showing", { count: Z.length }), /* @__PURE__ */ w(y, {
|
|
170
168
|
size: "sm",
|
|
171
169
|
variant: "ghost",
|
|
172
|
-
label:
|
|
173
|
-
icon: /* @__PURE__ */
|
|
170
|
+
label: P("issueBreakdown.showAll"),
|
|
171
|
+
icon: /* @__PURE__ */ w(te, {}),
|
|
174
172
|
onClick: () => J(null)
|
|
175
173
|
})]
|
|
176
|
-
}), Z.length === 0 ? /* @__PURE__ */
|
|
174
|
+
}), Z.length === 0 ? /* @__PURE__ */ w(se, { title: P("noIssuesInCycle") }) : /* @__PURE__ */ w(oe, {
|
|
177
175
|
size: "fill",
|
|
178
176
|
padding: "none",
|
|
179
177
|
className: "overflow-hidden",
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
-
workspace:
|
|
178
|
+
children: /* @__PURE__ */ w(ie, {
|
|
179
|
+
workspace: j,
|
|
182
180
|
issues: Z
|
|
183
181
|
})
|
|
184
182
|
})]
|
|
185
183
|
})
|
|
186
184
|
]
|
|
187
|
-
}), X.length > 0 && /* @__PURE__ */
|
|
188
|
-
"aria-label":
|
|
185
|
+
}), X.length > 0 && /* @__PURE__ */ w("aside", {
|
|
186
|
+
"aria-label": P("issueBreakdown.label"),
|
|
189
187
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
-
workspace:
|
|
188
|
+
children: /* @__PURE__ */ w(_, {
|
|
189
|
+
workspace: j,
|
|
192
190
|
issues: X,
|
|
193
|
-
tabs:
|
|
191
|
+
tabs: A,
|
|
194
192
|
tab: G,
|
|
195
193
|
onTabChange: K,
|
|
196
194
|
focus: q,
|
|
@@ -200,4 +198,4 @@ function A() {
|
|
|
200
198
|
})]
|
|
201
199
|
});
|
|
202
200
|
}
|
|
203
|
-
export {
|
|
201
|
+
export { j as component };
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NotFound as e } from "../../../components/status.js";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
3
|
// src/routes/$workspace/teams/$key.tsx?tsr-split=notFoundComponent
|
|
4
|
-
var n = () => /* @__PURE__ */ t(
|
|
5
|
-
className: "flex h-full min-h-0 flex-1",
|
|
6
|
-
children: /* @__PURE__ */ t(e, { status: 404 })
|
|
7
|
-
});
|
|
4
|
+
var n = () => /* @__PURE__ */ t(e, {});
|
|
8
5
|
export { n as notFoundComponent };
|