@burdenoff/microfe-planmagnet 2026.830.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 +52 -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/ProductsFeaturesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js +148 -144
- package/dist/planmagnet/pages/ProductsFeaturesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductsPagePage.js +85 -84
- package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js +95 -91
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +117 -113
- 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 +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/dist/planmagnet/pages/TasksTasksPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTasksPagePage.js +67 -66
- package/dist/planmagnet/pages/TasksTasksPagePage.js.map +1 -1
- package/dist/planmagnet/utils/rowNavigation.d.ts +29 -0
- package/dist/planmagnet/utils/rowNavigation.d.ts.map +1 -0
- package/dist/planmagnet/utils/rowNavigation.js +20 -0
- package/dist/planmagnet/utils/rowNavigation.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsReleasesPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsReleasesPagePage.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, Button } from '@burdenoff/fe-libs/ui';\nimport { GitBranch, Calendar, Package, Loader2 } from 'lucide-react';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\n\nconst LIST_RELEASES = gql`\n query ListReleases(\n $workspaceId: ID!\n $filter: PlanmagnetReleaseFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n workspaceId\n projectId\n name\n description\n version\n status\n plannedDate\n releasedAt\n releaseNotes\n ownerId\n tags\n createdAt\n updatedAt\n }\n totalCount\n }\n }\n`;\n\ninterface ReleaseNode {\n id: string;\n name: string;\n description: string | null;\n version: string;\n status: string;\n plannedDate: string | null;\n releasedAt: string | null;\n releaseNotes: string | null;\n ownerId: string;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\nconst statusTabs = [\n 'all',\n 'DRAFT',\n 'PLANNING',\n 'IN_PROGRESS',\n 'READY',\n 'RELEASED',\n 'CANCELLED',\n] as const;\nconst statusColor: Record<string, string> = {\n DRAFT: 'bg-gray-100 text-gray-800',\n PLANNING: 'bg-yellow-100 text-yellow-800',\n IN_PROGRESS: 'bg-blue-100 text-blue-800',\n READY: 'bg-orange-100 text-orange-800',\n RELEASED: 'bg-green-100 text-green-800',\n CANCELLED: 'bg-red-100 text-red-800',\n ROLLED_BACK: 'bg-red-100 text-red-800',\n};\n\nexport function ProductsReleasesPagePage() {\n const { workspaceId } = usePlanMagnet();\n const [activeTab, setActiveTab] = 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>>(LIST_RELEASES, {\n variables: {\n workspaceId,\n filter: activeTab !== 'all' ? { status: activeTab } : undefined,\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load releases: {error.message}</div>;\n }\n\n const releases: ReleaseNode[] = data?.planmagnetReleases?.items ?? [];\n const totalCount = data?.planmagnetReleases?.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\">Releases</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} releases across all products</p>\n </div>\n <Button size=\"sm\">\n <GitBranch className=\"mr-1 h-4 w-4\" />\n New Release\n </Button>\n </div>\n\n <div className=\"flex gap-1 border-b pb-1\">\n {statusTabs.map((tab) => (\n <button\n key={tab}\n onClick={() => setActiveTab(tab)}\n className={`px-3 py-1.5 text-sm rounded-md capitalize ${activeTab === tab ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n >\n {tab === 'all' ? 'All' : tab.toLowerCase().replace('_', ' ')}\n </button>\n ))}\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {releases.map((release) => (\n <Card
|
|
1
|
+
{"version":3,"file":"ProductsReleasesPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsReleasesPagePage.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, Button } from '@burdenoff/fe-libs/ui';\nimport { GitBranch, Calendar, Package, Loader2 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\n\nconst LIST_RELEASES = gql`\n query ListReleases(\n $workspaceId: ID!\n $filter: PlanmagnetReleaseFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetReleases(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n workspaceId\n projectId\n name\n description\n version\n status\n plannedDate\n releasedAt\n releaseNotes\n ownerId\n tags\n createdAt\n updatedAt\n }\n totalCount\n }\n }\n`;\n\ninterface ReleaseNode {\n id: string;\n name: string;\n description: string | null;\n version: string;\n status: string;\n plannedDate: string | null;\n releasedAt: string | null;\n releaseNotes: string | null;\n ownerId: string;\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\nconst statusTabs = [\n 'all',\n 'DRAFT',\n 'PLANNING',\n 'IN_PROGRESS',\n 'READY',\n 'RELEASED',\n 'CANCELLED',\n] as const;\nconst statusColor: Record<string, string> = {\n DRAFT: 'bg-gray-100 text-gray-800',\n PLANNING: 'bg-yellow-100 text-yellow-800',\n IN_PROGRESS: 'bg-blue-100 text-blue-800',\n READY: 'bg-orange-100 text-orange-800',\n RELEASED: 'bg-green-100 text-green-800',\n CANCELLED: 'bg-red-100 text-red-800',\n ROLLED_BACK: 'bg-red-100 text-red-800',\n};\n\nexport function ProductsReleasesPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [activeTab, setActiveTab] = 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>>(LIST_RELEASES, {\n variables: {\n workspaceId,\n filter: activeTab !== 'all' ? { status: activeTab } : undefined,\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load releases: {error.message}</div>;\n }\n\n const releases: ReleaseNode[] = data?.planmagnetReleases?.items ?? [];\n const totalCount = data?.planmagnetReleases?.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\">Releases</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} releases across all products</p>\n </div>\n <Button size=\"sm\">\n <GitBranch className=\"mr-1 h-4 w-4\" />\n New Release\n </Button>\n </div>\n\n <div className=\"flex gap-1 border-b pb-1\">\n {statusTabs.map((tab) => (\n <button\n key={tab}\n onClick={() => setActiveTab(tab)}\n className={`px-3 py-1.5 text-sm rounded-md capitalize ${activeTab === tab ? 'bg-primary text-primary-foreground' : 'text-muted-foreground hover:bg-muted'}`}\n >\n {tab === 'all' ? 'All' : tab.toLowerCase().replace('_', ' ')}\n </button>\n ))}\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {releases.map((release) => (\n <Card\n key={release.id}\n {...rowLinkProps(\n () => navigate(detailPath('/products/release-detail-page', release.id)),\n release.name\n )}\n >\n <CardHeader className=\"pb-2\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-lg font-semibold\">{release.version}</span>\n </div>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[release.status] ?? 'bg-gray-100'}`}\n >\n {release.status.toLowerCase().replace('_', ' ')}\n </span>\n </div>\n <CardTitle className=\"text-sm font-medium\">{release.name}</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n {release.description ?? 'No description'}\n </p>\n\n <div className=\"flex items-center gap-4 text-sm\">\n <div className=\"flex items-center gap-1 text-muted-foreground\">\n <Package className=\"h-3.5 w-3.5\" />\n Owner: {release.ownerId}\n </div>\n <div className=\"flex items-center gap-1 text-muted-foreground\">\n <Calendar className=\"h-3.5 w-3.5\" />\n {release.plannedDate\n ? new Date(release.plannedDate).toLocaleDateString()\n : 'No date'}\n </div>\n </div>\n\n {release.tags.length > 0 && (\n <div className=\"flex gap-1 flex-wrap\">\n {release.tags.map((tag) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </div>\n )}\n\n {release.releaseNotes && (\n <div className=\"border-t pt-2\">\n <p className=\"text-xs font-medium text-muted-foreground mb-1\">\n Release Notes Preview\n </p>\n <p className=\"text-xs text-muted-foreground line-clamp-3\">\n {release.releaseNotes}\n </p>\n </div>\n )}\n </CardContent>\n </Card>\n ))}\n </div>\n {releases.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">No releases match this filter.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAUA,IAAM,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CnB,IAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACK,IAAsC;CAC1C,OAAO;CACP,UAAU;CACV,aAAa;CACb,OAAO;CACP,UAAU;CACV,WAAW;CACX,aAAa;CACd;AAED,SAAgB,IAA2B;CACzC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAW,KAAgB,EAAiB,MAAM,EAEnD,EACJ,SACA,YACA,aAGA,EAA8B,GAAe;EAC3C,WAAW;GACT;GACA,QAAQ,MAAc,QAAgC,KAA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":3,"file":"ProductsRoadmapsPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProductsRoadmapsPagePage.tsx"],"names":[],"mappings":"AAmEA,wBAAgB,wBAAwB,4CAwKvC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
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 {
|
|
2
|
+
import { detailPath as n, rowLinkProps as r } from "../utils/rowNavigation.js";
|
|
3
|
+
import { useState as i } from "react";
|
|
4
|
+
import { Calendar as a, Filter as o, Loader2 as s, Map as c, Plus as l } from "lucide-react";
|
|
5
|
+
import { gql as u } from "@apollo/client";
|
|
6
|
+
import { useQuery as d } from "@apollo/client/react";
|
|
7
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
8
|
+
import { Badge as m, Button as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y } from "@burdenoff/fe-libs/ui";
|
|
8
9
|
//#region src/planmagnet/pages/ProductsRoadmapsPagePage.tsx
|
|
9
|
-
var
|
|
10
|
+
var b = u`
|
|
10
11
|
query ListRoadmapsPage(
|
|
11
12
|
$workspaceId: ID!
|
|
12
13
|
$filter: PlanmagnetRoadmapFilter
|
|
@@ -34,158 +35,161 @@ var v = c`
|
|
|
34
35
|
totalCount
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
|
-
`,
|
|
38
|
+
`, x = {
|
|
38
39
|
TIMELINE: "bg-purple-100 text-purple-800",
|
|
39
40
|
GANTT: "bg-orange-100 text-orange-800",
|
|
40
41
|
SWIMLANE: "bg-green-100 text-green-800",
|
|
41
42
|
CUSTOM: "bg-blue-100 text-blue-800"
|
|
42
43
|
};
|
|
43
|
-
function
|
|
44
|
-
let
|
|
44
|
+
function S() {
|
|
45
|
+
let u = t(), { workspaceId: S } = e(), [C, w] = i("all"), [T, E] = i("all"), { data: D, loading: O, error: k } = d(b, {
|
|
45
46
|
variables: {
|
|
46
|
-
workspaceId:
|
|
47
|
+
workspaceId: S,
|
|
47
48
|
pagination: { first: 50 }
|
|
48
49
|
},
|
|
49
|
-
skip: !
|
|
50
|
+
skip: !S
|
|
50
51
|
});
|
|
51
|
-
if (
|
|
52
|
+
if (O) return /* @__PURE__ */ f("div", {
|
|
52
53
|
className: "flex items-center justify-center p-12",
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ f(s, { className: "h-8 w-8 animate-spin text-muted-foreground" })
|
|
54
55
|
});
|
|
55
|
-
if (
|
|
56
|
+
if (k) return /* @__PURE__ */ p("div", {
|
|
56
57
|
className: "p-6 text-destructive",
|
|
57
|
-
children: ["Failed to load roadmaps: ",
|
|
58
|
+
children: ["Failed to load roadmaps: ", k.message]
|
|
58
59
|
});
|
|
59
|
-
let
|
|
60
|
+
let A = D?.planmagnetRoadmaps?.items ?? [], j = D?.planmagnetRoadmaps?.totalCount ?? 0, M = ["all", ...new Set(A.map((e) => e.type))], N = [
|
|
60
61
|
"all",
|
|
61
62
|
"public",
|
|
62
63
|
"private"
|
|
63
|
-
],
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
], P = A.filter((e) => (C === "all" || e.type === C) && (T === "all" || T === "public" && e.isPublic || T === "private" && !e.isPublic));
|
|
65
|
+
return /* @__PURE__ */ p("div", {
|
|
65
66
|
className: "space-y-6 p-6",
|
|
66
67
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
+
/* @__PURE__ */ p("div", {
|
|
68
69
|
className: "flex items-center justify-between",
|
|
69
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
|
|
70
71
|
className: "text-2xl font-semibold",
|
|
71
72
|
children: "Roadmaps"
|
|
72
|
-
}), /* @__PURE__ */
|
|
73
|
+
}), /* @__PURE__ */ p("p", {
|
|
73
74
|
className: "text-sm text-muted-foreground",
|
|
74
|
-
children: [
|
|
75
|
-
})] }), /* @__PURE__ */
|
|
75
|
+
children: [j, " roadmaps across all products"]
|
|
76
|
+
})] }), /* @__PURE__ */ p(h, {
|
|
76
77
|
size: "sm",
|
|
77
|
-
onClick: () =>
|
|
78
|
-
children: [/* @__PURE__ */
|
|
78
|
+
onClick: () => u("/products/create-roadmap-page"),
|
|
79
|
+
children: [/* @__PURE__ */ f(l, { className: "mr-1 h-4 w-4" }), "New Roadmap"]
|
|
79
80
|
})]
|
|
80
81
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ p("div", {
|
|
82
83
|
className: "flex gap-4 flex-wrap",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ p("div", {
|
|
84
85
|
className: "flex items-center gap-2",
|
|
85
86
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ f(o, { className: "h-4 w-4 text-muted-foreground" }),
|
|
88
|
+
/* @__PURE__ */ f("span", {
|
|
88
89
|
className: "text-sm text-muted-foreground",
|
|
89
90
|
children: "Type:"
|
|
90
91
|
}),
|
|
91
|
-
|
|
92
|
-
onClick: () =>
|
|
93
|
-
className: `px-2 py-1 text-xs rounded-md capitalize ${
|
|
92
|
+
M.map((e) => /* @__PURE__ */ f("button", {
|
|
93
|
+
onClick: () => w(e),
|
|
94
|
+
className: `px-2 py-1 text-xs rounded-md capitalize ${C === e ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
|
|
94
95
|
children: e === "all" ? "All" : e.toLowerCase()
|
|
95
96
|
}, e))
|
|
96
97
|
]
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ p("div", {
|
|
98
99
|
className: "flex items-center gap-2",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
100
|
+
children: [/* @__PURE__ */ f("span", {
|
|
100
101
|
className: "text-sm text-muted-foreground",
|
|
101
102
|
children: "Visibility:"
|
|
102
|
-
}),
|
|
103
|
-
onClick: () =>
|
|
104
|
-
className: `px-2 py-1 text-xs rounded-md capitalize ${
|
|
103
|
+
}), N.map((e) => /* @__PURE__ */ f("button", {
|
|
104
|
+
onClick: () => E(e),
|
|
105
|
+
className: `px-2 py-1 text-xs rounded-md capitalize ${T === e ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
|
|
105
106
|
children: e
|
|
106
107
|
}, e))]
|
|
107
108
|
})]
|
|
108
109
|
}),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ f("div", {
|
|
110
111
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
111
|
-
children:
|
|
112
|
-
let t = e.items?.length ?? 0,
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
className: "
|
|
117
|
-
children:
|
|
118
|
-
className: "
|
|
119
|
-
children:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
})
|
|
126
|
-
}), /* @__PURE__ */ d(h, {
|
|
127
|
-
className: "space-y-3",
|
|
128
|
-
children: [
|
|
129
|
-
/* @__PURE__ */ u("p", {
|
|
130
|
-
className: "text-sm text-muted-foreground",
|
|
131
|
-
children: e.description ?? "No description"
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ d("div", {
|
|
134
|
-
className: "flex items-center gap-2",
|
|
135
|
-
children: [/* @__PURE__ */ u("span", {
|
|
136
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${y[e.type] ?? "bg-gray-100"}`,
|
|
137
|
-
children: e.type.toLowerCase()
|
|
138
|
-
}), /* @__PURE__ */ u(f, {
|
|
139
|
-
variant: "outline",
|
|
140
|
-
className: "text-xs capitalize",
|
|
112
|
+
children: P.map((e) => {
|
|
113
|
+
let t = e.items?.length ?? 0, i = e.items?.filter((e) => e.status === "COMPLETED" || e.status === "DONE").length ?? 0, o = t > 0 ? Math.round(i / t * 100) : 0, s = e.items?.map((e) => e.startDate).filter(Boolean) ?? [], l = e.items?.map((e) => e.endDate).filter(Boolean) ?? [], d = s.length > 0 ? s.sort()[0] : null, h = l.length > 0 ? l.sort().reverse()[0] : null;
|
|
114
|
+
return /* @__PURE__ */ p(g, {
|
|
115
|
+
...r(() => u(n("/products/roadmap-detail-page", e.id)), e.name),
|
|
116
|
+
children: [/* @__PURE__ */ f(v, {
|
|
117
|
+
className: "pb-2",
|
|
118
|
+
children: /* @__PURE__ */ p("div", {
|
|
119
|
+
className: "flex items-center justify-between",
|
|
120
|
+
children: [/* @__PURE__ */ f(y, {
|
|
121
|
+
className: "text-base",
|
|
122
|
+
children: e.name
|
|
123
|
+
}), /* @__PURE__ */ f(m, {
|
|
124
|
+
variant: e.isPublic ? "default" : "secondary",
|
|
125
|
+
className: "capitalize",
|
|
141
126
|
children: e.isPublic ? "public" : "private"
|
|
142
127
|
})]
|
|
143
|
-
}),
|
|
144
|
-
/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ d("div", {
|
|
145
|
-
className: "flex justify-between text-xs mb-1",
|
|
146
|
-
children: [/* @__PURE__ */ u("span", {
|
|
147
|
-
className: "text-muted-foreground",
|
|
148
|
-
children: "Progress"
|
|
149
|
-
}), /* @__PURE__ */ d("span", {
|
|
150
|
-
className: "font-medium",
|
|
151
|
-
children: [i, "%"]
|
|
152
|
-
})]
|
|
153
|
-
}), /* @__PURE__ */ u("div", {
|
|
154
|
-
className: "w-full h-2 rounded-full bg-muted overflow-hidden",
|
|
155
|
-
children: /* @__PURE__ */ u("div", {
|
|
156
|
-
className: "h-full bg-primary rounded-full",
|
|
157
|
-
style: { width: `${i}%` }
|
|
158
|
-
})
|
|
159
|
-
})] }),
|
|
160
|
-
/* @__PURE__ */ u("div", {
|
|
161
|
-
className: "flex gap-4 text-xs text-muted-foreground",
|
|
162
|
-
children: /* @__PURE__ */ d("span", {
|
|
163
|
-
className: "flex items-center gap-1",
|
|
164
|
-
children: [
|
|
165
|
-
/* @__PURE__ */ u(o, { className: "h-3 w-3" }),
|
|
166
|
-
t,
|
|
167
|
-
" items"
|
|
168
|
-
]
|
|
169
|
-
})
|
|
170
|
-
}),
|
|
171
|
-
/* @__PURE__ */ d("div", {
|
|
172
|
-
className: "flex items-center justify-between text-xs text-muted-foreground border-t pt-2",
|
|
173
|
-
children: [/* @__PURE__ */ d("span", { children: ["Owner: ", e.ownerId] }), c && l && /* @__PURE__ */ d("span", {
|
|
174
|
-
className: "flex items-center gap-1",
|
|
175
|
-
children: [
|
|
176
|
-
/* @__PURE__ */ u(r, { className: "h-3 w-3" }),
|
|
177
|
-
new Date(c).toLocaleDateString(),
|
|
178
|
-
" -",
|
|
179
|
-
" ",
|
|
180
|
-
new Date(l).toLocaleDateString()
|
|
181
|
-
]
|
|
182
|
-
})]
|
|
183
128
|
})
|
|
184
|
-
|
|
185
|
-
|
|
129
|
+
}), /* @__PURE__ */ p(_, {
|
|
130
|
+
className: "space-y-3",
|
|
131
|
+
children: [
|
|
132
|
+
/* @__PURE__ */ f("p", {
|
|
133
|
+
className: "text-sm text-muted-foreground",
|
|
134
|
+
children: e.description ?? "No description"
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ p("div", {
|
|
137
|
+
className: "flex items-center gap-2",
|
|
138
|
+
children: [/* @__PURE__ */ f("span", {
|
|
139
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${x[e.type] ?? "bg-gray-100"}`,
|
|
140
|
+
children: e.type.toLowerCase()
|
|
141
|
+
}), /* @__PURE__ */ f(m, {
|
|
142
|
+
variant: "outline",
|
|
143
|
+
className: "text-xs capitalize",
|
|
144
|
+
children: e.isPublic ? "public" : "private"
|
|
145
|
+
})]
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("div", {
|
|
148
|
+
className: "flex justify-between text-xs mb-1",
|
|
149
|
+
children: [/* @__PURE__ */ f("span", {
|
|
150
|
+
className: "text-muted-foreground",
|
|
151
|
+
children: "Progress"
|
|
152
|
+
}), /* @__PURE__ */ p("span", {
|
|
153
|
+
className: "font-medium",
|
|
154
|
+
children: [o, "%"]
|
|
155
|
+
})]
|
|
156
|
+
}), /* @__PURE__ */ f("div", {
|
|
157
|
+
className: "w-full h-2 rounded-full bg-muted overflow-hidden",
|
|
158
|
+
children: /* @__PURE__ */ f("div", {
|
|
159
|
+
className: "h-full bg-primary rounded-full",
|
|
160
|
+
style: { width: `${o}%` }
|
|
161
|
+
})
|
|
162
|
+
})] }),
|
|
163
|
+
/* @__PURE__ */ f("div", {
|
|
164
|
+
className: "flex gap-4 text-xs text-muted-foreground",
|
|
165
|
+
children: /* @__PURE__ */ p("span", {
|
|
166
|
+
className: "flex items-center gap-1",
|
|
167
|
+
children: [
|
|
168
|
+
/* @__PURE__ */ f(c, { className: "h-3 w-3" }),
|
|
169
|
+
t,
|
|
170
|
+
" items"
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ p("div", {
|
|
175
|
+
className: "flex items-center justify-between text-xs text-muted-foreground border-t pt-2",
|
|
176
|
+
children: [/* @__PURE__ */ p("span", { children: ["Owner: ", e.ownerId] }), d && h && /* @__PURE__ */ p("span", {
|
|
177
|
+
className: "flex items-center gap-1",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ f(a, { className: "h-3 w-3" }),
|
|
180
|
+
new Date(d).toLocaleDateString(),
|
|
181
|
+
" -",
|
|
182
|
+
" ",
|
|
183
|
+
new Date(h).toLocaleDateString()
|
|
184
|
+
]
|
|
185
|
+
})]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
})]
|
|
189
|
+
}, e.id);
|
|
186
190
|
})
|
|
187
191
|
}),
|
|
188
|
-
|
|
192
|
+
P.length === 0 && /* @__PURE__ */ f("p", {
|
|
189
193
|
className: "text-center text-muted-foreground py-8",
|
|
190
194
|
children: "No roadmaps match the selected filters."
|
|
191
195
|
})
|
|
@@ -193,6 +197,6 @@ function b() {
|
|
|
193
197
|
});
|
|
194
198
|
}
|
|
195
199
|
//#endregion
|
|
196
|
-
export {
|
|
200
|
+
export { S as ProductsRoadmapsPagePage };
|
|
197
201
|
|
|
198
202
|
//# sourceMappingURL=ProductsRoadmapsPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsRoadmapsPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsRoadmapsPagePage.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, Button } from '@burdenoff/fe-libs/ui';\nimport { Map, Calendar, Plus, Filter, Loader2 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst LIST_ROADMAPS = gql`\n query ListRoadmapsPage(\n $workspaceId: ID!\n $filter: PlanmagnetRoadmapFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetRoadmaps(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n type\n isPublic\n ownerId\n createdAt\n updatedAt\n items {\n id\n title\n status\n startDate\n endDate\n }\n }\n totalCount\n }\n }\n`;\n\ninterface RoadmapItemNode {\n id: string;\n title: string;\n status: string;\n startDate: string | null;\n endDate: string | null;\n}\n\ninterface RoadmapNode {\n id: string;\n name: string;\n description: string | null;\n type: string;\n isPublic: boolean;\n ownerId: string;\n createdAt: string;\n updatedAt: string;\n items: RoadmapItemNode[];\n}\n\nconst typeColor: Record<string, string> = {\n TIMELINE: 'bg-purple-100 text-purple-800',\n GANTT: 'bg-orange-100 text-orange-800',\n SWIMLANE: 'bg-green-100 text-green-800',\n CUSTOM: 'bg-blue-100 text-blue-800',\n};\n\nexport function ProductsRoadmapsPagePage() {\n const navigate = usePlanMagnetNavigate();\n const { workspaceId } = usePlanMagnet();\n const [typeFilter, setTypeFilter] = useState<string>('all');\n const [visFilter, setVisFilter] = 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>>(LIST_ROADMAPS, {\n variables: {\n workspaceId,\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load roadmaps: {error.message}</div>;\n }\n\n const roadmaps: RoadmapNode[] = data?.planmagnetRoadmaps?.items ?? [];\n const totalCount = data?.planmagnetRoadmaps?.totalCount ?? 0;\n\n const types = ['all', ...new Set(roadmaps.map((r) => r.type))];\n const visibilities = ['all', 'public', 'private'];\n\n const filtered = roadmaps.filter(\n (r) =>\n (typeFilter === 'all' || r.type === typeFilter) &&\n (visFilter === 'all' ||\n (visFilter === 'public' && r.isPublic) ||\n (visFilter === 'private' && !r.isPublic))\n );\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\">Roadmaps</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} roadmaps across all products</p>\n </div>\n <Button size=\"sm\" onClick={() => navigate('/products/create-roadmap-page')}>\n <Plus className=\"mr-1 h-4 w-4\" />\n New Roadmap\n </Button>\n </div>\n\n <div className=\"flex gap-4 flex-wrap\">\n <div className=\"flex items-center gap-2\">\n <Filter className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-sm text-muted-foreground\">Type:</span>\n {types.map((t) => (\n <button\n key={t}\n onClick={() => setTypeFilter(t)}\n className={`px-2 py-1 text-xs rounded-md capitalize ${typeFilter === t ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'}`}\n >\n {t === 'all' ? 'All' : t.toLowerCase()}\n </button>\n ))}\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm text-muted-foreground\">Visibility:</span>\n {visibilities.map((v) => (\n <button\n key={v}\n onClick={() => setVisFilter(v)}\n className={`px-2 py-1 text-xs rounded-md capitalize ${visFilter === v ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'}`}\n >\n {v}\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {filtered.map((rm) => {\n const itemCount = rm.items?.length ?? 0;\n const completedItems =\n rm.items?.filter((i) => i.status === 'COMPLETED' || i.status === 'DONE').length ?? 0;\n const progress = itemCount > 0 ? Math.round((completedItems / itemCount) * 100) : 0;\n const startDates = rm.items?.map((i) => i.startDate).filter(Boolean) ?? [];\n const endDates = rm.items?.map((i) => i.endDate).filter(Boolean) ?? [];\n const earliestStart = startDates.length > 0 ? startDates.sort()[0] : null;\n const latestEnd = endDates.length > 0 ? endDates.sort().reverse()[0] : null;\n\n return (\n <Card key={rm.id}>\n <CardHeader className=\"pb-2\">\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base\">{rm.name}</CardTitle>\n <Badge variant={rm.isPublic ? 'default' : 'secondary'} className=\"capitalize\">\n {rm.isPublic ? 'public' : 'private'}\n </Badge>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n {rm.description ?? 'No description'}\n </p>\n <div className=\"flex items-center gap-2\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${typeColor[rm.type] ?? 'bg-gray-100'}`}\n >\n {rm.type.toLowerCase()}\n </span>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {rm.isPublic ? 'public' : 'private'}\n </Badge>\n </div>\n <div>\n <div className=\"flex justify-between text-xs mb-1\">\n <span className=\"text-muted-foreground\">Progress</span>\n <span className=\"font-medium\">{progress}%</span>\n </div>\n <div className=\"w-full h-2 rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full bg-primary rounded-full\"\n style={{ width: `${progress}%` }}\n />\n </div>\n </div>\n <div className=\"flex gap-4 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Map className=\"h-3 w-3\" />\n {itemCount} items\n </span>\n </div>\n <div className=\"flex items-center justify-between text-xs text-muted-foreground border-t pt-2\">\n <span>Owner: {rm.ownerId}</span>\n {earliestStart && latestEnd && (\n <span className=\"flex items-center gap-1\">\n <Calendar className=\"h-3 w-3\" />\n {new Date(earliestStart).toLocaleDateString()} -{' '}\n {new Date(latestEnd).toLocaleDateString()}\n </span>\n )}\n </div>\n </CardContent>\n </Card>\n );\n })}\n </div>\n {filtered.length === 0 && (\n <p className=\"text-center text-muted-foreground py-8\">\n No roadmaps match the selected filters.\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDnB,IAAoC;CACxC,UAAU;CACV,OAAO;CACP,UAAU;CACV,QAAQ;CACT;AAED,SAAgB,IAA2B;CACzC,IAAM,IAAW,GAAuB,EAClC,EAAE,mBAAgB,GAAe,EACjC,CAAC,GAAY,KAAiB,EAAiB,MAAM,EACrD,CAAC,GAAW,KAAgB,EAAiB,MAAM,EAEnD,EACJ,SACA,YACA,aAGA,EAA8B,GAAe;EAC3C,WAAW;GACT;GACA,YAAY,EAAE,OAAO,IAAI;GAC1B;EACD,MAAM,CAAC;EACR,CAAC;AAEJ,KAAI,EACF,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,8CAA+C,CAAA;EAC9D,CAAA;AAIV,KAAI,EACF,QAAO,kBAAC,OAAD;EAAK,WAAU;YAAf,CAAsC,6BAA0B,EAA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f,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAwB;SAAe,CAAA,EACvD,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAA+B,GAAS,IAAQ;WAC5C;WACN,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,OAAD;SACE,WAAU;SACV,OAAO,EAAE,OAAO,GAAG,EAAS,IAAI;SAChC,CAAA;QACE,CAAA,CACF,EAAA,CAAA;OACN,kBAAC,OAAD;QAAK,WAAU;kBACb,kBAAC,QAAD;SAAM,WAAU;mBAAhB;UACE,kBAAC,GAAD,EAAK,WAAU,WAAY,CAAA;UAC1B;UAAU;UACN;;QACH,CAAA;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,QAAD,EAAA,UAAA,CAAM,WAAQ,EAAG,QAAe,EAAA,CAAA,EAC/B,KAAiB,KAChB,kBAAC,QAAD;SAAM,WAAU;mBAAhB;UACE,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA;UAC/B,IAAI,KAAK,EAAc,CAAC,oBAAoB;UAAC;UAAG;UAChD,IAAI,KAAK,EAAU,CAAC,oBAAoB;UACpC;WAEL;;OACM;QACT,EAAA,EApDI,EAAG,GAoDP;MAET;IACE,CAAA;GACL,EAAS,WAAW,KACnB,kBAAC,KAAD;IAAG,WAAU;cAAyC;IAElD,CAAA;GAEF"}
|
|
1
|
+
{"version":3,"file":"ProductsRoadmapsPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsRoadmapsPagePage.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, Button } from '@burdenoff/fe-libs/ui';\nimport { Map, Calendar, Plus, Filter, Loader2 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\nimport { rowLinkProps, detailPath } from '../utils/rowNavigation';\n\nconst LIST_ROADMAPS = gql`\n query ListRoadmapsPage(\n $workspaceId: ID!\n $filter: PlanmagnetRoadmapFilter\n $pagination: PlanmagnetPaginationInput\n ) {\n planmagnetRoadmaps(workspaceId: $workspaceId, filter: $filter, pagination: $pagination) {\n items {\n id\n workspaceId\n name\n description\n type\n isPublic\n ownerId\n createdAt\n updatedAt\n items {\n id\n title\n status\n startDate\n endDate\n }\n }\n totalCount\n }\n }\n`;\n\ninterface RoadmapItemNode {\n id: string;\n title: string;\n status: string;\n startDate: string | null;\n endDate: string | null;\n}\n\ninterface RoadmapNode {\n id: string;\n name: string;\n description: string | null;\n type: string;\n isPublic: boolean;\n ownerId: string;\n createdAt: string;\n updatedAt: string;\n items: RoadmapItemNode[];\n}\n\nconst typeColor: Record<string, string> = {\n TIMELINE: 'bg-purple-100 text-purple-800',\n GANTT: 'bg-orange-100 text-orange-800',\n SWIMLANE: 'bg-green-100 text-green-800',\n CUSTOM: 'bg-blue-100 text-blue-800',\n};\n\nexport function ProductsRoadmapsPagePage() {\n const navigate = usePlanMagnetNavigate();\n const { workspaceId } = usePlanMagnet();\n const [typeFilter, setTypeFilter] = useState<string>('all');\n const [visFilter, setVisFilter] = 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>>(LIST_ROADMAPS, {\n variables: {\n workspaceId,\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-destructive\">Failed to load roadmaps: {error.message}</div>;\n }\n\n const roadmaps: RoadmapNode[] = data?.planmagnetRoadmaps?.items ?? [];\n const totalCount = data?.planmagnetRoadmaps?.totalCount ?? 0;\n\n const types = ['all', ...new Set(roadmaps.map((r) => r.type))];\n const visibilities = ['all', 'public', 'private'];\n\n const filtered = roadmaps.filter(\n (r) =>\n (typeFilter === 'all' || r.type === typeFilter) &&\n (visFilter === 'all' ||\n (visFilter === 'public' && r.isPublic) ||\n (visFilter === 'private' && !r.isPublic))\n );\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\">Roadmaps</h1>\n <p className=\"text-sm text-muted-foreground\">{totalCount} roadmaps across all products</p>\n </div>\n <Button size=\"sm\" onClick={() => navigate('/products/create-roadmap-page')}>\n <Plus className=\"mr-1 h-4 w-4\" />\n New Roadmap\n </Button>\n </div>\n\n <div className=\"flex gap-4 flex-wrap\">\n <div className=\"flex items-center gap-2\">\n <Filter className=\"h-4 w-4 text-muted-foreground\" />\n <span className=\"text-sm text-muted-foreground\">Type:</span>\n {types.map((t) => (\n <button\n key={t}\n onClick={() => setTypeFilter(t)}\n className={`px-2 py-1 text-xs rounded-md capitalize ${typeFilter === t ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'}`}\n >\n {t === 'all' ? 'All' : t.toLowerCase()}\n </button>\n ))}\n </div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm text-muted-foreground\">Visibility:</span>\n {visibilities.map((v) => (\n <button\n key={v}\n onClick={() => setVisFilter(v)}\n className={`px-2 py-1 text-xs rounded-md capitalize ${visFilter === v ? 'bg-primary text-primary-foreground' : 'bg-muted text-muted-foreground'}`}\n >\n {v}\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n {filtered.map((rm) => {\n const itemCount = rm.items?.length ?? 0;\n const completedItems =\n rm.items?.filter((i) => i.status === 'COMPLETED' || i.status === 'DONE').length ?? 0;\n const progress = itemCount > 0 ? Math.round((completedItems / itemCount) * 100) : 0;\n const startDates = rm.items?.map((i) => i.startDate).filter(Boolean) ?? [];\n const endDates = rm.items?.map((i) => i.endDate).filter(Boolean) ?? [];\n const earliestStart = startDates.length > 0 ? startDates.sort()[0] : null;\n const latestEnd = endDates.length > 0 ? endDates.sort().reverse()[0] : null;\n\n return (\n <Card\n key={rm.id}\n {...rowLinkProps(\n () => navigate(detailPath('/products/roadmap-detail-page', rm.id)),\n rm.name\n )}\n >\n <CardHeader className=\"pb-2\">\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base\">{rm.name}</CardTitle>\n <Badge variant={rm.isPublic ? 'default' : 'secondary'} className=\"capitalize\">\n {rm.isPublic ? 'public' : 'private'}\n </Badge>\n </div>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n <p className=\"text-sm text-muted-foreground\">\n {rm.description ?? 'No description'}\n </p>\n <div className=\"flex items-center gap-2\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${typeColor[rm.type] ?? 'bg-gray-100'}`}\n >\n {rm.type.toLowerCase()}\n </span>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {rm.isPublic ? 'public' : 'private'}\n </Badge>\n </div>\n <div>\n <div className=\"flex justify-between text-xs mb-1\">\n <span className=\"text-muted-foreground\">Progress</span>\n <span className=\"font-medium\">{progress}%</span>\n </div>\n <div className=\"w-full h-2 rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full bg-primary rounded-full\"\n style={{ width: `${progress}%` }}\n />\n </div>\n </div>\n <div className=\"flex gap-4 text-xs text-muted-foreground\">\n <span className=\"flex items-center gap-1\">\n <Map className=\"h-3 w-3\" />\n {itemCount} items\n </span>\n </div>\n <div className=\"flex items-center justify-between text-xs text-muted-foreground border-t pt-2\">\n <span>Owner: {rm.ownerId}</span>\n {earliestStart && latestEnd && (\n <span className=\"flex items-center gap-1\">\n <Calendar className=\"h-3 w-3\" />\n {new Date(earliestStart).toLocaleDateString()} -{' '}\n {new Date(latestEnd).toLocaleDateString()}\n </span>\n )}\n </div>\n </CardContent>\n </Card>\n );\n })}\n </div>\n {filtered.length === 0 && (\n <p className=\"text-center text-muted-fo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AAiB,KAChB,kBAAC,QAAD;UAAM,WAAU;oBAAhB;WACE,kBAAC,GAAD,EAAU,WAAU,WAAY,CAAA;WAC/B,IAAI,KAAK,EAAc,CAAC,oBAAoB;WAAC;WAAG;WAChD,IAAI,KAAK,EAAU,CAAC,oBAAoB;WACpC;YAEL;;QACM;SACT;QAzDA,EAAG,GAyDH;MAET;IACE,CAAA;GACL,EAAS,WAAW,KACnB,kBAAC,KAAD;IAAG,WAAU;cAAyC;IAElD,CAAA;GAEF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectsActiveProjectsPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsActiveProjectsPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectsActiveProjectsPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ProjectsActiveProjectsPagePage.tsx"],"names":[],"mappings":"AA2CA,wBAAgB,8BAA8B,4CA8F7C"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
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 { Users as i } from "lucide-react";
|
|
4
|
+
import { gql as a } from "@apollo/client";
|
|
5
|
+
import { useQuery as o } from "@apollo/client/react";
|
|
6
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
7
|
+
import { Badge as l, Card as u, CardContent as d, CardHeader as f, CardTitle as p } from "@burdenoff/fe-libs/ui";
|
|
7
8
|
//#region src/planmagnet/pages/ProjectsActiveProjectsPagePage.tsx
|
|
8
|
-
var
|
|
9
|
+
var m = a`
|
|
9
10
|
query GetActiveProjects($workspaceId: ID!) {
|
|
10
11
|
planmagnetProjects(
|
|
11
12
|
workspaceId: $workspaceId
|
|
@@ -29,81 +30,84 @@ var d = n`
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
`;
|
|
32
|
-
function
|
|
33
|
-
let { workspaceId:
|
|
34
|
-
if (
|
|
33
|
+
function h() {
|
|
34
|
+
let { workspaceId: a } = e(), h = t(), { data: g, loading: _, error: v } = o(m, { variables: { workspaceId: a ?? "default" } });
|
|
35
|
+
if (_) return /* @__PURE__ */ s("div", {
|
|
35
36
|
className: "flex items-center justify-center p-12",
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ s("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
37
38
|
});
|
|
38
|
-
if (
|
|
39
|
+
if (v) return /* @__PURE__ */ c("div", {
|
|
39
40
|
className: "p-6 text-red-500",
|
|
40
|
-
children: ["Error loading active projects: ",
|
|
41
|
+
children: ["Error loading active projects: ", v.message]
|
|
41
42
|
});
|
|
42
|
-
let
|
|
43
|
-
return /* @__PURE__ */
|
|
43
|
+
let y = g?.planmagnetProjects?.items ?? [];
|
|
44
|
+
return /* @__PURE__ */ c("div", {
|
|
44
45
|
className: "space-y-6 p-6",
|
|
45
46
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ c("div", { children: [/* @__PURE__ */ s("h1", {
|
|
47
48
|
className: "text-2xl font-semibold",
|
|
48
49
|
children: "Active Projects"
|
|
49
|
-
}), /* @__PURE__ */
|
|
50
|
+
}), /* @__PURE__ */ c("p", {
|
|
50
51
|
className: "text-sm text-muted-foreground",
|
|
51
|
-
children: [
|
|
52
|
+
children: [y.length, " active projects in progress"]
|
|
52
53
|
})] }),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ s("div", {
|
|
54
55
|
className: "grid grid-cols-1 md:grid-cols-2 gap-4",
|
|
55
|
-
children:
|
|
56
|
-
|
|
57
|
-
children: /* @__PURE__ */
|
|
58
|
-
className: "
|
|
59
|
-
children:
|
|
60
|
-
className: "
|
|
61
|
-
children:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
className: "space-y-3",
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ i("p", {
|
|
71
|
-
className: "text-sm text-muted-foreground",
|
|
72
|
-
children: e.description ?? "No description"
|
|
73
|
-
}),
|
|
74
|
-
/* @__PURE__ */ a("div", {
|
|
75
|
-
className: "flex gap-2",
|
|
76
|
-
children: [/* @__PURE__ */ i(o, {
|
|
77
|
-
variant: "outline",
|
|
78
|
-
className: "capitalize",
|
|
79
|
-
children: e.methodology.toLowerCase()
|
|
80
|
-
}), e.tags.slice(0, 3).map((e) => /* @__PURE__ */ i(o, {
|
|
81
|
-
variant: "outline",
|
|
82
|
-
className: "text-xs",
|
|
83
|
-
children: e
|
|
84
|
-
}, e))]
|
|
85
|
-
}),
|
|
86
|
-
/* @__PURE__ */ i("div", {
|
|
87
|
-
className: "flex gap-4 text-xs text-muted-foreground",
|
|
88
|
-
children: /* @__PURE__ */ a("span", { children: [
|
|
89
|
-
e.startDate ? new Date(e.startDate).toLocaleDateString() : "—",
|
|
90
|
-
" -",
|
|
91
|
-
" ",
|
|
92
|
-
e.endDate ? new Date(e.endDate).toLocaleDateString() : "—"
|
|
93
|
-
] })
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ a("div", {
|
|
96
|
-
className: "text-xs text-muted-foreground border-t pt-2 flex items-center gap-1",
|
|
97
|
-
children: [
|
|
98
|
-
/* @__PURE__ */ i(t, { className: "h-3 w-3" }),
|
|
99
|
-
"Owner: ",
|
|
100
|
-
e.ownerId
|
|
101
|
-
]
|
|
56
|
+
children: y.map((e) => /* @__PURE__ */ c(u, {
|
|
57
|
+
...r(() => h(n("/projects/project-detail-page", e.id)), e.name),
|
|
58
|
+
children: [/* @__PURE__ */ s(f, {
|
|
59
|
+
className: "pb-2",
|
|
60
|
+
children: /* @__PURE__ */ c("div", {
|
|
61
|
+
className: "flex items-center justify-between",
|
|
62
|
+
children: [/* @__PURE__ */ s(p, {
|
|
63
|
+
className: "text-base",
|
|
64
|
+
children: e.name
|
|
65
|
+
}), /* @__PURE__ */ s("span", {
|
|
66
|
+
className: "text-xs font-mono text-muted-foreground",
|
|
67
|
+
children: e.key
|
|
68
|
+
})]
|
|
102
69
|
})
|
|
103
|
-
|
|
104
|
-
|
|
70
|
+
}), /* @__PURE__ */ c(d, {
|
|
71
|
+
className: "space-y-3",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ s("p", {
|
|
74
|
+
className: "text-sm text-muted-foreground",
|
|
75
|
+
children: e.description ?? "No description"
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ c("div", {
|
|
78
|
+
className: "flex gap-2",
|
|
79
|
+
children: [/* @__PURE__ */ s(l, {
|
|
80
|
+
variant: "outline",
|
|
81
|
+
className: "capitalize",
|
|
82
|
+
children: e.methodology.toLowerCase()
|
|
83
|
+
}), e.tags.slice(0, 3).map((e) => /* @__PURE__ */ s(l, {
|
|
84
|
+
variant: "outline",
|
|
85
|
+
className: "text-xs",
|
|
86
|
+
children: e
|
|
87
|
+
}, e))]
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ s("div", {
|
|
90
|
+
className: "flex gap-4 text-xs text-muted-foreground",
|
|
91
|
+
children: /* @__PURE__ */ c("span", { children: [
|
|
92
|
+
e.startDate ? new Date(e.startDate).toLocaleDateString() : "—",
|
|
93
|
+
" -",
|
|
94
|
+
" ",
|
|
95
|
+
e.endDate ? new Date(e.endDate).toLocaleDateString() : "—"
|
|
96
|
+
] })
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ c("div", {
|
|
99
|
+
className: "text-xs text-muted-foreground border-t pt-2 flex items-center gap-1",
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ s(i, { className: "h-3 w-3" }),
|
|
102
|
+
"Owner: ",
|
|
103
|
+
e.ownerId
|
|
104
|
+
]
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
})]
|
|
108
|
+
}, e.id))
|
|
105
109
|
}),
|
|
106
|
-
|
|
110
|
+
y.length === 0 && /* @__PURE__ */ s("p", {
|
|
107
111
|
className: "text-center text-muted-foreground py-8",
|
|
108
112
|
children: "No active projects."
|
|
109
113
|
})
|
|
@@ -111,6 +115,6 @@ function f() {
|
|
|
111
115
|
});
|
|
112
116
|
}
|
|
113
117
|
//#endregion
|
|
114
|
-
export {
|
|
118
|
+
export { h as ProjectsActiveProjectsPagePage };
|
|
115
119
|
|
|
116
120
|
//# sourceMappingURL=ProjectsActiveProjectsPagePage.js.map
|