@burdenoff/microfe-planmagnet 2026.930.1 → 2026.930.3
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/links/IssueLinksPanel.d.ts +10 -0
- package/dist/planmagnet/links/IssueLinksPanel.d.ts.map +1 -0
- package/dist/planmagnet/links/IssueLinksPanel.js +221 -0
- package/dist/planmagnet/links/IssueLinksPanel.js.map +1 -0
- package/dist/planmagnet/milestones/MilestoneControls.d.ts +41 -0
- package/dist/planmagnet/milestones/MilestoneControls.d.ts.map +1 -0
- package/dist/planmagnet/milestones/MilestoneControls.js +420 -0
- package/dist/planmagnet/milestones/MilestoneControls.js.map +1 -0
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +59 -59
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +184 -166
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +18 -0
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +114 -95
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js +57 -48
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +151 -134
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksEditTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js +149 -126
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +153 -138
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
- package/dist/planmagnet/roadmaps/FeatureInitiativeCard.d.ts +14 -0
- package/dist/planmagnet/roadmaps/FeatureInitiativeCard.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/FeatureInitiativeCard.js +166 -0
- package/dist/planmagnet/roadmaps/FeatureInitiativeCard.js.map +1 -0
- package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
- package/dist/planmagnet/sprints/SprintControls.js +239 -243
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,14 +2,15 @@ import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/Pla
|
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
3
|
import { detailPath as r, rowLinkProps as i } from "../utils/rowNavigation.js";
|
|
4
4
|
import { NewMilestoneDialog as a } from "../create/CreateDialogs.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { MilestoneProgressBar as o } from "../milestones/MilestoneControls.js";
|
|
6
|
+
import { useState as s } from "react";
|
|
7
|
+
import { Calendar as c, Target as l, User as u } from "lucide-react";
|
|
8
|
+
import { gql as d } from "@apollo/client";
|
|
9
|
+
import { useQuery as f } from "@apollo/client/react";
|
|
10
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/planmagnet/pages/ProjectsMilestonesPagePage.tsx
|
|
12
|
-
var
|
|
13
|
+
var b = d`
|
|
13
14
|
query GetMilestones($workspaceId: ID!, $filter: PlanmagnetMilestoneFilter) {
|
|
14
15
|
planmagnetMilestones(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
|
|
15
16
|
items {
|
|
@@ -26,17 +27,24 @@ var y = u`
|
|
|
26
27
|
isOverdue
|
|
27
28
|
ownerId
|
|
28
29
|
createdAt
|
|
30
|
+
workItemProgress {
|
|
31
|
+
total
|
|
32
|
+
done
|
|
33
|
+
cancelled
|
|
34
|
+
open
|
|
35
|
+
percentComplete
|
|
36
|
+
}
|
|
29
37
|
}
|
|
30
38
|
totalCount
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
|
-
`,
|
|
41
|
+
`, x = {
|
|
34
42
|
PENDING: "bg-gray-100 text-gray-800",
|
|
35
43
|
IN_PROGRESS: "bg-blue-100 text-blue-800",
|
|
36
44
|
COMPLETED: "bg-green-100 text-green-800",
|
|
37
45
|
MISSED: "bg-red-100 text-red-800",
|
|
38
46
|
CANCELLED: "bg-red-100 text-red-800"
|
|
39
|
-
},
|
|
47
|
+
}, S = [
|
|
40
48
|
"all",
|
|
41
49
|
"PENDING",
|
|
42
50
|
"IN_PROGRESS",
|
|
@@ -44,84 +52,85 @@ var y = u`
|
|
|
44
52
|
"MISSED",
|
|
45
53
|
"CANCELLED"
|
|
46
54
|
];
|
|
47
|
-
function
|
|
48
|
-
let { workspaceId:
|
|
49
|
-
workspaceId:
|
|
50
|
-
filter:
|
|
55
|
+
function C() {
|
|
56
|
+
let { workspaceId: d } = e(), C = t(), [w, T] = s("all"), { data: E, loading: D, error: O } = f(b, { variables: {
|
|
57
|
+
workspaceId: d ?? "default",
|
|
58
|
+
filter: w === "all" ? void 0 : { status: w }
|
|
51
59
|
} });
|
|
52
|
-
if (
|
|
60
|
+
if (D && !E) return /* @__PURE__ */ p("div", {
|
|
53
61
|
className: "flex items-center justify-center p-12",
|
|
54
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ p("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
55
63
|
});
|
|
56
|
-
let
|
|
57
|
-
return /* @__PURE__ */
|
|
64
|
+
let k = E?.planmagnetMilestones?.items ?? [], A = E?.planmagnetMilestones?.totalCount ?? 0;
|
|
65
|
+
return /* @__PURE__ */ m("div", {
|
|
58
66
|
className: "space-y-6 p-6",
|
|
59
67
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ m("div", {
|
|
61
69
|
className: "flex items-center justify-between",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
63
71
|
className: "text-2xl font-semibold",
|
|
64
72
|
children: "Milestones"
|
|
65
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ p("p", {
|
|
66
74
|
className: "text-sm text-muted-foreground",
|
|
67
|
-
children:
|
|
68
|
-
})] }), /* @__PURE__ */
|
|
75
|
+
children: w === "all" ? `${A} milestones across all projects` : `${A} ${w.toLowerCase().replace("_", " ")} milestones`
|
|
76
|
+
})] }), /* @__PURE__ */ p(a, { onCreated: (e) => C(r("/projects/milestone-detail-page", e)) })]
|
|
69
77
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ p("div", {
|
|
71
79
|
className: "flex gap-1",
|
|
72
|
-
children:
|
|
73
|
-
onClick: () =>
|
|
74
|
-
className: `px-3 py-1.5 text-sm rounded-md capitalize ${
|
|
80
|
+
children: S.map((e) => /* @__PURE__ */ p("button", {
|
|
81
|
+
onClick: () => T(e),
|
|
82
|
+
className: `px-3 py-1.5 text-sm rounded-md capitalize ${w === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
75
83
|
children: e === "all" ? "All" : e.toLowerCase().replace("_", " ")
|
|
76
84
|
}, e))
|
|
77
85
|
}),
|
|
78
|
-
|
|
86
|
+
O && /* @__PURE__ */ m("div", {
|
|
79
87
|
role: "alert",
|
|
80
88
|
className: "rounded-md border border-destructive/40 p-4 text-sm text-destructive",
|
|
81
|
-
children: ["Milestones could not be loaded: ",
|
|
89
|
+
children: ["Milestones could not be loaded: ", O.message]
|
|
82
90
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ p("div", {
|
|
84
92
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
85
|
-
children:
|
|
86
|
-
...i(() =>
|
|
87
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: k.map((e) => /* @__PURE__ */ m(g, {
|
|
94
|
+
...i(() => C(r("/projects/milestone-detail-page", e.id)), e.name),
|
|
95
|
+
children: [/* @__PURE__ */ p(v, {
|
|
88
96
|
className: "pb-2",
|
|
89
|
-
children: /* @__PURE__ */
|
|
97
|
+
children: /* @__PURE__ */ m("div", {
|
|
90
98
|
className: "flex items-center justify-between",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
99
|
+
children: [/* @__PURE__ */ m(y, {
|
|
92
100
|
className: "text-base flex items-center gap-2",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
94
|
-
}), /* @__PURE__ */
|
|
95
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
101
|
+
children: [/* @__PURE__ */ p(l, { className: "h-4 w-4 text-primary" }), e.name]
|
|
102
|
+
}), /* @__PURE__ */ p("span", {
|
|
103
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${x[e.status] ?? "bg-gray-100"}`,
|
|
96
104
|
children: e.status.toLowerCase().replace("_", " ")
|
|
97
105
|
})]
|
|
98
106
|
})
|
|
99
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ m(_, {
|
|
100
108
|
className: "space-y-3",
|
|
101
109
|
children: [
|
|
102
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ p("p", {
|
|
103
111
|
className: "text-sm text-muted-foreground",
|
|
104
112
|
children: e.description ?? "No description"
|
|
105
113
|
}),
|
|
106
|
-
/* @__PURE__ */ p(
|
|
114
|
+
e.workItemProgress && /* @__PURE__ */ p(o, { progress: e.workItemProgress }),
|
|
115
|
+
/* @__PURE__ */ m("div", {
|
|
107
116
|
className: "flex gap-3 text-xs text-muted-foreground",
|
|
108
117
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ m("span", {
|
|
110
119
|
className: "flex items-center gap-1",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
120
|
+
children: [/* @__PURE__ */ p(c, { className: "h-3 w-3" }), e.dueDate ? new Date(e.dueDate).toLocaleDateString() : "No due date"]
|
|
112
121
|
}),
|
|
113
|
-
e.isOverdue && /* @__PURE__ */
|
|
122
|
+
e.isOverdue && /* @__PURE__ */ p(h, {
|
|
114
123
|
variant: "destructive",
|
|
115
124
|
"data-testid": "milestone-overdue",
|
|
116
125
|
children: "Overdue"
|
|
117
126
|
}),
|
|
118
|
-
e.ownerId && /* @__PURE__ */
|
|
127
|
+
e.ownerId && /* @__PURE__ */ m("span", {
|
|
119
128
|
className: "flex items-center gap-1",
|
|
120
|
-
children: [/* @__PURE__ */
|
|
129
|
+
children: [/* @__PURE__ */ p(u, { className: "h-3 w-3" }), /* @__PURE__ */ p(n, { id: e.ownerId })]
|
|
121
130
|
})
|
|
122
131
|
]
|
|
123
132
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ m("div", {
|
|
125
134
|
className: "text-xs text-muted-foreground",
|
|
126
135
|
children: ["Project: ", e.project?.name ?? "not available"]
|
|
127
136
|
})
|
|
@@ -129,7 +138,7 @@ function S() {
|
|
|
129
138
|
})]
|
|
130
139
|
}, e.id))
|
|
131
140
|
}),
|
|
132
|
-
!
|
|
141
|
+
!O && k.length === 0 && /* @__PURE__ */ p("p", {
|
|
133
142
|
className: "text-center text-muted-foreground py-8",
|
|
134
143
|
children: "No milestones found."
|
|
135
144
|
})
|
|
@@ -137,6 +146,6 @@ function S() {
|
|
|
137
146
|
});
|
|
138
147
|
}
|
|
139
148
|
//#endregion
|
|
140
|
-
export {
|
|
149
|
+
export { C as ProjectsMilestonesPagePage };
|
|
141
150
|
|
|
142
151
|
//# sourceMappingURL=ProjectsMilestonesPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsMilestonesPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsMilestonesPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { Target, Calendar, User } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\nimport { PersonName } from '../people/People';\nimport { NewMilestoneDialog } from '../create/CreateDialogs';\n\nconst GET_MILESTONES = gql`\n query GetMilestones($workspaceId: ID!, $filter: PlanmagnetMilestoneFilter) {\n planmagnetMilestones(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {\n items {\n id\n name\n description\n projectId\n project {\n id\n name\n }\n status\n dueDate\n isOverdue\n ownerId\n createdAt\n }\n totalCount\n }\n }\n`;\n\nconst statusColor: Record<string, string> = {\n PENDING: 'bg-gray-100 text-gray-800',\n IN_PROGRESS: 'bg-blue-100 text-blue-800',\n COMPLETED: 'bg-green-100 text-green-800',\n MISSED: 'bg-red-100 text-red-800',\n CANCELLED: 'bg-red-100 text-red-800',\n};\n\nconst milestoneStatuses = [\n 'all',\n 'PENDING',\n 'IN_PROGRESS',\n 'COMPLETED',\n 'MISSED',\n 'CANCELLED',\n] as const;\n\nexport function ProjectsMilestonesPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [filter, setFilter] = useState<string>('all');\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_MILESTONES, {\n variables: {\n workspaceId: workspaceId ?? 'default',\n filter: filter !== 'all' ? { status: filter } : undefined,\n },\n });\n\n // Only before the first load: a refetch after a create must not blank the page.\n if (loading && !data)\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 // A failed load is shown INSIDE the list area: an early return here replaced the whole page, so the status tabs\n // and New Milestone vanished and a failing tab could not be left (BOFF-7942).\n\n const milestones = data?.planmagnetMilestones?.items ?? [];\n const totalCount = data?.planmagnetMilestones?.totalCount ?? 0;\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\">Milestones</h1>\n <p className=\"text-sm text-muted-foreground\">\n {/* The count follows the tab: it is the filtered total, so do not call it \"all\". */}\n {filter === 'all'\n ? `${totalCount} milestones across all projects`\n : `${totalCount} ${filter.toLowerCase().replace('_', ' ')} milestones`}\n </p>\n </div>\n <NewMilestoneDialog\n onCreated={(id) => navigate(detailPath('/projects/milestone-detail-page', id))}\n />\n </div>\n <div className=\"flex gap-1\">\n {milestoneStatuses.map((s) => (\n <button\n key={s}\n onClick={() => setFilter(s)}\n className={`px-3 py-1.5 text-sm rounded-md capitalize ${filter === s ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n >\n {s === 'all' ? 'All' : s.toLowerCase().replace('_', ' ')}\n </button>\n ))}\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"rounded-md border border-destructive/40 p-4 text-sm text-destructive\"\n >\n Milestones could not be loaded: {error.message}\n </div>\n )}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {milestones.map(\n (ms: {\n id: string;\n name: string;\n description: string | null;\n projectId: string;\n project: { id: string; name: string } | null;\n status: string;\n dueDate: string | null;\n isOverdue: boolean;\n ownerId: string | null;\n }) => (\n <Card\n key={ms.id}\n {...rowLinkProps(\n () => navigate(detailPath('/projects/milestone-detail-page', ms.id)),\n ms.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 <Target className=\"h-4 w-4 text-primary\" />\n {ms.name}\n </CardTitle>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[ms.status] ?? 'bg-gray-100'}`}\n >\n {ms.status.toLowerCase().replace('_', ' ')}\n </span>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n {ms.description ?? 'No description'}\n </p>\n <div className=\"flex gap-3 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Calendar className=\"h-3 w-3\" />\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : 'No due date'}\n </span>\n {ms.isOverdue && (\n <Badge variant=\"destructive\" data-testid=\"milestone-overdue\">\n Overdue\n </Badge>\n )}\n {ms.ownerId && (\n <span className=\"flex items-center gap-1\">\n <User className=\"h-3 w-3\" />\n <PersonName id={ms.ownerId} />\n </span>\n )}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n Project: {ms.project?.name ?? 'not available'}\n </div>\n </CardContent>\n </Card>\n )\n )}\n </div>\n {!error && milestones.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No milestones found.</p>\n )}\n </div>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectsMilestonesPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsMilestonesPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Badge } from '@burdenoff/fe-libs/ui';\nimport { Target, Calendar, User } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\nimport { PersonName } from '../people/People';\nimport { NewMilestoneDialog } from '../create/CreateDialogs';\nimport { type MilestoneProgress, MilestoneProgressBar } from '../milestones/MilestoneControls';\n\nconst GET_MILESTONES = gql`\n query GetMilestones($workspaceId: ID!, $filter: PlanmagnetMilestoneFilter) {\n planmagnetMilestones(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {\n items {\n id\n name\n description\n projectId\n project {\n id\n name\n }\n status\n dueDate\n isOverdue\n ownerId\n createdAt\n workItemProgress {\n total\n done\n cancelled\n open\n percentComplete\n }\n }\n totalCount\n }\n }\n`;\n\nconst statusColor: Record<string, string> = {\n PENDING: 'bg-gray-100 text-gray-800',\n IN_PROGRESS: 'bg-blue-100 text-blue-800',\n COMPLETED: 'bg-green-100 text-green-800',\n MISSED: 'bg-red-100 text-red-800',\n CANCELLED: 'bg-red-100 text-red-800',\n};\n\nconst milestoneStatuses = [\n 'all',\n 'PENDING',\n 'IN_PROGRESS',\n 'COMPLETED',\n 'MISSED',\n 'CANCELLED',\n] as const;\n\nexport function ProjectsMilestonesPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [filter, setFilter] = useState<string>('all');\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_MILESTONES, {\n variables: {\n workspaceId: workspaceId ?? 'default',\n filter: filter !== 'all' ? { status: filter } : undefined,\n },\n });\n\n // Only before the first load: a refetch after a create must not blank the page.\n if (loading && !data)\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 // A failed load is shown INSIDE the list area: an early return here replaced the whole page, so the status tabs\n // and New Milestone vanished and a failing tab could not be left (BOFF-7942).\n\n const milestones = data?.planmagnetMilestones?.items ?? [];\n const totalCount = data?.planmagnetMilestones?.totalCount ?? 0;\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\">Milestones</h1>\n <p className=\"text-sm text-muted-foreground\">\n {/* The count follows the tab: it is the filtered total, so do not call it \"all\". */}\n {filter === 'all'\n ? `${totalCount} milestones across all projects`\n : `${totalCount} ${filter.toLowerCase().replace('_', ' ')} milestones`}\n </p>\n </div>\n <NewMilestoneDialog\n onCreated={(id) => navigate(detailPath('/projects/milestone-detail-page', id))}\n />\n </div>\n <div className=\"flex gap-1\">\n {milestoneStatuses.map((s) => (\n <button\n key={s}\n onClick={() => setFilter(s)}\n className={`px-3 py-1.5 text-sm rounded-md capitalize ${filter === s ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n >\n {s === 'all' ? 'All' : s.toLowerCase().replace('_', ' ')}\n </button>\n ))}\n </div>\n {error && (\n <div\n role=\"alert\"\n className=\"rounded-md border border-destructive/40 p-4 text-sm text-destructive\"\n >\n Milestones could not be loaded: {error.message}\n </div>\n )}\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {milestones.map(\n (ms: {\n id: string;\n name: string;\n description: string | null;\n projectId: string;\n project: { id: string; name: string } | null;\n status: string;\n dueDate: string | null;\n isOverdue: boolean;\n ownerId: string | null;\n workItemProgress: MilestoneProgress | null;\n }) => (\n <Card\n key={ms.id}\n {...rowLinkProps(\n () => navigate(detailPath('/projects/milestone-detail-page', ms.id)),\n ms.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 <Target className=\"h-4 w-4 text-primary\" />\n {ms.name}\n </CardTitle>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[ms.status] ?? 'bg-gray-100'}`}\n >\n {ms.status.toLowerCase().replace('_', ' ')}\n </span>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n {ms.description ?? 'No description'}\n </p>\n {ms.workItemProgress && <MilestoneProgressBar progress={ms.workItemProgress} />}\n <div className=\"flex gap-3 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Calendar className=\"h-3 w-3\" />\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : 'No due date'}\n </span>\n {ms.isOverdue && (\n <Badge variant=\"destructive\" data-testid=\"milestone-overdue\">\n Overdue\n </Badge>\n )}\n {ms.ownerId && (\n <span className=\"flex items-center gap-1\">\n <User className=\"h-3 w-3\" />\n <PersonName id={ms.ownerId} />\n </span>\n )}\n </div>\n <div className=\"text-xs text-muted-foreground\">\n Project: {ms.project?.name ?? 'not available'}\n </div>\n </CardContent>\n </Card>\n )\n )}\n </div>\n {!error && milestones.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No milestones found.</p>\n )}\n </div>\n );\n}\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TasksCreateTaskPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TasksCreateTaskPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TasksCreateTaskPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TasksCreateTaskPagePage.tsx"],"names":[],"mappings":"AAuEA,wBAAgB,uBAAuB,4CA+VtC"}
|