@burdenoff/microfe-planmagnet 2026.930.12 → 2026.930.13
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/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +20 -11
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +227 -223
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +37 -37
- package/dist/planmagnet/automation/AutomationRuleFields.js +41 -41
- package/dist/planmagnet/board/BulkActions.js +6 -6
- package/dist/planmagnet/board/ProjectBoard.js +24 -24
- package/dist/planmagnet/budgets/BudgetControls.js +18 -18
- package/dist/planmagnet/controls/FeatureControls.js +24 -24
- package/dist/planmagnet/controls/ObjectiveControls.js +11 -11
- package/dist/planmagnet/controls/ProgramControls.js +9 -9
- package/dist/planmagnet/controls/WorkItemControls.js +27 -27
- package/dist/planmagnet/dependency/DependencyPanel.js +7 -7
- package/dist/planmagnet/pages/AiPlanPagePage.js +6 -6
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +370 -221
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +140 -135
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js +160 -108
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +5 -5
- package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsWorkflowPagePage.js +30 -30
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.js +329 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.js.map +1 -0
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +26 -26
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts +14 -2
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +173 -113
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js +211 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.js +177 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts +7 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.js +137 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.d.ts +42 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.js +47 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.js.map +1 -0
- package/dist/planmagnet/time/TimeEntryControls.js +12 -12
- package/package.json +1 -1
|
@@ -2,27 +2,32 @@ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
|
2
2
|
import { Legend as t } from "../../node_modules/recharts/es6/component/Legend.js";
|
|
3
3
|
import { Tooltip as n } from "../../node_modules/recharts/es6/component/Tooltip.js";
|
|
4
4
|
import { ResponsiveContainer as r } from "../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
5
|
-
import { Bar as
|
|
6
|
-
import { ReferenceLine as
|
|
7
|
-
import { CartesianGrid as
|
|
8
|
-
import { Line as
|
|
9
|
-
import { Area as
|
|
10
|
-
import { XAxis as
|
|
11
|
-
import { YAxis as
|
|
12
|
-
import { LineChart as
|
|
13
|
-
import { BarChart as
|
|
14
|
-
import { AreaChart as
|
|
15
|
-
import { countLabel as
|
|
16
|
-
import { BudgetPerformanceCard as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
5
|
+
import { Bar as ee } from "../../node_modules/recharts/es6/cartesian/Bar.js";
|
|
6
|
+
import { ReferenceLine as te } from "../../node_modules/recharts/es6/cartesian/ReferenceLine.js";
|
|
7
|
+
import { CartesianGrid as i } from "../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
8
|
+
import { Line as ne } from "../../node_modules/recharts/es6/cartesian/Line.js";
|
|
9
|
+
import { Area as re } from "../../node_modules/recharts/es6/cartesian/Area.js";
|
|
10
|
+
import { XAxis as a } from "../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
11
|
+
import { YAxis as o } from "../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
12
|
+
import { LineChart as ie } from "../../node_modules/recharts/es6/chart/LineChart.js";
|
|
13
|
+
import { BarChart as ae } from "../../node_modules/recharts/es6/chart/BarChart.js";
|
|
14
|
+
import { AreaChart as oe } from "../../node_modules/recharts/es6/chart/AreaChart.js";
|
|
15
|
+
import { countLabel as s, useProjectCounts as se, useSprintCounts as ce } from "../hooks/useCounts.js";
|
|
16
|
+
import { BudgetPerformanceCard as le, CycleTimeCard as ue } from "./analytics/DeliveryHealthCards.js";
|
|
17
|
+
import { QualityMetricsCard as de } from "./analytics/QualityMetricsCard.js";
|
|
18
|
+
import { DeliveryKpisCard as fe } from "./analytics/DeliveryKpisCard.js";
|
|
19
|
+
import { ThroughputCard as pe } from "./analytics/ThroughputCard.js";
|
|
20
|
+
import { activePreset as me, isValidRange as c, presetRange as l, scopeToProjectId as he, toRangeVariables as ge } from "./analytics/analyticsRange.js";
|
|
21
|
+
import { useState as u } from "react";
|
|
22
|
+
import { BarChart3 as _e, FolderKanban as ve, Target as ye, TrendingUp as be, Zap as xe } from "lucide-react";
|
|
23
|
+
import { useSearchParams as Se } from "react-router";
|
|
24
|
+
import { gql as d } from "@apollo/client";
|
|
25
|
+
import { useQuery as f } from "@apollo/client/react";
|
|
26
|
+
import { Fragment as Ce, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
27
|
+
import { useI18n as we } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
28
|
+
import { Badge as Te, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y, Select as b, SelectContent as x, SelectItem as S, SelectTrigger as C, SelectValue as w } from "@burdenoff/fe-libs/ui";
|
|
24
29
|
//#region src/planmagnet/pages/AnalyticsAnalyticsPagePage.tsx
|
|
25
|
-
var
|
|
30
|
+
var Ee = d`
|
|
26
31
|
query AnalyticsProjectSprints($workspaceId: ID!, $projectId: String) {
|
|
27
32
|
planmagnetSprints(
|
|
28
33
|
workspaceId: $workspaceId
|
|
@@ -38,7 +43,7 @@ var me = m`
|
|
|
38
43
|
}
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
|
-
`,
|
|
46
|
+
`, De = d`
|
|
42
47
|
query AnalyticsMilestoneRisk($workspaceId: ID!, $yesterday: DateTime) {
|
|
43
48
|
missed: planmagnetMilestones(
|
|
44
49
|
workspaceId: $workspaceId
|
|
@@ -55,7 +60,7 @@ var me = m`
|
|
|
55
60
|
totalCount
|
|
56
61
|
}
|
|
57
62
|
}
|
|
58
|
-
`,
|
|
63
|
+
`, Oe = d`
|
|
59
64
|
query GetAnalyticsWorkItemCounts($workspaceId: ID!) {
|
|
60
65
|
planmagnetWorkItemCounts(workspaceId: $workspaceId) {
|
|
61
66
|
total
|
|
@@ -73,7 +78,7 @@ var me = m`
|
|
|
73
78
|
}
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
|
-
`,
|
|
81
|
+
`, ke = d`
|
|
77
82
|
query GetAnalyticsData($workspaceId: ID!, $projectPagination: PlanmagnetPaginationInput) {
|
|
78
83
|
planmagnetProjects(workspaceId: $workspaceId, pagination: $projectPagination) {
|
|
79
84
|
items {
|
|
@@ -88,7 +93,7 @@ var me = m`
|
|
|
88
93
|
totalCount
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
|
-
`,
|
|
96
|
+
`, Ae = d`
|
|
92
97
|
query GetSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
|
|
93
98
|
planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
|
|
94
99
|
sprintId
|
|
@@ -105,7 +110,7 @@ var me = m`
|
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
|
-
`,
|
|
113
|
+
`, je = d`
|
|
109
114
|
query GetVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
|
|
110
115
|
planmagnetVelocity(
|
|
111
116
|
workspaceId: $workspaceId
|
|
@@ -125,9 +130,19 @@ var me = m`
|
|
|
125
130
|
}
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
|
-
`,
|
|
129
|
-
query GetCumulativeFlow(
|
|
130
|
-
|
|
133
|
+
`, Me = d`
|
|
134
|
+
query GetCumulativeFlow(
|
|
135
|
+
$workspaceId: ID!
|
|
136
|
+
$projectId: ID!
|
|
137
|
+
$startDate: DateTime
|
|
138
|
+
$endDate: DateTime
|
|
139
|
+
) {
|
|
140
|
+
planmagnetCumulativeFlow(
|
|
141
|
+
workspaceId: $workspaceId
|
|
142
|
+
projectId: $projectId
|
|
143
|
+
startDate: $startDate
|
|
144
|
+
endDate: $endDate
|
|
145
|
+
) {
|
|
131
146
|
projectId
|
|
132
147
|
startDate
|
|
133
148
|
endDate
|
|
@@ -140,7 +155,7 @@ var me = m`
|
|
|
140
155
|
}
|
|
141
156
|
}
|
|
142
157
|
}
|
|
143
|
-
`,
|
|
158
|
+
`, T = {
|
|
144
159
|
BACKLOG: "#9ca3af",
|
|
145
160
|
TODO: "#60a5fa",
|
|
146
161
|
IN_PROGRESS: "#fbbf24",
|
|
@@ -149,428 +164,562 @@ var me = m`
|
|
|
149
164
|
DONE: "#4ade80",
|
|
150
165
|
CANCELLED: "#f87171"
|
|
151
166
|
};
|
|
152
|
-
function
|
|
167
|
+
function E(e) {
|
|
153
168
|
let t = new Date(e);
|
|
154
169
|
return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
|
|
155
170
|
}
|
|
156
|
-
function
|
|
157
|
-
let { workspaceId:
|
|
171
|
+
function D() {
|
|
172
|
+
let { workspaceId: d } = e(), { t: D } = we(), [Ne, O] = u(""), [k, Pe] = Se(), A = k.get("from"), j = k.get("to"), [M, N] = u(() => A && j && c(A, j) ? {
|
|
173
|
+
from: A,
|
|
174
|
+
to: j
|
|
175
|
+
} : l("30")), [Fe, Ie] = u(M), [P, Le] = u(k.get("project") || "all"), F = he(P), I = me(M), Re = c(M.from, M.to), ze = Re ? null : D("planmagnet.analytics.range.invalid", "\"From\" must be on or before \"To\".");
|
|
176
|
+
function L(e, t) {
|
|
177
|
+
N(e), c(e.from, e.to) && Ie(e);
|
|
178
|
+
let n = new URLSearchParams(k);
|
|
179
|
+
n.set("from", e.from), n.set("to", e.to), t === "all" ? n.delete("project") : n.set("project", t), Pe(n, { replace: !0 });
|
|
180
|
+
}
|
|
181
|
+
function Be(e) {
|
|
182
|
+
L(l(e), P);
|
|
183
|
+
}
|
|
184
|
+
function Ve(e) {
|
|
185
|
+
e && M.to && c(e, M.to) ? L({
|
|
186
|
+
from: e,
|
|
187
|
+
to: M.to
|
|
188
|
+
}, P) : N((t) => ({
|
|
189
|
+
...t,
|
|
190
|
+
from: e
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
function He(e) {
|
|
194
|
+
e && M.from && c(M.from, e) ? L({
|
|
195
|
+
from: M.from,
|
|
196
|
+
to: e
|
|
197
|
+
}, P) : N((t) => ({
|
|
198
|
+
...t,
|
|
199
|
+
to: e
|
|
200
|
+
}));
|
|
201
|
+
}
|
|
202
|
+
function Ue(e) {
|
|
203
|
+
Le(e), O(""), L(M, e);
|
|
204
|
+
}
|
|
205
|
+
let { startDate: R, endDate: z } = ge(Re ? M : Fe), { data: We, loading: Ge, error: Ke } = f(ke, {
|
|
158
206
|
variables: {
|
|
159
|
-
workspaceId:
|
|
207
|
+
workspaceId: d,
|
|
160
208
|
projectPagination: { first: 100 }
|
|
161
209
|
},
|
|
162
|
-
skip: !
|
|
163
|
-
}), { data:
|
|
164
|
-
variables: { workspaceId:
|
|
165
|
-
skip: !
|
|
166
|
-
}),
|
|
210
|
+
skip: !d
|
|
211
|
+
}), { data: qe } = f(Oe, {
|
|
212
|
+
variables: { workspaceId: d },
|
|
213
|
+
skip: !d
|
|
214
|
+
}), B = qe?.planmagnetWorkItemCounts, Je = se(), Ye = ce(), [Xe] = u(() => (/* @__PURE__ */ new Date(Date.now() - 864e5)).toISOString().slice(0, 10)), { data: V } = f(De, {
|
|
167
215
|
variables: {
|
|
168
|
-
workspaceId:
|
|
169
|
-
yesterday:
|
|
216
|
+
workspaceId: d,
|
|
217
|
+
yesterday: Xe
|
|
170
218
|
},
|
|
171
|
-
skip: !
|
|
172
|
-
}),
|
|
219
|
+
skip: !d
|
|
220
|
+
}), H = We?.planmagnetProjects?.items ?? [], U = F || H[0]?.id || "", { data: Ze } = f(Ee, {
|
|
173
221
|
variables: {
|
|
174
|
-
workspaceId:
|
|
175
|
-
projectId:
|
|
222
|
+
workspaceId: d,
|
|
223
|
+
projectId: U
|
|
176
224
|
},
|
|
177
|
-
skip: !
|
|
178
|
-
}),
|
|
225
|
+
skip: !d || !U
|
|
226
|
+
}), W = Ze?.planmagnetSprints.items ?? [], Qe = W.filter((e) => e.status === "COMPLETED").sort((e, t) => (t.completedAt ?? t.endDate ?? "").localeCompare(e.completedAt ?? e.endDate ?? ""))[0], $e = W.find((e) => e.status === "ACTIVE" || e.status === "REVIEW") ?? Qe ?? W[0], G = Ne || $e?.id || "", K = H.find((e) => e.id === U)?.name ?? "", { data: et, loading: tt } = f(Ae, {
|
|
179
227
|
variables: {
|
|
180
|
-
workspaceId:
|
|
181
|
-
sprintId:
|
|
228
|
+
workspaceId: d,
|
|
229
|
+
sprintId: G
|
|
182
230
|
},
|
|
183
|
-
skip: !
|
|
184
|
-
}), { data:
|
|
231
|
+
skip: !d || !G
|
|
232
|
+
}), { data: nt, loading: rt } = f(je, {
|
|
185
233
|
variables: {
|
|
186
|
-
workspaceId:
|
|
187
|
-
projectId:
|
|
234
|
+
workspaceId: d,
|
|
235
|
+
projectId: U,
|
|
188
236
|
trailingSprintCount: 6
|
|
189
237
|
},
|
|
190
|
-
skip: !
|
|
191
|
-
}), { data:
|
|
238
|
+
skip: !d || !U
|
|
239
|
+
}), { data: it, loading: at } = f(Me, {
|
|
192
240
|
variables: {
|
|
193
|
-
workspaceId:
|
|
194
|
-
projectId:
|
|
241
|
+
workspaceId: d,
|
|
242
|
+
projectId: U,
|
|
243
|
+
startDate: R,
|
|
244
|
+
endDate: z
|
|
195
245
|
},
|
|
196
|
-
skip: !
|
|
246
|
+
skip: !d || !U
|
|
197
247
|
});
|
|
198
|
-
if (
|
|
248
|
+
if (Ge && !We) return /* @__PURE__ */ p("div", {
|
|
199
249
|
className: "flex items-center justify-center p-12",
|
|
200
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
201
251
|
});
|
|
202
|
-
if (
|
|
252
|
+
if (Ke) return /* @__PURE__ */ m("div", {
|
|
203
253
|
className: "p-6 text-red-500",
|
|
204
254
|
children: [
|
|
205
|
-
|
|
255
|
+
D("planmagnet.analytics.errorLoading", "Error loading analytics"),
|
|
206
256
|
": ",
|
|
207
|
-
|
|
257
|
+
Ke.message
|
|
208
258
|
]
|
|
209
259
|
});
|
|
210
|
-
let
|
|
211
|
-
let t =
|
|
260
|
+
let q = (e) => B?.byStatus.find((t) => t.status === e), ot = q("CANCELLED")?.count ?? 0, st = B ? q("DONE")?.count ?? 0 : null, J = B ? B.total : null, Y = B ? B.blocked : null, ct = B ? B.points : null, lt = B ? q("DONE")?.points ?? 0 : null, ut = (e) => {
|
|
261
|
+
let t = B?.byProject.filter((t) => t.projectId === e) ?? [], n = t.filter((e) => e.status !== "CANCELLED").reduce((e, t) => e + t.count, 0), r = t.filter((e) => e.status === "DONE").reduce((e, t) => e + t.count, 0);
|
|
212
262
|
return n > 0 ? Math.round(r / n * 100) : 0;
|
|
213
|
-
},
|
|
214
|
-
day:
|
|
263
|
+
}, dt = Ye?.running ?? null, ft = V ? V.missed.totalCount + V.overdue.totalCount : null, pt = Je?.active ?? null, mt = J != null && st != null && J - ot > 0 ? Math.round(st / (J - ot) * 100) : null, ht = (et?.planmagnetSprintBurndown)?.points.map((e) => ({
|
|
264
|
+
day: E(e.date),
|
|
215
265
|
remaining: e.remainingPoints,
|
|
216
266
|
completed: e.completedPoints
|
|
217
|
-
})) ?? [],
|
|
267
|
+
})) ?? [], X = nt?.planmagnetVelocity, Z = X?.sprints.map((e) => ({
|
|
218
268
|
name: e.sprintName,
|
|
219
269
|
completed: e.completedPoints,
|
|
220
270
|
planned: e.plannedPoints ?? void 0
|
|
221
|
-
})) ?? [],
|
|
222
|
-
let t = { day:
|
|
271
|
+
})) ?? [], gt = X ? Math.round(X.averageVelocity) : 0, _t = X ? Math.round(X.forecastNextSprintPoints) : 0, Q = it?.planmagnetCumulativeFlow, vt = Array.from(new Set(Q?.points.flatMap((e) => e.statuses.map((e) => e.status)) ?? [])), $ = Q?.points.map((e) => {
|
|
272
|
+
let t = { day: E(e.date) };
|
|
223
273
|
for (let n of e.statuses) t[n.status] = n.count;
|
|
224
274
|
return t;
|
|
225
|
-
}) ?? [],
|
|
275
|
+
}) ?? [], yt = [
|
|
226
276
|
{
|
|
227
|
-
label:
|
|
228
|
-
value:
|
|
229
|
-
trend: `${
|
|
277
|
+
label: D("planmagnet.analytics.metrics.totalWorkItems.label", "Total Work Items"),
|
|
278
|
+
value: s(J),
|
|
279
|
+
trend: `${s(mt)}% ${D("planmagnet.analytics.metrics.totalWorkItems.trend", "completed")}`
|
|
230
280
|
},
|
|
231
281
|
{
|
|
232
|
-
label:
|
|
233
|
-
value:
|
|
234
|
-
trend: `${
|
|
282
|
+
label: D("planmagnet.analytics.metrics.storyPoints.label", "Story Points"),
|
|
283
|
+
value: s(ct),
|
|
284
|
+
trend: `${s(lt)} ${D("planmagnet.analytics.metrics.storyPoints.trend", "completed")}`
|
|
235
285
|
},
|
|
236
286
|
{
|
|
237
|
-
label:
|
|
238
|
-
value:
|
|
239
|
-
trend: `${
|
|
287
|
+
label: D("planmagnet.analytics.metrics.activeProjects.label", "Active Projects"),
|
|
288
|
+
value: s(pt),
|
|
289
|
+
trend: `${s(Je?.all)} ${D("planmagnet.analytics.metrics.activeProjects.trend", "total")}`
|
|
240
290
|
},
|
|
241
291
|
{
|
|
242
|
-
label:
|
|
243
|
-
value:
|
|
244
|
-
trend:
|
|
292
|
+
label: D("planmagnet.analytics.metrics.blockedItems.label", "Blocked Items"),
|
|
293
|
+
value: s(Y),
|
|
294
|
+
trend: Y == null ? "" : Y > 0 ? D("planmagnet.analytics.metrics.blockedItems.attention", "Needs attention") : D("planmagnet.analytics.metrics.blockedItems.clear", "All clear")
|
|
245
295
|
}
|
|
246
296
|
];
|
|
247
|
-
return /* @__PURE__ */
|
|
297
|
+
return /* @__PURE__ */ m("div", {
|
|
248
298
|
className: "space-y-6 p-6",
|
|
249
299
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
251
301
|
className: "text-2xl font-semibold",
|
|
252
|
-
children:
|
|
253
|
-
}), /* @__PURE__ */
|
|
302
|
+
children: D("planmagnet.analytics.title", "Analytics Dashboard")
|
|
303
|
+
}), /* @__PURE__ */ p("p", {
|
|
254
304
|
className: "text-sm text-muted-foreground",
|
|
255
|
-
children:
|
|
305
|
+
children: D("planmagnet.analytics.subtitle", "Overview of project health and team performance")
|
|
256
306
|
})] }),
|
|
257
|
-
/* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ m("div", {
|
|
308
|
+
className: "flex flex-col gap-3 rounded-lg border p-3 sm:flex-row sm:flex-wrap sm:items-center sm:justify-between",
|
|
309
|
+
"data-testid": "analytics-range",
|
|
310
|
+
children: [/* @__PURE__ */ m("div", {
|
|
311
|
+
className: "flex flex-wrap items-center gap-2",
|
|
312
|
+
children: [
|
|
313
|
+
/* @__PURE__ */ p("div", {
|
|
314
|
+
className: "flex items-center gap-1 rounded-md border p-0.5",
|
|
315
|
+
role: "group",
|
|
316
|
+
"aria-label": D("planmagnet.analytics.range.presetLabel", "Date range preset"),
|
|
317
|
+
"data-testid": "analytics-range-preset",
|
|
318
|
+
children: [
|
|
319
|
+
"7",
|
|
320
|
+
"30",
|
|
321
|
+
"90"
|
|
322
|
+
].map((e) => /* @__PURE__ */ p("button", {
|
|
323
|
+
type: "button",
|
|
324
|
+
"aria-pressed": I === e,
|
|
325
|
+
onClick: () => Be(e),
|
|
326
|
+
className: `px-2.5 py-1 text-xs rounded ${I === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
327
|
+
children: D("planmagnet.analytics.range.last", "Last {{days}} days", { days: e })
|
|
328
|
+
}, e))
|
|
329
|
+
}),
|
|
330
|
+
/* @__PURE__ */ m("div", {
|
|
331
|
+
className: "flex items-center gap-1.5",
|
|
332
|
+
children: [
|
|
333
|
+
/* @__PURE__ */ p("label", {
|
|
334
|
+
htmlFor: "analytics-range-from",
|
|
335
|
+
className: "sr-only",
|
|
336
|
+
children: D("planmagnet.analytics.range.from", "From")
|
|
337
|
+
}),
|
|
338
|
+
/* @__PURE__ */ p(y, {
|
|
339
|
+
id: "analytics-range-from",
|
|
340
|
+
type: "date",
|
|
341
|
+
className: "h-8 w-36",
|
|
342
|
+
value: M.from,
|
|
343
|
+
max: M.to,
|
|
344
|
+
onChange: (e) => Ve(e.target.value)
|
|
345
|
+
}),
|
|
346
|
+
/* @__PURE__ */ p("span", {
|
|
347
|
+
className: "text-muted-foreground text-sm",
|
|
348
|
+
children: "–"
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ p("label", {
|
|
351
|
+
htmlFor: "analytics-range-to",
|
|
352
|
+
className: "sr-only",
|
|
353
|
+
children: D("planmagnet.analytics.range.to", "To")
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ p(y, {
|
|
356
|
+
id: "analytics-range-to",
|
|
357
|
+
type: "date",
|
|
358
|
+
className: "h-8 w-36",
|
|
359
|
+
value: M.to,
|
|
360
|
+
min: M.from,
|
|
361
|
+
onChange: (e) => He(e.target.value)
|
|
362
|
+
})
|
|
363
|
+
]
|
|
364
|
+
}),
|
|
365
|
+
ze && /* @__PURE__ */ p("p", {
|
|
366
|
+
role: "alert",
|
|
367
|
+
className: "text-xs text-status-error-text",
|
|
368
|
+
children: ze
|
|
369
|
+
})
|
|
370
|
+
]
|
|
371
|
+
}), /* @__PURE__ */ m(b, {
|
|
372
|
+
value: P,
|
|
373
|
+
onValueChange: Ue,
|
|
374
|
+
children: [/* @__PURE__ */ p(C, {
|
|
375
|
+
className: "h-8 w-56",
|
|
376
|
+
"data-testid": "analytics-project",
|
|
377
|
+
children: /* @__PURE__ */ p(w, { placeholder: D("planmagnet.analytics.range.allProjects", "All projects") })
|
|
378
|
+
}), /* @__PURE__ */ m(x, { children: [/* @__PURE__ */ p(S, {
|
|
379
|
+
value: "all",
|
|
380
|
+
children: D("planmagnet.analytics.range.allProjects", "All projects")
|
|
381
|
+
}), H.map((e) => /* @__PURE__ */ p(S, {
|
|
382
|
+
value: e.id,
|
|
383
|
+
children: e.name
|
|
384
|
+
}, e.id))] })]
|
|
385
|
+
})]
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ p("div", {
|
|
258
388
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
259
|
-
children:
|
|
389
|
+
children: yt.map((e) => /* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
|
|
260
390
|
className: "pt-4",
|
|
261
391
|
children: [
|
|
262
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ p("p", {
|
|
263
393
|
className: "text-xs text-muted-foreground",
|
|
264
394
|
children: e.label
|
|
265
395
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ p("p", {
|
|
267
397
|
className: "text-xl font-bold mt-1",
|
|
268
398
|
children: e.value
|
|
269
399
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ p("p", {
|
|
271
401
|
className: "text-xs text-green-600 mt-1",
|
|
272
402
|
children: e.trend
|
|
273
403
|
})
|
|
274
404
|
]
|
|
275
405
|
}) }, e.label))
|
|
276
406
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
407
|
+
/* @__PURE__ */ m("div", {
|
|
278
408
|
className: "grid grid-cols-2 md:grid-cols-4 gap-4",
|
|
279
409
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
|
|
281
411
|
className: "pt-4",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
412
|
+
children: [/* @__PURE__ */ m("div", {
|
|
283
413
|
className: "flex items-center gap-2 text-muted-foreground text-xs",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
-
}), /* @__PURE__ */
|
|
414
|
+
children: [/* @__PURE__ */ p(ve, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeProjects", "Active Projects")]
|
|
415
|
+
}), /* @__PURE__ */ p("p", {
|
|
286
416
|
className: "text-xl font-bold mt-1",
|
|
287
|
-
children:
|
|
417
|
+
children: s(pt)
|
|
288
418
|
})]
|
|
289
419
|
}) }),
|
|
290
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
|
|
291
421
|
className: "pt-4",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
422
|
+
children: [/* @__PURE__ */ m("div", {
|
|
293
423
|
className: "flex items-center gap-2 text-muted-foreground text-xs",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
295
|
-
}), /* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ p(xe, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.activeSprints", "Active Sprints")]
|
|
425
|
+
}), /* @__PURE__ */ p("p", {
|
|
296
426
|
className: "text-xl font-bold mt-1",
|
|
297
|
-
children:
|
|
427
|
+
children: s(dt)
|
|
298
428
|
})]
|
|
299
429
|
}) }),
|
|
300
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
|
|
301
431
|
className: "pt-4",
|
|
302
432
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ m("div", {
|
|
304
434
|
className: "flex items-center gap-2 text-muted-foreground text-xs",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
435
|
+
children: [/* @__PURE__ */ p(be, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.avgVelocity", "Avg Velocity")]
|
|
306
436
|
}),
|
|
307
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ p("p", {
|
|
308
438
|
className: "text-xs text-muted-foreground truncate",
|
|
309
|
-
children:
|
|
439
|
+
children: K || "—"
|
|
310
440
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ m("p", {
|
|
312
442
|
className: "text-xl font-bold mt-1",
|
|
313
443
|
children: [
|
|
314
|
-
|
|
444
|
+
gt,
|
|
315
445
|
" ",
|
|
316
|
-
|
|
446
|
+
D("planmagnet.analytics.summary.pointsShort", "pts")
|
|
317
447
|
]
|
|
318
448
|
})
|
|
319
449
|
]
|
|
320
450
|
}) }),
|
|
321
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ p(h, { children: /* @__PURE__ */ m(g, {
|
|
322
452
|
className: "pt-4",
|
|
323
|
-
children: [/* @__PURE__ */
|
|
453
|
+
children: [/* @__PURE__ */ m("div", {
|
|
324
454
|
className: "flex items-center gap-2 text-muted-foreground text-xs",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
326
|
-
}), /* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ p(ye, { className: "h-4 w-4" }), D("planmagnet.analytics.summary.atRisk", "At Risk")]
|
|
456
|
+
}), /* @__PURE__ */ m("p", {
|
|
327
457
|
className: "text-xl font-bold mt-1",
|
|
328
458
|
children: [
|
|
329
|
-
|
|
459
|
+
s(ft),
|
|
330
460
|
" ",
|
|
331
|
-
|
|
461
|
+
D("planmagnet.analytics.summary.milestones", "milestones")
|
|
332
462
|
]
|
|
333
463
|
})]
|
|
334
464
|
}) })
|
|
335
465
|
]
|
|
336
466
|
}),
|
|
337
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ m("div", {
|
|
338
468
|
className: "flex flex-col sm:flex-row gap-3 items-start sm:items-center",
|
|
339
|
-
children: [/* @__PURE__ */
|
|
469
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
|
|
340
470
|
className: "text-lg font-semibold",
|
|
341
|
-
children:
|
|
342
|
-
}), /* @__PURE__ */
|
|
471
|
+
children: D("planmagnet.analytics.delivery.title", "Sprint Delivery Analytics")
|
|
472
|
+
}), /* @__PURE__ */ p("p", {
|
|
473
|
+
className: "text-xs text-muted-foreground",
|
|
474
|
+
children: D("planmagnet.analytics.delivery.forProject", "For {{project}}", { project: K || D("planmagnet.analytics.delivery.noProject", "no project") })
|
|
475
|
+
})] }), /* @__PURE__ */ p("div", {
|
|
343
476
|
className: "flex gap-2 sm:ml-auto",
|
|
344
|
-
children:
|
|
345
|
-
value:
|
|
346
|
-
onValueChange:
|
|
347
|
-
|
|
348
|
-
},
|
|
349
|
-
children: [/* @__PURE__ */ g(T, {
|
|
350
|
-
className: "h-8 w-48",
|
|
351
|
-
children: /* @__PURE__ */ g(E, { placeholder: k("planmagnet.analytics.delivery.projectPlaceholder", "Select project") })
|
|
352
|
-
}), /* @__PURE__ */ g(C, { children: I.map((e) => /* @__PURE__ */ g(w, {
|
|
353
|
-
value: e.id,
|
|
354
|
-
children: e.name
|
|
355
|
-
}, e.id)) })]
|
|
356
|
-
}), /* @__PURE__ */ _(S, {
|
|
357
|
-
value: B,
|
|
358
|
-
onValueChange: A,
|
|
359
|
-
children: [/* @__PURE__ */ g(T, {
|
|
477
|
+
children: /* @__PURE__ */ m(b, {
|
|
478
|
+
value: G,
|
|
479
|
+
onValueChange: O,
|
|
480
|
+
children: [/* @__PURE__ */ p(C, {
|
|
360
481
|
className: "h-8 w-48",
|
|
361
|
-
children: /* @__PURE__ */
|
|
362
|
-
}), /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ p(w, { placeholder: D("planmagnet.analytics.delivery.sprintPlaceholder", "Select sprint") })
|
|
483
|
+
}), /* @__PURE__ */ p(x, { children: W.map((e) => /* @__PURE__ */ p(S, {
|
|
363
484
|
value: e.id,
|
|
364
485
|
children: e.name
|
|
365
486
|
}, e.id)) })]
|
|
366
|
-
})
|
|
487
|
+
})
|
|
367
488
|
})]
|
|
368
489
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
490
|
+
/* @__PURE__ */ m("div", {
|
|
370
491
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
|
|
372
493
|
className: "flex items-center gap-2",
|
|
373
|
-
children: [/* @__PURE__ */
|
|
374
|
-
}) }), /* @__PURE__ */ g
|
|
494
|
+
children: [/* @__PURE__ */ p(_e, { className: "h-4 w-4" }), D("planmagnet.analytics.burndown.title", "Sprint Burndown")]
|
|
495
|
+
}) }), /* @__PURE__ */ p(g, { children: tt ? /* @__PURE__ */ p("div", {
|
|
375
496
|
className: "flex justify-center py-12",
|
|
376
|
-
children: /* @__PURE__ */
|
|
377
|
-
}) :
|
|
497
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
|
|
498
|
+
}) : ht.length > 0 ? /* @__PURE__ */ p(r, {
|
|
378
499
|
width: "100%",
|
|
379
500
|
height: 220,
|
|
380
|
-
children: /* @__PURE__ */
|
|
381
|
-
data:
|
|
501
|
+
children: /* @__PURE__ */ m(ie, {
|
|
502
|
+
data: ht,
|
|
382
503
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ p(i, {
|
|
384
505
|
strokeDasharray: "3 3",
|
|
385
506
|
opacity: .2
|
|
386
507
|
}),
|
|
387
|
-
/* @__PURE__ */
|
|
508
|
+
/* @__PURE__ */ p(a, {
|
|
388
509
|
dataKey: "day",
|
|
389
510
|
tick: { fontSize: 11 }
|
|
390
511
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
512
|
+
/* @__PURE__ */ p(o, {
|
|
392
513
|
tick: { fontSize: 11 },
|
|
393
514
|
allowDecimals: !1
|
|
394
515
|
}),
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ p(n, {}),
|
|
517
|
+
/* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
|
|
518
|
+
/* @__PURE__ */ p(ne, {
|
|
398
519
|
type: "monotone",
|
|
399
520
|
dataKey: "remaining",
|
|
400
|
-
name:
|
|
521
|
+
name: D("planmagnet.analytics.burndown.remaining", "Remaining points"),
|
|
401
522
|
stroke: "#f59e0b",
|
|
402
523
|
strokeWidth: 2,
|
|
403
524
|
dot: { r: 2 }
|
|
404
525
|
}),
|
|
405
|
-
/* @__PURE__ */
|
|
526
|
+
/* @__PURE__ */ p(ne, {
|
|
406
527
|
type: "monotone",
|
|
407
528
|
dataKey: "completed",
|
|
408
|
-
name:
|
|
529
|
+
name: D("planmagnet.analytics.burndown.completed", "Completed points"),
|
|
409
530
|
stroke: "#22c55e",
|
|
410
531
|
strokeWidth: 2,
|
|
411
532
|
dot: { r: 2 }
|
|
412
533
|
})
|
|
413
534
|
]
|
|
414
535
|
})
|
|
415
|
-
}) : /* @__PURE__ */
|
|
536
|
+
}) : /* @__PURE__ */ p("p", {
|
|
416
537
|
className: "text-sm text-muted-foreground py-8 text-center",
|
|
417
|
-
children:
|
|
418
|
-
}) })] }), /* @__PURE__ */
|
|
538
|
+
children: D("planmagnet.analytics.burndown.empty", "No sprint selected, or the sprint has no work items yet")
|
|
539
|
+
}) })] }), /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ m(v, {
|
|
419
540
|
className: "flex items-center gap-2",
|
|
420
541
|
children: [
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
542
|
+
/* @__PURE__ */ p(be, { className: "h-4 w-4" }),
|
|
543
|
+
D("planmagnet.analytics.velocity.title", "Sprint Velocity"),
|
|
423
544
|
" (",
|
|
424
|
-
|
|
545
|
+
Z.length,
|
|
425
546
|
" ",
|
|
426
|
-
|
|
547
|
+
D("planmagnet.analytics.velocity.sprints", "Sprints"),
|
|
427
548
|
")"
|
|
428
549
|
]
|
|
429
|
-
}) }), /* @__PURE__ */ g
|
|
550
|
+
}) }), /* @__PURE__ */ p(g, { children: rt ? /* @__PURE__ */ p("div", {
|
|
430
551
|
className: "flex justify-center py-12",
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
}) :
|
|
552
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
|
|
553
|
+
}) : Z.length > 0 ? /* @__PURE__ */ m(Ce, { children: [/* @__PURE__ */ p(r, {
|
|
433
554
|
width: "100%",
|
|
434
555
|
height: 190,
|
|
435
|
-
children: /* @__PURE__ */
|
|
436
|
-
data:
|
|
556
|
+
children: /* @__PURE__ */ m(ae, {
|
|
557
|
+
data: Z,
|
|
437
558
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
559
|
+
/* @__PURE__ */ p(i, {
|
|
439
560
|
strokeDasharray: "3 3",
|
|
440
561
|
opacity: .2
|
|
441
562
|
}),
|
|
442
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ p(a, {
|
|
443
564
|
dataKey: "name",
|
|
444
565
|
tick: { fontSize: 11 }
|
|
445
566
|
}),
|
|
446
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ p(o, {
|
|
447
568
|
tick: { fontSize: 11 },
|
|
448
569
|
allowDecimals: !1
|
|
449
570
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
452
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ p(n, {}),
|
|
572
|
+
/* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
|
|
573
|
+
/* @__PURE__ */ p(ee, {
|
|
453
574
|
dataKey: "planned",
|
|
454
|
-
name:
|
|
575
|
+
name: D("planmagnet.analytics.velocity.planned", "Planned"),
|
|
455
576
|
fill: "#cbd5e1"
|
|
456
577
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
578
|
+
/* @__PURE__ */ p(ee, {
|
|
458
579
|
dataKey: "completed",
|
|
459
|
-
name:
|
|
580
|
+
name: D("planmagnet.analytics.velocity.completed", "Completed"),
|
|
460
581
|
fill: "#6366f1"
|
|
461
582
|
}),
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
y:
|
|
583
|
+
/* @__PURE__ */ p(te, {
|
|
584
|
+
y: gt,
|
|
464
585
|
stroke: "#22c55e",
|
|
465
586
|
strokeDasharray: "4 4",
|
|
466
587
|
label: {
|
|
467
|
-
value:
|
|
588
|
+
value: D("planmagnet.analytics.velocity.avgLabel", "avg"),
|
|
468
589
|
fontSize: 10,
|
|
469
590
|
position: "right"
|
|
470
591
|
}
|
|
471
592
|
})
|
|
472
593
|
]
|
|
473
594
|
})
|
|
474
|
-
}), /* @__PURE__ */
|
|
595
|
+
}), /* @__PURE__ */ p("p", {
|
|
475
596
|
className: "text-xs text-muted-foreground text-center mt-2",
|
|
476
|
-
children:
|
|
477
|
-
points:
|
|
478
|
-
count:
|
|
597
|
+
children: Z.length === 1 ? D("planmagnet.analytics.velocity.trailingAverageOne", "Average of the last completed sprint: {{points}} pts per sprint", { points: _t }) : D("planmagnet.analytics.velocity.trailingAverage", "Average of the last {{count}} completed sprints: {{points}} pts per sprint", {
|
|
598
|
+
points: _t,
|
|
599
|
+
count: Z.length
|
|
479
600
|
})
|
|
480
|
-
})] }) : /* @__PURE__ */
|
|
601
|
+
})] }) : /* @__PURE__ */ p("p", {
|
|
481
602
|
className: "text-sm text-muted-foreground py-8 text-center",
|
|
482
|
-
children:
|
|
603
|
+
children: D("planmagnet.analytics.velocity.empty", "No completed sprints yet for this project")
|
|
483
604
|
}) })] })]
|
|
484
605
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ m(h, { children: [/* @__PURE__ */ m(_, { children: [/* @__PURE__ */ m(v, {
|
|
486
607
|
className: "flex items-center gap-2",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
488
|
-
})
|
|
608
|
+
children: [/* @__PURE__ */ p(_e, { className: "h-4 w-4" }), D("planmagnet.analytics.cfd.title", "Cumulative Flow Diagram")]
|
|
609
|
+
}), /* @__PURE__ */ p("p", {
|
|
610
|
+
className: "text-xs text-muted-foreground",
|
|
611
|
+
children: D("planmagnet.analytics.cfd.subtitle", "Selected date range, for {{project}}.", { project: K || D("planmagnet.analytics.delivery.noProject", "no project") })
|
|
612
|
+
})] }), /* @__PURE__ */ p(g, { children: at ? /* @__PURE__ */ p("div", {
|
|
489
613
|
className: "flex justify-center py-12",
|
|
490
|
-
children: /* @__PURE__ */
|
|
491
|
-
}) : $.length > 0 ? /* @__PURE__ */
|
|
614
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full" })
|
|
615
|
+
}) : $.length > 0 ? /* @__PURE__ */ p(r, {
|
|
492
616
|
width: "100%",
|
|
493
617
|
height: 260,
|
|
494
|
-
children: /* @__PURE__ */
|
|
618
|
+
children: /* @__PURE__ */ m(oe, {
|
|
495
619
|
data: $,
|
|
496
620
|
children: [
|
|
497
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ p(i, {
|
|
498
622
|
strokeDasharray: "3 3",
|
|
499
623
|
opacity: .2
|
|
500
624
|
}),
|
|
501
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ p(a, {
|
|
502
626
|
dataKey: "day",
|
|
503
627
|
tick: { fontSize: 11 }
|
|
504
628
|
}),
|
|
505
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ p(o, {
|
|
506
630
|
tick: { fontSize: 11 },
|
|
507
631
|
allowDecimals: !1
|
|
508
632
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
633
|
+
/* @__PURE__ */ p(n, {}),
|
|
634
|
+
/* @__PURE__ */ p(t, { wrapperStyle: { fontSize: 12 } }),
|
|
635
|
+
vt.map((e) => /* @__PURE__ */ p(re, {
|
|
512
636
|
type: "monotone",
|
|
513
637
|
dataKey: e,
|
|
514
638
|
name: e.toLowerCase().replace("_", " "),
|
|
515
639
|
stackId: "cfd",
|
|
516
|
-
stroke:
|
|
517
|
-
fill:
|
|
640
|
+
stroke: T[e] ?? "#a3a3a3",
|
|
641
|
+
fill: T[e] ?? "#a3a3a3",
|
|
518
642
|
fillOpacity: .7
|
|
519
643
|
}, e))
|
|
520
644
|
]
|
|
521
645
|
})
|
|
522
|
-
}) : /* @__PURE__ */
|
|
646
|
+
}) : /* @__PURE__ */ p("p", {
|
|
523
647
|
className: "text-sm text-muted-foreground py-8 text-center",
|
|
524
|
-
children:
|
|
648
|
+
children: D("planmagnet.analytics.cfd.empty", "No work items found for this project")
|
|
525
649
|
}) })] }),
|
|
526
|
-
/* @__PURE__ */
|
|
650
|
+
/* @__PURE__ */ p(pe, {
|
|
651
|
+
workspaceId: d,
|
|
652
|
+
projectId: U,
|
|
653
|
+
startDate: R,
|
|
654
|
+
endDate: z
|
|
655
|
+
}),
|
|
656
|
+
/* @__PURE__ */ m("div", {
|
|
657
|
+
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
658
|
+
children: [/* @__PURE__ */ p(de, {
|
|
659
|
+
workspaceId: d,
|
|
660
|
+
projectId: F,
|
|
661
|
+
startDate: R,
|
|
662
|
+
endDate: z
|
|
663
|
+
}), /* @__PURE__ */ p(fe, {
|
|
664
|
+
workspaceId: d,
|
|
665
|
+
projectId: F,
|
|
666
|
+
startDate: R,
|
|
667
|
+
endDate: z
|
|
668
|
+
})]
|
|
669
|
+
}),
|
|
670
|
+
/* @__PURE__ */ m("div", {
|
|
527
671
|
className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
|
|
528
|
-
children: [/* @__PURE__ */
|
|
529
|
-
workspaceId:
|
|
530
|
-
projectId:
|
|
531
|
-
|
|
672
|
+
children: [/* @__PURE__ */ p(ue, {
|
|
673
|
+
workspaceId: d,
|
|
674
|
+
projectId: U,
|
|
675
|
+
startDate: R,
|
|
676
|
+
endDate: z
|
|
677
|
+
}), /* @__PURE__ */ p(le, {
|
|
678
|
+
workspaceId: d,
|
|
679
|
+
projectId: F
|
|
680
|
+
})]
|
|
532
681
|
}),
|
|
533
|
-
/* @__PURE__ */
|
|
682
|
+
/* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(_, { children: /* @__PURE__ */ p(v, { children: D("planmagnet.analytics.projectHealth.title", "Project Health") }) }), /* @__PURE__ */ p(g, { children: /* @__PURE__ */ m("div", {
|
|
534
683
|
className: "space-y-3",
|
|
535
|
-
children: [
|
|
536
|
-
let t =
|
|
537
|
-
return /* @__PURE__ */
|
|
684
|
+
children: [H.filter((e) => e.status === "ACTIVE").map((e) => {
|
|
685
|
+
let t = ut(e.id), n = e.endDate && new Date(e.endDate) < /* @__PURE__ */ new Date() && t < 100 ? "at_risk" : t >= 75 ? "on_track" : "in_progress";
|
|
686
|
+
return /* @__PURE__ */ m("div", {
|
|
538
687
|
className: "flex items-center gap-4",
|
|
539
688
|
children: [
|
|
540
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ p("span", {
|
|
541
690
|
className: "text-sm font-medium w-40 truncate",
|
|
542
691
|
children: e.name
|
|
543
692
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ p("div", {
|
|
545
694
|
className: "flex-1",
|
|
546
|
-
children: /* @__PURE__ */
|
|
695
|
+
children: /* @__PURE__ */ p("div", {
|
|
547
696
|
className: "w-full h-2 rounded-full bg-muted overflow-hidden",
|
|
548
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ p("div", {
|
|
549
698
|
className: `h-full rounded-full ${n === "at_risk" ? "bg-orange-400" : n === "on_track" ? "bg-green-400" : "bg-blue-400"}`,
|
|
550
699
|
style: { width: `${t}%` }
|
|
551
700
|
})
|
|
552
701
|
})
|
|
553
702
|
}),
|
|
554
|
-
/* @__PURE__ */
|
|
703
|
+
/* @__PURE__ */ m("span", {
|
|
555
704
|
className: "text-sm w-12 text-right",
|
|
556
705
|
children: [t, "%"]
|
|
557
706
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ p(Te, {
|
|
559
708
|
variant: "outline",
|
|
560
709
|
className: "capitalize text-xs w-20 justify-center",
|
|
561
710
|
children: n.replace("_", " ")
|
|
562
711
|
})
|
|
563
712
|
]
|
|
564
713
|
}, e.id);
|
|
565
|
-
}),
|
|
714
|
+
}), H.filter((e) => e.status === "ACTIVE").length === 0 && /* @__PURE__ */ p("p", {
|
|
566
715
|
className: "text-sm text-muted-foreground text-center py-4",
|
|
567
|
-
children:
|
|
716
|
+
children: D("planmagnet.analytics.projectHealth.empty", "No active projects found")
|
|
568
717
|
})]
|
|
569
718
|
}) })] })
|
|
570
719
|
]
|
|
571
720
|
});
|
|
572
721
|
}
|
|
573
722
|
//#endregion
|
|
574
|
-
export {
|
|
723
|
+
export { D as AnalyticsAnalyticsPagePage };
|
|
575
724
|
|
|
576
725
|
//# sourceMappingURL=AnalyticsAnalyticsPagePage.js.map
|