@burdenoff/microfe-planmagnet 2026.924.5 → 2026.925.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,23 @@
1
1
  import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
2
  import { detailPath as n, rowLinkProps as r } from "../utils/rowNavigation.js";
3
- import { CalendarClock as i, FolderKanban as a } from "lucide-react";
4
- import { gql as o } from "@apollo/client";
5
- import { useQuery as s } from "@apollo/client/react";
6
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
- import { Badge as u, Card as d, CardContent as f, CardHeader as p, CardTitle as m } from "@burdenoff/fe-libs/ui";
3
+ import { NewSprintDialog as i } from "../sprints/SprintControls.js";
4
+ import { CalendarClock as a, FolderKanban as o } from "lucide-react";
5
+ import { gql as s } from "@apollo/client";
6
+ import { useQuery as c } from "@apollo/client/react";
7
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ import { Badge as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h } from "@burdenoff/fe-libs/ui";
8
9
  //#region src/planmagnet/pages/ProjectsPlanningPagePage.tsx
9
- var h = o`
10
+ var g = s`
10
11
  query GetSprints($workspaceId: ID!) {
11
12
  planmagnetSprints(workspaceId: $workspaceId, pagination: { first: 100 }) {
12
13
  items {
13
14
  id
14
15
  name
15
16
  projectId
17
+ project {
18
+ id
19
+ name
20
+ }
16
21
  status
17
22
  startDate
18
23
  endDate
@@ -28,102 +33,105 @@ var h = o`
28
33
  totalCount
29
34
  }
30
35
  }
31
- `, g = {
36
+ `, _ = {
32
37
  PLANNING: "bg-blue-100 text-blue-800",
33
38
  ACTIVE: "bg-green-100 text-green-800",
34
39
  REVIEW: "bg-purple-100 text-purple-800",
35
40
  COMPLETED: "bg-gray-100 text-gray-800",
36
41
  CANCELLED: "bg-red-100 text-red-800"
37
42
  };
38
- function _() {
39
- let { workspaceId: o } = e(), _ = t(), { data: v, loading: y, error: b } = s(h, { variables: { workspaceId: o ?? "default" } });
40
- if (y) return /* @__PURE__ */ c("div", {
43
+ function v() {
44
+ let { workspaceId: s } = e(), v = t(), { data: y, loading: b, error: x } = c(g, { variables: { workspaceId: s ?? "default" } });
45
+ if (b) return /* @__PURE__ */ l("div", {
41
46
  className: "flex items-center justify-center p-12",
42
- children: /* @__PURE__ */ c("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
47
+ children: /* @__PURE__ */ l("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
43
48
  });
44
- if (b) return /* @__PURE__ */ l("div", {
49
+ if (x) return /* @__PURE__ */ u("div", {
45
50
  className: "p-6 text-red-500",
46
- children: ["Error loading planning sessions: ", b.message]
51
+ children: ["Error loading planning sessions: ", x.message]
47
52
  });
48
- let x = v?.planmagnetSprints?.items ?? [];
49
- return /* @__PURE__ */ l("div", {
53
+ let S = y?.planmagnetSprints?.items ?? [];
54
+ return /* @__PURE__ */ u("div", {
50
55
  className: "space-y-6 p-6",
51
56
  children: [
52
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
53
- className: "text-2xl font-semibold",
54
- children: "Planning Sessions"
55
- }), /* @__PURE__ */ l("p", {
56
- className: "text-sm text-muted-foreground",
57
- children: [x.length, " sprints across all projects"]
58
- })] }),
59
- /* @__PURE__ */ c("div", {
57
+ /* @__PURE__ */ u("div", {
58
+ className: "flex items-center justify-between",
59
+ children: [/* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("h1", {
60
+ className: "text-2xl font-semibold",
61
+ children: "Planning Sessions"
62
+ }), /* @__PURE__ */ u("p", {
63
+ className: "text-sm text-muted-foreground",
64
+ children: [S.length, " sprints across all projects"]
65
+ })] }), /* @__PURE__ */ l(i, { onCreated: (e) => v(n("/projects/planning-detail-page", e)) })]
66
+ }),
67
+ /* @__PURE__ */ l("div", {
60
68
  className: "grid grid-cols-1 md:grid-cols-2 gap-4",
61
- children: x.map((e) => {
62
- let t = e.workItems.reduce((e, t) => e + (t.storyPoints ?? 0), 0), o = e.capacity ?? 0, s = o > 0 ? Math.round(t / o * 100) : 0;
63
- return /* @__PURE__ */ l(d, {
64
- ...r(() => _(n("/projects/planning-detail-page", e.id)), e.name),
65
- children: [/* @__PURE__ */ c(p, {
69
+ children: S.map((e) => {
70
+ let t = e.workItems.reduce((e, t) => e + (t.storyPoints ?? 0), 0), i = e.capacity ?? 0, s = i > 0 ? Math.round(t / i * 100) : 0;
71
+ return /* @__PURE__ */ u(f, {
72
+ ...r(() => v(n("/projects/planning-detail-page", e.id)), e.name),
73
+ children: [/* @__PURE__ */ l(m, {
66
74
  className: "pb-2",
67
- children: /* @__PURE__ */ l("div", {
75
+ children: /* @__PURE__ */ u("div", {
68
76
  className: "flex items-center justify-between",
69
- children: [/* @__PURE__ */ l(m, {
77
+ children: [/* @__PURE__ */ u(h, {
70
78
  className: "text-base flex items-center gap-2",
71
- children: [/* @__PURE__ */ c(i, { className: "h-4 w-4 text-primary" }), e.name]
72
- }), /* @__PURE__ */ c(u, {
79
+ children: [/* @__PURE__ */ l(a, { className: "h-4 w-4 text-primary" }), e.name]
80
+ }), /* @__PURE__ */ l(d, {
73
81
  variant: e.status === "COMPLETED" ? "default" : "secondary",
74
82
  className: "capitalize",
75
83
  children: e.status.toLowerCase().replace("_", " ")
76
84
  })]
77
85
  })
78
- }), /* @__PURE__ */ l(f, {
86
+ }), /* @__PURE__ */ u(p, {
79
87
  className: "space-y-3",
80
88
  children: [
81
- /* @__PURE__ */ l("div", {
89
+ /* @__PURE__ */ u("div", {
82
90
  className: "flex gap-2",
83
- children: [/* @__PURE__ */ c("span", {
84
- className: `text-xs px-2 py-0.5 rounded-full capitalize ${g[e.status] ?? "bg-gray-100"}`,
91
+ children: [/* @__PURE__ */ l("span", {
92
+ className: `text-xs px-2 py-0.5 rounded-full capitalize ${_[e.status] ?? "bg-gray-100"}`,
85
93
  children: e.status.toLowerCase().replace("_", " ")
86
- }), /* @__PURE__ */ l("span", {
94
+ }), /* @__PURE__ */ u("span", {
87
95
  className: "text-xs text-muted-foreground flex items-center gap-1",
88
- children: [/* @__PURE__ */ c(a, { className: "h-3 w-3" }), e.projectId]
96
+ children: [/* @__PURE__ */ l(o, { className: "h-3 w-3" }), e.project?.name ?? "Unknown project"]
89
97
  })]
90
98
  }),
91
- e.goal && /* @__PURE__ */ c("p", {
99
+ e.goal && /* @__PURE__ */ l("p", {
92
100
  className: "text-sm text-muted-foreground",
93
101
  children: e.goal
94
102
  }),
95
- /* @__PURE__ */ l("div", {
103
+ /* @__PURE__ */ u("div", {
96
104
  className: "flex gap-3 text-xs text-muted-foreground",
97
- children: [/* @__PURE__ */ l("span", {
105
+ children: [/* @__PURE__ */ u("span", {
98
106
  className: "flex items-center gap-1",
99
107
  children: [
100
- /* @__PURE__ */ c(i, { className: "h-3 w-3" }),
108
+ /* @__PURE__ */ l(a, { className: "h-3 w-3" }),
101
109
  e.startDate ? new Date(e.startDate).toLocaleDateString() : "—",
102
110
  " -",
103
111
  " ",
104
112
  e.endDate ? new Date(e.endDate).toLocaleDateString() : "—"
105
113
  ]
106
- }), /* @__PURE__ */ l("span", { children: [e.workItems.length, " work items"] })]
114
+ }), /* @__PURE__ */ u("span", { children: [e.workItems.length, " work items"] })]
107
115
  }),
108
- o > 0 && /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("div", {
116
+ i > 0 && /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("div", {
109
117
  className: "flex justify-between text-xs mb-1",
110
- children: [/* @__PURE__ */ c("span", {
118
+ children: [/* @__PURE__ */ l("span", {
111
119
  className: "text-muted-foreground",
112
120
  children: "Capacity"
113
- }), /* @__PURE__ */ l("span", {
121
+ }), /* @__PURE__ */ u("span", {
114
122
  className: "font-medium",
115
123
  children: [
116
124
  t,
117
125
  "/",
118
- o,
126
+ i,
119
127
  " pts (",
120
128
  s,
121
129
  "%)"
122
130
  ]
123
131
  })]
124
- }), /* @__PURE__ */ c("div", {
132
+ }), /* @__PURE__ */ l("div", {
125
133
  className: "w-full h-2 rounded-full bg-muted overflow-hidden",
126
- children: /* @__PURE__ */ c("div", {
134
+ children: /* @__PURE__ */ l("div", {
127
135
  className: `h-full rounded-full ${s > 90 ? "bg-red-400" : "bg-primary"}`,
128
136
  style: { width: `${Math.min(s, 100)}%` }
129
137
  })
@@ -133,7 +141,7 @@ function _() {
133
141
  }, e.id);
134
142
  })
135
143
  }),
136
- x.length === 0 && /* @__PURE__ */ c("p", {
144
+ S.length === 0 && /* @__PURE__ */ l("p", {
137
145
  className: "text-center text-muted-foreground py-8",
138
146
  children: "No planning sessions found."
139
147
  })
@@ -141,6 +149,6 @@ function _() {
141
149
  });
142
150
  }
143
151
  //#endregion
144
- export { _ as ProjectsPlanningPagePage };
152
+ export { v as ProjectsPlanningPagePage };
145
153
 
146
154
  //# sourceMappingURL=ProjectsPlanningPagePage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectsPlanningPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsPlanningPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { CalendarClock, FolderKanban } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\n\nconst GET_SPRINTS = gql`\n query GetSprints($workspaceId: ID!) {\n planmagnetSprints(workspaceId: $workspaceId, pagination: { first: 100 }) {\n items {\n id\n name\n projectId\n status\n startDate\n endDate\n goal\n capacity\n velocity\n workItems {\n id\n status\n storyPoints\n }\n }\n totalCount\n }\n }\n`;\n\nconst statusColor: Record<string, string> = {\n PLANNING: 'bg-blue-100 text-blue-800',\n ACTIVE: 'bg-green-100 text-green-800',\n REVIEW: 'bg-purple-100 text-purple-800',\n COMPLETED: 'bg-gray-100 text-gray-800',\n CANCELLED: 'bg-red-100 text-red-800',\n};\n\nexport function ProjectsPlanningPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const {\n data,\n loading,\n error,\n } = // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useQuery<Record<string, any>>(GET_SPRINTS, {\n variables: { workspaceId: workspaceId ?? 'default' },\n });\n\n if (loading)\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n if (error)\n return <div className=\"p-6 text-red-500\">Error loading planning sessions: {error.message}</div>;\n\n const sprints = data?.planmagnetSprints?.items ?? [];\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Planning Sessions</h1>\n <p className=\"text-sm text-muted-foreground\">\n {sprints.length} sprints across all projects\n </p>\n </div>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {sprints.map(\n (sprint: {\n id: string;\n name: string;\n projectId: string;\n status: string;\n startDate: string | null;\n endDate: string | null;\n goal: string | null;\n capacity: number | null;\n velocity: number | null;\n workItems: { id: string; status: string; storyPoints: number | null }[];\n }) => {\n const totalPoints = sprint.workItems.reduce(\n (sum: number, wi: { storyPoints: number | null }) => sum + (wi.storyPoints ?? 0),\n 0\n );\n const allocatedCapacity = sprint.capacity ?? 0;\n const capPct =\n allocatedCapacity > 0 ? Math.round((totalPoints / allocatedCapacity) * 100) : 0;\n return (\n <Card\n key={sprint.id}\n {...rowLinkProps(\n () => navigate(detailPath('/projects/planning-detail-page', sprint.id)),\n sprint.name\n )}\n >\n <CardHeader className=\"pb-2\">\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base flex items-center gap-2\">\n <CalendarClock className=\"h-4 w-4 text-primary\" />\n {sprint.name}\n </CardTitle>\n <Badge\n variant={sprint.status === 'COMPLETED' ? 'default' : 'secondary'}\n className=\"capitalize\"\n >\n {sprint.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <div className=\"flex gap-2\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[sprint.status] ?? 'bg-gray-100'}`}\n >\n {sprint.status.toLowerCase().replace('_', ' ')}\n </span>\n <span className=\"text-xs text-muted-foreground flex items-center gap-1\">\n <FolderKanban className=\"h-3 w-3\" />\n {sprint.projectId}\n </span>\n </div>\n {sprint.goal && <p className=\"text-sm text-muted-foreground\">{sprint.goal}</p>}\n <div className=\"flex gap-3 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <CalendarClock className=\"h-3 w-3\" />\n {sprint.startDate\n ? new Date(sprint.startDate).toLocaleDateString()\n : '—'} -{' '}\n {sprint.endDate ? new Date(sprint.endDate).toLocaleDateString() : '—'}\n </span>\n <span>{sprint.workItems.length} work items</span>\n </div>\n {allocatedCapacity > 0 && (\n <div>\n <div className=\"flex justify-between text-xs mb-1\">\n <span className=\"text-muted-foreground\">Capacity</span>\n <span className=\"font-medium\">\n {totalPoints}/{allocatedCapacity} pts ({capPct}%)\n </span>\n </div>\n <div className=\"w-full h-2 rounded-full bg-muted overflow-hidden\">\n <div\n className={`h-full rounded-full ${capPct > 90 ? 'bg-red-400' : 'bg-primary'}`}\n style={{ width: `${Math.min(capPct, 100)}%` }}\n />\n </div>\n </div>\n )}\n </CardContent>\n </Card>\n );\n }\n )}\n </div>\n {sprints.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No planning sessions found.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;GAwBjB,IAAsC;CAC1C,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,WAAW;CAC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AAU;cAAyC;IAA+B,CAAA;GAEnF"}
1
+ {"version":3,"file":"ProjectsPlanningPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsPlanningPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { CalendarClock, FolderKanban } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\nimport { NewSprintDialog } from '../sprints/SprintControls';\n\nconst GET_SPRINTS = gql`\n query GetSprints($workspaceId: ID!) {\n planmagnetSprints(workspaceId: $workspaceId, pagination: { first: 100 }) {\n items {\n id\n name\n projectId\n project {\n id\n name\n }\n status\n startDate\n endDate\n goal\n capacity\n velocity\n workItems {\n id\n status\n storyPoints\n }\n }\n totalCount\n }\n }\n`;\n\nconst statusColor: Record<string, string> = {\n PLANNING: 'bg-blue-100 text-blue-800',\n ACTIVE: 'bg-green-100 text-green-800',\n REVIEW: 'bg-purple-100 text-purple-800',\n COMPLETED: 'bg-gray-100 text-gray-800',\n CANCELLED: 'bg-red-100 text-red-800',\n};\n\nexport function ProjectsPlanningPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const {\n data,\n loading,\n error,\n } = // eslint-disable-next-line @typescript-eslint/no-explicit-any\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n useQuery<Record<string, any>>(GET_SPRINTS, {\n variables: { workspaceId: workspaceId ?? 'default' },\n });\n\n if (loading)\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n if (error)\n return <div className=\"p-6 text-red-500\">Error loading planning sessions: {error.message}</div>;\n\n const sprints = data?.planmagnetSprints?.items ?? [];\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Planning Sessions</h1>\n <p className=\"text-sm text-muted-foreground\">\n {sprints.length} sprints across all projects\n </p>\n </div>\n <NewSprintDialog\n onCreated={(id) => navigate(detailPath('/projects/planning-detail-page', id))}\n />\n </div>\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {sprints.map(\n (sprint: {\n id: string;\n name: string;\n projectId: string;\n project: { id: string; name: string } | null;\n status: string;\n startDate: string | null;\n endDate: string | null;\n goal: string | null;\n capacity: number | null;\n velocity: number | null;\n workItems: { id: string; status: string; storyPoints: number | null }[];\n }) => {\n const totalPoints = sprint.workItems.reduce(\n (sum: number, wi: { storyPoints: number | null }) => sum + (wi.storyPoints ?? 0),\n 0\n );\n const allocatedCapacity = sprint.capacity ?? 0;\n const capPct =\n allocatedCapacity > 0 ? Math.round((totalPoints / allocatedCapacity) * 100) : 0;\n return (\n <Card\n key={sprint.id}\n {...rowLinkProps(\n () => navigate(detailPath('/projects/planning-detail-page', sprint.id)),\n sprint.name\n )}\n >\n <CardHeader className=\"pb-2\">\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base flex items-center gap-2\">\n <CalendarClock className=\"h-4 w-4 text-primary\" />\n {sprint.name}\n </CardTitle>\n <Badge\n variant={sprint.status === 'COMPLETED' ? 'default' : 'secondary'}\n className=\"capitalize\"\n >\n {sprint.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <div className=\"flex gap-2\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[sprint.status] ?? 'bg-gray-100'}`}\n >\n {sprint.status.toLowerCase().replace('_', ' ')}\n </span>\n <span className=\"text-xs text-muted-foreground flex items-center gap-1\">\n <FolderKanban className=\"h-3 w-3\" />\n {sprint.project?.name ?? 'Unknown project'}\n </span>\n </div>\n {sprint.goal && <p className=\"text-sm text-muted-foreground\">{sprint.goal}</p>}\n <div className=\"flex gap-3 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <CalendarClock className=\"h-3 w-3\" />\n {sprint.startDate\n ? new Date(sprint.startDate).toLocaleDateString()\n : '—'} -{' '}\n {sprint.endDate ? new Date(sprint.endDate).toLocaleDateString() : '—'}\n </span>\n <span>{sprint.workItems.length} work items</span>\n </div>\n {allocatedCapacity > 0 && (\n <div>\n <div className=\"flex justify-between text-xs mb-1\">\n <span className=\"text-muted-foreground\">Capacity</span>\n <span className=\"font-medium\">\n {totalPoints}/{allocatedCapacity} pts ({capPct}%)\n </span>\n </div>\n <div className=\"w-full h-2 rounded-full bg-muted overflow-hidden\">\n <div\n className={`h-full rounded-full ${capPct > 90 ? 'bg-red-400' : 'bg-primary'}`}\n style={{ width: `${Math.min(capPct, 100)}%` }}\n />\n </div>\n </div>\n )}\n </CardContent>\n </Card>\n );\n }\n )}\n </div>\n {sprints.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No planning sessions found.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAUA,IAAM,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BjB,IAAsC;CAC1C,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,WAAW;CACX,WAAW;CACZ;AAED,SAAgB,IAA2B;CACzC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,EACJ,SACA,YACA,aAGA,EAA8B,GAAa,EACzC,WAAW,EAAE,aAAa,KAAe,WAAW,EACrD,CAAC;AAEJ,KAAI,EACF,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA;AAEV,KAAI,EACF,QAAO,kBAAC,OAAD;EAAK,WAAU;YAAf,CAAkC,qCAAkC,EAAM,QAAc;;CAEjG,IAAM,IAAU,GAAM,mBAAmB,SA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AAU,WAAY,CAAA,EACnC,EAAO,SAAS,QAAQ,kBACpB;YACH;;QACL,EAAO,QAAQ,kBAAC,KAAD;SAAG,WAAU;mBAAiC,EAAO;SAAS,CAAA;QAC9E,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,QAAD;UAAM,WAAU;oBAAhB;WACE,kBAAC,GAAD,EAAe,WAAU,WAAY,CAAA;WACpC,EAAO,YACJ,IAAI,KAAK,EAAO,UAAU,CAAC,oBAAoB,GAC/C;WAAI;WAAG;WACV,EAAO,UAAU,IAAI,KAAK,EAAO,QAAQ,CAAC,oBAAoB,GAAG;WAC7D;aACP,kBAAC,QAAD,EAAA,UAAA,CAAO,EAAO,UAAU,QAAO,cAAkB,EAAA,CAAA,CAC7C;;QACL,IAAoB,KACnB,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,OAAD;SAAK,WAAU;mBAAf,CACE,kBAAC,QAAD;UAAM,WAAU;oBAAwB;UAAe,CAAA,EACvD,kBAAC,QAAD;UAAM,WAAU;oBAAhB;WACG;WAAY;WAAE;WAAkB;WAAO;WAAO;WAC1C;YACH;YACN,kBAAC,OAAD;SAAK,WAAU;mBACb,kBAAC,OAAD;UACE,WAAW,uBAAuB,IAAS,KAAK,eAAe;UAC/D,OAAO,EAAE,OAAO,GAAG,KAAK,IAAI,GAAQ,IAAI,CAAC,IAAI;UAC7C,CAAA;SACE,CAAA,CACF,EAAA,CAAA;QAEI;SACT;QA5DA,EAAO,GA4DP;MAGZ;IACG,CAAA;GACL,EAAQ,WAAW,KAClB,kBAAC,KAAD;IAAG,WAAU;cAAyC;IAA+B,CAAA;GAEnF"}
@@ -1 +1 @@
1
- {"version":3,"file":"SprintsStartSprintPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/SprintsStartSprintPagePage.tsx"],"names":[],"mappings":"AAyFA,wBAAgB,0BAA0B,4CAsMzC"}
1
+ {"version":3,"file":"SprintsStartSprintPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/SprintsStartSprintPagePage.tsx"],"names":[],"mappings":"AAiFA,wBAAgB,0BAA0B,4CAsNzC"}
@@ -1,11 +1,13 @@
1
- import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
2
- import { Calendar as t, Play as n, Users as r, Zap as i } from "lucide-react";
3
- import { gql as a } from "@apollo/client";
4
- import { useMutation as o, useQuery as s } from "@apollo/client/react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { Badge as u, Button as d, Card as f, CardContent as p, CardHeader as m, CardTitle as h } from "@burdenoff/fe-libs/ui";
1
+ import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
+ import { detailPath as n } from "../utils/rowNavigation.js";
3
+ import { NewSprintDialog as r, SprintLifecycleActions as i } from "../sprints/SprintControls.js";
4
+ import { Calendar as a, Users as o, Zap as s } from "lucide-react";
5
+ import { gql as c } from "@apollo/client";
6
+ import { useQuery as l } from "@apollo/client/react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { Badge as f, Card as p, CardContent as m, CardHeader as h, CardTitle as g } from "@burdenoff/fe-libs/ui";
7
9
  //#region src/planmagnet/pages/SprintsStartSprintPagePage.tsx
8
- var g = a`
10
+ var _ = c`
9
11
  query GetSprints(
10
12
  $workspaceId: ID!
11
13
  $filter: PlanmagnetSprintFilter
@@ -31,14 +33,6 @@ var g = a`
31
33
  totalCount
32
34
  }
33
35
  }
34
- `, _ = a`
35
- mutation StartSprint($sprintId: ID!) {
36
- planmagnetStartSprint(id: $sprintId) {
37
- id
38
- status
39
- startDate
40
- }
41
- }
42
36
  `;
43
37
  function v(e) {
44
38
  let t = e.workItems ?? [], n = t.reduce((e, t) => e + (t.storyPoints ?? 0), 0), r = t.filter((e) => e.status === "DONE").reduce((e, t) => e + (t.storyPoints ?? 0), 0);
@@ -52,163 +46,176 @@ function v(e) {
52
46
  };
53
47
  }
54
48
  function y() {
55
- let { workspaceId: a } = e(), { data: y, loading: b, error: x } = s(g, {
49
+ let { workspaceId: c } = e(), { data: y, loading: b, error: x } = l(_, {
56
50
  variables: {
57
- workspaceId: a,
51
+ workspaceId: c,
58
52
  pagination: { first: 50 }
59
53
  },
60
- skip: !a
61
- }), S = y?.planmagnetSprints?.items ?? [], C = S.filter((e) => e.status === "ACTIVE"), w = S.filter((e) => e.status === "PLANNING"), [T, { loading: E }] = o(_, { refetchQueries: ["GetSprints"] }), D = async (e) => {
62
- a && await T({ variables: { sprintId: e } });
63
- };
64
- return b ? /* @__PURE__ */ c("div", {
54
+ skip: !c
55
+ }), S = y?.planmagnetSprints?.items ?? [], C = S.filter((e) => e.status === "ACTIVE" || e.status === "REVIEW"), w = S.filter((e) => e.status === "PLANNING"), T = t(), E = (e) => T(n("/projects/planning-detail-page", e));
56
+ return b ? /* @__PURE__ */ u("div", {
65
57
  className: "flex items-center justify-center p-12",
66
- children: /* @__PURE__ */ c("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
67
- }) : x ? /* @__PURE__ */ l("div", {
58
+ children: /* @__PURE__ */ u("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
59
+ }) : x ? /* @__PURE__ */ d("div", {
68
60
  className: "p-6 text-red-500",
69
61
  children: ["Error: ", x.message]
70
- }) : /* @__PURE__ */ l("div", {
62
+ }) : /* @__PURE__ */ d("div", {
71
63
  className: "space-y-6 p-6",
72
64
  children: [
73
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
74
- className: "text-2xl font-semibold",
75
- children: "Sprint Management"
76
- }), /* @__PURE__ */ l("p", {
77
- className: "text-sm text-muted-foreground",
78
- children: [
79
- S.length,
80
- " sprints total · ",
81
- C.length,
82
- " active"
83
- ]
84
- })] }),
85
- C.length > 0 && /* @__PURE__ */ l("div", {
65
+ /* @__PURE__ */ d("div", {
66
+ className: "flex items-center justify-between",
67
+ children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
68
+ className: "text-2xl font-semibold",
69
+ children: "Sprint Management"
70
+ }), /* @__PURE__ */ d("p", {
71
+ className: "text-sm text-muted-foreground",
72
+ children: [
73
+ S.length,
74
+ " sprints total · ",
75
+ C.length,
76
+ " active"
77
+ ]
78
+ })] }), /* @__PURE__ */ u(r, { onCreated: E })]
79
+ }),
80
+ C.length > 0 && /* @__PURE__ */ d("div", {
86
81
  className: "space-y-4",
87
- children: [/* @__PURE__ */ c("h2", {
82
+ children: [/* @__PURE__ */ u("h2", {
88
83
  className: "text-lg font-medium",
89
84
  children: "Active Sprints"
90
85
  }), C.map((e) => {
91
- let n = v(e), a = e.workItems ?? [], o = n.totalPoints > 0 ? Math.round(n.completedPoints / n.totalPoints * 100) : 0;
92
- return /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
86
+ let t = v(e), n = e.workItems ?? [], r = t.totalPoints > 0 ? Math.round(t.completedPoints / t.totalPoints * 100) : 0;
87
+ return /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
93
88
  className: "pb-2",
94
- children: /* @__PURE__ */ l("div", {
89
+ children: /* @__PURE__ */ d("div", {
95
90
  className: "flex items-center justify-between",
96
- children: [/* @__PURE__ */ l(h, {
91
+ children: [/* @__PURE__ */ d(g, {
97
92
  className: "text-base flex items-center gap-2",
98
- children: [/* @__PURE__ */ c(i, { className: "h-4 w-4 text-primary" }), e.name]
99
- }), /* @__PURE__ */ c(u, { children: "Active" })]
93
+ children: [/* @__PURE__ */ u(s, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ u("button", {
94
+ type: "button",
95
+ className: "hover:underline text-left",
96
+ onClick: () => E(e.id),
97
+ children: e.name
98
+ })]
99
+ }), /* @__PURE__ */ d("div", {
100
+ className: "flex items-start gap-2",
101
+ children: [/* @__PURE__ */ u(f, { children: e.status === "REVIEW" ? "Review" : "Active" }), /* @__PURE__ */ u(i, {
102
+ sprintId: e.id,
103
+ sprintName: e.name,
104
+ status: e.status
105
+ })]
106
+ })]
100
107
  })
101
- }), /* @__PURE__ */ l(p, {
108
+ }), /* @__PURE__ */ d(m, {
102
109
  className: "space-y-4",
103
110
  children: [
104
- /* @__PURE__ */ c("p", {
111
+ /* @__PURE__ */ u("p", {
105
112
  className: "text-sm text-muted-foreground",
106
113
  children: e.goal ?? ""
107
114
  }),
108
- /* @__PURE__ */ l("div", {
115
+ /* @__PURE__ */ d("div", {
109
116
  className: "flex gap-4 text-xs text-muted-foreground",
110
- children: [/* @__PURE__ */ l("span", {
117
+ children: [/* @__PURE__ */ d("span", {
111
118
  className: "flex items-center gap-1",
112
119
  children: [
113
- /* @__PURE__ */ c(t, { className: "h-3 w-3" }),
120
+ /* @__PURE__ */ u(a, { className: "h-3 w-3" }),
114
121
  e.startDate ?? "?",
115
122
  " - ",
116
123
  e.endDate ?? "?"
117
124
  ]
118
- }), /* @__PURE__ */ l("span", {
125
+ }), /* @__PURE__ */ d("span", {
119
126
  className: "flex items-center gap-1",
120
127
  children: [
121
- /* @__PURE__ */ c(r, { className: "h-3 w-3" }),
122
- n.teamMemberIds.length,
128
+ /* @__PURE__ */ u(o, { className: "h-3 w-3" }),
129
+ t.teamMemberIds.length,
123
130
  " members"
124
131
  ]
125
132
  })]
126
133
  }),
127
- /* @__PURE__ */ l("div", {
134
+ /* @__PURE__ */ d("div", {
128
135
  className: "grid grid-cols-3 gap-4 text-center",
129
136
  children: [
130
- /* @__PURE__ */ l("div", {
137
+ /* @__PURE__ */ d("div", {
131
138
  className: "p-3 bg-muted rounded-md",
132
- children: [/* @__PURE__ */ l("p", {
139
+ children: [/* @__PURE__ */ d("p", {
133
140
  className: "text-lg font-bold",
134
141
  children: [
135
- n.completedPoints,
142
+ t.completedPoints,
136
143
  "/",
137
- n.totalPoints
144
+ t.totalPoints
138
145
  ]
139
- }), /* @__PURE__ */ c("p", {
146
+ }), /* @__PURE__ */ u("p", {
140
147
  className: "text-xs text-muted-foreground",
141
148
  children: "Points"
142
149
  })]
143
150
  }),
144
- /* @__PURE__ */ l("div", {
151
+ /* @__PURE__ */ d("div", {
145
152
  className: "p-3 bg-muted rounded-md",
146
- children: [/* @__PURE__ */ l("p", {
153
+ children: [/* @__PURE__ */ d("p", {
147
154
  className: "text-lg font-bold",
148
155
  children: [
149
- n.tasksCompleted,
156
+ t.tasksCompleted,
150
157
  "/",
151
- n.tasksTotal
158
+ t.tasksTotal
152
159
  ]
153
- }), /* @__PURE__ */ c("p", {
160
+ }), /* @__PURE__ */ u("p", {
154
161
  className: "text-xs text-muted-foreground",
155
162
  children: "Tasks"
156
163
  })]
157
164
  }),
158
- /* @__PURE__ */ l("div", {
165
+ /* @__PURE__ */ d("div", {
159
166
  className: "p-3 bg-muted rounded-md",
160
- children: [/* @__PURE__ */ c("p", {
167
+ children: [/* @__PURE__ */ u("p", {
161
168
  className: "text-lg font-bold",
162
- children: n.velocity
163
- }), /* @__PURE__ */ c("p", {
169
+ children: t.velocity
170
+ }), /* @__PURE__ */ u("p", {
164
171
  className: "text-xs text-muted-foreground",
165
172
  children: "Velocity"
166
173
  })]
167
174
  })
168
175
  ]
169
176
  }),
170
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("div", {
177
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("div", {
171
178
  className: "flex justify-between text-xs mb-1",
172
- children: [/* @__PURE__ */ c("span", {
179
+ children: [/* @__PURE__ */ u("span", {
173
180
  className: "text-muted-foreground",
174
181
  children: "Sprint Progress"
175
- }), /* @__PURE__ */ l("span", {
182
+ }), /* @__PURE__ */ d("span", {
176
183
  className: "font-medium",
177
- children: [o, "%"]
184
+ children: [r, "%"]
178
185
  })]
179
- }), /* @__PURE__ */ c("div", {
186
+ }), /* @__PURE__ */ u("div", {
180
187
  className: "w-full h-2 rounded-full bg-muted overflow-hidden",
181
- children: /* @__PURE__ */ c("div", {
188
+ children: /* @__PURE__ */ u("div", {
182
189
  className: "h-full bg-primary rounded-full",
183
- style: { width: `${o}%` }
190
+ style: { width: `${r}%` }
184
191
  })
185
192
  })] }),
186
- a.length > 0 && /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
193
+ n.length > 0 && /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
187
194
  className: "text-xs font-medium text-muted-foreground mb-2",
188
195
  children: "Sprint Backlog"
189
- }), /* @__PURE__ */ c("div", {
196
+ }), /* @__PURE__ */ u("div", {
190
197
  className: "space-y-1",
191
- children: a.map((e) => /* @__PURE__ */ l("div", {
198
+ children: n.map((e) => /* @__PURE__ */ d("div", {
192
199
  className: "flex items-center justify-between border rounded p-2 text-sm",
193
- children: [/* @__PURE__ */ c("span", { children: e.title }), /* @__PURE__ */ l("div", {
200
+ children: [/* @__PURE__ */ u("span", { children: e.title }), /* @__PURE__ */ d("div", {
194
201
  className: "flex gap-1",
195
- children: [/* @__PURE__ */ c(u, {
202
+ children: [/* @__PURE__ */ u(f, {
196
203
  variant: "secondary",
197
204
  className: "text-xs capitalize",
198
205
  children: e.status.toLowerCase().replace("_", " ")
199
- }), /* @__PURE__ */ l("span", {
206
+ }), /* @__PURE__ */ d("span", {
200
207
  className: "text-xs text-muted-foreground",
201
208
  children: [e.storyPoints ?? 0, "pts"]
202
209
  })]
203
210
  })]
204
211
  }, e.id))
205
212
  })] }),
206
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
213
+ /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("p", {
207
214
  className: "text-xs font-medium text-muted-foreground mb-1",
208
215
  children: "Team"
209
- }), /* @__PURE__ */ c("div", {
216
+ }), /* @__PURE__ */ u("div", {
210
217
  className: "flex gap-2",
211
- children: n.teamMemberIds.map((e) => /* @__PURE__ */ c("div", {
218
+ children: t.teamMemberIds.map((e) => /* @__PURE__ */ u("div", {
212
219
  className: "h-7 w-7 rounded-full bg-primary/10 flex items-center justify-center text-[10px] font-medium text-primary",
213
220
  title: e,
214
221
  children: e.slice(0, 2).toUpperCase()
@@ -218,49 +225,52 @@ function y() {
218
225
  })] }, e.id);
219
226
  })]
220
227
  }),
221
- w.length > 0 && /* @__PURE__ */ l("div", {
228
+ w.length > 0 && /* @__PURE__ */ d("div", {
222
229
  className: "space-y-4",
223
- children: [/* @__PURE__ */ c("h2", {
230
+ children: [/* @__PURE__ */ u("h2", {
224
231
  className: "text-lg font-medium",
225
232
  children: "Planning"
226
233
  }), w.map((e) => {
227
234
  let t = v(e);
228
- return /* @__PURE__ */ l(f, { children: [/* @__PURE__ */ c(m, {
235
+ return /* @__PURE__ */ d(p, { children: [/* @__PURE__ */ u(h, {
229
236
  className: "pb-2",
230
- children: /* @__PURE__ */ l("div", {
237
+ children: /* @__PURE__ */ d("div", {
231
238
  className: "flex items-center justify-between",
232
- children: [/* @__PURE__ */ c(h, {
239
+ children: [/* @__PURE__ */ u(g, {
233
240
  className: "text-base",
234
- children: e.name
235
- }), /* @__PURE__ */ l("div", {
236
- className: "flex items-center gap-2",
237
- children: [/* @__PURE__ */ c(u, {
241
+ children: /* @__PURE__ */ u("button", {
242
+ type: "button",
243
+ className: "hover:underline text-left",
244
+ onClick: () => E(e.id),
245
+ children: e.name
246
+ })
247
+ }), /* @__PURE__ */ d("div", {
248
+ className: "flex items-start gap-2",
249
+ children: [/* @__PURE__ */ u(f, {
238
250
  variant: "secondary",
239
251
  children: "Planning"
240
- }), /* @__PURE__ */ l(d, {
241
- size: "sm",
242
- variant: "outline",
243
- onClick: () => D(e.id),
244
- disabled: E,
245
- children: [/* @__PURE__ */ c(n, { className: "mr-1 h-3 w-3" }), "Start Sprint"]
252
+ }), /* @__PURE__ */ u(i, {
253
+ sprintId: e.id,
254
+ sprintName: e.name,
255
+ status: e.status
246
256
  })]
247
257
  })]
248
258
  })
249
- }), /* @__PURE__ */ l(p, {
259
+ }), /* @__PURE__ */ d(m, {
250
260
  className: "space-y-2",
251
- children: [/* @__PURE__ */ c("p", {
261
+ children: [/* @__PURE__ */ u("p", {
252
262
  className: "text-sm text-muted-foreground",
253
263
  children: e.goal ?? ""
254
- }), /* @__PURE__ */ l("div", {
264
+ }), /* @__PURE__ */ d("div", {
255
265
  className: "flex gap-4 text-xs text-muted-foreground",
256
266
  children: [
257
- /* @__PURE__ */ l("span", { children: [
267
+ /* @__PURE__ */ d("span", { children: [
258
268
  e.startDate ?? "?",
259
269
  " - ",
260
270
  e.endDate ?? "?"
261
271
  ] }),
262
- /* @__PURE__ */ l("span", { children: [t.totalPoints, " points planned"] }),
263
- /* @__PURE__ */ l("span", { children: [t.teamMemberIds.length, " members"] })
272
+ /* @__PURE__ */ d("span", { children: [t.totalPoints, " points planned"] }),
273
+ /* @__PURE__ */ d("span", { children: [t.teamMemberIds.length, " members"] })
264
274
  ]
265
275
  })]
266
276
  })] }, e.id);