@parallelworks/tandem-web 0.139.0 → 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/AppRoot.js +9 -8
- package/components/settings.js +10 -10
- package/hostedApp.js +47 -45
- package/lib/pageTitle.js +22 -10
- package/package.json +1 -1
- package/pages/areas.js +112 -112
- package/pages/decisions.js +36 -36
- package/pages/issues.js +34 -34
- package/pages/projects.js +109 -109
- package/pages/triage.js +64 -64
- 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 +185 -185
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +484 -484
- package/routes/_workspace/knowledge/_term2.js +166 -166
- package/routes/_workspace/knowledge/index2.js +33 -33
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +215 -215
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +38 -38
- package/routes/_workspace/teams/_key/settings2.js +131 -131
- package/routes/docs/route2.js +5 -5
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../../../../../api/client.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { usePageTitle as n } from "../../../../../lib/pageTitle.js";
|
|
3
|
+
import { useNavigate as r } from "../../../../../lib/router.js";
|
|
4
|
+
import { cyclesQuery as i, issuesQuery as a, teamsQuery as ee } from "../../../../../api/queries.js";
|
|
5
|
+
import { CloseIcon as o, CycleIcon as te } from "../../../../../components/icons.js";
|
|
5
6
|
import { teamPath as s } from "../../../../../lib/teamPaths.js";
|
|
6
|
-
import { Route as
|
|
7
|
-
import { invalidateIssueViews as
|
|
8
|
-
import { addDays as
|
|
9
|
-
import { ProgressBar as
|
|
10
|
-
import { usePageTitle as d } from "../../../../../lib/pageTitle.js";
|
|
7
|
+
import { Route as ne } from "./_number.js";
|
|
8
|
+
import { invalidateIssueViews as re } from "../../../../../api/mutations.js";
|
|
9
|
+
import { addDays as c, today as l, useTime as u } from "../../../../../lib/time.js";
|
|
10
|
+
import { ProgressBar as d } from "../../../../../components/Planning.js";
|
|
11
11
|
import { useCan as f } from "../../../../../lib/roles.js";
|
|
12
12
|
import { FavoriteStar as p } from "../../../../../components/FavoriteStar.js";
|
|
13
13
|
import { BurnUp as m } from "../../../../../components/Reports.js";
|
|
@@ -27,13 +27,13 @@ var k = [
|
|
|
27
27
|
"projects"
|
|
28
28
|
];
|
|
29
29
|
function A() {
|
|
30
|
-
let { workspace: A, key: j, number: M } =
|
|
31
|
-
|
|
30
|
+
let { workspace: A, key: j, number: M } = ne.useParams(), N = S("planning"), P = x(), F = u(), I = r(), { data: L } = O(ee(A)), { data: R } = O(i(A, j)), z = R.find((e) => String(e.number) === M), B = L.find((e) => e.key === j);
|
|
31
|
+
n(z && (z.name ? N("cycleNamed", {
|
|
32
32
|
number: z.number,
|
|
33
33
|
name: z.name
|
|
34
34
|
}) : N("cycle", { number: z.number })), B?.name);
|
|
35
35
|
let V = f(A, "manage_cycles", { team: j }), H = D(), [U, W] = b(null), [G, K] = b("assignees"), [q, J] = b(null), { data: ce } = E({
|
|
36
|
-
...
|
|
36
|
+
...a(A, { cycle: z?.id ?? "" }),
|
|
37
37
|
enabled: !!z
|
|
38
38
|
}), Y = T({
|
|
39
39
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles/{number}/move-unfinished", { params: { path: {
|
|
@@ -42,13 +42,13 @@ function A() {
|
|
|
42
42
|
number: Number(M)
|
|
43
43
|
} } })),
|
|
44
44
|
onSuccess: (e) => W(e.moved),
|
|
45
|
-
onSettled: () =>
|
|
45
|
+
onSettled: () => re(H, A)
|
|
46
46
|
});
|
|
47
47
|
if (!z) return /* @__PURE__ */ C("p", {
|
|
48
48
|
className: "px-8 py-10 text-sm text-muted-foreground",
|
|
49
49
|
children: N("noSuchCycle")
|
|
50
50
|
});
|
|
51
|
-
let X = ce?.issues ?? [], Z = q ? X.filter((e) => g(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" &&
|
|
51
|
+
let X = ce?.issues ?? [], Z = q ? X.filter((e) => g(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" && c(l(), 2) >= z.endsOn, $ = z.name ? N("cycleNamed", {
|
|
52
52
|
number: z.number,
|
|
53
53
|
name: z.name
|
|
54
54
|
}) : N("cycle", { number: z.number });
|
|
@@ -80,7 +80,7 @@ function A() {
|
|
|
80
80
|
/* @__PURE__ */ w("div", {
|
|
81
81
|
className: "flex flex-wrap items-center gap-3",
|
|
82
82
|
children: [
|
|
83
|
-
/* @__PURE__ */ C(
|
|
83
|
+
/* @__PURE__ */ C(te, { className: `size-5 shrink-0 ${z.state === "current" ? "text-status-started" : "text-muted-foreground"}` }),
|
|
84
84
|
/* @__PURE__ */ C("h1", {
|
|
85
85
|
className: "text-xl font-semibold tracking-tight",
|
|
86
86
|
children: $
|
|
@@ -139,7 +139,7 @@ function A() {
|
|
|
139
139
|
/* @__PURE__ */ C("section", {
|
|
140
140
|
className: "mt-6",
|
|
141
141
|
"aria-label": N("progressTitle"),
|
|
142
|
-
children: /* @__PURE__ */ C(
|
|
142
|
+
children: /* @__PURE__ */ C(d, { progress: z.progress })
|
|
143
143
|
}),
|
|
144
144
|
/* @__PURE__ */ C("section", {
|
|
145
145
|
className: "mt-6 rounded-xl border border-border bg-card p-4",
|
|
@@ -170,7 +170,7 @@ function A() {
|
|
|
170
170
|
size: "sm",
|
|
171
171
|
variant: "ghost",
|
|
172
172
|
label: N("issueBreakdown.showAll"),
|
|
173
|
-
icon: /* @__PURE__ */ C(
|
|
173
|
+
icon: /* @__PURE__ */ C(o, {}),
|
|
174
174
|
onClick: () => J(null)
|
|
175
175
|
})]
|
|
176
176
|
}), Z.length === 0 ? /* @__PURE__ */ C(oe, { title: N("noIssuesInCycle") }) : /* @__PURE__ */ C(ae, {
|
|
@@ -1,11 +1,11 @@
|
|
|
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 {
|
|
2
|
+
import { usePageTitle as n } from "../../../../../lib/pageTitle.js";
|
|
3
|
+
import { Link as r } from "../../../../../lib/router.js";
|
|
4
|
+
import { cyclesQuery as i, teamsQuery as a } from "../../../../../api/queries.js";
|
|
5
|
+
import { AddIcon as o, CycleIcon as s } from "../../../../../components/icons.js";
|
|
6
|
+
import { teamPath as c } from "../../../../../lib/teamPaths.js";
|
|
7
|
+
import { Route as l } from "./index.js";
|
|
8
|
+
import { useTime as u } from "../../../../../lib/time.js";
|
|
9
9
|
import { useCan as d } from "../../../../../lib/roles.js";
|
|
10
10
|
import { BurnUp as f } from "../../../../../components/Reports.js";
|
|
11
11
|
import { Button as p, EmptyState as m, ErrorText as h, PageHeader as g, StatusBadge as _ } from "@parallelworks/ui";
|
|
@@ -23,17 +23,17 @@ function A(e) {
|
|
|
23
23
|
return n > 0 ? n : null;
|
|
24
24
|
}
|
|
25
25
|
function j() {
|
|
26
|
-
let { workspace:
|
|
27
|
-
|
|
28
|
-
let P = d(
|
|
26
|
+
let { workspace: u, key: f } = l.useParams(), _ = x("planning"), b = y(), { data: k } = D(a(u)), { data: j } = D(i(u, f)), N = k.find((e) => e.key === f);
|
|
27
|
+
n(_("cycles"), N?.name);
|
|
28
|
+
let P = d(u, "manage_cycles", { team: f }), F = E(), [I, L] = v(!1), R = T({
|
|
29
29
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles", {
|
|
30
30
|
params: { path: {
|
|
31
|
-
workspace:
|
|
31
|
+
workspace: u,
|
|
32
32
|
key: f
|
|
33
33
|
} },
|
|
34
34
|
body: {}
|
|
35
35
|
})),
|
|
36
|
-
onSettled: () => F.invalidateQueries({ queryKey:
|
|
36
|
+
onSettled: () => F.invalidateQueries({ queryKey: i(u, f).queryKey })
|
|
37
37
|
}), z = [...j].sort((e, t) => e.number - t.number), B = z.filter((e) => e.state === "past"), V = I ? 0 : Math.max(0, B.length - O), H = z.filter((e) => e.state !== "past" || B.indexOf(e) >= V), U = A(j);
|
|
38
38
|
return /* @__PURE__ */ w("div", {
|
|
39
39
|
className: "flex h-full min-h-0 flex-col",
|
|
@@ -41,7 +41,7 @@ function j() {
|
|
|
41
41
|
heading: !1,
|
|
42
42
|
breadcrumbs: [{
|
|
43
43
|
label: N?.name ?? f,
|
|
44
|
-
href:
|
|
44
|
+
href: c(u, f, "issues")
|
|
45
45
|
}, { label: _("cycles") }]
|
|
46
46
|
}), /* @__PURE__ */ C("div", {
|
|
47
47
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
@@ -61,7 +61,7 @@ function j() {
|
|
|
61
61
|
onClick: () => R.mutate(),
|
|
62
62
|
loading: R.isPending,
|
|
63
63
|
className: "ml-auto",
|
|
64
|
-
children: [/* @__PURE__ */ C(
|
|
64
|
+
children: [/* @__PURE__ */ C(o, { className: "size-3.5" }), _("newCycle")]
|
|
65
65
|
})]
|
|
66
66
|
}),
|
|
67
67
|
R.isError && /* @__PURE__ */ C(h, {
|
|
@@ -72,13 +72,13 @@ function j() {
|
|
|
72
72
|
!N?.cyclesEnabled && j.length === 0 ? /* @__PURE__ */ C("div", {
|
|
73
73
|
className: "mt-8",
|
|
74
74
|
children: /* @__PURE__ */ C(m, {
|
|
75
|
-
icon: /* @__PURE__ */ C(
|
|
75
|
+
icon: /* @__PURE__ */ C(s, {}),
|
|
76
76
|
title: _("cyclesOff"),
|
|
77
77
|
description: _("cyclesOffDescription"),
|
|
78
|
-
action: /* @__PURE__ */ C(
|
|
78
|
+
action: /* @__PURE__ */ C(r, {
|
|
79
79
|
to: "/$workspace/teams/$key/settings",
|
|
80
80
|
params: {
|
|
81
|
-
workspace:
|
|
81
|
+
workspace: u,
|
|
82
82
|
key: f
|
|
83
83
|
},
|
|
84
84
|
className: "text-sm text-primary hover:underline",
|
|
@@ -97,7 +97,7 @@ function j() {
|
|
|
97
97
|
}), /* @__PURE__ */ C("ol", {
|
|
98
98
|
className: "relative mt-6",
|
|
99
99
|
children: H.map((e, t) => /* @__PURE__ */ C(M, {
|
|
100
|
-
workspace:
|
|
100
|
+
workspace: u,
|
|
101
101
|
teamKey: f,
|
|
102
102
|
cycle: e,
|
|
103
103
|
capacity: U,
|
|
@@ -110,19 +110,19 @@ function j() {
|
|
|
110
110
|
})]
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
function M({ workspace: e, teamKey: t, cycle:
|
|
114
|
-
let c = x("planning"),
|
|
113
|
+
function M({ workspace: e, teamKey: t, cycle: n, capacity: i, first: a, last: o }) {
|
|
114
|
+
let c = x("planning"), l = u(), d = b(), p = n.state === "current", m = (e) => d.number(e, {
|
|
115
115
|
style: "percent",
|
|
116
116
|
maximumFractionDigits: 0
|
|
117
|
-
}), h =
|
|
118
|
-
...h > 0 ? [c("success", { percent: m(
|
|
119
|
-
c("completedCount", { count:
|
|
117
|
+
}), h = n.state === "past" ? k(n) : n.progress.total, g = i !== null && n.state !== "past" && h > i, v = n.state === "past" ? [
|
|
118
|
+
...h > 0 ? [c("success", { percent: m(n.progress.completed / h) })] : [],
|
|
119
|
+
c("completedCount", { count: n.progress.completed }),
|
|
120
120
|
c("scopeCount", { count: h }),
|
|
121
|
-
...
|
|
121
|
+
...n.carriedOut > 0 ? [c("carriedOut", { count: n.carriedOut })] : []
|
|
122
122
|
] : [
|
|
123
123
|
...i ? [c("ofCapacity", { percent: m(h / i) })] : [],
|
|
124
124
|
c("scopeCount", { count: h }),
|
|
125
|
-
...
|
|
125
|
+
...n.carriedIn > 0 ? [c("carriedIn", { count: n.carriedIn })] : []
|
|
126
126
|
];
|
|
127
127
|
return /* @__PURE__ */ w("li", {
|
|
128
128
|
className: "grid grid-cols-[3.5rem_1fr] gap-x-3 md:grid-cols-[4.5rem_1fr] md:gap-x-4",
|
|
@@ -131,48 +131,48 @@ function M({ workspace: e, teamKey: t, cycle: r, capacity: i, first: a, last: s
|
|
|
131
131
|
children: [
|
|
132
132
|
/* @__PURE__ */ C("span", {
|
|
133
133
|
className: "absolute top-4 right-5 text-right text-xs leading-tight text-muted-foreground tabular-nums",
|
|
134
|
-
children:
|
|
134
|
+
children: l.day(n.startsOn)
|
|
135
135
|
}),
|
|
136
136
|
/* @__PURE__ */ C("span", {
|
|
137
137
|
"aria-hidden": "true",
|
|
138
|
-
className: `absolute right-[7px] w-px ${a ? "top-6" : "top-0"} ${
|
|
138
|
+
className: `absolute right-[7px] w-px ${a ? "top-6" : "top-0"} ${o ? "h-6" : "bottom-0"} ${a && o ? "hidden" : ""} ${p ? "bg-primary" : "bg-border"}`
|
|
139
139
|
}),
|
|
140
140
|
/* @__PURE__ */ C("span", {
|
|
141
141
|
"aria-hidden": "true",
|
|
142
|
-
className: `absolute top-[18px] right-0.5 size-[11px] rounded-full border-2 ${p ? "border-primary bg-primary" :
|
|
142
|
+
className: `absolute top-[18px] right-0.5 size-[11px] rounded-full border-2 ${p ? "border-primary bg-primary" : n.state === "past" ? "border-muted-foreground bg-muted-foreground" : "border-border bg-background"}`
|
|
143
143
|
})
|
|
144
144
|
]
|
|
145
145
|
}), /* @__PURE__ */ w("div", {
|
|
146
146
|
className: `min-w-0 border-b border-border ${p ? "rounded-xl bg-muted/50" : ""}`,
|
|
147
|
-
children: [/* @__PURE__ */ w(
|
|
147
|
+
children: [/* @__PURE__ */ w(r, {
|
|
148
148
|
to: "/$workspace/teams/$key/cycles/$number",
|
|
149
149
|
params: {
|
|
150
150
|
workspace: e,
|
|
151
151
|
key: t,
|
|
152
|
-
number: String(
|
|
152
|
+
number: String(n.number)
|
|
153
153
|
},
|
|
154
154
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1.5 rounded-xl px-3 py-3.5 hover:bg-muted/60",
|
|
155
155
|
children: [
|
|
156
156
|
/* @__PURE__ */ w("span", {
|
|
157
157
|
className: "flex min-w-0 flex-1 basis-full items-center gap-2 md:basis-auto",
|
|
158
|
-
children: [/* @__PURE__ */ C(
|
|
158
|
+
children: [/* @__PURE__ */ C(s, { className: `size-4 shrink-0 ${p ? "text-primary" : "text-muted-foreground"}` }), /* @__PURE__ */ w("span", {
|
|
159
159
|
className: "min-w-0",
|
|
160
160
|
children: [/* @__PURE__ */ C("span", {
|
|
161
161
|
className: "block truncate text-sm font-medium",
|
|
162
|
-
children:
|
|
163
|
-
number:
|
|
164
|
-
name:
|
|
165
|
-
}) : c("cycle", { number:
|
|
162
|
+
children: n.name ? c("cycleNamed", {
|
|
163
|
+
number: n.number,
|
|
164
|
+
name: n.name
|
|
165
|
+
}) : c("cycle", { number: n.number })
|
|
166
166
|
}), /* @__PURE__ */ C("span", {
|
|
167
167
|
className: "block text-xs text-muted-foreground",
|
|
168
|
-
children:
|
|
168
|
+
children: l.dayRange(n.startsOn, n.endsOn)
|
|
169
169
|
})]
|
|
170
170
|
})]
|
|
171
171
|
}),
|
|
172
172
|
/* @__PURE__ */ C(_, {
|
|
173
173
|
variant: p ? "info" : "muted",
|
|
174
174
|
size: "sm",
|
|
175
|
-
children: c(`states.${
|
|
175
|
+
children: c(`states.${n.state}`)
|
|
176
176
|
}),
|
|
177
177
|
/* @__PURE__ */ C("span", {
|
|
178
178
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums",
|
|
@@ -187,7 +187,7 @@ function M({ workspace: e, teamKey: t, cycle: r, capacity: i, first: a, last: s
|
|
|
187
187
|
children: /* @__PURE__ */ C(f, {
|
|
188
188
|
workspace: e,
|
|
189
189
|
teamKey: t,
|
|
190
|
-
cycle:
|
|
190
|
+
cycle: n
|
|
191
191
|
})
|
|
192
192
|
})]
|
|
193
193
|
})]
|