@parallelworks/tandem-web 0.171.1 → 0.171.2
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/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +57 -57
- package/components/ActorAvatar.js +4 -4
- 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 +29 -29
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +38 -38
- 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 +23 -23
- 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 +12 -12
- 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 +4 -4
- 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 +4 -4
- 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/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 +109 -109
- 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 +477 -477
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +175 -175
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -117
- 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
package/pages/projects.js
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { healthStates as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Avatar as
|
|
19
|
-
import { useParams as
|
|
20
|
-
import { useEffect as
|
|
1
|
+
import { projectsQuery as e, teamsQuery as t } from "../api/queries.js";
|
|
2
|
+
import { DisplayMenu as n } from "../components/DisplayMenu.js";
|
|
3
|
+
import { EntityIcon as r } from "../components/EntityIcon.js";
|
|
4
|
+
import { FavoriteStar as i } from "../components/FavoriteStar.js";
|
|
5
|
+
import { ChevronDownIcon as a, ListViewIcon as o, PriorityIcon as s, ProjectIcon as c, TimelineIcon as l, usePriorityNames as u } from "../components/icons.js";
|
|
6
|
+
import { NewProjectDialog as d } from "../components/NewProjectDialog.js";
|
|
7
|
+
import { HealthIcon as f, ProgressBar as p, ProjectStatusIcon as m, healthOf as h } from "../components/Planning.js";
|
|
8
|
+
import { useFavorites as g } from "../lib/favorites.js";
|
|
9
|
+
import { copyItem as _, useLinkItems as v } from "../lib/menus.js";
|
|
10
|
+
import { usePageTitle as y } from "../lib/pageTitle.js";
|
|
11
|
+
import { usePeople as b } from "../lib/people.js";
|
|
12
|
+
import { storeLayout as x, storedLayout as S } from "../lib/projectList.js";
|
|
13
|
+
import { healthStates as C, projectStatuses as ee, shownStatus as te } from "../lib/projectStates.js";
|
|
14
|
+
import { projectRef as w, projectTree as T, projectsUnder as E } from "../lib/projects.js";
|
|
15
|
+
import { useCan as ne } from "../lib/roles.js";
|
|
16
|
+
import { Link as D, useNavigate as re } from "../lib/router.js";
|
|
17
|
+
import { useTime as O } from "../lib/time.js";
|
|
18
|
+
import { Avatar as k, Button as A, Combobox as ie, EmptyState as ae, PageHeaderAddButton as oe, Switch as se, Tabs as j, ToggleGroup as ce, Tooltip as M, menuDivider as le, useOpenMenu as ue } from "@parallelworks/ui";
|
|
19
|
+
import { useParams as N, useSearch as de } from "@tanstack/react-router";
|
|
20
|
+
import { useEffect as P, useId as fe, useRef as F, useState as I } from "react";
|
|
21
21
|
import { useFormatter as L, useTranslations as R } from "use-intl";
|
|
22
22
|
import { jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
23
23
|
import { useSuspenseQuery as V } from "@tanstack/react-query";
|
|
24
24
|
import { MoreButton as H } from "@parallelworks/ui/list";
|
|
25
25
|
// src/pages/projects.tsx
|
|
26
26
|
function U() {
|
|
27
|
-
let { workspace:
|
|
28
|
-
...
|
|
29
|
-
team:
|
|
30
|
-
} :
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
let { team:
|
|
34
|
-
...
|
|
27
|
+
let { workspace: r, key: a } = N({ strict: !1 }), s = de({ strict: !1 }), u = a ? {
|
|
28
|
+
...s,
|
|
29
|
+
team: a
|
|
30
|
+
} : s, f = R("planning"), p = R("common"), { data: m } = V(e(r)), { data: b } = V(t(r)), C = b.find((e) => e.key === u.team);
|
|
31
|
+
y(C ? f("teamProjects", { team: C.name }) : f("projects"));
|
|
32
|
+
let T = a ? "list" : "timeline", D = u.view ?? S(!!a) ?? T, O = m.filter((e) => (!C || e.teamIds.includes(C.id)) && !!e.template == (D === "templates")), k = ne(r, "manage_projects"), [j, M] = I(!1), P = fe(), F = re(), L = ue(), H = v(), U = u.parent ? m.find((e) => e.id === u.parent) : void 0, W = U && new Set(E(m, U.id).map((e) => e.id)), G = te(u.status, D === "templates"), K = O.filter((e) => (!G || e.status === G) && (!u.health || h(e) === u.health) && (!W || W.has(e.id))), q = O.length > 0 && (!!G || !!u.health), J = (e) => {
|
|
33
|
+
let { team: t, ...n } = Object.fromEntries(Object.entries({
|
|
34
|
+
...u,
|
|
35
35
|
...e
|
|
36
36
|
}).filter(([, e]) => e !== void 0));
|
|
37
|
-
return F(
|
|
37
|
+
return F(a ? {
|
|
38
38
|
to: "/$workspace/teams/$key/projects",
|
|
39
39
|
params: {
|
|
40
|
-
workspace:
|
|
41
|
-
key:
|
|
40
|
+
workspace: r,
|
|
41
|
+
key: a
|
|
42
42
|
},
|
|
43
|
-
search:
|
|
43
|
+
search: n,
|
|
44
44
|
replace: !0
|
|
45
45
|
} : {
|
|
46
46
|
to: "/$workspace/projects",
|
|
47
|
-
params: { workspace:
|
|
48
|
-
search:
|
|
47
|
+
params: { workspace: r },
|
|
48
|
+
search: n,
|
|
49
49
|
replace: !0
|
|
50
50
|
});
|
|
51
|
-
}, Y =
|
|
51
|
+
}, Y = g(r), X = R("favorites"), Z = (e) => [
|
|
52
52
|
{
|
|
53
|
-
label:
|
|
53
|
+
label: p("open"),
|
|
54
54
|
onClick: () => F({
|
|
55
55
|
to: "/$workspace/projects/$projectId",
|
|
56
56
|
params: {
|
|
57
|
-
workspace:
|
|
58
|
-
projectId:
|
|
57
|
+
workspace: r,
|
|
58
|
+
projectId: w(e)
|
|
59
59
|
}
|
|
60
60
|
})
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
label:
|
|
63
|
+
label: f("viewIssues"),
|
|
64
64
|
onClick: () => F({
|
|
65
65
|
to: "/$workspace/projects/$projectId",
|
|
66
66
|
params: {
|
|
67
|
-
workspace:
|
|
68
|
-
projectId:
|
|
67
|
+
workspace: r,
|
|
68
|
+
projectId: w(e)
|
|
69
69
|
},
|
|
70
70
|
search: { tab: "issues" }
|
|
71
71
|
})
|
|
@@ -74,11 +74,11 @@ function U() {
|
|
|
74
74
|
label: Y.find("project", e.id) ? X("remove") : X("add"),
|
|
75
75
|
onClick: () => Y.toggle("project", e.id)
|
|
76
76
|
},
|
|
77
|
-
|
|
78
|
-
...H(`/${
|
|
79
|
-
|
|
77
|
+
le,
|
|
78
|
+
...H(`/${r}/projects/${w(e)}`),
|
|
79
|
+
_(p("copyName"), e.name)
|
|
80
80
|
], Q = (e) => ({
|
|
81
|
-
workspace:
|
|
81
|
+
workspace: r,
|
|
82
82
|
project: e,
|
|
83
83
|
onContextMenu: (t) => L(t, Z(e)),
|
|
84
84
|
menu: () => Z(e)
|
|
@@ -91,92 +91,92 @@ function U() {
|
|
|
91
91
|
children: [
|
|
92
92
|
/* @__PURE__ */ z("h1", {
|
|
93
93
|
className: "min-w-0 truncate text-sm font-semibold",
|
|
94
|
-
children:
|
|
94
|
+
children: C ? f("teamProjects", { team: C.name }) : f("projects")
|
|
95
95
|
}),
|
|
96
|
-
!
|
|
97
|
-
workspace:
|
|
96
|
+
!C && /* @__PURE__ */ z(i, {
|
|
97
|
+
workspace: r,
|
|
98
98
|
kind: "page",
|
|
99
99
|
target: "projects"
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ z("span", {
|
|
102
102
|
className: "ml-auto flex items-center gap-1",
|
|
103
|
-
children: /* @__PURE__ */ z(
|
|
104
|
-
...
|
|
103
|
+
children: /* @__PURE__ */ z(n, {
|
|
104
|
+
...D !== "templates" && {
|
|
105
105
|
layouts: [{
|
|
106
106
|
value: "list",
|
|
107
|
-
label:
|
|
108
|
-
icon: /* @__PURE__ */ z(
|
|
107
|
+
label: f("views.list"),
|
|
108
|
+
icon: /* @__PURE__ */ z(o, {})
|
|
109
109
|
}, {
|
|
110
110
|
value: "timeline",
|
|
111
|
-
label:
|
|
112
|
-
icon: /* @__PURE__ */ z(
|
|
111
|
+
label: f("views.timeline"),
|
|
112
|
+
icon: /* @__PURE__ */ z(l, {})
|
|
113
113
|
}],
|
|
114
|
-
layout:
|
|
114
|
+
layout: D,
|
|
115
115
|
onLayoutChange: (e) => {
|
|
116
|
-
|
|
116
|
+
x(!!a, e), J({ view: e });
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
|
-
changed:
|
|
119
|
+
changed: D !== T,
|
|
120
120
|
children: /* @__PURE__ */ B("div", {
|
|
121
121
|
className: "flex items-center justify-between gap-3",
|
|
122
122
|
children: [/* @__PURE__ */ z("span", {
|
|
123
|
-
id:
|
|
123
|
+
id: P,
|
|
124
124
|
className: "text-sm",
|
|
125
|
-
children:
|
|
126
|
-
}), /* @__PURE__ */ z(
|
|
125
|
+
children: f("showTemplates")
|
|
126
|
+
}), /* @__PURE__ */ z(se, {
|
|
127
127
|
size: "sm",
|
|
128
|
-
checked:
|
|
128
|
+
checked: D === "templates",
|
|
129
129
|
onCheckedChange: (e) => J({ view: e ? "templates" : void 0 }),
|
|
130
|
-
"aria-labelledby":
|
|
130
|
+
"aria-labelledby": P
|
|
131
131
|
})]
|
|
132
132
|
})
|
|
133
133
|
})
|
|
134
134
|
}),
|
|
135
|
-
|
|
136
|
-
label:
|
|
137
|
-
onClick: () =>
|
|
135
|
+
k && /* @__PURE__ */ z(oe, {
|
|
136
|
+
label: f("newProject"),
|
|
137
|
+
onClick: () => M(!0)
|
|
138
138
|
})
|
|
139
139
|
]
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ B("div", {
|
|
142
142
|
className: "flex shrink-0 flex-wrap items-center gap-1 border-b border-border px-4 py-2 md:px-5",
|
|
143
143
|
children: [
|
|
144
|
-
/* @__PURE__ */ z(
|
|
145
|
-
label:
|
|
144
|
+
/* @__PURE__ */ z(ce, {
|
|
145
|
+
label: f("filterStatus"),
|
|
146
146
|
multiple: !1,
|
|
147
|
-
all: { count:
|
|
147
|
+
all: { count: O.length },
|
|
148
148
|
options: ee.map((e) => ({
|
|
149
149
|
value: e,
|
|
150
|
-
label:
|
|
151
|
-
count:
|
|
150
|
+
label: f(`status.${e}`),
|
|
151
|
+
count: O.filter((t) => t.status === e).length
|
|
152
152
|
})),
|
|
153
153
|
value: G ? [G] : [],
|
|
154
154
|
onValueChange: ([e]) => J({ status: e ?? "all" })
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
u.health && /* @__PURE__ */ z(A, {
|
|
157
157
|
variant: "outline",
|
|
158
158
|
size: "sm",
|
|
159
159
|
"aria-pressed": !0,
|
|
160
160
|
onClick: () => J({ health: void 0 }),
|
|
161
|
-
children:
|
|
161
|
+
children: f("healthFilter", { health: f(`health.${u.health}`) })
|
|
162
162
|
}),
|
|
163
|
-
|
|
163
|
+
O.some((e) => e.parentId) && /* @__PURE__ */ z(ie, {
|
|
164
164
|
items: [{
|
|
165
165
|
value: "",
|
|
166
|
-
label:
|
|
167
|
-
}, ...
|
|
166
|
+
label: f("anyParent")
|
|
167
|
+
}, ...m.filter((e) => m.some((t) => t.parentId === e.id)).map((e) => ({
|
|
168
168
|
value: e.id,
|
|
169
169
|
label: e.name
|
|
170
170
|
}))],
|
|
171
|
-
value:
|
|
171
|
+
value: u.parent ?? "",
|
|
172
172
|
onValueChange: (e) => J({ parent: e || void 0 }),
|
|
173
|
-
placeholder:
|
|
174
|
-
"aria-label":
|
|
175
|
-
trigger: /* @__PURE__ */ z(
|
|
173
|
+
placeholder: f("parentProject"),
|
|
174
|
+
"aria-label": f("parentProject"),
|
|
175
|
+
trigger: /* @__PURE__ */ z(A, {
|
|
176
176
|
variant: "outline",
|
|
177
177
|
size: "sm",
|
|
178
178
|
className: U ? "border-(--theme-link) text-(--theme-app)" : void 0,
|
|
179
|
-
children: U ?
|
|
179
|
+
children: U ? f("underProject", { name: U.name }) : f("parentProject")
|
|
180
180
|
})
|
|
181
181
|
})
|
|
182
182
|
]
|
|
@@ -187,19 +187,19 @@ function U() {
|
|
|
187
187
|
className: "min-h-0 min-w-0 flex-1 overflow-auto",
|
|
188
188
|
children: K.length === 0 ? /* @__PURE__ */ z("div", {
|
|
189
189
|
className: "p-6",
|
|
190
|
-
children: /* @__PURE__ */ z(
|
|
191
|
-
icon: /* @__PURE__ */ z(
|
|
192
|
-
title:
|
|
193
|
-
...!q && { description:
|
|
194
|
-
...
|
|
190
|
+
children: /* @__PURE__ */ z(ae, {
|
|
191
|
+
icon: /* @__PURE__ */ z(c, {}),
|
|
192
|
+
title: f(q ? "noProjectsWithStatus" : D === "templates" ? "noTemplates" : "noProjects"),
|
|
193
|
+
...!q && { description: f(D === "templates" ? "noTemplatesDescription" : "noProjectsDescription") },
|
|
194
|
+
...k && !q && D !== "templates" && { action: /* @__PURE__ */ z(A, {
|
|
195
195
|
type: "button",
|
|
196
196
|
variant: "primary",
|
|
197
|
-
onClick: () =>
|
|
198
|
-
children:
|
|
197
|
+
onClick: () => M(!0),
|
|
198
|
+
children: f("newProject")
|
|
199
199
|
}) }
|
|
200
200
|
})
|
|
201
|
-
}) :
|
|
202
|
-
workspace:
|
|
201
|
+
}) : D === "timeline" ? /* @__PURE__ */ z(ge, {
|
|
202
|
+
workspace: r,
|
|
203
203
|
projects: K,
|
|
204
204
|
rowProps: Q
|
|
205
205
|
}) : /* @__PURE__ */ z(pe, {
|
|
@@ -207,23 +207,23 @@ function U() {
|
|
|
207
207
|
rowProps: Q
|
|
208
208
|
})
|
|
209
209
|
}), /* @__PURE__ */ z(ve, {
|
|
210
|
-
workspace:
|
|
211
|
-
projects:
|
|
212
|
-
health:
|
|
213
|
-
onHealth: (e) => J({ health: e ===
|
|
210
|
+
workspace: r,
|
|
211
|
+
projects: O,
|
|
212
|
+
health: u.health,
|
|
213
|
+
onHealth: (e) => J({ health: e === u.health ? void 0 : e })
|
|
214
214
|
})]
|
|
215
215
|
}),
|
|
216
|
-
|
|
217
|
-
workspace:
|
|
218
|
-
teamId:
|
|
219
|
-
onClose: () =>
|
|
216
|
+
j && /* @__PURE__ */ z(d, {
|
|
217
|
+
workspace: r,
|
|
218
|
+
teamId: C?.id,
|
|
219
|
+
onClose: () => M(!1)
|
|
220
220
|
})
|
|
221
221
|
]
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
var W = "@4xl:grid @4xl:grid-cols-[minmax(0,1fr)_10rem_2rem_2rem_6rem_8rem_2rem]";
|
|
225
225
|
function pe({ projects: e, rowProps: t }) {
|
|
226
|
-
let n = R("planning"), [r, i] = I(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) =>
|
|
226
|
+
let n = R("planning"), [r, i] = I(/* @__PURE__ */ new Set()), a = new Set([...r].flatMap((t) => E(e, t).map((e) => e.id))), o = (e) => i((t) => {
|
|
227
227
|
let n = new Set(t);
|
|
228
228
|
return n.delete(e) || n.add(e), n;
|
|
229
229
|
});
|
|
@@ -234,14 +234,14 @@ function pe({ projects: e, rowProps: t }) {
|
|
|
234
234
|
children: [
|
|
235
235
|
/* @__PURE__ */ z("span", { children: n("name") }),
|
|
236
236
|
/* @__PURE__ */ z("span", { children: n("healthLabel") }),
|
|
237
|
-
/* @__PURE__ */ z(
|
|
237
|
+
/* @__PURE__ */ z(M, {
|
|
238
238
|
content: n("priority"),
|
|
239
239
|
children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
|
|
240
240
|
className: "sr-only",
|
|
241
241
|
children: n("priority")
|
|
242
242
|
}) })
|
|
243
243
|
}),
|
|
244
|
-
/* @__PURE__ */ z(
|
|
244
|
+
/* @__PURE__ */ z(M, {
|
|
245
245
|
content: n("lead"),
|
|
246
246
|
children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z("span", {
|
|
247
247
|
className: "sr-only",
|
|
@@ -252,7 +252,7 @@ function pe({ projects: e, rowProps: t }) {
|
|
|
252
252
|
/* @__PURE__ */ z("span", { children: n("progressTitle") }),
|
|
253
253
|
/* @__PURE__ */ z("span", {})
|
|
254
254
|
]
|
|
255
|
-
}), /* @__PURE__ */ z("ul", { children:
|
|
255
|
+
}), /* @__PURE__ */ z("ul", { children: T(e).filter((e) => !a.has(e.project.id)).map((e) => /* @__PURE__ */ z(K, {
|
|
256
256
|
...t(e.project),
|
|
257
257
|
depth: e.depth,
|
|
258
258
|
childCount: e.children,
|
|
@@ -262,97 +262,97 @@ function pe({ projects: e, rowProps: t }) {
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
function G({ project: e }) {
|
|
265
|
-
return e.icon || e.color ? /* @__PURE__ */ z(
|
|
265
|
+
return e.icon || e.color ? /* @__PURE__ */ z(r, {
|
|
266
266
|
icon: e.icon ?? "",
|
|
267
267
|
color: e.color ?? "",
|
|
268
268
|
name: e.name
|
|
269
|
-
}) : /* @__PURE__ */ z(
|
|
269
|
+
}) : /* @__PURE__ */ z(c, { className: "size-4 text-muted-foreground" });
|
|
270
270
|
}
|
|
271
|
-
function K({ workspace: e, project:
|
|
272
|
-
let d = R("planning"),
|
|
271
|
+
function K({ workspace: e, project: t, onContextMenu: n, menu: r, depth: i = 0, childCount: o = 0, folded: c = !1, onFold: l }) {
|
|
272
|
+
let d = R("planning"), g = R("common"), _ = O(), v = u(), { person: y } = b(e), x = t.lead ? y(t.lead) : void 0, S = h(t);
|
|
273
273
|
return /* @__PURE__ */ B("li", {
|
|
274
274
|
className: "group flex items-center border-b border-border pr-2 hover:bg-muted/60",
|
|
275
275
|
children: [
|
|
276
276
|
/* @__PURE__ */ z("span", {
|
|
277
277
|
className: "flex shrink-0 justify-end pl-2 md:pl-3",
|
|
278
|
-
style: { width: `${
|
|
278
|
+
style: { width: `${i * 1.25 + 2}rem` },
|
|
279
279
|
children: o > 0 && /* @__PURE__ */ z("button", {
|
|
280
280
|
type: "button",
|
|
281
281
|
onClick: l,
|
|
282
|
-
"aria-expanded": !
|
|
283
|
-
"aria-label": d(
|
|
282
|
+
"aria-expanded": !c,
|
|
283
|
+
"aria-label": d(c ? "showSubProjects" : "hideSubProjects", { name: t.name }),
|
|
284
284
|
className: "rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
285
|
-
children: /* @__PURE__ */ z(
|
|
285
|
+
children: /* @__PURE__ */ z(a, { className: `size-3.5 transition-transform ${c ? "-rotate-90" : ""}` })
|
|
286
286
|
})
|
|
287
287
|
}),
|
|
288
|
-
/* @__PURE__ */ B(
|
|
288
|
+
/* @__PURE__ */ B(D, {
|
|
289
289
|
to: "/$workspace/projects/$projectId",
|
|
290
290
|
params: {
|
|
291
291
|
workspace: e,
|
|
292
|
-
projectId:
|
|
292
|
+
projectId: w(t)
|
|
293
293
|
},
|
|
294
|
-
onContextMenu:
|
|
294
|
+
onContextMenu: n,
|
|
295
295
|
className: `flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 py-2.5 pl-1 ${W}`,
|
|
296
296
|
children: [
|
|
297
297
|
/* @__PURE__ */ B("span", {
|
|
298
298
|
className: "flex min-w-0 basis-full items-center gap-2.5 @4xl:basis-auto",
|
|
299
|
-
children: [/* @__PURE__ */ z(G, { project:
|
|
299
|
+
children: [/* @__PURE__ */ z(G, { project: t }), /* @__PURE__ */ B("span", {
|
|
300
300
|
className: "min-w-0",
|
|
301
301
|
children: [/* @__PURE__ */ z("span", {
|
|
302
302
|
className: "block truncate text-sm font-medium",
|
|
303
|
-
children:
|
|
304
|
-
}),
|
|
303
|
+
children: t.name
|
|
304
|
+
}), t.summary && /* @__PURE__ */ z("span", {
|
|
305
305
|
className: "block truncate text-xs text-muted-foreground",
|
|
306
|
-
children:
|
|
306
|
+
children: t.summary
|
|
307
307
|
})]
|
|
308
308
|
})]
|
|
309
309
|
}),
|
|
310
310
|
/* @__PURE__ */ B("span", {
|
|
311
311
|
className: "flex items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground",
|
|
312
|
-
children: [/* @__PURE__ */ z(
|
|
312
|
+
children: [/* @__PURE__ */ z(f, { state: S }), d(`health.${S}`)]
|
|
313
313
|
}),
|
|
314
|
-
/* @__PURE__ */ z(
|
|
315
|
-
content:
|
|
314
|
+
/* @__PURE__ */ z(M, {
|
|
315
|
+
content: v[t.priority],
|
|
316
316
|
children: /* @__PURE__ */ z("span", {
|
|
317
317
|
role: "img",
|
|
318
|
-
"aria-label":
|
|
318
|
+
"aria-label": v[t.priority],
|
|
319
319
|
className: "flex",
|
|
320
|
-
children: /* @__PURE__ */ z(
|
|
320
|
+
children: /* @__PURE__ */ z(s, { priority: t.priority })
|
|
321
321
|
})
|
|
322
322
|
}),
|
|
323
323
|
/* @__PURE__ */ z("span", {
|
|
324
324
|
className: "flex",
|
|
325
|
-
children:
|
|
326
|
-
content: d("leadIs", { name:
|
|
327
|
-
children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(
|
|
328
|
-
name:
|
|
329
|
-
src:
|
|
325
|
+
children: x && /* @__PURE__ */ z(M, {
|
|
326
|
+
content: d("leadIs", { name: x.name }),
|
|
327
|
+
children: /* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(k, {
|
|
328
|
+
name: x.name,
|
|
329
|
+
src: x.avatarUrl,
|
|
330
330
|
size: "sm"
|
|
331
331
|
}) })
|
|
332
332
|
})
|
|
333
333
|
}),
|
|
334
334
|
/* @__PURE__ */ z("span", {
|
|
335
335
|
className: "text-xs text-muted-foreground tabular-nums",
|
|
336
|
-
children:
|
|
336
|
+
children: t.targetDate ? _.day(t.targetDate) : ""
|
|
337
337
|
}),
|
|
338
|
-
/* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(
|
|
339
|
-
progress: o > 0 ?
|
|
338
|
+
/* @__PURE__ */ z("span", { children: /* @__PURE__ */ z(p, {
|
|
339
|
+
progress: o > 0 ? t.treeProgress : t.progress,
|
|
340
340
|
compact: !0
|
|
341
341
|
}) }),
|
|
342
|
-
/* @__PURE__ */ z(
|
|
343
|
-
content: d(`status.${
|
|
342
|
+
/* @__PURE__ */ z(M, {
|
|
343
|
+
content: d(`status.${t.status}`),
|
|
344
344
|
children: /* @__PURE__ */ z("span", {
|
|
345
345
|
role: "img",
|
|
346
|
-
"aria-label": d(`status.${
|
|
346
|
+
"aria-label": d(`status.${t.status}`),
|
|
347
347
|
className: "flex",
|
|
348
|
-
children: /* @__PURE__ */ z(
|
|
348
|
+
children: /* @__PURE__ */ z(m, { status: t.status })
|
|
349
349
|
})
|
|
350
350
|
})
|
|
351
351
|
]
|
|
352
352
|
}),
|
|
353
353
|
/* @__PURE__ */ z(H, {
|
|
354
|
-
items:
|
|
355
|
-
label:
|
|
354
|
+
items: r,
|
|
355
|
+
label: g("moreActionsFor", { name: t.name })
|
|
356
356
|
})
|
|
357
357
|
]
|
|
358
358
|
});
|
|
@@ -364,51 +364,51 @@ var q = 864e5, J = 5, Y = 64, X = 256, Z = 56, Q = (e) => Date.parse(`${e}T00:00
|
|
|
364
364
|
let e = /* @__PURE__ */ new Date();
|
|
365
365
|
return Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
366
366
|
}, he = (e) => e - (new Date(e).getUTCDay() + 6) % 7 * q;
|
|
367
|
-
function ge({ workspace: e, projects:
|
|
368
|
-
let
|
|
367
|
+
function ge({ workspace: e, projects: t, rowProps: n }) {
|
|
368
|
+
let r = R("planning"), i = L(), a = F(null), [o, s] = I({
|
|
369
369
|
left: 0,
|
|
370
370
|
width: 0
|
|
371
|
-
}),
|
|
371
|
+
}), c = me(), l = t.map((e) => {
|
|
372
372
|
let t = e.targetDate ? Q(e.targetDate) : void 0;
|
|
373
373
|
return {
|
|
374
374
|
p: e,
|
|
375
375
|
start: e.startDate ? Q(e.startDate) : t === void 0 ? void 0 : Math.min(Date.parse(e.createdAt), t),
|
|
376
376
|
end: t
|
|
377
377
|
};
|
|
378
|
-
}),
|
|
379
|
-
for (let e =
|
|
380
|
-
let
|
|
381
|
-
for (let e = he(
|
|
382
|
-
let
|
|
378
|
+
}), u = l.flatMap((e) => [e.start, e.end].filter((e) => e !== void 0)), d = $(Math.min(c - 90 * q, ...u)), f = $(Math.max(c + 300 * q, ...u) + 40 * q), p = (e) => (e - d) / q * J, m = p(f), h = [];
|
|
379
|
+
for (let e = d; e < f; e = $(e + 32 * q)) h.push(e);
|
|
380
|
+
let g = [];
|
|
381
|
+
for (let e = he(d) + 7 * q; e < f; e += 7 * q) g.push(e);
|
|
382
|
+
let _ = (e, t) => i.dateTime(new Date(e), {
|
|
383
383
|
...t,
|
|
384
384
|
timeZone: "UTC"
|
|
385
|
-
}),
|
|
385
|
+
}), v = (e, t) => `${_(e, {
|
|
386
386
|
month: "short",
|
|
387
387
|
year: "numeric"
|
|
388
|
-
})} – ${
|
|
388
|
+
})} – ${_(t, {
|
|
389
389
|
month: "short",
|
|
390
390
|
year: "numeric"
|
|
391
|
-
})}`,
|
|
392
|
-
let e =
|
|
393
|
-
e &&
|
|
391
|
+
})}`, y = () => {
|
|
392
|
+
let e = a.current;
|
|
393
|
+
e && s({
|
|
394
394
|
left: e.scrollLeft,
|
|
395
395
|
width: e.clientWidth - X
|
|
396
396
|
});
|
|
397
|
-
},
|
|
398
|
-
let t =
|
|
397
|
+
}, b = (e = "smooth") => {
|
|
398
|
+
let t = a.current;
|
|
399
399
|
t && t.scrollTo({
|
|
400
|
-
left:
|
|
400
|
+
left: p(c) - (t.clientWidth - X) / 2,
|
|
401
401
|
behavior: e
|
|
402
402
|
});
|
|
403
403
|
};
|
|
404
|
-
return
|
|
405
|
-
ref:
|
|
406
|
-
onScroll:
|
|
404
|
+
return P(() => (b("instant"), y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y)), []), /* @__PURE__ */ z("div", {
|
|
405
|
+
ref: a,
|
|
406
|
+
onScroll: y,
|
|
407
407
|
className: "relative h-full min-h-0 overflow-auto",
|
|
408
408
|
children: /* @__PURE__ */ B("div", {
|
|
409
409
|
className: "relative",
|
|
410
410
|
style: {
|
|
411
|
-
width:
|
|
411
|
+
width: m + X,
|
|
412
412
|
minHeight: "100%"
|
|
413
413
|
},
|
|
414
414
|
children: [
|
|
@@ -423,33 +423,33 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
423
423
|
children: [/* @__PURE__ */ z("div", {
|
|
424
424
|
className: "sticky left-0 z-[3] flex shrink-0 items-end border-r border-border bg-background px-4 pb-2",
|
|
425
425
|
style: { width: X },
|
|
426
|
-
children: /* @__PURE__ */ z(
|
|
426
|
+
children: /* @__PURE__ */ z(A, {
|
|
427
427
|
type: "button",
|
|
428
428
|
size: "xs",
|
|
429
|
-
onClick: () =>
|
|
430
|
-
children:
|
|
429
|
+
onClick: () => b(),
|
|
430
|
+
children: r("today")
|
|
431
431
|
})
|
|
432
432
|
}), /* @__PURE__ */ B("div", {
|
|
433
433
|
className: "relative",
|
|
434
|
-
style: { width:
|
|
434
|
+
style: { width: m },
|
|
435
435
|
children: [
|
|
436
|
-
|
|
436
|
+
h.map((e) => /* @__PURE__ */ z("span", {
|
|
437
437
|
className: "absolute top-2 pl-1.5 text-[11px] font-medium text-muted-foreground uppercase",
|
|
438
|
-
style: { left:
|
|
439
|
-
children:
|
|
438
|
+
style: { left: p(e) },
|
|
439
|
+
children: _(e, {
|
|
440
440
|
month: "short",
|
|
441
441
|
...new Date(e).getUTCMonth() === 0 && { year: "numeric" }
|
|
442
442
|
})
|
|
443
443
|
}, e)),
|
|
444
|
-
|
|
444
|
+
g.filter((e) => Math.abs(p(e) - p(c)) > 36).map((e) => /* @__PURE__ */ z("span", {
|
|
445
445
|
className: "absolute bottom-2 -translate-x-1/2 text-[11px] text-muted-foreground tabular-nums",
|
|
446
|
-
style: { left:
|
|
447
|
-
children:
|
|
446
|
+
style: { left: p(e) },
|
|
447
|
+
children: _(e, { day: "numeric" })
|
|
448
448
|
}, e)),
|
|
449
449
|
/* @__PURE__ */ z("span", {
|
|
450
450
|
className: "absolute bottom-1.5 z-[1] -translate-x-1/2 rounded-full bg-primary px-2 py-px text-[11px] font-medium text-primary-foreground uppercase tabular-nums",
|
|
451
|
-
style: { left:
|
|
452
|
-
children:
|
|
451
|
+
style: { left: p(c) },
|
|
452
|
+
children: _(c, {
|
|
453
453
|
month: "short",
|
|
454
454
|
day: "numeric"
|
|
455
455
|
})
|
|
@@ -457,19 +457,19 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
457
457
|
]
|
|
458
458
|
})]
|
|
459
459
|
}),
|
|
460
|
-
|
|
460
|
+
g.map((e) => /* @__PURE__ */ z("div", {
|
|
461
461
|
"aria-hidden": "true",
|
|
462
462
|
className: "pointer-events-none absolute bottom-0 border-l border-dashed border-border/40",
|
|
463
463
|
style: {
|
|
464
|
-
left: X +
|
|
464
|
+
left: X + p(e),
|
|
465
465
|
top: Z
|
|
466
466
|
}
|
|
467
467
|
}, e)),
|
|
468
|
-
|
|
468
|
+
h.map((e) => /* @__PURE__ */ z("div", {
|
|
469
469
|
"aria-hidden": "true",
|
|
470
470
|
className: "pointer-events-none absolute bottom-0 w-px bg-border/70",
|
|
471
471
|
style: {
|
|
472
|
-
left: X +
|
|
472
|
+
left: X + p(e),
|
|
473
473
|
top: Z
|
|
474
474
|
}
|
|
475
475
|
}, e)),
|
|
@@ -477,160 +477,160 @@ function ge({ workspace: e, projects: n, rowProps: r }) {
|
|
|
477
477
|
"aria-hidden": "true",
|
|
478
478
|
className: "pointer-events-none absolute bottom-0 z-[1] w-px bg-primary",
|
|
479
479
|
style: {
|
|
480
|
-
left: X +
|
|
480
|
+
left: X + p(c),
|
|
481
481
|
top: Z
|
|
482
482
|
}
|
|
483
483
|
}),
|
|
484
484
|
/* @__PURE__ */ z("ul", {
|
|
485
485
|
className: "relative",
|
|
486
|
-
children:
|
|
487
|
-
let
|
|
486
|
+
children: l.map(({ p: t, start: r, end: i }) => {
|
|
487
|
+
let a = r !== void 0 && i !== void 0, s = a ? p(r) : 0, l = a ? Math.max(p(i + q), s + 24) : 0, u = a && l < o.left, d = a && s > o.left + o.width, f = a ? Math.min(Math.max(p(c) - s, 0), l - s) : 0, h = Math.min(Math.max(o.left + 8 - s, 0), Math.max(l - s - 80, 0));
|
|
488
488
|
return /* @__PURE__ */ B("li", {
|
|
489
489
|
className: "group flex hover:bg-muted/40",
|
|
490
490
|
style: { height: Y },
|
|
491
|
-
children: [/* @__PURE__ */ z(_e, { ...
|
|
491
|
+
children: [/* @__PURE__ */ z(_e, { ...n(t) }), /* @__PURE__ */ B("div", {
|
|
492
492
|
className: "relative",
|
|
493
|
-
style: { width:
|
|
494
|
-
children: [
|
|
495
|
-
content: `${
|
|
496
|
-
children: /* @__PURE__ */ B(
|
|
493
|
+
style: { width: m },
|
|
494
|
+
children: [a && !u && !d && /* @__PURE__ */ z(M, {
|
|
495
|
+
content: `${t.name}, ${v(r, i)}`,
|
|
496
|
+
children: /* @__PURE__ */ B(D, {
|
|
497
497
|
to: "/$workspace/projects/$projectId",
|
|
498
498
|
params: {
|
|
499
499
|
workspace: e,
|
|
500
|
-
projectId:
|
|
500
|
+
projectId: w(t)
|
|
501
501
|
},
|
|
502
502
|
className: "absolute top-2 bottom-2 flex flex-col justify-end gap-1",
|
|
503
503
|
style: {
|
|
504
|
-
left:
|
|
505
|
-
width:
|
|
504
|
+
left: s,
|
|
505
|
+
width: l - s
|
|
506
506
|
},
|
|
507
507
|
children: [/* @__PURE__ */ z("span", {
|
|
508
508
|
className: "block self-start truncate px-0.5 text-xs font-medium",
|
|
509
509
|
style: {
|
|
510
|
-
marginLeft:
|
|
511
|
-
maxWidth: Math.max(
|
|
510
|
+
marginLeft: h,
|
|
511
|
+
maxWidth: Math.max(m - s - h, l - s - h)
|
|
512
512
|
},
|
|
513
|
-
children:
|
|
513
|
+
children: t.name
|
|
514
514
|
}), /* @__PURE__ */ B("span", {
|
|
515
515
|
className: "relative block h-6 overflow-hidden rounded-md border border-border",
|
|
516
516
|
children: [/* @__PURE__ */ z("span", {
|
|
517
517
|
className: "absolute inset-y-0 left-0 bg-muted-foreground/20",
|
|
518
|
-
style: { width:
|
|
518
|
+
style: { width: f }
|
|
519
519
|
}), /* @__PURE__ */ z("span", {
|
|
520
520
|
className: "absolute inset-y-0 right-0 border-l border-dashed border-primary/50 bg-primary/10",
|
|
521
|
-
style: { left:
|
|
521
|
+
style: { left: f }
|
|
522
522
|
})]
|
|
523
523
|
})]
|
|
524
524
|
})
|
|
525
|
-
}), (
|
|
525
|
+
}), (u || d) && /* @__PURE__ */ B(D, {
|
|
526
526
|
to: "/$workspace/projects/$projectId",
|
|
527
527
|
params: {
|
|
528
528
|
workspace: e,
|
|
529
|
-
projectId:
|
|
529
|
+
projectId: w(t)
|
|
530
530
|
},
|
|
531
531
|
className: "absolute top-1/2 flex -translate-y-1/2 items-center gap-1.5 whitespace-nowrap text-xs text-muted-foreground hover:text-foreground",
|
|
532
|
-
style:
|
|
533
|
-
left:
|
|
532
|
+
style: u ? { left: o.left + 12 } : {
|
|
533
|
+
left: o.left + o.width - 12,
|
|
534
534
|
transform: "translate(-100%, -50%)"
|
|
535
535
|
},
|
|
536
536
|
children: [
|
|
537
|
-
|
|
537
|
+
u && /* @__PURE__ */ z("span", {
|
|
538
538
|
"aria-hidden": "true",
|
|
539
539
|
children: "←"
|
|
540
540
|
}),
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
v(r, i),
|
|
542
|
+
d && /* @__PURE__ */ z("span", {
|
|
543
543
|
"aria-hidden": "true",
|
|
544
544
|
children: "→"
|
|
545
545
|
})
|
|
546
546
|
]
|
|
547
547
|
})]
|
|
548
548
|
})]
|
|
549
|
-
},
|
|
549
|
+
}, t.id);
|
|
550
550
|
})
|
|
551
551
|
})
|
|
552
552
|
]
|
|
553
553
|
})
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
|
-
function _e({ workspace: e, project:
|
|
557
|
-
let
|
|
558
|
-
return /* @__PURE__ */ B(
|
|
556
|
+
function _e({ workspace: e, project: t, onContextMenu: n }) {
|
|
557
|
+
let r = R("planning"), { person: i } = b(e), a = t.lead ? i(t.lead) : void 0, o = h(t);
|
|
558
|
+
return /* @__PURE__ */ B(D, {
|
|
559
559
|
to: "/$workspace/projects/$projectId",
|
|
560
560
|
params: {
|
|
561
561
|
workspace: e,
|
|
562
|
-
projectId:
|
|
562
|
+
projectId: w(t)
|
|
563
563
|
},
|
|
564
|
-
onContextMenu:
|
|
564
|
+
onContextMenu: n,
|
|
565
565
|
className: "sticky left-0 z-[2] flex shrink-0 items-center gap-2 border-r border-border bg-background px-4 group-hover:bg-muted",
|
|
566
566
|
style: { width: X },
|
|
567
567
|
children: [
|
|
568
|
-
/* @__PURE__ */ z(G, { project:
|
|
568
|
+
/* @__PURE__ */ z(G, { project: t }),
|
|
569
569
|
/* @__PURE__ */ z("span", {
|
|
570
570
|
className: "min-w-0 flex-1 truncate text-sm",
|
|
571
|
-
children:
|
|
571
|
+
children: t.name
|
|
572
572
|
}),
|
|
573
|
-
/* @__PURE__ */ z(
|
|
574
|
-
content:
|
|
573
|
+
/* @__PURE__ */ z(M, {
|
|
574
|
+
content: r(`status.${t.status}`),
|
|
575
575
|
children: /* @__PURE__ */ z("span", {
|
|
576
576
|
role: "img",
|
|
577
|
-
"aria-label":
|
|
577
|
+
"aria-label": r(`status.${t.status}`),
|
|
578
578
|
className: "flex",
|
|
579
|
-
children: /* @__PURE__ */ z(
|
|
579
|
+
children: /* @__PURE__ */ z(m, { status: t.status })
|
|
580
580
|
})
|
|
581
581
|
}),
|
|
582
|
-
/* @__PURE__ */ z(
|
|
583
|
-
content:
|
|
582
|
+
/* @__PURE__ */ z(M, {
|
|
583
|
+
content: r(`health.${o}`),
|
|
584
584
|
children: /* @__PURE__ */ z("span", {
|
|
585
585
|
role: "img",
|
|
586
|
-
"aria-label":
|
|
587
|
-
children: /* @__PURE__ */ z(
|
|
586
|
+
"aria-label": r(`health.${o}`),
|
|
587
|
+
children: /* @__PURE__ */ z(f, { state: o })
|
|
588
588
|
})
|
|
589
589
|
}),
|
|
590
|
-
|
|
591
|
-
name:
|
|
592
|
-
src:
|
|
590
|
+
a && /* @__PURE__ */ z(k, {
|
|
591
|
+
name: a.name,
|
|
592
|
+
src: a.avatarUrl,
|
|
593
593
|
size: "xs",
|
|
594
594
|
tooltip: !0
|
|
595
595
|
})
|
|
596
596
|
]
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
|
-
function ve({ workspace: e, projects:
|
|
600
|
-
let
|
|
599
|
+
function ve({ workspace: e, projects: n, health: i, onHealth: a }) {
|
|
600
|
+
let o = R("planning"), { data: s } = V(t(e)), { person: c } = b(e), [l, u] = I("health"), d = (e) => n.filter(e).length, p = "flex h-9 w-full items-center gap-2.5 rounded-md px-2 text-sm", m = [...new Set(n.map((e) => e.lead ?? ""))];
|
|
601
601
|
return /* @__PURE__ */ B("aside", {
|
|
602
|
-
"aria-label":
|
|
602
|
+
"aria-label": o("breakdown"),
|
|
603
603
|
className: "hidden w-72 shrink-0 overflow-y-auto border-l border-border p-3 xl:block",
|
|
604
|
-
children: [/* @__PURE__ */ z(
|
|
604
|
+
children: [/* @__PURE__ */ z(j, {
|
|
605
605
|
variant: "segmented",
|
|
606
606
|
size: "sm",
|
|
607
|
-
label:
|
|
607
|
+
label: o("breakdown"),
|
|
608
608
|
items: [
|
|
609
609
|
"health",
|
|
610
610
|
"teams",
|
|
611
611
|
"leads"
|
|
612
612
|
].map((e) => ({
|
|
613
613
|
value: e,
|
|
614
|
-
label:
|
|
614
|
+
label: o(`summaryTabs.${e}`)
|
|
615
615
|
})),
|
|
616
|
-
value:
|
|
617
|
-
onValueChange:
|
|
616
|
+
value: l,
|
|
617
|
+
onValueChange: u
|
|
618
618
|
}), /* @__PURE__ */ B("ul", {
|
|
619
619
|
className: "mt-2",
|
|
620
620
|
children: [
|
|
621
|
-
|
|
621
|
+
l === "health" && C.map((e) => ({
|
|
622
622
|
h: e,
|
|
623
|
-
n:
|
|
623
|
+
n: d((t) => h(t) === e)
|
|
624
624
|
})).filter(({ n: e }) => e > 0).map(({ h: e, n: t }) => /* @__PURE__ */ z("li", { children: /* @__PURE__ */ B("button", {
|
|
625
625
|
type: "button",
|
|
626
|
-
"aria-pressed":
|
|
627
|
-
onClick: () =>
|
|
628
|
-
className: `${
|
|
626
|
+
"aria-pressed": i === e,
|
|
627
|
+
onClick: () => a(e),
|
|
628
|
+
className: `${p} hover:bg-muted aria-pressed:bg-muted`,
|
|
629
629
|
children: [
|
|
630
|
-
/* @__PURE__ */ z(
|
|
630
|
+
/* @__PURE__ */ z(f, { state: e }),
|
|
631
631
|
/* @__PURE__ */ z("span", {
|
|
632
632
|
className: "flex-1 text-left",
|
|
633
|
-
children:
|
|
633
|
+
children: o(`health.${e}`)
|
|
634
634
|
}),
|
|
635
635
|
/* @__PURE__ */ z("span", {
|
|
636
636
|
className: "text-muted-foreground tabular-nums",
|
|
@@ -638,13 +638,13 @@ function ve({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
638
638
|
})
|
|
639
639
|
]
|
|
640
640
|
}) }, e)),
|
|
641
|
-
|
|
641
|
+
l === "teams" && s.filter((e) => !e.archivedAt).map((e) => ({
|
|
642
642
|
team: e,
|
|
643
|
-
n:
|
|
643
|
+
n: d((t) => t.teamIds.includes(e.id))
|
|
644
644
|
})).filter(({ n: e }) => e > 0).map(({ team: e, n: t }) => /* @__PURE__ */ B("li", {
|
|
645
|
-
className:
|
|
645
|
+
className: p,
|
|
646
646
|
children: [
|
|
647
|
-
/* @__PURE__ */ z(
|
|
647
|
+
/* @__PURE__ */ z(r, {
|
|
648
648
|
icon: e.icon,
|
|
649
649
|
color: e.color,
|
|
650
650
|
name: e.name
|
|
@@ -659,12 +659,12 @@ function ve({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
659
659
|
})
|
|
660
660
|
]
|
|
661
661
|
}, e.id)),
|
|
662
|
-
|
|
663
|
-
let t = e ?
|
|
662
|
+
l === "leads" && m.map((e) => {
|
|
663
|
+
let t = e ? c(e) : void 0;
|
|
664
664
|
return /* @__PURE__ */ B("li", {
|
|
665
|
-
className:
|
|
665
|
+
className: p,
|
|
666
666
|
children: [
|
|
667
|
-
t ? /* @__PURE__ */ z(
|
|
667
|
+
t ? /* @__PURE__ */ z(k, {
|
|
668
668
|
name: t.name,
|
|
669
669
|
src: t.avatarUrl,
|
|
670
670
|
size: "xs",
|
|
@@ -672,11 +672,11 @@ function ve({ workspace: e, projects: t, health: n, onHealth: r }) {
|
|
|
672
672
|
}) : /* @__PURE__ */ z("span", { className: "size-4" }),
|
|
673
673
|
/* @__PURE__ */ z("span", {
|
|
674
674
|
className: "flex-1 truncate",
|
|
675
|
-
children: t ? t.name :
|
|
675
|
+
children: t ? t.name : o("noLead")
|
|
676
676
|
}),
|
|
677
677
|
/* @__PURE__ */ z("span", {
|
|
678
678
|
className: "text-muted-foreground tabular-nums",
|
|
679
|
-
children:
|
|
679
|
+
children: d((t) => (t.lead ?? "") === e)
|
|
680
680
|
})
|
|
681
681
|
]
|
|
682
682
|
}, e || "none");
|