@burdenoff/microfe-planmagnet 2026.924.2 → 2026.924.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/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +93 -142
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.d.ts.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +150 -149
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +113 -116
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsGoalsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsGoalsPagePage.js +59 -58
- package/dist/planmagnet/pages/GoalsGoalsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +150 -149
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js +108 -107
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +93 -92
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.js +89 -87
- package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +94 -93
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js +57 -56
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +82 -81
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +72 -71
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +38 -37
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +72 -71
- 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 +47 -46
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +120 -119
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +131 -130
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.js +77 -75
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ReportsReportsPagePage.js +71 -70
- package/dist/planmagnet/pages/ReportsReportsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.js +58 -57
- package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
- package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.js +81 -72
- package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.js.map +1 -1
- package/dist/planmagnet/people/People.d.ts +20 -0
- package/dist/planmagnet/people/People.d.ts.map +1 -0
- package/dist/planmagnet/people/People.js +42 -0
- package/dist/planmagnet/people/People.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { PersonName as e } from "../people/People.js";
|
|
2
|
+
import { useEntityId as t } from "../hooks/useEntityId.js";
|
|
3
|
+
import { Calendar as n, FolderKanban as r, Target as i, User 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";
|
|
7
8
|
//#region src/planmagnet/pages/ProjectsMilestoneDetailPagePage.tsx
|
|
8
|
-
var
|
|
9
|
+
var h = o`
|
|
9
10
|
query GetMilestonesForDetail($id: ID!) {
|
|
10
11
|
planmagnetMilestone(id: $id) {
|
|
11
12
|
id
|
|
@@ -19,151 +20,151 @@ var m = a`
|
|
|
19
20
|
completedAt
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
|
-
`,
|
|
23
|
+
`, g = {
|
|
23
24
|
PENDING: "bg-gray-100 text-gray-800",
|
|
24
25
|
IN_PROGRESS: "bg-blue-100 text-blue-800",
|
|
25
26
|
COMPLETED: "bg-green-100 text-green-800",
|
|
26
27
|
MISSED: "bg-red-100 text-red-800",
|
|
27
28
|
CANCELLED: "bg-red-100 text-red-800"
|
|
28
29
|
};
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
variables: { id:
|
|
32
|
-
skip: !
|
|
30
|
+
function _() {
|
|
31
|
+
let o = t("milestoneId"), { data: _, loading: v, error: y } = s(h, {
|
|
32
|
+
variables: { id: o },
|
|
33
|
+
skip: !o
|
|
33
34
|
});
|
|
34
|
-
if (!
|
|
35
|
+
if (!o) return /* @__PURE__ */ c("div", {
|
|
35
36
|
className: "p-6 text-muted-foreground",
|
|
36
37
|
children: "No milestone selected. Open one from the list."
|
|
37
38
|
});
|
|
38
|
-
if (
|
|
39
|
+
if (v) return /* @__PURE__ */ c("div", {
|
|
39
40
|
className: "flex items-center justify-center p-12",
|
|
40
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ c("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
41
42
|
});
|
|
42
|
-
if (
|
|
43
|
+
if (y) return /* @__PURE__ */ l("div", {
|
|
43
44
|
className: "p-6 text-red-500",
|
|
44
|
-
children: ["Error loading milestone: ",
|
|
45
|
+
children: ["Error loading milestone: ", y.message]
|
|
45
46
|
});
|
|
46
|
-
let
|
|
47
|
-
if (!
|
|
47
|
+
let b = _?.planmagnetMilestone;
|
|
48
|
+
if (!b) return /* @__PURE__ */ c("div", {
|
|
48
49
|
className: "p-6 text-muted-foreground",
|
|
49
50
|
children: "Milestone not found."
|
|
50
51
|
});
|
|
51
|
-
let
|
|
52
|
-
return /* @__PURE__ */
|
|
52
|
+
let x = b.status === "COMPLETED";
|
|
53
|
+
return /* @__PURE__ */ l("div", {
|
|
53
54
|
className: "space-y-6 p-6",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ l("div", {
|
|
55
56
|
className: "flex items-center justify-between",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
57
|
+
children: [/* @__PURE__ */ l("div", {
|
|
57
58
|
className: "flex items-center gap-3",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
59
|
+
children: [/* @__PURE__ */ c(i, { className: "h-6 w-6 text-primary" }), /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
|
|
59
60
|
className: "text-2xl font-semibold",
|
|
60
|
-
children:
|
|
61
|
-
}), /* @__PURE__ */
|
|
61
|
+
children: b.name
|
|
62
|
+
}), /* @__PURE__ */ l("p", {
|
|
62
63
|
className: "text-sm text-muted-foreground",
|
|
63
|
-
children: ["Project: ",
|
|
64
|
+
children: ["Project: ", b.projectId]
|
|
64
65
|
})] })]
|
|
65
|
-
}), /* @__PURE__ */
|
|
66
|
-
className: `text-xs px-3 py-1 rounded-full capitalize ${
|
|
67
|
-
children:
|
|
66
|
+
}), /* @__PURE__ */ c("span", {
|
|
67
|
+
className: `text-xs px-3 py-1 rounded-full capitalize ${g[b.status] ?? "bg-gray-100"}`,
|
|
68
|
+
children: b.status.toLowerCase().replace("_", " ")
|
|
68
69
|
})]
|
|
69
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ l("div", {
|
|
70
71
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ l("div", {
|
|
72
73
|
className: "lg:col-span-2 space-y-6",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Overview" }) }), /* @__PURE__ */ l(f, {
|
|
74
75
|
className: "space-y-4",
|
|
75
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ c("p", {
|
|
76
77
|
className: "text-sm",
|
|
77
|
-
children:
|
|
78
|
-
}), /* @__PURE__ */
|
|
78
|
+
children: b.description ?? "No description provided."
|
|
79
|
+
}), /* @__PURE__ */ c("div", { children: /* @__PURE__ */ l("div", {
|
|
79
80
|
className: "flex justify-between text-sm mb-2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ c("span", {
|
|
81
82
|
className: "text-muted-foreground",
|
|
82
83
|
children: "Status"
|
|
83
|
-
}), /* @__PURE__ */
|
|
84
|
-
variant:
|
|
84
|
+
}), /* @__PURE__ */ c(u, {
|
|
85
|
+
variant: x ? "default" : "secondary",
|
|
85
86
|
className: "capitalize",
|
|
86
|
-
children:
|
|
87
|
+
children: b.status.toLowerCase().replace("_", " ")
|
|
87
88
|
})]
|
|
88
89
|
}) })]
|
|
89
|
-
})] }), /* @__PURE__ */
|
|
90
|
+
})] }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Timeline" }) }), /* @__PURE__ */ c(f, { children: /* @__PURE__ */ l("div", {
|
|
90
91
|
className: "grid grid-cols-2 gap-4 text-center",
|
|
91
|
-
children: [/* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ l("div", {
|
|
92
93
|
className: "p-4 bg-muted rounded-md",
|
|
93
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ c("p", {
|
|
94
95
|
className: "text-sm font-bold",
|
|
95
|
-
children:
|
|
96
|
-
}), /* @__PURE__ */
|
|
96
|
+
children: b.dueDate ? new Date(b.dueDate).toLocaleDateString() : "—"
|
|
97
|
+
}), /* @__PURE__ */ c("p", {
|
|
97
98
|
className: "text-xs text-muted-foreground",
|
|
98
99
|
children: "Due Date"
|
|
99
100
|
})]
|
|
100
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ l("div", {
|
|
101
102
|
className: "p-4 bg-muted rounded-md",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ c("p", {
|
|
103
104
|
className: "text-sm font-bold",
|
|
104
|
-
children:
|
|
105
|
-
}), /* @__PURE__ */
|
|
105
|
+
children: b.completedAt ? new Date(b.completedAt).toLocaleDateString() : "—"
|
|
106
|
+
}), /* @__PURE__ */ c("p", {
|
|
106
107
|
className: "text-xs text-muted-foreground",
|
|
107
108
|
children: "Completed"
|
|
108
109
|
})]
|
|
109
110
|
})]
|
|
110
111
|
}) })] })]
|
|
111
|
-
}), /* @__PURE__ */
|
|
112
|
+
}), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ c(m, { children: "Details" }) }), /* @__PURE__ */ l(f, {
|
|
112
113
|
className: "space-y-3 text-sm",
|
|
113
114
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ l("div", {
|
|
115
116
|
className: "flex items-center gap-2",
|
|
116
117
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ c(n, { className: "h-4 w-4 text-muted-foreground" }),
|
|
119
|
+
/* @__PURE__ */ c("span", {
|
|
119
120
|
className: "text-muted-foreground",
|
|
120
121
|
children: "Due:"
|
|
121
122
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ c("span", {
|
|
123
124
|
className: "font-medium",
|
|
124
|
-
children:
|
|
125
|
+
children: b.dueDate ? new Date(b.dueDate).toLocaleDateString() : "Not set"
|
|
125
126
|
})
|
|
126
127
|
]
|
|
127
128
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ l("div", {
|
|
129
130
|
className: "flex items-center gap-2",
|
|
130
131
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ c(r, { className: "h-4 w-4 text-muted-foreground" }),
|
|
133
|
+
/* @__PURE__ */ c("span", {
|
|
133
134
|
className: "text-muted-foreground",
|
|
134
135
|
children: "Project:"
|
|
135
136
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ c("span", {
|
|
137
138
|
className: "font-medium",
|
|
138
|
-
children:
|
|
139
|
+
children: b.projectId
|
|
139
140
|
})
|
|
140
141
|
]
|
|
141
142
|
}),
|
|
142
|
-
|
|
143
|
+
b.ownerId && /* @__PURE__ */ l("div", {
|
|
143
144
|
className: "flex items-center gap-2",
|
|
144
145
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ c(a, { className: "h-4 w-4 text-muted-foreground" }),
|
|
147
|
+
/* @__PURE__ */ c("span", {
|
|
147
148
|
className: "text-muted-foreground",
|
|
148
149
|
children: "Owner:"
|
|
149
150
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ c("span", {
|
|
151
152
|
className: "font-medium",
|
|
152
|
-
children:
|
|
153
|
+
children: /* @__PURE__ */ c(e, { id: b.ownerId })
|
|
153
154
|
})
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ l("div", {
|
|
157
158
|
className: "flex items-center gap-2",
|
|
158
159
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ c(n, { className: "h-4 w-4 text-muted-foreground" }),
|
|
161
|
+
/* @__PURE__ */ c("span", {
|
|
161
162
|
className: "text-muted-foreground",
|
|
162
163
|
children: "Created:"
|
|
163
164
|
}),
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ c("span", {
|
|
165
166
|
className: "font-medium",
|
|
166
|
-
children:
|
|
167
|
+
children: b.createdAt ? new Date(b.createdAt).toLocaleDateString() : "—"
|
|
167
168
|
})
|
|
168
169
|
]
|
|
169
170
|
})
|
|
@@ -173,6 +174,6 @@ function g() {
|
|
|
173
174
|
});
|
|
174
175
|
}
|
|
175
176
|
//#endregion
|
|
176
|
-
export {
|
|
177
|
+
export { _ as ProjectsMilestoneDetailPagePage };
|
|
177
178
|
|
|
178
179
|
//# sourceMappingURL=ProjectsMilestoneDetailPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsMilestoneDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsMilestoneDetailPagePage.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 { Target, Calendar, FolderKanban, User } from 'lucide-react';\nimport { useEntityId } from '../hooks/useEntityId';\n\nconst GET_MILESTONES_FOR_DETAIL = gql`\n query GetMilestonesForDetail($id: ID!) {\n planmagnetMilestone(id: $id) {\n id\n name\n description\n projectId\n status\n dueDate\n ownerId\n createdAt\n completedAt\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\nexport function ProjectsMilestoneDetailPagePage() {\n const milestoneId = useEntityId('milestoneId');\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_FOR_DETAIL, {\n variables: { id: milestoneId },\n skip: !milestoneId,\n });\n\n if (!milestoneId)\n return (\n <div className=\"p-6 text-muted-foreground\">\n No milestone selected. Open one from the list.\n </div>\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 milestone: {error.message}</div>;\n\n const ms = data?.planmagnetMilestone;\n if (!ms) return <div className=\"p-6 text-muted-foreground\">Milestone not found.</div>;\n\n const isCompleted = ms.status === 'COMPLETED';\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Target className=\"h-6 w-6 text-primary\" />\n <div>\n <h1 className=\"text-2xl font-semibold\">{ms.name}</h1>\n <p className=\"text-sm text-muted-foreground\">Project: {ms.projectId}</p>\n </div>\n </div>\n <span\n className={`text-xs px-3 py-1 rounded-full capitalize ${statusColor[ms.status] ?? 'bg-gray-100'}`}\n >\n {ms.status.toLowerCase().replace('_', ' ')}\n </span>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Overview</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <p className=\"text-sm\">{ms.description ?? 'No description provided.'}</p>\n <div>\n <div className=\"flex justify-between text-sm mb-2\">\n <span className=\"text-muted-foreground\">Status</span>\n <Badge variant={isCompleted ? 'default' : 'secondary'} className=\"capitalize\">\n {ms.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader>\n <CardTitle>Timeline</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-2 gap-4 text-center\">\n <div className=\"p-4 bg-muted rounded-md\">\n <p className=\"text-sm font-bold\">\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : '—'}\n </p>\n <p className=\"text-xs text-muted-foreground\">Due Date</p>\n </div>\n <div className=\"p-4 bg-muted rounded-md\">\n <p className=\"text-sm font-bold\">\n {ms.completedAt ? new Date(ms.completedAt).toLocaleDateString() : '—'}\n </p>\n <p className=\"text-xs text-muted-foreground\">Completed</p>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3 text-sm\">\n <div className=\"flex items-center gap-2\">\n <Calendar className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Due:</span>\n <span className=\"font-medium\">\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : 'Not set'}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <FolderKanban className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Project:</span>\n <span className=\"font-medium\">{ms.projectId}</span>\n </div>\n {ms.ownerId && (\n <div className=\"flex items-center gap-2\">\n <User className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Owner:</span>\n <span className=\"font-medium\"
|
|
1
|
+
{"version":3,"file":"ProjectsMilestoneDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProjectsMilestoneDetailPagePage.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 { Target, Calendar, FolderKanban, User } from 'lucide-react';\nimport { useEntityId } from '../hooks/useEntityId';\nimport { PersonName } from '../people/People';\n\nconst GET_MILESTONES_FOR_DETAIL = gql`\n query GetMilestonesForDetail($id: ID!) {\n planmagnetMilestone(id: $id) {\n id\n name\n description\n projectId\n status\n dueDate\n ownerId\n createdAt\n completedAt\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\nexport function ProjectsMilestoneDetailPagePage() {\n const milestoneId = useEntityId('milestoneId');\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_FOR_DETAIL, {\n variables: { id: milestoneId },\n skip: !milestoneId,\n });\n\n if (!milestoneId)\n return (\n <div className=\"p-6 text-muted-foreground\">\n No milestone selected. Open one from the list.\n </div>\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 milestone: {error.message}</div>;\n\n const ms = data?.planmagnetMilestone;\n if (!ms) return <div className=\"p-6 text-muted-foreground\">Milestone not found.</div>;\n\n const isCompleted = ms.status === 'COMPLETED';\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n <Target className=\"h-6 w-6 text-primary\" />\n <div>\n <h1 className=\"text-2xl font-semibold\">{ms.name}</h1>\n <p className=\"text-sm text-muted-foreground\">Project: {ms.projectId}</p>\n </div>\n </div>\n <span\n className={`text-xs px-3 py-1 rounded-full capitalize ${statusColor[ms.status] ?? 'bg-gray-100'}`}\n >\n {ms.status.toLowerCase().replace('_', ' ')}\n </span>\n </div>\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-6\">\n <div className=\"lg:col-span-2 space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Overview</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <p className=\"text-sm\">{ms.description ?? 'No description provided.'}</p>\n <div>\n <div className=\"flex justify-between text-sm mb-2\">\n <span className=\"text-muted-foreground\">Status</span>\n <Badge variant={isCompleted ? 'default' : 'secondary'} className=\"capitalize\">\n {ms.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n </div>\n </CardContent>\n </Card>\n <Card>\n <CardHeader>\n <CardTitle>Timeline</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"grid grid-cols-2 gap-4 text-center\">\n <div className=\"p-4 bg-muted rounded-md\">\n <p className=\"text-sm font-bold\">\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : '—'}\n </p>\n <p className=\"text-xs text-muted-foreground\">Due Date</p>\n </div>\n <div className=\"p-4 bg-muted rounded-md\">\n <p className=\"text-sm font-bold\">\n {ms.completedAt ? new Date(ms.completedAt).toLocaleDateString() : '—'}\n </p>\n <p className=\"text-xs text-muted-foreground\">Completed</p>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3 text-sm\">\n <div className=\"flex items-center gap-2\">\n <Calendar className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Due:</span>\n <span className=\"font-medium\">\n {ms.dueDate ? new Date(ms.dueDate).toLocaleDateString() : 'Not set'}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <FolderKanban className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Project:</span>\n <span className=\"font-medium\">{ms.projectId}</span>\n </div>\n {ms.ownerId && (\n <div className=\"flex items-center gap-2\">\n <User className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Owner:</span>\n <span className=\"font-medium\">\n <PersonName id={ms.ownerId} />\n </span>\n </div>\n )}\n <div className=\"flex items-center gap-2\">\n <Calendar className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-muted-foreground\">Created:</span>\n <span className=\"font-medium\">\n {ms.createdAt ? new Date(ms.createdAt).toLocaleDateString() : '—'}\n </span>\n </div>\n </CardContent>\n </Card>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAA4B,CAAG;;;;;;;;;;;;;;GAgB/B,IAAsC;CAC1C,SAAS;CACT,aAAa;CACb,WAAW;CACX,QAAQ;CACR,WAAW;CACZ;AAED,SAAgB,IAAkC;CAChD,IAAM,IAAc,EAAY,cAAc,EAExC,EACJ,SACA,YACA,aAGA,EAA8B,GAA2B;EACvD,WAAW,EAAE,IAAI,GAAa;EAC9B,MAAM,CAAC;EACR,CAAC;AAEJ,KAAI,CAAC,EACH,QACE,kBAAC,OAAD;EAAK,WAAU;YAA4B;EAErC,CAAA;AAEV,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,6BAA0B,EAAM,QAAc;;CAEzF,IAAM,IAAK,GAAM;AACjB,KAAI,CAAC,EAAI,QAAO,kBAAC,OAAD;EAAK,WAAU;YAA4B;EAA0B,CAAA;CAErF,IAAM,IAAc,EAAG,WAAW;AAElC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wBAAyB,CAAA,EAC3C,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAA0B,EAAG;KAAU,CAAA,EACrD,kBAAC,KAAD;KAAG,WAAU;eAAb,CAA6C,aAAU,EAAG,UAAc;OACpE,EAAA,CAAA,CACF;OACN,kBAAC,QAAD;IACE,WAAW,6CAA6C,EAAY,EAAG,W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agePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectsMilestonesPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsMilestonesPagePage.tsx"],"names":[],"mappings":"AA8CA,wBAAgB,0BAA0B,4CAyGzC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { PersonName as n } from "../people/People.js";
|
|
3
|
+
import { detailPath as r, rowLinkProps as i } from "../utils/rowNavigation.js";
|
|
4
|
+
import { useState as a } from "react";
|
|
5
|
+
import { Calendar as o, Target as s, User as c } from "lucide-react";
|
|
6
|
+
import { gql as l } from "@apollo/client";
|
|
7
|
+
import { useQuery as u } from "@apollo/client/react";
|
|
8
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { Card as p, CardContent as m, CardHeader as h, CardTitle as g } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/planmagnet/pages/ProjectsMilestonesPagePage.tsx
|
|
10
|
-
var
|
|
11
|
+
var _ = l`
|
|
11
12
|
query GetMilestones($workspaceId: ID!, $filter: PlanmagnetMilestoneFilter) {
|
|
12
13
|
planmagnetMilestones(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
|
|
13
14
|
items {
|
|
@@ -23,13 +24,13 @@ var g = c`
|
|
|
23
24
|
totalCount
|
|
24
25
|
}
|
|
25
26
|
}
|
|
26
|
-
`,
|
|
27
|
+
`, v = {
|
|
27
28
|
PENDING: "bg-gray-100 text-gray-800",
|
|
28
29
|
IN_PROGRESS: "bg-blue-100 text-blue-800",
|
|
29
30
|
COMPLETED: "bg-green-100 text-green-800",
|
|
30
31
|
MISSED: "bg-red-100 text-red-800",
|
|
31
32
|
CANCELLED: "bg-red-100 text-red-800"
|
|
32
|
-
},
|
|
33
|
+
}, y = [
|
|
33
34
|
"all",
|
|
34
35
|
"PENDING",
|
|
35
36
|
"IN_PROGRESS",
|
|
@@ -37,72 +38,72 @@ var g = c`
|
|
|
37
38
|
"MISSED",
|
|
38
39
|
"CANCELLED"
|
|
39
40
|
];
|
|
40
|
-
function
|
|
41
|
-
let { workspaceId:
|
|
42
|
-
workspaceId:
|
|
43
|
-
filter:
|
|
41
|
+
function b() {
|
|
42
|
+
let { workspaceId: l } = e(), b = t(), [x, S] = a("all"), { data: C, loading: w, error: T } = u(_, { variables: {
|
|
43
|
+
workspaceId: l ?? "default",
|
|
44
|
+
filter: x === "all" ? void 0 : { status: x }
|
|
44
45
|
} });
|
|
45
|
-
if (
|
|
46
|
+
if (w) return /* @__PURE__ */ d("div", {
|
|
46
47
|
className: "flex items-center justify-center p-12",
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
+
children: /* @__PURE__ */ d("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
48
49
|
});
|
|
49
|
-
if (
|
|
50
|
+
if (T) return /* @__PURE__ */ f("div", {
|
|
50
51
|
className: "p-6 text-red-500",
|
|
51
|
-
children: ["Error loading milestones: ",
|
|
52
|
+
children: ["Error loading milestones: ", T.message]
|
|
52
53
|
});
|
|
53
|
-
let
|
|
54
|
-
return /* @__PURE__ */
|
|
54
|
+
let E = C?.planmagnetMilestones?.items ?? [], D = C?.planmagnetMilestones?.totalCount ?? 0;
|
|
55
|
+
return /* @__PURE__ */ f("div", {
|
|
55
56
|
className: "space-y-6 p-6",
|
|
56
57
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
58
59
|
className: "text-2xl font-semibold",
|
|
59
60
|
children: "Milestones"
|
|
60
|
-
}), /* @__PURE__ */
|
|
61
|
+
}), /* @__PURE__ */ f("p", {
|
|
61
62
|
className: "text-sm text-muted-foreground",
|
|
62
|
-
children: [
|
|
63
|
+
children: [D, " milestones across all projects"]
|
|
63
64
|
})] }),
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ d("div", {
|
|
65
66
|
className: "flex gap-1",
|
|
66
|
-
children:
|
|
67
|
-
onClick: () =>
|
|
68
|
-
className: `px-3 py-1.5 text-sm rounded-md capitalize ${
|
|
67
|
+
children: y.map((e) => /* @__PURE__ */ d("button", {
|
|
68
|
+
onClick: () => S(e),
|
|
69
|
+
className: `px-3 py-1.5 text-sm rounded-md capitalize ${x === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
69
70
|
children: e === "all" ? "All" : e.toLowerCase().replace("_", " ")
|
|
70
71
|
}, e))
|
|
71
72
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ d("div", {
|
|
73
74
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
74
|
-
children:
|
|
75
|
-
...
|
|
76
|
-
children: [/* @__PURE__ */
|
|
75
|
+
children: E.map((e) => /* @__PURE__ */ f(p, {
|
|
76
|
+
...i(() => b(r("/projects/milestone-detail-page", e.id)), e.name),
|
|
77
|
+
children: [/* @__PURE__ */ d(h, {
|
|
77
78
|
className: "pb-2",
|
|
78
|
-
children: /* @__PURE__ */
|
|
79
|
+
children: /* @__PURE__ */ f("div", {
|
|
79
80
|
className: "flex items-center justify-between",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
+
children: [/* @__PURE__ */ f(g, {
|
|
81
82
|
className: "text-base flex items-center gap-2",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
}), /* @__PURE__ */
|
|
84
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
83
|
+
children: [/* @__PURE__ */ d(s, { className: "h-4 w-4 text-primary" }), e.name]
|
|
84
|
+
}), /* @__PURE__ */ d("span", {
|
|
85
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${v[e.status] ?? "bg-gray-100"}`,
|
|
85
86
|
children: e.status.toLowerCase().replace("_", " ")
|
|
86
87
|
})]
|
|
87
88
|
})
|
|
88
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ f(m, {
|
|
89
90
|
className: "space-y-3",
|
|
90
91
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ d("p", {
|
|
92
93
|
className: "text-sm text-muted-foreground",
|
|
93
94
|
children: e.description ?? "No description"
|
|
94
95
|
}),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ f("div", {
|
|
96
97
|
className: "flex gap-3 text-xs text-muted-foreground",
|
|
97
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ f("span", {
|
|
98
99
|
className: "flex items-center gap-1",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
100
|
-
}), e.ownerId && /* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ d(o, { className: "h-3 w-3" }), e.dueDate ? new Date(e.dueDate).toLocaleDateString() : "No due date"]
|
|
101
|
+
}), e.ownerId && /* @__PURE__ */ f("span", {
|
|
101
102
|
className: "flex items-center gap-1",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
103
|
+
children: [/* @__PURE__ */ d(c, { className: "h-3 w-3" }), /* @__PURE__ */ d(n, { id: e.ownerId })]
|
|
103
104
|
})]
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ f("div", {
|
|
106
107
|
className: "text-xs text-muted-foreground",
|
|
107
108
|
children: ["Project: ", e.projectId]
|
|
108
109
|
})
|
|
@@ -110,7 +111,7 @@ function y() {
|
|
|
110
111
|
})]
|
|
111
112
|
}, e.id))
|
|
112
113
|
}),
|
|
113
|
-
|
|
114
|
+
E.length === 0 && /* @__PURE__ */ d("p", {
|
|
114
115
|
className: "text-center text-muted-foreground py-8",
|
|
115
116
|
children: "No milestones found."
|
|
116
117
|
})
|
|
@@ -118,6 +119,6 @@ function y() {
|
|
|
118
119
|
});
|
|
119
120
|
}
|
|
120
121
|
//#endregion
|
|
121
|
-
export {
|
|
122
|
+
export { b as ProjectsMilestonesPagePage };
|
|
122
123
|
|
|
123
124
|
//# 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';\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 status\n dueDate\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 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 milestones: {error.message}</div>;\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>\n <h1 className=\"text-2xl font-semibold\">Milestones</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} milestones across all projects</p>\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 <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 status: string;\n dueDate: string | null;\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.ownerId && (\n <span className=\"flex items-center gap-1\">\n <User className=\"h-3 w-3\" />\n {ms.ownerId}
|
|
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';\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 status\n dueDate\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 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 milestones: {error.message}</div>;\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>\n <h1 className=\"text-2xl font-semibold\">Milestones</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} milestones across all projects</p>\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 <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 status: string;\n dueDate: string | null;\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.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\">Project: {ms.projectId}</div>\n </CardContent>\n </Card>\n )\n )}\n </div>\n {milestones.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No milestones found.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAiB,CAAG;;;;;;;;;;;;;;;;GAkBpB,IAAsC;CAC1C,SAAS;CACT,aAAa;CACb,WAAW;CACX,QAAQ;CACR,WAAW;CACZ,EAEK,IAAoB;CACxB;CACA;CACA;CACA;CACA;CACA;CACD;AAED,SAAgB,IAA6B;CAC3C,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAQ,KAAa,EAAiB,MAAM,EAE7C,EACJ,SACA,YACA,aAGA,EAA8B,GAAgB,EAC5C,WAAW;EACT,aAAa,KAAe;EAC5B,QAAQ,MAAW,QAA6B,KAAA,IAArB,EAAE,QAAQ,GAAQ;EAC9C,EACF,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,8BAA2B,EAAM,QAAc;;CAE1F,IAAM,IAAa,GAAM,sBAAsB,SAAS,EAAE,EACpD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AM,WAAU;mBAAhB,CACE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAC5B,kBAAC,GAAD,EAAY,IAAI,EAAG,SAAW,CAAA,CACzB;WAEL;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CAA+C,aAAU,EAAG,UAAgB;;OAChE;QACT;OArCA,EAAG,GAqCH,CAEV;IACG,CAAA;GACL,EAAW,WAAW,KACrB,kBAAC,KAAD;IAAG,WAAU;cAAyC;IAAwB,CAAA;GAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsPlanningDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsPlanningDetailPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectsPlanningDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsPlanningDetailPagePage.tsx"],"names":[],"mappings":"AAyDA,wBAAgB,8BAA8B,4CA8O7C"}
|