@parallelworks/tandem-web 0.189.9 → 0.189.10
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 +0 -1
- package/_virtual/_virtual_i18n/es/common.js +0 -1
- package/_virtual/_virtual_i18n/ja/common.js +0 -1
- package/_virtual/_virtual_i18n/ko/common.js +0 -1
- package/_virtual/_virtual_i18n/zh/common.js +0 -1
- package/components/IssueBreakdown.js +162 -76
- package/lib/glossary.js +35 -22
- package/lib/issueList.js +2 -1
- package/package.json +1 -1
- package/pages/issues.js +365 -367
- package/routes/_workspace/teams/_key/cycles/_number2.js +68 -71
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../../../api/client.js";
|
|
2
2
|
import { invalidateIssueViews as n } from "../../../../../api/mutations.js";
|
|
3
|
-
import { cyclesQuery as
|
|
4
|
-
import { useCycleCrumb as
|
|
5
|
-
import { FavoriteStar as
|
|
6
|
-
import {
|
|
7
|
-
import { StatusGroups as
|
|
8
|
-
import {
|
|
9
|
-
import { ProgressBar as
|
|
10
|
-
import { BurnUp as
|
|
11
|
-
import { NotFound as
|
|
12
|
-
import { cycleParam as
|
|
13
|
-
import { usePageTitle as
|
|
14
|
-
import { useCan as
|
|
15
|
-
import { useNavigate as
|
|
16
|
-
import { teamPath as
|
|
17
|
-
import { addDays as
|
|
18
|
-
import { Route as
|
|
19
|
-
import { Button as
|
|
3
|
+
import { cyclesQuery as ee, issuesQuery as r, teamsQuery as i } from "../../../../../api/queries.js";
|
|
4
|
+
import { useCycleCrumb as a } from "../../../../../components/cycleCrumb.js";
|
|
5
|
+
import { FavoriteStar as o } from "../../../../../components/FavoriteStar.js";
|
|
6
|
+
import { BreakdownFilterBar as s, IssueBreakdown as c, inBreakdown as l } from "../../../../../components/IssueBreakdown.js";
|
|
7
|
+
import { StatusGroups as u } from "../../../../../components/IssueGroup.js";
|
|
8
|
+
import { CycleIcon as d } from "../../../../../components/icons.js";
|
|
9
|
+
import { ProgressBar as f } from "../../../../../components/Planning.js";
|
|
10
|
+
import { BurnUp as p } from "../../../../../components/Reports.js";
|
|
11
|
+
import { NotFound as m } from "../../../../../components/status.js";
|
|
12
|
+
import { cycleParam as h, findCycle as te } from "../../../../../lib/cycleLinks.js";
|
|
13
|
+
import { usePageTitle as ne } from "../../../../../lib/pageTitle.js";
|
|
14
|
+
import { useCan as re } from "../../../../../lib/roles.js";
|
|
15
|
+
import { useNavigate as ie } from "../../../../../lib/router.js";
|
|
16
|
+
import { teamPath as g } from "../../../../../lib/teamPaths.js";
|
|
17
|
+
import { addDays as ae, today as oe, useTime as se } from "../../../../../lib/time.js";
|
|
18
|
+
import { Route as ce } from "./_number.js";
|
|
19
|
+
import { Button as _, Card as v, EmptyState as y, ErrorText as b, PageHeader as x } from "@parallelworks/ui";
|
|
20
20
|
import { useState as S } from "react";
|
|
21
21
|
import { useErrorMessage as C } from "@parallelworks/problem/react";
|
|
22
22
|
import { useTranslations as w } from "use-intl";
|
|
@@ -30,47 +30,47 @@ var j = [
|
|
|
30
30
|
"projects"
|
|
31
31
|
];
|
|
32
32
|
function M() {
|
|
33
|
-
let { workspace: M, key: N, number: P } =
|
|
34
|
-
|
|
35
|
-
number:
|
|
36
|
-
name:
|
|
37
|
-
}) : F("cycle", { number:
|
|
38
|
-
let
|
|
39
|
-
...
|
|
40
|
-
enabled: !!
|
|
33
|
+
let { workspace: M, key: N, number: P } = ce.useParams(), F = w("planning"), le = C(), I = se(), L = ie(), { data: R } = A(i(M)), { data: z } = A(ee(M, N)), B = te(z, P), V = R.find((e) => e.key === N), H = a(M, N, z, B);
|
|
34
|
+
ne(B && (B.name ? F("cycleNamed", {
|
|
35
|
+
number: B.number,
|
|
36
|
+
name: B.name
|
|
37
|
+
}) : F("cycle", { number: B.number })), V?.name);
|
|
38
|
+
let U = re(M, "manage_cycles", { team: N }), W = k(), [G, ue] = S(null), [K, q] = S("assignees"), [J, Y] = S({}), { data: de } = O({
|
|
39
|
+
...r(M, { cycle: B?.id ?? "" }),
|
|
40
|
+
enabled: !!B
|
|
41
41
|
}), X = D({
|
|
42
42
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles/{number}/move-unfinished", { params: { path: {
|
|
43
43
|
workspace: M,
|
|
44
44
|
key: N,
|
|
45
|
-
number:
|
|
45
|
+
number: B?.number ?? 0
|
|
46
46
|
} } })),
|
|
47
|
-
onSuccess: (e) =>
|
|
48
|
-
onSettled: () => n(
|
|
47
|
+
onSuccess: (e) => ue(e.moved),
|
|
48
|
+
onSettled: () => n(W, M)
|
|
49
49
|
});
|
|
50
|
-
if (!
|
|
51
|
-
let Z =
|
|
52
|
-
number:
|
|
53
|
-
name:
|
|
54
|
-
}) : F("cycle", { number:
|
|
50
|
+
if (!B) return /* @__PURE__ */ T(m, { title: F("noSuchCycle") });
|
|
51
|
+
let Z = de?.issues ?? [], Q = Z.filter((e) => l(e, J)), $ = Z.filter((e) => e.status.category !== "completed" && e.status.category !== "canceled").length, fe = B.state === "past" || B.state === "current" && ae(oe(), 2) >= B.endsOn, pe = B.name ? F("cycleNamed", {
|
|
52
|
+
number: B.number,
|
|
53
|
+
name: B.name
|
|
54
|
+
}) : F("cycle", { number: B.number });
|
|
55
55
|
return /* @__PURE__ */ E("div", {
|
|
56
56
|
className: "flex h-full min-h-0 flex-col",
|
|
57
57
|
children: [/* @__PURE__ */ T(x, {
|
|
58
58
|
heading: !1,
|
|
59
59
|
breadcrumbs: [
|
|
60
60
|
{
|
|
61
|
-
label:
|
|
62
|
-
href:
|
|
61
|
+
label: V?.name ?? N,
|
|
62
|
+
href: g(M, N, "issues")
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
label: F("cycles"),
|
|
66
|
-
href:
|
|
66
|
+
href: g(M, N, "cycles")
|
|
67
67
|
},
|
|
68
|
-
...
|
|
68
|
+
...H ? [H] : []
|
|
69
69
|
],
|
|
70
|
-
titleActions: /* @__PURE__ */ T(
|
|
70
|
+
titleActions: /* @__PURE__ */ T(o, {
|
|
71
71
|
workspace: M,
|
|
72
72
|
kind: "cycle",
|
|
73
|
-
target:
|
|
73
|
+
target: B.id
|
|
74
74
|
})
|
|
75
75
|
}), /* @__PURE__ */ E("div", {
|
|
76
76
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto xl:flex-row xl:overflow-hidden",
|
|
@@ -80,28 +80,28 @@ function M() {
|
|
|
80
80
|
/* @__PURE__ */ E("div", {
|
|
81
81
|
className: "flex flex-wrap items-center gap-3",
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */ T(
|
|
83
|
+
/* @__PURE__ */ T(d, { className: `size-5 shrink-0 ${B.state === "current" ? "text-status-started" : "text-muted-foreground"}` }),
|
|
84
84
|
/* @__PURE__ */ T("h1", {
|
|
85
85
|
className: "text-xl font-semibold tracking-tight",
|
|
86
|
-
children:
|
|
86
|
+
children: pe
|
|
87
87
|
}),
|
|
88
88
|
/* @__PURE__ */ T("span", {
|
|
89
89
|
className: "rounded-md border border-border px-1.5 py-0.5 text-xs text-muted-foreground",
|
|
90
|
-
children: F(`states.${
|
|
90
|
+
children: F(`states.${B.state}`)
|
|
91
91
|
}),
|
|
92
92
|
/* @__PURE__ */ T("span", {
|
|
93
93
|
className: "text-sm text-muted-foreground",
|
|
94
|
-
children:
|
|
94
|
+
children: I.dayRange(B.startsOn, B.endsOn)
|
|
95
95
|
}),
|
|
96
|
-
|
|
96
|
+
B.carriedIn > 0 && /* @__PURE__ */ T("span", {
|
|
97
97
|
className: "text-sm text-muted-foreground",
|
|
98
|
-
children: F("carriedIn", { count:
|
|
98
|
+
children: F("carriedIn", { count: B.carriedIn })
|
|
99
99
|
}),
|
|
100
|
-
|
|
100
|
+
B.carriedOut > 0 && /* @__PURE__ */ T("span", {
|
|
101
101
|
className: "text-sm text-muted-foreground",
|
|
102
|
-
children: F("carriedOut", { count:
|
|
102
|
+
children: F("carriedOut", { count: B.carriedOut })
|
|
103
103
|
}),
|
|
104
|
-
|
|
104
|
+
U && $ > 0 && fe && /* @__PURE__ */ T(_, {
|
|
105
105
|
type: "button",
|
|
106
106
|
onClick: () => X.mutate(),
|
|
107
107
|
loading: X.isPending,
|
|
@@ -110,10 +110,10 @@ function M() {
|
|
|
110
110
|
})
|
|
111
111
|
]
|
|
112
112
|
}),
|
|
113
|
-
X.isError && /* @__PURE__ */ T(
|
|
113
|
+
X.isError && /* @__PURE__ */ T(b, {
|
|
114
114
|
size: "md",
|
|
115
115
|
className: "mt-2",
|
|
116
|
-
children:
|
|
116
|
+
children: le(X.error)
|
|
117
117
|
}),
|
|
118
118
|
G !== null && X.data && /* @__PURE__ */ E("p", {
|
|
119
119
|
className: "mt-2 text-sm text-muted-foreground",
|
|
@@ -124,12 +124,12 @@ function M() {
|
|
|
124
124
|
/* @__PURE__ */ T("button", {
|
|
125
125
|
type: "button",
|
|
126
126
|
className: "text-primary hover:underline",
|
|
127
|
-
onClick: () =>
|
|
127
|
+
onClick: () => L({
|
|
128
128
|
to: "/$workspace/teams/$key/cycles/$number",
|
|
129
129
|
params: {
|
|
130
130
|
workspace: M,
|
|
131
131
|
key: N,
|
|
132
|
-
number:
|
|
132
|
+
number: h(X.data.cycle)
|
|
133
133
|
}
|
|
134
134
|
}),
|
|
135
135
|
children: F("openCycle", { number: X.data.cycle.number })
|
|
@@ -139,45 +139,42 @@ function M() {
|
|
|
139
139
|
/* @__PURE__ */ T("section", {
|
|
140
140
|
className: "mt-6",
|
|
141
141
|
"aria-label": F("progressTitle"),
|
|
142
|
-
children: /* @__PURE__ */ T(
|
|
142
|
+
children: /* @__PURE__ */ T(f, { progress: B.progress })
|
|
143
143
|
}),
|
|
144
144
|
/* @__PURE__ */ T("section", {
|
|
145
145
|
className: "mt-6 rounded-xl border border-border bg-card p-4",
|
|
146
|
-
children: /* @__PURE__ */ T(
|
|
146
|
+
children: /* @__PURE__ */ T(p, {
|
|
147
147
|
workspace: M,
|
|
148
148
|
teamKey: N,
|
|
149
|
-
cycle:
|
|
149
|
+
cycle: B
|
|
150
150
|
})
|
|
151
151
|
}),
|
|
152
152
|
Z.length > 0 && /* @__PURE__ */ T("div", {
|
|
153
153
|
className: "mt-8 xl:hidden",
|
|
154
|
-
children: /* @__PURE__ */ T(
|
|
154
|
+
children: /* @__PURE__ */ T(c, {
|
|
155
155
|
workspace: M,
|
|
156
156
|
issues: Z,
|
|
157
157
|
tabs: j,
|
|
158
158
|
tab: K,
|
|
159
159
|
onTabChange: q,
|
|
160
160
|
focus: J,
|
|
161
|
-
onFocus:
|
|
161
|
+
onFocus: Y
|
|
162
162
|
})
|
|
163
163
|
}),
|
|
164
164
|
/* @__PURE__ */ E("section", {
|
|
165
165
|
className: "mt-8",
|
|
166
|
-
children: [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
onClick: () => Y(null)
|
|
175
|
-
})]
|
|
176
|
-
}), Q.length === 0 ? /* @__PURE__ */ T(v, { title: F("noIssuesInCycle") }) : /* @__PURE__ */ T(_, {
|
|
166
|
+
children: [/* @__PURE__ */ T(s, {
|
|
167
|
+
workspace: M,
|
|
168
|
+
issues: Z,
|
|
169
|
+
tabs: j,
|
|
170
|
+
focus: J,
|
|
171
|
+
onFocus: Y,
|
|
172
|
+
className: "mb-3"
|
|
173
|
+
}), Q.length === 0 ? /* @__PURE__ */ T(y, { title: F("noIssuesInCycle") }) : /* @__PURE__ */ T(v, {
|
|
177
174
|
size: "fill",
|
|
178
175
|
padding: "none",
|
|
179
176
|
className: "overflow-hidden",
|
|
180
|
-
children: /* @__PURE__ */ T(
|
|
177
|
+
children: /* @__PURE__ */ T(u, {
|
|
181
178
|
workspace: M,
|
|
182
179
|
issues: Q
|
|
183
180
|
})
|
|
@@ -187,14 +184,14 @@ function M() {
|
|
|
187
184
|
}), Z.length > 0 && /* @__PURE__ */ T("aside", {
|
|
188
185
|
"aria-label": F("issueBreakdown.label"),
|
|
189
186
|
className: "hidden w-80 shrink-0 overflow-y-auto border-l border-border px-4 py-6 xl:block",
|
|
190
|
-
children: /* @__PURE__ */ T(
|
|
187
|
+
children: /* @__PURE__ */ T(c, {
|
|
191
188
|
workspace: M,
|
|
192
189
|
issues: Z,
|
|
193
190
|
tabs: j,
|
|
194
191
|
tab: K,
|
|
195
192
|
onTabChange: q,
|
|
196
193
|
focus: J,
|
|
197
|
-
onFocus:
|
|
194
|
+
onFocus: Y
|
|
198
195
|
})
|
|
199
196
|
})]
|
|
200
197
|
})]
|