@burdenoff/microfe-planmagnet 2026.923.1 → 2026.923.2
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/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +20 -0
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/hooks/useEntityId.d.ts +14 -0
- package/dist/planmagnet/hooks/useEntityId.d.ts.map +1 -0
- package/dist/planmagnet/hooks/useEntityId.js +15 -0
- package/dist/planmagnet/hooks/useEntityId.js.map +1 -0
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +74 -70
- package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +21 -17
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +21 -16
- 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 +67 -63
- 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 +61 -56
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +107 -99
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +94 -90
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +46 -41
- 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 +110 -106
- package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +2 -2
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js +2 -2
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -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 {
|
|
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\">{ms.ownerId}</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":";;;;;;;AAQA,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,CAA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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsMilestonesPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsMilestonesPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectsMilestonesPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsMilestonesPagePage.tsx"],"names":[],"mappings":"AA6CA,wBAAgB,0BAA0B,4CAyGzC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
|
+
import { detailPath as n, rowLinkProps as r } from "../utils/rowNavigation.js";
|
|
3
|
+
import { useState as i } from "react";
|
|
4
|
+
import { Calendar as a, Target as o, User 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 { Card as f, CardContent as p, CardHeader as m, CardTitle as h } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
//#region src/planmagnet/pages/ProjectsMilestonesPagePage.tsx
|
|
9
|
-
var
|
|
10
|
+
var g = c`
|
|
10
11
|
query GetMilestones($workspaceId: ID!, $filter: PlanmagnetMilestoneFilter) {
|
|
11
12
|
planmagnetMilestones(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
|
|
12
13
|
items {
|
|
@@ -22,13 +23,13 @@ var p = a`
|
|
|
22
23
|
totalCount
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
|
-
`,
|
|
26
|
+
`, _ = {
|
|
26
27
|
PENDING: "bg-gray-100 text-gray-800",
|
|
27
28
|
IN_PROGRESS: "bg-blue-100 text-blue-800",
|
|
28
29
|
COMPLETED: "bg-green-100 text-green-800",
|
|
29
30
|
MISSED: "bg-red-100 text-red-800",
|
|
30
31
|
CANCELLED: "bg-red-100 text-red-800"
|
|
31
|
-
},
|
|
32
|
+
}, v = [
|
|
32
33
|
"all",
|
|
33
34
|
"PENDING",
|
|
34
35
|
"IN_PROGRESS",
|
|
@@ -36,77 +37,80 @@ var p = a`
|
|
|
36
37
|
"MISSED",
|
|
37
38
|
"CANCELLED"
|
|
38
39
|
];
|
|
39
|
-
function
|
|
40
|
-
let { workspaceId:
|
|
41
|
-
workspaceId:
|
|
42
|
-
filter:
|
|
40
|
+
function y() {
|
|
41
|
+
let { workspaceId: c } = e(), y = t(), [b, x] = i("all"), { data: S, loading: C, error: w } = l(g, { variables: {
|
|
42
|
+
workspaceId: c ?? "default",
|
|
43
|
+
filter: b === "all" ? void 0 : { status: b }
|
|
43
44
|
} });
|
|
44
|
-
if (
|
|
45
|
+
if (C) return /* @__PURE__ */ u("div", {
|
|
45
46
|
className: "flex items-center justify-center p-12",
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ u("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
47
48
|
});
|
|
48
|
-
if (
|
|
49
|
+
if (w) return /* @__PURE__ */ d("div", {
|
|
49
50
|
className: "p-6 text-red-500",
|
|
50
|
-
children: ["Error loading milestones: ",
|
|
51
|
+
children: ["Error loading milestones: ", w.message]
|
|
51
52
|
});
|
|
52
|
-
let
|
|
53
|
-
return /* @__PURE__ */
|
|
53
|
+
let T = S?.planmagnetMilestones?.items ?? [], E = S?.planmagnetMilestones?.totalCount ?? 0;
|
|
54
|
+
return /* @__PURE__ */ d("div", {
|
|
54
55
|
className: "space-y-6 p-6",
|
|
55
56
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h1", {
|
|
57
58
|
className: "text-2xl font-semibold",
|
|
58
59
|
children: "Milestones"
|
|
59
|
-
}), /* @__PURE__ */
|
|
60
|
+
}), /* @__PURE__ */ d("p", {
|
|
60
61
|
className: "text-sm text-muted-foreground",
|
|
61
|
-
children: [
|
|
62
|
+
children: [E, " milestones across all projects"]
|
|
62
63
|
})] }),
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ u("div", {
|
|
64
65
|
className: "flex gap-1",
|
|
65
|
-
children:
|
|
66
|
-
onClick: () =>
|
|
67
|
-
className: `px-3 py-1.5 text-sm rounded-md capitalize ${
|
|
66
|
+
children: v.map((e) => /* @__PURE__ */ u("button", {
|
|
67
|
+
onClick: () => x(e),
|
|
68
|
+
className: `px-3 py-1.5 text-sm rounded-md capitalize ${b === e ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-muted"}`,
|
|
68
69
|
children: e === "all" ? "All" : e.toLowerCase().replace("_", " ")
|
|
69
70
|
}, e))
|
|
70
71
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ u("div", {
|
|
72
73
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
73
|
-
children:
|
|
74
|
-
|
|
75
|
-
children: /* @__PURE__ */
|
|
76
|
-
className: "
|
|
77
|
-
children:
|
|
78
|
-
className: "
|
|
79
|
-
children: [/* @__PURE__ */
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}), /* @__PURE__ */ c(u, {
|
|
86
|
-
className: "space-y-3",
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ s("p", {
|
|
89
|
-
className: "text-sm text-muted-foreground",
|
|
90
|
-
children: e.description ?? "No description"
|
|
91
|
-
}),
|
|
92
|
-
/* @__PURE__ */ c("div", {
|
|
93
|
-
className: "flex gap-3 text-xs text-muted-foreground",
|
|
94
|
-
children: [/* @__PURE__ */ c("span", {
|
|
95
|
-
className: "flex items-center gap-1",
|
|
96
|
-
children: [/* @__PURE__ */ s(n, { className: "h-3 w-3" }), e.dueDate ? new Date(e.dueDate).toLocaleDateString() : "No due date"]
|
|
97
|
-
}), e.ownerId && /* @__PURE__ */ c("span", {
|
|
98
|
-
className: "flex items-center gap-1",
|
|
99
|
-
children: [/* @__PURE__ */ s(i, { className: "h-3 w-3" }), e.ownerId]
|
|
74
|
+
children: T.map((e) => /* @__PURE__ */ d(f, {
|
|
75
|
+
...r(() => y(n("/projects/milestone-detail-page", e.id)), e.name),
|
|
76
|
+
children: [/* @__PURE__ */ u(m, {
|
|
77
|
+
className: "pb-2",
|
|
78
|
+
children: /* @__PURE__ */ d("div", {
|
|
79
|
+
className: "flex items-center justify-between",
|
|
80
|
+
children: [/* @__PURE__ */ d(h, {
|
|
81
|
+
className: "text-base flex items-center gap-2",
|
|
82
|
+
children: [/* @__PURE__ */ u(o, { className: "h-4 w-4 text-primary" }), e.name]
|
|
83
|
+
}), /* @__PURE__ */ u("span", {
|
|
84
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${_[e.status] ?? "bg-gray-100"}`,
|
|
85
|
+
children: e.status.toLowerCase().replace("_", " ")
|
|
100
86
|
})]
|
|
101
|
-
}),
|
|
102
|
-
/* @__PURE__ */ c("div", {
|
|
103
|
-
className: "text-xs text-muted-foreground",
|
|
104
|
-
children: ["Project: ", e.projectId]
|
|
105
87
|
})
|
|
106
|
-
|
|
107
|
-
|
|
88
|
+
}), /* @__PURE__ */ d(p, {
|
|
89
|
+
className: "space-y-3",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ u("p", {
|
|
92
|
+
className: "text-sm text-muted-foreground",
|
|
93
|
+
children: e.description ?? "No description"
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ d("div", {
|
|
96
|
+
className: "flex gap-3 text-xs text-muted-foreground",
|
|
97
|
+
children: [/* @__PURE__ */ d("span", {
|
|
98
|
+
className: "flex items-center gap-1",
|
|
99
|
+
children: [/* @__PURE__ */ u(a, { className: "h-3 w-3" }), e.dueDate ? new Date(e.dueDate).toLocaleDateString() : "No due date"]
|
|
100
|
+
}), e.ownerId && /* @__PURE__ */ d("span", {
|
|
101
|
+
className: "flex items-center gap-1",
|
|
102
|
+
children: [/* @__PURE__ */ u(s, { className: "h-3 w-3" }), e.ownerId]
|
|
103
|
+
})]
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ d("div", {
|
|
106
|
+
className: "text-xs text-muted-foreground",
|
|
107
|
+
children: ["Project: ", e.projectId]
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
})]
|
|
111
|
+
}, e.id))
|
|
108
112
|
}),
|
|
109
|
-
|
|
113
|
+
T.length === 0 && /* @__PURE__ */ u("p", {
|
|
110
114
|
className: "text-center text-muted-foreground py-8",
|
|
111
115
|
children: "No milestones found."
|
|
112
116
|
})
|
|
@@ -114,6 +118,6 @@ function g() {
|
|
|
114
118
|
});
|
|
115
119
|
}
|
|
116
120
|
//#endregion
|
|
117
|
-
export {
|
|
121
|
+
export { y as ProjectsMilestonesPagePage };
|
|
118
122
|
|
|
119
123
|
//# 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 } from '../providers/PlanMagnetProvider';\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 [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
|
|
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}\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":";;;;;;;;;AAUA,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,IAAa,GAAM,sBAAsB,cAAc;AAE7D,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;IAAI,WAAU;cAAyB;IAAe,CAAA,EACtD,kBAAC,KAAD;IAAG,WAAU;cAAb,CAA8C,GAAW,kCAAmC;MACxF,EAAA,CAAA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,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":"AAwDA,wBAAgB,8BAA8B,4CA8O7C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEntityId as e } from "../hooks/useEntityId.js";
|
|
2
2
|
import { BarChart3 as t, CalendarClock as n, FolderKanban as r, Users as i } from "lucide-react";
|
|
3
3
|
import { gql as a } from "@apollo/client";
|
|
4
4
|
import { useQuery as o } from "@apollo/client/react";
|
|
@@ -6,26 +6,24 @@ import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
|
6
6
|
import { Badge as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/planmagnet/pages/ProjectsPlanningDetailPagePage.tsx
|
|
8
8
|
var m = a`
|
|
9
|
-
query GetSprintDetail($
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
query GetSprintDetail($id: ID!) {
|
|
10
|
+
planmagnetSprint(id: $id) {
|
|
11
|
+
id
|
|
12
|
+
name
|
|
13
|
+
projectId
|
|
14
|
+
status
|
|
15
|
+
startDate
|
|
16
|
+
endDate
|
|
17
|
+
goal
|
|
18
|
+
capacity
|
|
19
|
+
velocity
|
|
20
|
+
workItems {
|
|
12
21
|
id
|
|
13
|
-
|
|
14
|
-
projectId
|
|
22
|
+
key
|
|
15
23
|
status
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
capacity
|
|
20
|
-
velocity
|
|
21
|
-
workItems {
|
|
22
|
-
id
|
|
23
|
-
key
|
|
24
|
-
status
|
|
25
|
-
storyPoints
|
|
26
|
-
assigneeId
|
|
27
|
-
priority
|
|
28
|
-
}
|
|
24
|
+
storyPoints
|
|
25
|
+
assigneeId
|
|
26
|
+
priority
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
}
|
|
@@ -50,9 +48,16 @@ var m = a`
|
|
|
50
48
|
}
|
|
51
49
|
`;
|
|
52
50
|
function g() {
|
|
53
|
-
let
|
|
54
|
-
variables: {
|
|
55
|
-
skip: !
|
|
51
|
+
let a = e("sprintId"), { data: g, loading: _, error: v } = o(m, {
|
|
52
|
+
variables: { id: a },
|
|
53
|
+
skip: !a
|
|
54
|
+
}), { data: y } = o(h, {
|
|
55
|
+
variables: { sprintId: a },
|
|
56
|
+
skip: !a
|
|
57
|
+
});
|
|
58
|
+
if (!a) return /* @__PURE__ */ s("div", {
|
|
59
|
+
className: "p-6 text-muted-foreground",
|
|
60
|
+
children: "No planning session selected. Open one from the list."
|
|
56
61
|
});
|
|
57
62
|
if (_) return /* @__PURE__ */ s("div", {
|
|
58
63
|
className: "flex items-center justify-center p-12",
|
|
@@ -62,44 +67,44 @@ function g() {
|
|
|
62
67
|
className: "p-6 text-red-500",
|
|
63
68
|
children: ["Error loading planning session: ", v.message]
|
|
64
69
|
});
|
|
65
|
-
let
|
|
66
|
-
if (!
|
|
70
|
+
let b = g?.planmagnetSprint;
|
|
71
|
+
if (!b) return /* @__PURE__ */ s("div", {
|
|
67
72
|
className: "p-6 text-muted-foreground",
|
|
68
73
|
children: "Planning session not found."
|
|
69
74
|
});
|
|
70
|
-
let
|
|
71
|
-
for (let e of
|
|
75
|
+
let x = y?.planmagnetSprintCapacity, S = {};
|
|
76
|
+
for (let e of x?.members ?? []) S[e.actorId] = {
|
|
72
77
|
employeeName: e.employeeName,
|
|
73
78
|
allocatedHours: e.allocatedHours,
|
|
74
79
|
billableHours: e.billableHours,
|
|
75
80
|
utilizationPercent: e.utilizationPercent
|
|
76
81
|
};
|
|
77
|
-
let
|
|
78
|
-
|
|
79
|
-
let
|
|
82
|
+
let C = b.workItems ?? [], w = C.reduce((e, t) => e + (t.storyPoints ?? 0), 0);
|
|
83
|
+
C.filter((e) => e.status === "DONE").reduce((e, t) => e + (t.storyPoints ?? 0), 0);
|
|
84
|
+
let T = b.capacity ?? w, E = T > 0 ? Math.round(w / T * 100) : 0, D = T - w, O = [...new Set(C.map((e) => e.assigneeId).filter(Boolean))];
|
|
80
85
|
return /* @__PURE__ */ c("div", {
|
|
81
86
|
className: "space-y-6 p-6",
|
|
82
87
|
children: [/* @__PURE__ */ c("div", {
|
|
83
88
|
className: "flex items-center justify-between",
|
|
84
89
|
children: [/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h1", {
|
|
85
90
|
className: "text-2xl font-semibold",
|
|
86
|
-
children:
|
|
91
|
+
children: b.name
|
|
87
92
|
}), /* @__PURE__ */ c("p", {
|
|
88
93
|
className: "text-sm text-muted-foreground",
|
|
89
94
|
children: [
|
|
90
|
-
|
|
95
|
+
b.projectId,
|
|
91
96
|
" ·",
|
|
92
97
|
" ",
|
|
93
|
-
|
|
98
|
+
b.startDate ? new Date(b.startDate).toLocaleDateString() : "—",
|
|
94
99
|
" -",
|
|
95
100
|
" ",
|
|
96
|
-
|
|
101
|
+
b.endDate ? new Date(b.endDate).toLocaleDateString() : "—"
|
|
97
102
|
]
|
|
98
103
|
})] }), /* @__PURE__ */ s("div", {
|
|
99
104
|
className: "flex gap-2",
|
|
100
105
|
children: /* @__PURE__ */ s(l, {
|
|
101
106
|
className: "capitalize",
|
|
102
|
-
children:
|
|
107
|
+
children: b.status.toLowerCase().replace("_", " ")
|
|
103
108
|
})
|
|
104
109
|
})]
|
|
105
110
|
}), /* @__PURE__ */ c("div", {
|
|
@@ -115,7 +120,7 @@ function g() {
|
|
|
115
120
|
className: "p-4 bg-muted rounded-md",
|
|
116
121
|
children: [/* @__PURE__ */ s("p", {
|
|
117
122
|
className: "text-2xl font-bold",
|
|
118
|
-
children:
|
|
123
|
+
children: T
|
|
119
124
|
}), /* @__PURE__ */ s("p", {
|
|
120
125
|
className: "text-xs text-muted-foreground",
|
|
121
126
|
children: "Capacity"
|
|
@@ -125,7 +130,7 @@ function g() {
|
|
|
125
130
|
className: "p-4 bg-primary/10 rounded-md",
|
|
126
131
|
children: [/* @__PURE__ */ s("p", {
|
|
127
132
|
className: "text-2xl font-bold text-primary",
|
|
128
|
-
children:
|
|
133
|
+
children: w
|
|
129
134
|
}), /* @__PURE__ */ s("p", {
|
|
130
135
|
className: "text-xs text-muted-foreground",
|
|
131
136
|
children: "Allocated"
|
|
@@ -135,7 +140,7 @@ function g() {
|
|
|
135
140
|
className: "p-4 bg-muted rounded-md",
|
|
136
141
|
children: [/* @__PURE__ */ s("p", {
|
|
137
142
|
className: "text-2xl font-bold",
|
|
138
|
-
children:
|
|
143
|
+
children: D > 0 ? D : 0
|
|
139
144
|
}), /* @__PURE__ */ s("p", {
|
|
140
145
|
className: "text-xs text-muted-foreground",
|
|
141
146
|
children: "Remaining"
|
|
@@ -149,24 +154,24 @@ function g() {
|
|
|
149
154
|
children: "Utilization"
|
|
150
155
|
}), /* @__PURE__ */ c("span", {
|
|
151
156
|
className: "font-medium",
|
|
152
|
-
children: [
|
|
157
|
+
children: [E, "%"]
|
|
153
158
|
})]
|
|
154
159
|
}), /* @__PURE__ */ s("div", {
|
|
155
160
|
className: "w-full h-4 rounded-full bg-muted overflow-hidden",
|
|
156
161
|
children: /* @__PURE__ */ s("div", {
|
|
157
|
-
className: `h-full rounded-full ${
|
|
158
|
-
style: { width: `${Math.min(
|
|
162
|
+
className: `h-full rounded-full ${E > 90 ? "bg-red-400" : "bg-green-400"}`,
|
|
163
|
+
style: { width: `${Math.min(E, 100)}%` }
|
|
159
164
|
})
|
|
160
165
|
})] })]
|
|
161
166
|
})] }), /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ c(p, { children: [
|
|
162
167
|
"Team Members (",
|
|
163
|
-
|
|
168
|
+
O.length,
|
|
164
169
|
")"
|
|
165
170
|
] }) }), /* @__PURE__ */ c(d, { children: [
|
|
166
171
|
/* @__PURE__ */ c("div", {
|
|
167
172
|
className: "grid grid-cols-2 gap-3",
|
|
168
|
-
children: [
|
|
169
|
-
let t =
|
|
173
|
+
children: [O.map((e) => {
|
|
174
|
+
let t = S[e];
|
|
170
175
|
return /* @__PURE__ */ c("div", {
|
|
171
176
|
className: "flex items-center gap-2 border rounded-md p-2.5",
|
|
172
177
|
children: [/* @__PURE__ */ s("div", {
|
|
@@ -189,18 +194,18 @@ function g() {
|
|
|
189
194
|
})]
|
|
190
195
|
})]
|
|
191
196
|
}, e);
|
|
192
|
-
}),
|
|
197
|
+
}), O.length === 0 && /* @__PURE__ */ s("p", {
|
|
193
198
|
className: "text-sm text-muted-foreground col-span-2 text-center py-4",
|
|
194
199
|
children: "No team members assigned."
|
|
195
200
|
})]
|
|
196
201
|
}),
|
|
197
|
-
|
|
202
|
+
x?.crewfoundryUnavailable && O.length > 0 && /* @__PURE__ */ s("p", {
|
|
198
203
|
className: "text-xs text-muted-foreground mt-3 border-t pt-3",
|
|
199
204
|
children: "Workforce allocation from CrewFoundry is unavailable for this workspace — no CrewFoundry module provisioned yet."
|
|
200
205
|
}),
|
|
201
|
-
!
|
|
206
|
+
!x?.crewfoundryUnavailable && (x?.unmatchedAssigneeIds?.length ?? 0) > 0 && /* @__PURE__ */ c("p", {
|
|
202
207
|
className: "text-xs text-muted-foreground mt-3 border-t pt-3",
|
|
203
|
-
children: [
|
|
208
|
+
children: [x.unmatchedAssigneeIds.length, " assignee(s) have no matching CrewFoundry employee record — allocation hours shown only for matched employees."]
|
|
204
209
|
})
|
|
205
210
|
] })] })]
|
|
206
211
|
}), /* @__PURE__ */ c(u, { children: [/* @__PURE__ */ s(f, { children: /* @__PURE__ */ s(p, { children: "Session Info" }) }), /* @__PURE__ */ c(d, {
|
|
@@ -216,7 +221,7 @@ function g() {
|
|
|
216
221
|
}),
|
|
217
222
|
/* @__PURE__ */ s("span", {
|
|
218
223
|
className: "font-medium",
|
|
219
|
-
children:
|
|
224
|
+
children: b.projectId
|
|
220
225
|
})
|
|
221
226
|
]
|
|
222
227
|
}),
|
|
@@ -230,7 +235,7 @@ function g() {
|
|
|
230
235
|
}),
|
|
231
236
|
/* @__PURE__ */ s("span", {
|
|
232
237
|
className: "font-medium",
|
|
233
|
-
children:
|
|
238
|
+
children: b.startDate ? new Date(b.startDate).toLocaleDateString() : "Not set"
|
|
234
239
|
})
|
|
235
240
|
]
|
|
236
241
|
}),
|
|
@@ -244,7 +249,7 @@ function g() {
|
|
|
244
249
|
}),
|
|
245
250
|
/* @__PURE__ */ s("span", {
|
|
246
251
|
className: "font-medium",
|
|
247
|
-
children:
|
|
252
|
+
children: b.endDate ? new Date(b.endDate).toLocaleDateString() : "Not set"
|
|
248
253
|
})
|
|
249
254
|
]
|
|
250
255
|
}),
|
|
@@ -258,7 +263,7 @@ function g() {
|
|
|
258
263
|
}),
|
|
259
264
|
/* @__PURE__ */ s("span", {
|
|
260
265
|
className: "font-medium",
|
|
261
|
-
children:
|
|
266
|
+
children: O.length
|
|
262
267
|
})
|
|
263
268
|
]
|
|
264
269
|
}),
|
|
@@ -272,11 +277,11 @@ function g() {
|
|
|
272
277
|
}),
|
|
273
278
|
/* @__PURE__ */ c("span", {
|
|
274
279
|
className: "font-medium",
|
|
275
|
-
children: [
|
|
280
|
+
children: [T, " pts"]
|
|
276
281
|
})
|
|
277
282
|
]
|
|
278
283
|
}),
|
|
279
|
-
|
|
284
|
+
b.velocity != null && /* @__PURE__ */ c("div", {
|
|
280
285
|
className: "flex items-center gap-2",
|
|
281
286
|
children: [
|
|
282
287
|
/* @__PURE__ */ s(t, { className: "h-4 w-4 text-muted-foreground" }),
|
|
@@ -286,18 +291,18 @@ function g() {
|
|
|
286
291
|
}),
|
|
287
292
|
/* @__PURE__ */ c("span", {
|
|
288
293
|
className: "font-medium",
|
|
289
|
-
children: [
|
|
294
|
+
children: [b.velocity, " pts"]
|
|
290
295
|
})
|
|
291
296
|
]
|
|
292
297
|
}),
|
|
293
|
-
|
|
298
|
+
b.goal && /* @__PURE__ */ c("div", {
|
|
294
299
|
className: "border-t pt-3 mt-3",
|
|
295
300
|
children: [/* @__PURE__ */ s("p", {
|
|
296
301
|
className: "text-muted-foreground text-xs mb-1",
|
|
297
302
|
children: "Goal"
|
|
298
303
|
}), /* @__PURE__ */ s("p", {
|
|
299
304
|
className: "text-sm",
|
|
300
|
-
children:
|
|
305
|
+
children: b.goal
|
|
301
306
|
})]
|
|
302
307
|
})
|
|
303
308
|
]
|