@burdenoff/microfe-planmagnet 2026.930.13 → 2026.930.15
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 +166 -126
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +245 -225
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/activity/activityDescribe.d.ts +38 -0
- package/dist/planmagnet/activity/activityDescribe.d.ts.map +1 -0
- package/dist/planmagnet/activity/activityDescribe.js +123 -0
- package/dist/planmagnet/activity/activityDescribe.js.map +1 -0
- package/dist/planmagnet/activity/relativeTime.d.ts +8 -0
- package/dist/planmagnet/activity/relativeTime.d.ts.map +1 -0
- package/dist/planmagnet/activity/relativeTime.js +38 -0
- package/dist/planmagnet/activity/relativeTime.js.map +1 -0
- package/dist/planmagnet/comments/WorkItemActivity.d.ts.map +1 -1
- package/dist/planmagnet/comments/WorkItemActivity.js +35 -38
- package/dist/planmagnet/comments/WorkItemActivity.js.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.js +25 -25
- package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/ProjectControls.js +53 -46
- package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
- package/dist/planmagnet/dashboards/DashboardUI.d.ts +79 -0
- package/dist/planmagnet/dashboards/DashboardUI.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/DashboardUI.js +126 -0
- package/dist/planmagnet/dashboards/DashboardUI.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/DeliveryTimelineCard.d.ts +7 -0
- package/dist/planmagnet/dashboards/cards/DeliveryTimelineCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/DeliveryTimelineCard.js +92 -0
- package/dist/planmagnet/dashboards/cards/DeliveryTimelineCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/ObjectivesProgressCard.d.ts +7 -0
- package/dist/planmagnet/dashboards/cards/ObjectivesProgressCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/ObjectivesProgressCard.js +68 -0
- package/dist/planmagnet/dashboards/cards/ObjectivesProgressCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/PortfolioHealthCard.d.ts +5 -0
- package/dist/planmagnet/dashboards/cards/PortfolioHealthCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/PortfolioHealthCard.js +118 -0
- package/dist/planmagnet/dashboards/cards/PortfolioHealthCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/QualityMetricsCard.d.ts +8 -0
- package/dist/planmagnet/dashboards/cards/QualityMetricsCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/QualityMetricsCard.js +94 -0
- package/dist/planmagnet/dashboards/cards/QualityMetricsCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/RiskSeverityCard.d.ts +6 -0
- package/dist/planmagnet/dashboards/cards/RiskSeverityCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/RiskSeverityCard.js +90 -0
- package/dist/planmagnet/dashboards/cards/RiskSeverityCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/RoadmapHorizonCard.d.ts +5 -0
- package/dist/planmagnet/dashboards/cards/RoadmapHorizonCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/RoadmapHorizonCard.js +242 -0
- package/dist/planmagnet/dashboards/cards/RoadmapHorizonCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.d.ts +5 -0
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js +125 -0
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/TaskCompletionCard.d.ts +6 -0
- package/dist/planmagnet/dashboards/cards/TaskCompletionCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/TaskCompletionCard.js +85 -0
- package/dist/planmagnet/dashboards/cards/TaskCompletionCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamCapacityCard.d.ts +10 -0
- package/dist/planmagnet/dashboards/cards/TeamCapacityCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamCapacityCard.js +115 -0
- package/dist/planmagnet/dashboards/cards/TeamCapacityCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamOverviewCard.d.ts +5 -0
- package/dist/planmagnet/dashboards/cards/TeamOverviewCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamOverviewCard.js +70 -0
- package/dist/planmagnet/dashboards/cards/TeamOverviewCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamWorkloadCard.d.ts +9 -0
- package/dist/planmagnet/dashboards/cards/TeamWorkloadCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/TeamWorkloadCard.js +373 -0
- package/dist/planmagnet/dashboards/cards/TeamWorkloadCard.js.map +1 -0
- package/dist/planmagnet/dashboards/cards/TimeLoggedCard.d.ts +8 -0
- package/dist/planmagnet/dashboards/cards/TimeLoggedCard.d.ts.map +1 -0
- package/dist/planmagnet/dashboards/cards/TimeLoggedCard.js +247 -0
- package/dist/planmagnet/dashboards/cards/TimeLoggedCard.js.map +1 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.js +291 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -0
- package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +15 -15
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +9 -9
- package/dist/planmagnet/pages/DashboardsExecutivePagePage.d.ts +8 -0
- package/dist/planmagnet/pages/DashboardsExecutivePagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/DashboardsExecutivePagePage.js +61 -0
- package/dist/planmagnet/pages/DashboardsExecutivePagePage.js.map +1 -0
- package/dist/planmagnet/pages/DashboardsLeadershipPagePage.d.ts +8 -0
- package/dist/planmagnet/pages/DashboardsLeadershipPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/DashboardsLeadershipPagePage.js +62 -0
- package/dist/planmagnet/pages/DashboardsLeadershipPagePage.js.map +1 -0
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts +7 -0
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +117 -0
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js.map +1 -0
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts +6 -0
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +84 -0
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js.map +1 -0
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +118 -109
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProgramsEditProgramPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +13 -13
- package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/TeamCreateTeamPagePage.js +4 -4
- package/dist/planmagnet/pages/TeamTeamDetailPagePage.js +6 -6
- package/dist/planmagnet/pages/TeamTeamEditPagePage.js +6 -6
- package/dist/planmagnet/pages/analytics/SprintDeliveryCards.d.ts +10 -0
- package/dist/planmagnet/pages/analytics/SprintDeliveryCards.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/SprintDeliveryCards.js +219 -0
- package/dist/planmagnet/pages/analytics/SprintDeliveryCards.js.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.js +21 -21
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts +29 -0
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts +37 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.js +210 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.js.map +1 -0
- package/dist/planmagnet/team/TeamControls.d.ts.map +1 -1
- package/dist/planmagnet/team/TeamControls.js +134 -124
- package/dist/planmagnet/team/TeamControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@ import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
|
2
2
|
import { throwOnError as t } from "../utils/mutationResult.js";
|
|
3
3
|
import { enumLabel as n } from "../controls/WorkItemControls.js";
|
|
4
4
|
import { PortfolioSelect as r, ProgramSelect as i } from "../controls/Pickers.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { detailPath as a } from "../utils/rowNavigation.js";
|
|
6
|
+
import { endBeforeStart as o } from "../utils/formValidation.js";
|
|
7
|
+
import { useEntityId as s } from "../hooks/useEntityId.js";
|
|
8
8
|
import { PROJECT_STATUSES as c } from "../controls/ProjectControls.js";
|
|
9
9
|
import { useMemo as l, useState as u } from "react";
|
|
10
10
|
import { ArrowLeft as d, Save as f } from "lucide-react";
|
|
@@ -57,7 +57,7 @@ var w = p`
|
|
|
57
57
|
}
|
|
58
58
|
`;
|
|
59
59
|
function E() {
|
|
60
|
-
let p =
|
|
60
|
+
let p = s("projectId"), E = e(), { data: D, loading: O, error: k } = h(w, {
|
|
61
61
|
variables: { id: p },
|
|
62
62
|
skip: !p
|
|
63
63
|
}), [A, j] = u(null), M = D?.planmagnetProject, N = l(() => ({
|
|
@@ -83,7 +83,7 @@ function E() {
|
|
|
83
83
|
"ListPrograms",
|
|
84
84
|
"GetPortfolio",
|
|
85
85
|
"ListPortfolios"
|
|
86
|
-
] }), [B, V] = u(null), H =
|
|
86
|
+
] }), [B, V] = u(null), H = o(I.startDate, I.endDate);
|
|
87
87
|
return p ? O && !D ? /* @__PURE__ */ g("div", {
|
|
88
88
|
className: "flex items-center justify-center p-12",
|
|
89
89
|
children: /* @__PURE__ */ g("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
@@ -101,7 +101,7 @@ function E() {
|
|
|
101
101
|
variant: "ghost",
|
|
102
102
|
size: "sm",
|
|
103
103
|
"aria-label": "Back to the project",
|
|
104
|
-
onClick: () => E(
|
|
104
|
+
onClick: () => E(a("/projects/project-detail-page", p)),
|
|
105
105
|
children: /* @__PURE__ */ g(d, { className: "h-4 w-4" })
|
|
106
106
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
107
107
|
className: "text-2xl font-semibold",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonName as t } from "../people/People.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { detailPath as n } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useEntityId as r } from "../hooks/useEntityId.js";
|
|
5
5
|
import { MilestoneHeaderActions as i } from "../controls/MilestoneControls.js";
|
|
6
6
|
import { MilestoneProgressBar as a, MilestoneWorkItemsCard as o } from "../milestones/MilestoneControls.js";
|
|
7
7
|
import { Calendar as s, FolderKanban as c, Target as l, User as u } from "lucide-react";
|
|
@@ -38,7 +38,7 @@ var b = d`
|
|
|
38
38
|
}
|
|
39
39
|
`;
|
|
40
40
|
function x() {
|
|
41
|
-
let d =
|
|
41
|
+
let d = r("milestoneId"), x = e(), { data: S, loading: C, error: w } = f(b, {
|
|
42
42
|
variables: { id: d },
|
|
43
43
|
skip: !d
|
|
44
44
|
});
|
|
@@ -162,7 +162,7 @@ function x() {
|
|
|
162
162
|
T.project ? /* @__PURE__ */ p("button", {
|
|
163
163
|
type: "button",
|
|
164
164
|
className: "font-medium text-primary hover:underline",
|
|
165
|
-
onClick: () => x(
|
|
165
|
+
onClick: () => x(n("/projects/project-detail-page", T.project.id)),
|
|
166
166
|
children: T.project.name
|
|
167
167
|
}) : /* @__PURE__ */ p("span", {
|
|
168
168
|
className: "text-muted-foreground",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonAvatar as t, PersonName as n, initialsOf as r } from "../people/People.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { detailPath as i } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useEntityId as a } from "../hooks/useEntityId.js";
|
|
5
5
|
import { SprintLifecycleActions as o, SprintWorkItemsPanel as s } from "../sprints/SprintControls.js";
|
|
6
6
|
import { SprintDates as c } from "../sprints/SprintDates.js";
|
|
7
7
|
import { BarChart3 as l, FolderKanban as u, Pencil as d, Users as f } from "lucide-react";
|
|
@@ -79,7 +79,7 @@ var C = p`
|
|
|
79
79
|
}
|
|
80
80
|
`;
|
|
81
81
|
function T() {
|
|
82
|
-
let p =
|
|
82
|
+
let p = a("sprintId"), T = e(), { data: E, loading: D, error: O } = m(C, {
|
|
83
83
|
variables: { id: p },
|
|
84
84
|
skip: !p
|
|
85
85
|
}), { data: k } = m(w, {
|
|
@@ -140,7 +140,7 @@ function T() {
|
|
|
140
140
|
A.status !== "COMPLETED" && A.status !== "CANCELLED" && /* @__PURE__ */ g(v, {
|
|
141
141
|
size: "sm",
|
|
142
142
|
variant: "outline",
|
|
143
|
-
onClick: () => T(
|
|
143
|
+
onClick: () => T(i("/projects/planning-edit-page", A.id)),
|
|
144
144
|
"data-testid": "sprint-edit",
|
|
145
145
|
children: [/* @__PURE__ */ h(d, { className: "mr-1 h-4 w-4" }), " Edit"]
|
|
146
146
|
}),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { throwOnError as n } from "../utils/mutationResult.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { detailPath as r } from "../utils/rowNavigation.js";
|
|
4
|
+
import { endBeforeStart as i, parseIntField as a } from "../utils/formValidation.js";
|
|
5
|
+
import { useEntityId as o } from "../hooks/useEntityId.js";
|
|
6
6
|
import { SprintLifecycleActions as s } from "../sprints/SprintControls.js";
|
|
7
7
|
import { useMemo as c, useState as l } from "react";
|
|
8
8
|
import { ArrowLeft as u, Save as d } from "lucide-react";
|
|
@@ -49,7 +49,7 @@ var C = f`
|
|
|
49
49
|
}
|
|
50
50
|
`;
|
|
51
51
|
function T() {
|
|
52
|
-
let { workspaceId: f } = e(), T =
|
|
52
|
+
let { workspaceId: f } = e(), T = o("sprintId"), E = t(), { data: D, loading: O, error: k } = m(C, {
|
|
53
53
|
variables: {
|
|
54
54
|
id: T,
|
|
55
55
|
workspaceId: f ?? "default"
|
|
@@ -68,7 +68,7 @@ function T() {
|
|
|
68
68
|
let n = { ...t };
|
|
69
69
|
for (let [t, r] of Object.entries(e)) r !== L[t] && (n[t] = r);
|
|
70
70
|
return n;
|
|
71
|
-
}), [z, B] = l(null), V =
|
|
71
|
+
}), [z, B] = l(null), V = i(L.startDate, L.endDate), H = a(L.capacity, { min: 0 }), [U, { loading: W }] = p(w, { refetchQueries: [
|
|
72
72
|
"GetSprints",
|
|
73
73
|
"GetSprintDetail",
|
|
74
74
|
"GetSprintForEdit",
|
|
@@ -91,7 +91,7 @@ function T() {
|
|
|
91
91
|
variant: "ghost",
|
|
92
92
|
size: "sm",
|
|
93
93
|
"aria-label": "Back to the sprint",
|
|
94
|
-
onClick: () => E(
|
|
94
|
+
onClick: () => E(r("/projects/planning-detail-page", T)),
|
|
95
95
|
children: /* @__PURE__ */ h(u, { className: "h-4 w-4" })
|
|
96
96
|
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
97
97
|
className: "text-2xl font-semibold",
|
|
@@ -2,8 +2,8 @@ import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/Pla
|
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
3
|
import { workProgress as r } from "../hooks/useCounts.js";
|
|
4
4
|
import { enumLabel as i } from "../controls/WorkItemControls.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { ROW_LINK_CLASS as a, detailPath as o, rowLinkProps as s } from "../utils/rowNavigation.js";
|
|
6
|
+
import { useEntityId as c } from "../hooks/useEntityId.js";
|
|
7
7
|
import { NewRiskDialog as l, NewTemplateFromProjectDialog as u } from "../create/CreateDialogs.js";
|
|
8
8
|
import { ProjectHeaderActions as d } from "../controls/ProjectControls.js";
|
|
9
9
|
import { ProjectBudgetsSummary as f } from "../budgets/ProjectBudgetsSummary.js";
|
|
@@ -106,7 +106,7 @@ var N = C`
|
|
|
106
106
|
"ACCEPTED"
|
|
107
107
|
]);
|
|
108
108
|
function I() {
|
|
109
|
-
let C =
|
|
109
|
+
let C = c("projectId"), I = t(), { workspaceId: L } = e(), { data: R, loading: z, error: B } = w(N, {
|
|
110
110
|
variables: { id: C },
|
|
111
111
|
skip: !C
|
|
112
112
|
});
|
|
@@ -194,7 +194,7 @@ function I() {
|
|
|
194
194
|
/* @__PURE__ */ T(u, {
|
|
195
195
|
projectId: V.id,
|
|
196
196
|
projectName: V.name,
|
|
197
|
-
onCreated: (e) => I(
|
|
197
|
+
onCreated: (e) => I(o("/templates/edit-template-page", e)),
|
|
198
198
|
trigger: /* @__PURE__ */ E(O, {
|
|
199
199
|
size: "sm",
|
|
200
200
|
variant: "outline",
|
|
@@ -212,7 +212,7 @@ function I() {
|
|
|
212
212
|
/* @__PURE__ */ E(O, {
|
|
213
213
|
size: "sm",
|
|
214
214
|
variant: "outline",
|
|
215
|
-
onClick: () => I(
|
|
215
|
+
onClick: () => I(o("/projects/critical-path-page", V.id)),
|
|
216
216
|
children: [/* @__PURE__ */ T(v, { className: "mr-1 h-4 w-4" }), "Critical path"]
|
|
217
217
|
})
|
|
218
218
|
]
|
|
@@ -356,8 +356,8 @@ function I() {
|
|
|
356
356
|
] }) }), /* @__PURE__ */ E(A, {
|
|
357
357
|
className: "space-y-2",
|
|
358
358
|
children: [te.map((e) => /* @__PURE__ */ E("div", {
|
|
359
|
-
...
|
|
360
|
-
className: `flex items-center justify-between border rounded-md p-2.5 ${
|
|
359
|
+
...s(() => I(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`), e.key),
|
|
360
|
+
className: `flex items-center justify-between border rounded-md p-2.5 ${a}`,
|
|
361
361
|
children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("p", {
|
|
362
362
|
className: "text-sm font-medium",
|
|
363
363
|
children: [
|
|
@@ -437,12 +437,12 @@ function I() {
|
|
|
437
437
|
children: [/* @__PURE__ */ T("button", {
|
|
438
438
|
type: "button",
|
|
439
439
|
className: "text-sm font-medium hover:underline text-left",
|
|
440
|
-
onClick: () => I(
|
|
440
|
+
onClick: () => I(o("/projects/planning-detail-page", e.sprint.id)),
|
|
441
441
|
children: e.sprint.name
|
|
442
442
|
}), /* @__PURE__ */ E("button", {
|
|
443
443
|
type: "button",
|
|
444
444
|
className: "block text-xs text-muted-foreground hover:underline",
|
|
445
|
-
onClick: () => I(
|
|
445
|
+
onClick: () => I(o("/team/team-detail-page", e.sprint.team.id)),
|
|
446
446
|
children: [
|
|
447
447
|
e.items.length,
|
|
448
448
|
" item",
|
|
@@ -467,14 +467,14 @@ function I() {
|
|
|
467
467
|
]
|
|
468
468
|
}), /* @__PURE__ */ T(l, {
|
|
469
469
|
projectId: V.id,
|
|
470
|
-
onCreated: (e) => I(
|
|
470
|
+
onCreated: (e) => I(o("/risks/risk-detail-page", e))
|
|
471
471
|
})]
|
|
472
472
|
}), /* @__PURE__ */ E(A, {
|
|
473
473
|
className: "space-y-3",
|
|
474
474
|
children: [
|
|
475
475
|
q.map((e) => /* @__PURE__ */ E("div", {
|
|
476
|
-
...
|
|
477
|
-
className: `border-b pb-2 last:border-0 ${
|
|
476
|
+
...s(() => I(o("/risks/risk-detail-page", e.id)), e.title),
|
|
477
|
+
className: `border-b pb-2 last:border-0 ${a}`,
|
|
478
478
|
children: [/* @__PURE__ */ E("div", {
|
|
479
479
|
className: "flex justify-between gap-2",
|
|
480
480
|
children: [/* @__PURE__ */ T("span", {
|
|
@@ -548,7 +548,7 @@ function I() {
|
|
|
548
548
|
}), V.program ? /* @__PURE__ */ T("button", {
|
|
549
549
|
type: "button",
|
|
550
550
|
className: "text-primary hover:underline underline-offset-2",
|
|
551
|
-
onClick: () => I(
|
|
551
|
+
onClick: () => I(o("/products/program-detail-page", V.program.id)),
|
|
552
552
|
children: V.program.name
|
|
553
553
|
}) : /* @__PURE__ */ T("span", {
|
|
554
554
|
className: "text-muted-foreground",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonName as t } from "../people/People.js";
|
|
3
3
|
import { enumLabel as n } from "../controls/WorkItemControls.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { detailPath as r } from "../utils/rowNavigation.js";
|
|
5
|
+
import { useEntityId as i } from "../hooks/useEntityId.js";
|
|
6
6
|
import { RiskHeaderActions as a } from "../controls/RiskControls.js";
|
|
7
7
|
import { Calendar as o, FolderKanban as s, Gauge as c, ShieldAlert as l, User as u } from "lucide-react";
|
|
8
8
|
import { gql as d } from "@apollo/client";
|
|
@@ -45,7 +45,7 @@ var b = d`
|
|
|
45
45
|
NEGLIGIBLE: "bg-gray-100 text-gray-800"
|
|
46
46
|
}, S = 12;
|
|
47
47
|
function C() {
|
|
48
|
-
let d =
|
|
48
|
+
let d = i(), C = e(), { data: w, loading: T, error: E } = f(b, {
|
|
49
49
|
variables: { id: d },
|
|
50
50
|
skip: !d
|
|
51
51
|
});
|
|
@@ -186,7 +186,7 @@ function C() {
|
|
|
186
186
|
D.project ? /* @__PURE__ */ p("button", {
|
|
187
187
|
type: "button",
|
|
188
188
|
className: "font-medium text-primary hover:underline",
|
|
189
|
-
onClick: () => C(
|
|
189
|
+
onClick: () => C(r("/projects/project-detail-page", D.project?.id)),
|
|
190
190
|
children: D.project.name
|
|
191
191
|
}) : /* @__PURE__ */ p("span", {
|
|
192
192
|
className: "text-muted-foreground",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { throwOnError as n } from "../utils/mutationResult.js";
|
|
3
3
|
import { AssigneeSelect as r } from "../controls/WorkItemControls.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { detailPath as ee } from "../utils/rowNavigation.js";
|
|
5
|
+
import { parseIntField as te } from "../utils/formValidation.js";
|
|
6
6
|
import { TEAM_QUERIES as i } from "../team/TeamControls.js";
|
|
7
7
|
import { useDeferredValue as a, useEffect as ne, useState as o } from "react";
|
|
8
8
|
import { ArrowRight as re, FolderKanban as s, Save as c, Users as l, X as ie } from "lucide-react";
|
|
@@ -63,7 +63,7 @@ function w() {
|
|
|
63
63
|
ne(() => {
|
|
64
64
|
V(F);
|
|
65
65
|
}, [F, V]);
|
|
66
|
-
let [H, { loading: U }] = d(oe, { refetchQueries: i }), [W] = d(se, { refetchQueries: i }), [le] = d(ce, { refetchQueries: i }), [G, K] = o(null), [q, J] = o([]), [Y, X] = o(null), Z =
|
|
66
|
+
let [H, { loading: U }] = d(oe, { refetchQueries: i }), [W] = d(se, { refetchQueries: i }), [le] = d(ce, { refetchQueries: i }), [G, K] = o(null), [q, J] = o([]), [Y, X] = o(null), Z = te(D.capacity, { min: 0 }), Q = D.name.trim() === "", ue = U, $ = !Q && !Z.invalid && !ue && !!u, de = (e, t) => A((n) => {
|
|
67
67
|
let r = new Set(n);
|
|
68
68
|
return t ? r.add(e) : r.delete(e), r;
|
|
69
69
|
}), fe = (e, t) => M((n) => {
|
|
@@ -149,7 +149,7 @@ function w() {
|
|
|
149
149
|
] }), /* @__PURE__ */ m(h, {
|
|
150
150
|
size: "sm",
|
|
151
151
|
variant: "outline",
|
|
152
|
-
onClick: () => E(
|
|
152
|
+
onClick: () => E(ee("/team/team-detail-page", Y.id)),
|
|
153
153
|
children: ["View team", /* @__PURE__ */ p(re, { className: "ml-1 h-4 w-4" })]
|
|
154
154
|
})]
|
|
155
155
|
}),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ROW_LINK_CLASS as r, detailPath as i, rowLinkProps as a } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useEntityId as o } from "../hooks/useEntityId.js";
|
|
5
5
|
import { PlanMagnetNotFoundPage as s } from "./NotFoundPage.js";
|
|
6
6
|
import { NewSprintDialog as c } from "../sprints/SprintControls.js";
|
|
7
7
|
import { TeamHeaderActions as l, TeamMembersPanel as u, TeamProjectsPanel as d } from "../team/TeamControls.js";
|
|
@@ -59,7 +59,7 @@ var T = g`
|
|
|
59
59
|
CANCELLED: "bg-red-100 text-red-800"
|
|
60
60
|
};
|
|
61
61
|
function O() {
|
|
62
|
-
let g =
|
|
62
|
+
let g = o("teamId"), { workspaceId: O } = e(), k = t(), { data: A, loading: j, error: M } = _(T, {
|
|
63
63
|
variables: { id: g },
|
|
64
64
|
skip: !g
|
|
65
65
|
}), { data: N, loading: P } = _(E, {
|
|
@@ -163,7 +163,7 @@ function O() {
|
|
|
163
163
|
children: [/* @__PURE__ */ v(w, { children: "Sprints" }), /* @__PURE__ */ v(c, {
|
|
164
164
|
initialScope: "team",
|
|
165
165
|
initialTeamId: F.id,
|
|
166
|
-
onCreated: (e) => k(
|
|
166
|
+
onCreated: (e) => k(i("/projects/planning-detail-page", e))
|
|
167
167
|
})]
|
|
168
168
|
}), /* @__PURE__ */ y(S, {
|
|
169
169
|
className: "space-y-2",
|
|
@@ -179,8 +179,8 @@ function O() {
|
|
|
179
179
|
I.map((e) => {
|
|
180
180
|
let t = e.workItems.reduce((e, t) => e + (t.storyPoints ?? 0), 0), n = e.workItems.filter((e) => e.status === "DONE").reduce((e, t) => e + (t.storyPoints ?? 0), 0);
|
|
181
181
|
return /* @__PURE__ */ y("div", {
|
|
182
|
-
...
|
|
183
|
-
className: `flex items-center justify-between border rounded-md p-2.5 ${
|
|
182
|
+
...a(() => k(i("/projects/planning-detail-page", e.id)), e.name),
|
|
183
|
+
className: `flex items-center justify-between border rounded-md p-2.5 ${r}`,
|
|
184
184
|
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
|
|
185
185
|
className: "text-sm font-medium",
|
|
186
186
|
children: e.name
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { throwOnError as t } from "../utils/mutationResult.js";
|
|
3
3
|
import { AssigneeSelect as n } from "../controls/WorkItemControls.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { detailPath as r } from "../utils/rowNavigation.js";
|
|
5
|
+
import { parseIntField as i } from "../utils/formValidation.js";
|
|
6
|
+
import { useEntityId as a } from "../hooks/useEntityId.js";
|
|
7
7
|
import { PlanMagnetNotFoundPage as o } from "./NotFoundPage.js";
|
|
8
8
|
import { useMemo as s, useState as c } from "react";
|
|
9
9
|
import { ArrowLeft as l, Save as u } from "lucide-react";
|
|
@@ -34,7 +34,7 @@ var S = d`
|
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
36
|
function w() {
|
|
37
|
-
let d =
|
|
37
|
+
let d = a("teamId"), w = e(), { data: T, loading: E, error: D } = p(S, {
|
|
38
38
|
variables: { id: d },
|
|
39
39
|
skip: !d
|
|
40
40
|
}), O = T?.planmagnetTeam, k = s(() => ({
|
|
@@ -49,7 +49,7 @@ function w() {
|
|
|
49
49
|
let n = { ...t };
|
|
50
50
|
for (let [t, r] of Object.entries(e)) r !== M[t] && (n[t] = r);
|
|
51
51
|
return n;
|
|
52
|
-
}), [P, F] = c(null), [I, L] = c(null), R =
|
|
52
|
+
}), [P, F] = c(null), [I, L] = c(null), R = i(M.capacity, { min: 0 }), z = M.name.trim() === "", [B, { loading: V }] = f(C, { refetchQueries: [
|
|
53
53
|
"GetTeams",
|
|
54
54
|
"GetTeamDetail",
|
|
55
55
|
"GetTeamForEdit"
|
|
@@ -71,7 +71,7 @@ function w() {
|
|
|
71
71
|
variant: "ghost",
|
|
72
72
|
size: "sm",
|
|
73
73
|
"aria-label": "Back to the team",
|
|
74
|
-
onClick: () => w(
|
|
74
|
+
onClick: () => w(r("/team/team-detail-page", d)),
|
|
75
75
|
children: /* @__PURE__ */ m(l, { className: "h-4 w-4" })
|
|
76
76
|
}), /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h1", {
|
|
77
77
|
className: "text-2xl font-semibold",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function SprintBurndownCard({ workspaceId, sprintId, }: {
|
|
2
|
+
workspaceId?: string | null;
|
|
3
|
+
sprintId: string;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function SprintVelocityCard({ workspaceId, projectId, trailingSprintCount, }: {
|
|
6
|
+
workspaceId?: string | null;
|
|
7
|
+
projectId: string;
|
|
8
|
+
trailingSprintCount?: number;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=SprintDeliveryCards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SprintDeliveryCards.d.ts","sourceRoot":"","sources":["../../../../src/planmagnet/pages/analytics/SprintDeliveryCards.tsx"],"names":[],"mappings":"AAkGA,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,QAAQ,GACT,EAAE;IACD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,2CA2EA;AAED,wBAAgB,kBAAkB,CAAC,EACjC,WAAW,EACX,SAAS,EACT,mBAAuB,GACxB,EAAE;IACD,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,2CA6FA"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { Legend as e } from "../../../node_modules/recharts/es6/component/Legend.js";
|
|
2
|
+
import { Tooltip as t } from "../../../node_modules/recharts/es6/component/Tooltip.js";
|
|
3
|
+
import { ResponsiveContainer as n } from "../../../node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
4
|
+
import { Bar as r } from "../../../node_modules/recharts/es6/cartesian/Bar.js";
|
|
5
|
+
import { ReferenceLine as i } from "../../../node_modules/recharts/es6/cartesian/ReferenceLine.js";
|
|
6
|
+
import { CartesianGrid as a } from "../../../node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
7
|
+
import { Line as o } from "../../../node_modules/recharts/es6/cartesian/Line.js";
|
|
8
|
+
import { XAxis as s } from "../../../node_modules/recharts/es6/cartesian/XAxis.js";
|
|
9
|
+
import { YAxis as c } from "../../../node_modules/recharts/es6/cartesian/YAxis.js";
|
|
10
|
+
import { LineChart as l } from "../../../node_modules/recharts/es6/chart/LineChart.js";
|
|
11
|
+
import { BarChart as u } from "../../../node_modules/recharts/es6/chart/BarChart.js";
|
|
12
|
+
import { BarChart3 as d, TrendingUp as f } from "lucide-react";
|
|
13
|
+
import { gql as p } from "@apollo/client";
|
|
14
|
+
import { useQuery as m } from "@apollo/client/react";
|
|
15
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
16
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { Card as y, CardContent as b, CardHeader as x, CardTitle as S } from "@burdenoff/fe-libs/ui";
|
|
18
|
+
//#region src/planmagnet/pages/analytics/SprintDeliveryCards.tsx
|
|
19
|
+
var C = p`
|
|
20
|
+
query DashboardSprintBurndown($workspaceId: ID!, $sprintId: ID!) {
|
|
21
|
+
planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {
|
|
22
|
+
sprintId
|
|
23
|
+
totalPoints
|
|
24
|
+
totalCount
|
|
25
|
+
points {
|
|
26
|
+
date
|
|
27
|
+
remainingPoints
|
|
28
|
+
completedPoints
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`, w = p`
|
|
33
|
+
query DashboardVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {
|
|
34
|
+
planmagnetVelocity(
|
|
35
|
+
workspaceId: $workspaceId
|
|
36
|
+
projectId: $projectId
|
|
37
|
+
trailingSprintCount: $trailingSprintCount
|
|
38
|
+
) {
|
|
39
|
+
projectId
|
|
40
|
+
averageVelocity
|
|
41
|
+
forecastNextSprintPoints
|
|
42
|
+
sprints {
|
|
43
|
+
sprintId
|
|
44
|
+
sprintName
|
|
45
|
+
sequenceNumber
|
|
46
|
+
completedPoints
|
|
47
|
+
plannedPoints
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
`;
|
|
52
|
+
function T(e) {
|
|
53
|
+
let t = new Date(e);
|
|
54
|
+
return `${t.getUTCMonth() + 1}/${t.getUTCDate()}`;
|
|
55
|
+
}
|
|
56
|
+
function E({ workspaceId: r, sprintId: i }) {
|
|
57
|
+
let { t: u } = v(), { data: f, loading: p, error: h } = m(C, {
|
|
58
|
+
variables: {
|
|
59
|
+
workspaceId: r,
|
|
60
|
+
sprintId: i
|
|
61
|
+
},
|
|
62
|
+
skip: !r || !i
|
|
63
|
+
}), w = (f?.planmagnetSprintBurndown?.points ?? []).map((e) => ({
|
|
64
|
+
day: T(e.date),
|
|
65
|
+
remaining: e.remainingPoints,
|
|
66
|
+
completed: e.completedPoints
|
|
67
|
+
}));
|
|
68
|
+
return /* @__PURE__ */ _(y, { children: [/* @__PURE__ */ _(x, { children: [/* @__PURE__ */ _(S, {
|
|
69
|
+
className: "flex items-center gap-2",
|
|
70
|
+
children: [/* @__PURE__ */ g(d, { className: "h-4 w-4" }), u("planmagnet.dashboards.burndown.title", "Sprint burndown")]
|
|
71
|
+
}), /* @__PURE__ */ g("p", {
|
|
72
|
+
className: "text-xs text-muted-foreground",
|
|
73
|
+
children: u("planmagnet.dashboards.burndown.subtitle", "Remaining vs. completed story points, by day of the sprint.")
|
|
74
|
+
})] }), /* @__PURE__ */ g(b, { children: i ? p && !f ? /* @__PURE__ */ g("p", {
|
|
75
|
+
className: "text-sm text-muted-foreground",
|
|
76
|
+
children: u("planmagnet.dashboards.loading", "Loading…")
|
|
77
|
+
}) : h ? /* @__PURE__ */ _("p", {
|
|
78
|
+
className: "text-sm text-status-error-text",
|
|
79
|
+
children: [
|
|
80
|
+
u("planmagnet.dashboards.burndown.error", "Burndown could not be loaded"),
|
|
81
|
+
":",
|
|
82
|
+
" ",
|
|
83
|
+
h.message
|
|
84
|
+
]
|
|
85
|
+
}) : w.length === 0 ? /* @__PURE__ */ g("p", {
|
|
86
|
+
className: "text-sm text-muted-foreground",
|
|
87
|
+
children: u("planmagnet.dashboards.burndown.empty", "The active sprint has no work items yet.")
|
|
88
|
+
}) : /* @__PURE__ */ g(n, {
|
|
89
|
+
width: "100%",
|
|
90
|
+
height: 220,
|
|
91
|
+
children: /* @__PURE__ */ _(l, {
|
|
92
|
+
data: w,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ g(a, {
|
|
95
|
+
strokeDasharray: "3 3",
|
|
96
|
+
opacity: .2
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ g(s, {
|
|
99
|
+
dataKey: "day",
|
|
100
|
+
tick: { fontSize: 11 }
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ g(c, {
|
|
103
|
+
tick: { fontSize: 11 },
|
|
104
|
+
allowDecimals: !1
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ g(t, {}),
|
|
107
|
+
/* @__PURE__ */ g(e, { wrapperStyle: { fontSize: 12 } }),
|
|
108
|
+
/* @__PURE__ */ g(o, {
|
|
109
|
+
type: "monotone",
|
|
110
|
+
dataKey: "remaining",
|
|
111
|
+
name: u("planmagnet.dashboards.burndown.remaining", "Remaining points"),
|
|
112
|
+
stroke: "#f59e0b",
|
|
113
|
+
strokeWidth: 2,
|
|
114
|
+
dot: { r: 2 }
|
|
115
|
+
}),
|
|
116
|
+
/* @__PURE__ */ g(o, {
|
|
117
|
+
type: "monotone",
|
|
118
|
+
dataKey: "completed",
|
|
119
|
+
name: u("planmagnet.dashboards.burndown.completed", "Completed points"),
|
|
120
|
+
stroke: "#22c55e",
|
|
121
|
+
strokeWidth: 2,
|
|
122
|
+
dot: { r: 2 }
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
})
|
|
126
|
+
}) : /* @__PURE__ */ g("p", {
|
|
127
|
+
className: "text-sm text-muted-foreground",
|
|
128
|
+
children: u("planmagnet.dashboards.burndown.noSprint", "No active sprint for this project.")
|
|
129
|
+
}) })] });
|
|
130
|
+
}
|
|
131
|
+
function D({ workspaceId: o, projectId: l, trailingSprintCount: d = 6 }) {
|
|
132
|
+
let { t: p } = v(), { data: C, loading: T, error: E } = m(w, {
|
|
133
|
+
variables: {
|
|
134
|
+
workspaceId: o,
|
|
135
|
+
projectId: l,
|
|
136
|
+
trailingSprintCount: d
|
|
137
|
+
},
|
|
138
|
+
skip: !o || !l
|
|
139
|
+
}), D = C?.planmagnetVelocity, O = D?.sprints.map((e) => ({
|
|
140
|
+
name: e.sprintName,
|
|
141
|
+
completed: e.completedPoints,
|
|
142
|
+
planned: e.plannedPoints ?? void 0
|
|
143
|
+
})) ?? [], k = D ? Math.round(D.averageVelocity) : 0;
|
|
144
|
+
return /* @__PURE__ */ _(y, { children: [/* @__PURE__ */ _(x, { children: [/* @__PURE__ */ _(S, {
|
|
145
|
+
className: "flex items-center gap-2",
|
|
146
|
+
children: [/* @__PURE__ */ g(f, { className: "h-4 w-4" }), p("planmagnet.dashboards.velocity.title", "Sprint velocity")]
|
|
147
|
+
}), /* @__PURE__ */ g("p", {
|
|
148
|
+
className: "text-xs text-muted-foreground",
|
|
149
|
+
children: p("planmagnet.dashboards.velocity.subtitle", "Completed story points per sprint, across the trailing {{count}} completed sprints.", { count: d })
|
|
150
|
+
})] }), /* @__PURE__ */ g(b, { children: l ? T && !C ? /* @__PURE__ */ g("p", {
|
|
151
|
+
className: "text-sm text-muted-foreground",
|
|
152
|
+
children: p("planmagnet.dashboards.loading", "Loading…")
|
|
153
|
+
}) : E ? /* @__PURE__ */ _("p", {
|
|
154
|
+
className: "text-sm text-status-error-text",
|
|
155
|
+
children: [
|
|
156
|
+
p("planmagnet.dashboards.velocity.error", "Velocity could not be loaded"),
|
|
157
|
+
":",
|
|
158
|
+
" ",
|
|
159
|
+
E.message
|
|
160
|
+
]
|
|
161
|
+
}) : O.length === 0 ? /* @__PURE__ */ g("p", {
|
|
162
|
+
className: "text-sm text-muted-foreground",
|
|
163
|
+
children: p("planmagnet.dashboards.velocity.empty", "No completed sprints yet for this project.")
|
|
164
|
+
}) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(n, {
|
|
165
|
+
width: "100%",
|
|
166
|
+
height: 190,
|
|
167
|
+
children: /* @__PURE__ */ _(u, {
|
|
168
|
+
data: O,
|
|
169
|
+
children: [
|
|
170
|
+
/* @__PURE__ */ g(a, {
|
|
171
|
+
strokeDasharray: "3 3",
|
|
172
|
+
opacity: .2
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ g(s, {
|
|
175
|
+
dataKey: "name",
|
|
176
|
+
tick: { fontSize: 11 }
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ g(c, {
|
|
179
|
+
tick: { fontSize: 11 },
|
|
180
|
+
allowDecimals: !1
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ g(t, {}),
|
|
183
|
+
/* @__PURE__ */ g(e, { wrapperStyle: { fontSize: 12 } }),
|
|
184
|
+
/* @__PURE__ */ g(r, {
|
|
185
|
+
dataKey: "planned",
|
|
186
|
+
name: p("planmagnet.dashboards.velocity.planned", "Planned"),
|
|
187
|
+
fill: "#cbd5e1"
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ g(r, {
|
|
190
|
+
dataKey: "completed",
|
|
191
|
+
name: p("planmagnet.dashboards.velocity.completed", "Completed"),
|
|
192
|
+
fill: "#6366f1"
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ g(i, {
|
|
195
|
+
y: k,
|
|
196
|
+
stroke: "#22c55e",
|
|
197
|
+
strokeDasharray: "4 4",
|
|
198
|
+
label: {
|
|
199
|
+
value: p("planmagnet.dashboards.velocity.avgLabel", "avg"),
|
|
200
|
+
fontSize: 10
|
|
201
|
+
}
|
|
202
|
+
})
|
|
203
|
+
]
|
|
204
|
+
})
|
|
205
|
+
}), /* @__PURE__ */ g("p", {
|
|
206
|
+
className: "mt-2 text-center text-xs text-muted-foreground",
|
|
207
|
+
children: p("planmagnet.dashboards.velocity.trailingAverage", "Average of the last {{count}} completed sprints: {{points}} pts per sprint", {
|
|
208
|
+
count: O.length,
|
|
209
|
+
points: k
|
|
210
|
+
})
|
|
211
|
+
})] }) : /* @__PURE__ */ g("p", {
|
|
212
|
+
className: "text-sm text-muted-foreground",
|
|
213
|
+
children: p("planmagnet.dashboards.velocity.noProject", "Select a project to see its velocity.")
|
|
214
|
+
}) })] });
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
export { E as SprintBurndownCard, D as SprintVelocityCard };
|
|
218
|
+
|
|
219
|
+
//# sourceMappingURL=SprintDeliveryCards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SprintDeliveryCards.js","names":[],"sources":["../../../../src/planmagnet/pages/analytics/SprintDeliveryCards.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { BarChart3, TrendingUp } from 'lucide-react';\nimport {\n Bar,\n BarChart,\n CartesianGrid,\n Legend,\n Line,\n LineChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\n\n/**\n * Sprint burndown and velocity, as their own cards (BOFF-4447's server-computed\n * `planmagnetSprintBurndown` / `planmagnetVelocity`). Extracted out of\n * `pages/AnalyticsAnalyticsPagePage.tsx`, where this same chart code lived inline, so the\n * role dashboards (`dashboards/project-manager-page`) can import the chart rather than\n * duplicating it — same reasoning as `CycleTimeCard`/`BudgetPerformanceCard` alongside\n * them in `DeliveryHealthCards.tsx`. Each card owns its query, so neither can land a hook\n * after an early return in the host page.\n *\n * recharts' `stroke`/`fill` render as literal SVG paint attributes, not Tailwind\n * classNames — they cannot consume semantic `bg-*`/`text-*` tokens, the same documented\n * exception `AnalyticsAnalyticsPagePage.tsx`'s cumulative-flow chart carries.\n */\n\nconst GET_SPRINT_BURNDOWN = gql`\n query DashboardSprintBurndown($workspaceId: ID!, $sprintId: ID!) {\n planmagnetSprintBurndown(workspaceId: $workspaceId, sprintId: $sprintId) {\n sprintId\n totalPoints\n totalCount\n points {\n date\n remainingPoints\n completedPoints\n }\n }\n }\n`;\n\nconst GET_VELOCITY = gql`\n query DashboardVelocity($workspaceId: ID!, $projectId: ID!, $trailingSprintCount: Int) {\n planmagnetVelocity(\n workspaceId: $workspaceId\n projectId: $projectId\n trailingSprintCount: $trailingSprintCount\n ) {\n projectId\n averageVelocity\n forecastNextSprintPoints\n sprints {\n sprintId\n sprintName\n sequenceNumber\n completedPoints\n plannedPoints\n }\n }\n }\n`;\n\ninterface BurndownData {\n planmagnetSprintBurndown: {\n sprintId: string;\n totalPoints: number;\n totalCount: number;\n points: { date: string; remainingPoints: number; completedPoints: number }[];\n } | null;\n}\n\ninterface VelocityData {\n planmagnetVelocity: {\n projectId: string;\n averageVelocity: number;\n forecastNextSprintPoints: number;\n sprints: {\n sprintId: string;\n sprintName: string;\n sequenceNumber: number;\n completedPoints: number;\n plannedPoints: number | null;\n }[];\n };\n}\n\nfunction formatDay(iso: string): string {\n const d = new Date(iso);\n return `${d.getUTCMonth() + 1}/${d.getUTCDate()}`;\n}\n\nexport function SprintBurndownCard({\n workspaceId,\n sprintId,\n}: {\n workspaceId?: string | null;\n sprintId: string;\n}) {\n const { t } = useI18n();\n const { data, loading, error } = useQuery<BurndownData>(GET_SPRINT_BURNDOWN, {\n variables: { workspaceId, sprintId },\n skip: !workspaceId || !sprintId,\n });\n const points = data?.planmagnetSprintBurndown?.points ?? [];\n const chartData = points.map((p) => ({\n day: formatDay(p.date),\n remaining: p.remainingPoints,\n completed: p.completedPoints,\n }));\n\n return (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <BarChart3 className=\"h-4 w-4\" />\n {t('planmagnet.dashboards.burndown.title', 'Sprint burndown')}\n </CardTitle>\n <p className=\"text-xs text-muted-foreground\">\n {t(\n 'planmagnet.dashboards.burndown.subtitle',\n 'Remaining vs. completed story points, by day of the sprint.'\n )}\n </p>\n </CardHeader>\n <CardContent>\n {!sprintId ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.dashboards.burndown.noSprint', 'No active sprint for this project.')}\n </p>\n ) : loading && !data ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.dashboards.loading', 'Loading…')}\n </p>\n ) : error ? (\n <p className=\"text-sm text-status-error-text\">\n {t('planmagnet.dashboards.burndown.error', 'Burndown could not be loaded')}:{' '}\n {error.message}\n </p>\n ) : chartData.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.dashboards.burndown.empty', 'The active sprint has no work items yet.')}\n </p>\n ) : (\n <ResponsiveContainer width=\"100%\" height={220}>\n <LineChart data={chartData}>\n <CartesianGrid strokeDasharray=\"3 3\" opacity={0.2} />\n <XAxis dataKey=\"day\" tick={{ fontSize: 11 }} />\n <YAxis tick={{ fontSize: 11 }} allowDecimals={false} />\n <Tooltip />\n <Legend wrapperStyle={{ fontSize: 12 }} />\n <Line\n type=\"monotone\"\n dataKey=\"remaining\"\n name={t('planmagnet.dashboards.burndown.remaining', 'Remaining points')}\n stroke=\"#f59e0b\"\n strokeWidth={2}\n dot={{ r: 2 }}\n />\n <Line\n type=\"monotone\"\n dataKey=\"completed\"\n name={t('planmagnet.dashboards.burndown.completed', 'Completed points')}\n stroke=\"#22c55e\"\n strokeWidth={2}\n dot={{ r: 2 }}\n />\n </LineChart>\n </ResponsiveContainer>\n )}\n </CardContent>\n </Card>\n );\n}\n\nexport function SprintVelocityCard({\n workspaceId,\n projectId,\n trailingSprintCount = 6,\n}: {\n workspaceId?: string | null;\n projectId: string;\n trailingSprintCount?: number;\n}) {\n const { t } = useI18n();\n const { data, loading, error } = useQuery<VelocityData>(GET_VELOCITY, {\n variables: { workspaceId, projectId, trailingSprintCount },\n skip: !workspaceId || !projectId,\n });\n const velocity = data?.planmagnetVelocity;\n const chartData =\n velocity?.sprints.map((s) => ({\n name: s.sprintName,\n completed: s.completedPoints,\n planned: s.plannedPoints ?? undefined,\n })) ?? [];\n const avgVelocity = velocity ? Math.round(velocity.averageVelocity) : 0;\n\n return (\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <TrendingUp className=\"h-4 w-4\" />\n {t('planmagnet.dashboards.velocity.title', 'Sprint velocity')}\n </CardTitle>\n <p className=\"text-xs text-muted-foreground\">\n {t(\n 'planmagnet.dashboards.velocity.subtitle',\n 'Completed story points per sprint, across the trailing {{count}} completed sprints.',\n { count: trailingSprintCount }\n )}\n </p>\n </CardHeader>\n <CardContent>\n {!projectId ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.dashboards.velocity.noProject', 'Select a project to see its velocity.')}\n </p>\n ) : loading && !data ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.dashboards.loading', 'Loading…')}\n </p>\n ) : error ? (\n <p className=\"text-sm text-status-error-text\">\n {t('planmagnet.dashboards.velocity.error', 'Velocity could not be loaded')}:{' '}\n {error.message}\n </p>\n ) : chartData.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">\n {t(\n 'planmagnet.dashboards.velocity.empty',\n 'No completed sprints yet for this project.'\n )}\n </p>\n ) : (\n <>\n <ResponsiveContainer width=\"100%\" height={190}>\n <BarChart data={chartData}>\n <CartesianGrid strokeDasharray=\"3 3\" opacity={0.2} />\n <XAxis dataKey=\"name\" tick={{ fontSize: 11 }} />\n <YAxis tick={{ fontSize: 11 }} allowDecimals={false} />\n <Tooltip />\n <Legend wrapperStyle={{ fontSize: 12 }} />\n <Bar\n dataKey=\"planned\"\n name={t('planmagnet.dashboards.velocity.planned', 'Planned')}\n fill=\"#cbd5e1\"\n />\n <Bar\n dataKey=\"completed\"\n name={t('planmagnet.dashboards.velocity.completed', 'Completed')}\n fill=\"#6366f1\"\n />\n <ReferenceLine\n y={avgVelocity}\n stroke=\"#22c55e\"\n strokeDasharray=\"4 4\"\n label={{\n value: t('planmagnet.dashboards.velocity.avgLabel', 'avg'),\n fontSize: 10,\n }}\n />\n </BarChart>\n </ResponsiveContainer>\n <p className=\"mt-2 text-center text-xs text-muted-foreground\">\n {t(\n 'planmagnet.dashboards.velocity.trailingAverage',\n 'Average of the last {{count}} completed sprints: {{points}} pts per sprint',\n { count: chartData.length, points: avgVelocity }\n )}\n </p>\n </>\n )}\n </CardContent>\n </Card>\n );\n}\n"],"mappings":"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"}
|