@burdenoff/microfe-planmagnet 2026.925.10 → 2026.925.12
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/generated/wspace-types.d.ts +38 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/planmagnet/comments/WorkItemActivity.d.ts +4 -0
- package/dist/planmagnet/comments/WorkItemActivity.d.ts.map +1 -0
- package/dist/planmagnet/comments/WorkItemActivity.js +97 -0
- package/dist/planmagnet/comments/WorkItemActivity.js.map +1 -0
- package/dist/planmagnet/comments/WorkItemComments.d.ts.map +1 -1
- package/dist/planmagnet/comments/WorkItemComments.js +2 -2
- package/dist/planmagnet/comments/WorkItemComments.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +96 -95
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +116 -153
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
- package/dist/planmagnet/releases/ReleaseNotesCard.d.ts +5 -0
- package/dist/planmagnet/releases/ReleaseNotesCard.d.ts.map +1 -0
- package/dist/planmagnet/releases/ReleaseNotesCard.js +101 -0
- package/dist/planmagnet/releases/ReleaseNotesCard.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsReleaseDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsReleaseDetailPagePage.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 { Markdown } from '@burdenoff/fe-libs/shared/components';\nimport { GitBranch, Calendar, Clock, Server, Loader2 } from 'lucide-react';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\nimport { useParams } from 'react-router';\nimport { PersonName } from '../people/People';\n\nconst GET_RELEASE = gql`\n query GetRelease($id: ID!) {\n planmagnetRelease(id: $id) {\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 metadata\n createdAt\n updatedAt\n workItems {\n id\n title\n status\n type\n priority\n }\n }\n }\n`;\n\ninterface WorkItemSummary {\n id: string;\n title: string;\n status: string;\n type: string;\n priority: string;\n}\n\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 ProductsReleaseDetailPagePage() {\n const { workspaceId } = usePlanMagnet();\n const params = useParams<{ id: string }>();\n const releaseId = params.id ?? '';\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_RELEASE, {\n variables: { id: releaseId },\n skip: !releaseId,\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 release: {error.message}</div>;\n }\n\n const release = data?.planmagnetRelease;\n if (!release) return <div className=\"p-6 text-muted-foreground\">Release not found.</div>;\n\n const workItems: WorkItemSummary[] = release.workItems ?? [];\n const featureItems = workItems.filter((w) => w.type === 'STORY' || w.type === 'FEATURE');\n const bugItems = workItems.filter((w) => w.type === 'BUG');\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-2\">\n <GitBranch className=\"h-5 w-5 text-primary\" />\n <h1 className=\"text-2xl font-semibold\">{release.version}</h1>\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 <p className=\"text-sm text-muted-foreground mt-1\">{release.name}</p>\n </div>\n <Badge variant=\"outline\" className=\"capitalize\">\n {release.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n\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 <div className=\"text-sm prose prose-sm dark:prose-invert max-w-none\">\n {release.description ? (\n <Markdown>{release.description}</Markdown>\n ) : (\n <p>No description provided.</p>\n )}\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{featureItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Features</p>\n </div>\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{bugItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Bug Fixes</p>\n </div>\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{workItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Total Items</p>\n </div>\n </div>\n </CardContent>\n </Card>\n\n {release.releaseNotes && (\n <Card>\n <CardHeader>\n <CardTitle>Release Notes</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"text-sm prose prose-sm dark:prose-invert max-w-none\">\n <Markdown>{release.releaseNotes}</Markdown>\n </div>\n </CardContent>\n </Card>\n )}\n\n {workItems.length > 0 && (\n <Card>\n <CardHeader>\n <CardTitle>Work Items ({workItems.length})</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {workItems.map((item) => (\n <div\n key={item.id}\n className=\"flex items-center justify-between border rounded-md p-3\"\n >\n <div>\n <p className=\"text-sm font-medium\">{item.title}</p>\n <p className=\"text-xs text-muted-foreground capitalize\">\n {item.type.toLowerCase()} · {item.priority.toLowerCase()} priority\n </p>\n </div>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {item.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n ))}\n </CardContent>\n </Card>\n )}\n </div>\n\n <div className=\"space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Timeline</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\">Planned:</span>\n <span className=\"font-medium\">\n {release.plannedDate\n ? new Date(release.plannedDate).toLocaleDateString()\n : 'Not set'}\n </span>\n </div>\n {release.releasedAt && (\n <div className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4 text-green-500\" />\n <span className=\"text-muted-foreground\">Released:</span>\n <span className=\"font-medium\">\n {new Date(release.releasedAt).toLocaleDateString()}\n </span>\n </div>\n )}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Version</span>\n <span className=\"font-medium\">{release.version}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Status</span>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {release.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Owner</span>\n <span>\n <PersonName id={release.ownerId} />\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Created</span>\n <span>{new Date(release.createdAt).toLocaleDateString()}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Updated</span>\n <span>{new Date(release.updatedAt).toLocaleDateString()}</span>\n </div>\n </CardContent>\n </Card>\n\n {release.tags?.length > 0 && (\n <Card>\n <CardHeader>\n <CardTitle>Tags</CardTitle>\n </CardHeader>\n <CardContent className=\"flex flex-wrap gap-1\">\n {release.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"text-xs\">\n {tag}\n </Badge>\n ))}\n </CardContent>\n </Card>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAWA,IAAM,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCjB,IAAsC;CAC1C,OAAO;CACP,UAAU;CACV,aAAa;CACb,OAAO;CACP,UAAU;CACV,WAAW;CACX,aAAa;CACd;AAED,SAAgB,IAAgC;CAC9C,IAAM,EAAE,mBAAgB,GAAe,EAEjC,IADS,GAA2B,CACjB,MAAM,IAEzB,EACJ,SACA,YACA,aAGA,EAA8B,GAAa;EACzC,WAAW,EAAE,IAAI,GAAW;EAC5B,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,4BAAyB,EAAM,QAAc;;CAG5F,IAAM,IAAU,GAAM;AACtB,KAAI,CAAC,EAAS,QAAO,kBAAC,OAAD;EAAK,WAAU;YAA4B;EAAwB,CAAA;CAExF,IAAM,IAA+B,EAAQ,aAAa,EAAE,EACtD,IAAe,EAAU,QAAQ,MAAM,EAAE,SAAS,WAAW,EAAE,SAAS,UAAU,EAClF,IAAW,EAAU,QAAQ,MAAM,EAAE,SAAS,MAAM;AAE1D,QACE,kBAAC,OAAD;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A,EAC9B,CAAA,CACH;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAwB;SAAc,CAAA,EACtD,kBAAC,QAAD,EAAA,UAAO,IAAI,KAAK,EAAQ,UAAU,CAAC,oBAAoB,EAAQ,CAAA,CAC3D;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,QAAD;SAAM,WAAU;mBAAwB;SAAc,CAAA,EACtD,kBAAC,QAAD,EAAA,UAAO,IAAI,KAAK,EAAQ,UAAU,CAAC,oBAAoB,EAAQ,CAAA,CAC3D;;OACM;QACT,EAAA,CAAA;KAEN,EAAQ,MAAM,SAAS,KACtB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAW,QAAgB,CAAA,EAChB,CAAA,EACb,kBAAC,GAAD;MAAa,WAAU;gBACpB,EAAQ,KAAK,KAAK,MACjB,kBAAC,GAAD;OAAiB,SAAQ;OAAU,WAAU;iBAC1C;OACK,EAFI,EAEJ,CACR;MACU,CAAA,CACT,EAAA,CAAA;KAEL;MACF;KACF"}
|
|
1
|
+
{"version":3,"file":"ProductsReleaseDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ProductsReleaseDetailPagePage.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 { Markdown } from '@burdenoff/fe-libs/shared/components';\nimport { GitBranch, Calendar, Clock, Server, Loader2 } from 'lucide-react';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\nimport { useParams } from 'react-router';\nimport { PersonName } from '../people/People';\nimport { ReleaseNotesCard } from '../releases/ReleaseNotesCard';\n\nconst GET_RELEASE = gql`\n query GetRelease($id: ID!) {\n planmagnetRelease(id: $id) {\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 metadata\n createdAt\n updatedAt\n workItems {\n id\n title\n status\n type\n priority\n }\n }\n }\n`;\n\ninterface WorkItemSummary {\n id: string;\n title: string;\n status: string;\n type: string;\n priority: string;\n}\n\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 ProductsReleaseDetailPagePage() {\n const { workspaceId } = usePlanMagnet();\n const params = useParams<{ id: string }>();\n const releaseId = params.id ?? '';\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_RELEASE, {\n variables: { id: releaseId },\n skip: !releaseId,\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 release: {error.message}</div>;\n }\n\n const release = data?.planmagnetRelease;\n if (!release) return <div className=\"p-6 text-muted-foreground\">Release not found.</div>;\n\n const workItems: WorkItemSummary[] = release.workItems ?? [];\n const featureItems = workItems.filter((w) => w.type === 'STORY' || w.type === 'FEATURE');\n const bugItems = workItems.filter((w) => w.type === 'BUG');\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <div className=\"flex items-center gap-2\">\n <GitBranch className=\"h-5 w-5 text-primary\" />\n <h1 className=\"text-2xl font-semibold\">{release.version}</h1>\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 <p className=\"text-sm text-muted-foreground mt-1\">{release.name}</p>\n </div>\n <Badge variant=\"outline\" className=\"capitalize\">\n {release.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n\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 <div className=\"text-sm prose prose-sm dark:prose-invert max-w-none\">\n {release.description ? (\n <Markdown>{release.description}</Markdown>\n ) : (\n <p>No description provided.</p>\n )}\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{featureItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Features</p>\n </div>\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{bugItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Bug Fixes</p>\n </div>\n <div className=\"text-center p-3 bg-muted rounded-md\">\n <p className=\"text-lg font-semibold mt-1\">{workItems.length}</p>\n <p className=\"text-xs text-muted-foreground\">Total Items</p>\n </div>\n </div>\n </CardContent>\n </Card>\n\n <ReleaseNotesCard releaseId={release.id} notes={release.releaseNotes ?? null} />\n\n {workItems.length > 0 && (\n <Card>\n <CardHeader>\n <CardTitle>Work Items ({workItems.length})</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2\">\n {workItems.map((item) => (\n <div\n key={item.id}\n className=\"flex items-center justify-between border rounded-md p-3\"\n >\n <div>\n <p className=\"text-sm font-medium\">{item.title}</p>\n <p className=\"text-xs text-muted-foreground capitalize\">\n {item.type.toLowerCase()} · {item.priority.toLowerCase()} priority\n </p>\n </div>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {item.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n ))}\n </CardContent>\n </Card>\n )}\n </div>\n\n <div className=\"space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Timeline</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\">Planned:</span>\n <span className=\"font-medium\">\n {release.plannedDate\n ? new Date(release.plannedDate).toLocaleDateString()\n : 'Not set'}\n </span>\n </div>\n {release.releasedAt && (\n <div className=\"flex items-center gap-2\">\n <Clock className=\"h-4 w-4 text-green-500\" />\n <span className=\"text-muted-foreground\">Released:</span>\n <span className=\"font-medium\">\n {new Date(release.releasedAt).toLocaleDateString()}\n </span>\n </div>\n )}\n </CardContent>\n </Card>\n\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-2 text-sm\">\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Version</span>\n <span className=\"font-medium\">{release.version}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Status</span>\n <Badge variant=\"outline\" className=\"text-xs capitalize\">\n {release.status.toLowerCase().replace('_', ' ')}\n </Badge>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Owner</span>\n <span>\n <PersonName id={release.ownerId} />\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Created</span>\n <span>{new Date(release.createdAt).toLocaleDateString()}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Updated</span>\n <span>{new Date(release.updatedAt).toLocaleDateString()}</span>\n </div>\n </CardContent>\n </Card>\n\n {release.tags?.length > 0 && (\n <Card>\n <CardHeader>\n <CardTitle>Tags</CardTitle>\n </CardHeader>\n <CardContent className=\"flex flex-wrap gap-1\">\n {release.tags.map((tag: string) => (\n <Badge key={tag} variant=\"outline\" className=\"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AAW,QAAgB,CAAA,EAChB,CAAA,EACb,kBAAC,GAAD;MAAa,WAAU;gBACpB,EAAQ,KAAK,KAAK,MACjB,kBAAC,GAAD;OAAiB,SAAQ;OAAU,WAAU;iBAC1C;OACK,EAFI,EAEJ,CACR;MACU,CAAA,CACT,EAAA,CAAA;KAEL;MACF;KACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TasksTaskDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TasksTaskDetailPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TasksTaskDetailPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TasksTaskDetailPagePage.tsx"],"names":[],"mappings":"AA6RA,wBAAgB,uBAAuB,4CA4HtC"}
|
|
@@ -2,14 +2,15 @@ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
|
2
2
|
import { throwOnError as t } from "../utils/mutationResult.js";
|
|
3
3
|
import { MarkdownEditor as n } from "../../components/MarkdownEditor.js";
|
|
4
4
|
import { WorkItemComments as r } from "../comments/WorkItemComments.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { WorkItemActivity as i } from "../comments/WorkItemActivity.js";
|
|
6
|
+
import { useState as a } from "react";
|
|
7
|
+
import { FileText as o, Plus as s, X as c } from "lucide-react";
|
|
8
|
+
import { gql as l } from "@apollo/client";
|
|
9
|
+
import { useMutation as u, useQuery as d } from "@apollo/client/react";
|
|
10
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as m, Button as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y, Input as b } from "@burdenoff/fe-libs/ui";
|
|
11
12
|
//#region src/planmagnet/pages/TasksTaskDetailPagePage.tsx
|
|
12
|
-
var
|
|
13
|
+
var x = l`
|
|
13
14
|
query GetWorkItemDetail($workItemId: ID!) {
|
|
14
15
|
planmagnetWorkItem(id: $workItemId) {
|
|
15
16
|
id
|
|
@@ -31,7 +32,7 @@ var b = c`
|
|
|
31
32
|
updatedAt
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
`,
|
|
35
|
+
`, S = l`
|
|
35
36
|
query GetWorkItemDocs($workItemId: ID!) {
|
|
36
37
|
planmagnetWorkItemDocs(workItemId: $workItemId) {
|
|
37
38
|
id
|
|
@@ -41,28 +42,28 @@ var b = c`
|
|
|
41
42
|
updatedAt
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
`,
|
|
45
|
+
`, C = l`
|
|
45
46
|
mutation CreateDocForWorkItem($input: PlanmagnetCreateDocInput!) {
|
|
46
47
|
planmagnetCreateDoc(input: $input) {
|
|
47
48
|
id
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
|
-
`,
|
|
51
|
+
`, w = l`
|
|
51
52
|
mutation LinkDocToWorkItem($docId: ID!, $workItemId: ID!) {
|
|
52
53
|
planmagnetLinkDocToWorkItem(docId: $docId, workItemId: $workItemId) {
|
|
53
54
|
id
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
|
-
`,
|
|
57
|
+
`, T = l`
|
|
57
58
|
mutation UnlinkDocFromWorkItem($docId: ID!, $workItemId: ID!) {
|
|
58
59
|
planmagnetUnlinkDocFromWorkItem(docId: $docId, workItemId: $workItemId)
|
|
59
60
|
}
|
|
60
|
-
`,
|
|
61
|
+
`, E = {
|
|
61
62
|
LOW: "bg-gray-100 text-gray-800",
|
|
62
63
|
MEDIUM: "bg-blue-100 text-blue-800",
|
|
63
64
|
HIGH: "bg-orange-100 text-orange-800",
|
|
64
65
|
CRITICAL: "bg-red-100 text-red-800"
|
|
65
|
-
},
|
|
66
|
+
}, D = {
|
|
66
67
|
BACKLOG: "bg-gray-100 text-gray-800",
|
|
67
68
|
TODO: "bg-blue-100 text-blue-800",
|
|
68
69
|
IN_PROGRESS: "bg-yellow-100 text-yellow-800",
|
|
@@ -71,22 +72,22 @@ var b = c`
|
|
|
71
72
|
BLOCKED: "bg-red-100 text-red-800",
|
|
72
73
|
TESTING: "bg-teal-100 text-teal-800",
|
|
73
74
|
CANCELLED: "bg-gray-100 text-gray-800"
|
|
74
|
-
},
|
|
75
|
+
}, O = {
|
|
75
76
|
DRAFT: "bg-gray-100 text-gray-800",
|
|
76
77
|
PUBLISHED: "bg-green-100 text-green-800",
|
|
77
78
|
ARCHIVED: "bg-gray-100 text-gray-500"
|
|
78
79
|
};
|
|
79
|
-
function
|
|
80
|
-
let [r,
|
|
80
|
+
function k({ workItemId: e }) {
|
|
81
|
+
let [r, i] = a(!1), [l, m] = a(""), [x, E] = a(""), { data: D, loading: k, error: A, refetch: j } = d(S, {
|
|
81
82
|
variables: { workItemId: e },
|
|
82
83
|
skip: !e
|
|
83
|
-
}), [M, { loading: N }] =
|
|
84
|
-
if (!(!
|
|
84
|
+
}), [M, { loading: N }] = u(C), [P] = u(w), [F, { loading: I }] = u(T), [L, R] = a(null), z = D?.planmagnetWorkItemDocs ?? [], B = async () => {
|
|
85
|
+
if (!(!l.trim() || !x.trim())) {
|
|
85
86
|
R(null);
|
|
86
87
|
try {
|
|
87
88
|
let n = (await t(M({ variables: { input: {
|
|
88
|
-
title:
|
|
89
|
-
content:
|
|
89
|
+
title: l.trim(),
|
|
90
|
+
content: x.trim()
|
|
90
91
|
} } }))).data?.planmagnetCreateDoc?.id;
|
|
91
92
|
n && await t(P({ variables: {
|
|
92
93
|
docId: n,
|
|
@@ -96,7 +97,7 @@ function O({ workItemId: e }) {
|
|
|
96
97
|
R(e instanceof Error ? e.message : "The doc could not be saved.");
|
|
97
98
|
return;
|
|
98
99
|
}
|
|
99
|
-
|
|
100
|
+
m(""), E(""), i(!1), j();
|
|
100
101
|
}
|
|
101
102
|
}, V = async (n) => {
|
|
102
103
|
R(null);
|
|
@@ -111,274 +112,236 @@ function O({ workItemId: e }) {
|
|
|
111
112
|
}
|
|
112
113
|
j();
|
|
113
114
|
};
|
|
114
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
|
|
115
116
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ f(y, { children: "Linked Docs" }), !r && /* @__PURE__ */ p(h, {
|
|
117
118
|
size: "sm",
|
|
118
119
|
variant: "outline",
|
|
119
|
-
onClick: () =>
|
|
120
|
-
children: [/* @__PURE__ */
|
|
120
|
+
onClick: () => i(!0),
|
|
121
|
+
children: [/* @__PURE__ */ f(s, { className: "h-4 w-4 mr-1" }), "New Doc"]
|
|
121
122
|
})]
|
|
122
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ p(_, {
|
|
123
124
|
className: "space-y-4",
|
|
124
125
|
children: [
|
|
125
|
-
r && /* @__PURE__ */
|
|
126
|
+
r && /* @__PURE__ */ p("div", {
|
|
126
127
|
className: "space-y-3 rounded-md border border-input p-3",
|
|
127
128
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ f(b, {
|
|
129
130
|
placeholder: "Doc title",
|
|
130
|
-
value:
|
|
131
|
-
onChange: (e) =>
|
|
131
|
+
value: l,
|
|
132
|
+
onChange: (e) => m(e.target.value)
|
|
132
133
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
value:
|
|
134
|
+
/* @__PURE__ */ f(n, {
|
|
135
|
+
value: x,
|
|
135
136
|
onChange: E,
|
|
136
137
|
placeholder: "Write the spec/doc content...",
|
|
137
138
|
minHeight: 140
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ p("div", {
|
|
140
141
|
className: "flex gap-2 justify-end",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ f(h, {
|
|
142
143
|
size: "sm",
|
|
143
144
|
variant: "ghost",
|
|
144
145
|
onClick: () => {
|
|
145
|
-
|
|
146
|
+
i(!1), m(""), E("");
|
|
146
147
|
},
|
|
147
148
|
children: "Cancel"
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
+
}), /* @__PURE__ */ f(h, {
|
|
149
150
|
size: "sm",
|
|
150
|
-
disabled: N || !
|
|
151
|
+
disabled: N || !l.trim() || !x.trim(),
|
|
151
152
|
onClick: B,
|
|
152
153
|
children: N ? "Creating..." : "Create & Link"
|
|
153
154
|
})]
|
|
154
155
|
})
|
|
155
156
|
]
|
|
156
157
|
}),
|
|
157
|
-
k && /* @__PURE__ */
|
|
158
|
+
k && /* @__PURE__ */ f("p", {
|
|
158
159
|
className: "text-sm text-muted-foreground",
|
|
159
160
|
children: "Loading docs..."
|
|
160
161
|
}),
|
|
161
|
-
A && /* @__PURE__ */
|
|
162
|
+
A && /* @__PURE__ */ p("p", {
|
|
162
163
|
className: "text-sm text-red-500",
|
|
163
164
|
children: ["Error: ", A.message]
|
|
164
165
|
}),
|
|
165
|
-
L && /* @__PURE__ */
|
|
166
|
+
L && /* @__PURE__ */ f("p", {
|
|
166
167
|
role: "alert",
|
|
167
168
|
className: "text-sm text-destructive",
|
|
168
169
|
children: L
|
|
169
170
|
}),
|
|
170
|
-
!k && !A && z.length === 0 && !r && /* @__PURE__ */
|
|
171
|
+
!k && !A && z.length === 0 && !r && /* @__PURE__ */ f("p", {
|
|
171
172
|
className: "text-sm text-muted-foreground",
|
|
172
173
|
children: "No docs linked to this work item yet."
|
|
173
174
|
}),
|
|
174
|
-
z.map((e) => /* @__PURE__ */
|
|
175
|
+
z.map((e) => /* @__PURE__ */ p("div", {
|
|
175
176
|
className: "flex items-center justify-between gap-3 rounded-md border border-input p-3",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
177
|
+
children: [/* @__PURE__ */ p("div", {
|
|
177
178
|
className: "flex items-center gap-2 min-w-0",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
179
|
+
children: [/* @__PURE__ */ f(o, { className: "h-4 w-4 text-muted-foreground shrink-0" }), /* @__PURE__ */ p("div", {
|
|
179
180
|
className: "min-w-0",
|
|
180
|
-
children: [/* @__PURE__ */
|
|
181
|
+
children: [/* @__PURE__ */ f("p", {
|
|
181
182
|
className: "text-sm font-medium truncate",
|
|
182
183
|
children: e.title
|
|
183
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ p("p", {
|
|
184
185
|
className: "text-xs text-muted-foreground",
|
|
185
186
|
children: ["v", e.version]
|
|
186
187
|
})]
|
|
187
188
|
})]
|
|
188
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ p("div", {
|
|
189
190
|
className: "flex items-center gap-2 shrink-0",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
191
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
191
|
+
children: [/* @__PURE__ */ f("span", {
|
|
192
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${O[e.status] ?? ""}`,
|
|
192
193
|
children: e.status.toLowerCase()
|
|
193
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ f(h, {
|
|
194
195
|
size: "icon",
|
|
195
196
|
variant: "ghost",
|
|
196
197
|
disabled: I,
|
|
197
198
|
onClick: () => V(e.id),
|
|
198
199
|
"aria-label": `Unlink ${e.title}`,
|
|
199
|
-
children: /* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ f(c, { className: "h-4 w-4" })
|
|
200
201
|
})]
|
|
201
202
|
})]
|
|
202
203
|
}, e.id))
|
|
203
204
|
]
|
|
204
205
|
})] });
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
-
let { workspaceId: t } = e(), n = new URLSearchParams(window.location.search).get("taskId") ?? "", { data:
|
|
207
|
+
function A() {
|
|
208
|
+
let { workspaceId: t } = e(), n = new URLSearchParams(window.location.search).get("taskId") ?? "", { data: a, loading: o, error: s } = d(x, {
|
|
208
209
|
variables: { workItemId: n },
|
|
209
210
|
skip: !t || !n
|
|
210
211
|
});
|
|
211
|
-
if (
|
|
212
|
+
if (o) return /* @__PURE__ */ f("div", {
|
|
212
213
|
className: "flex items-center justify-center p-12",
|
|
213
|
-
children: /* @__PURE__ */
|
|
214
|
+
children: /* @__PURE__ */ f("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
214
215
|
});
|
|
215
|
-
if (
|
|
216
|
+
if (s) return /* @__PURE__ */ p("div", {
|
|
216
217
|
className: "p-6 text-red-500",
|
|
217
|
-
children: ["Error: ",
|
|
218
|
+
children: ["Error: ", s.message]
|
|
218
219
|
});
|
|
219
|
-
let
|
|
220
|
-
if (!
|
|
220
|
+
let c = a?.planmagnetWorkItem;
|
|
221
|
+
if (!c) return /* @__PURE__ */ f("div", {
|
|
221
222
|
className: "p-6 text-muted-foreground",
|
|
222
223
|
children: "Task not found."
|
|
223
224
|
});
|
|
224
|
-
let
|
|
225
|
-
|
|
226
|
-
action: "Task created",
|
|
227
|
-
by: s.reporterId ?? "Unknown",
|
|
228
|
-
at: s.createdAt
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
action: `Assigned to ${s.assigneeId ?? "Unassigned"}`,
|
|
232
|
-
by: s.reporterId ?? "Unknown",
|
|
233
|
-
at: s.createdAt
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
action: `Status changed to ${c}`,
|
|
237
|
-
by: s.assigneeId ?? "Unknown",
|
|
238
|
-
at: s.updatedAt
|
|
239
|
-
}
|
|
240
|
-
];
|
|
241
|
-
return /* @__PURE__ */ f("div", {
|
|
225
|
+
let l = c.status.toLowerCase().replace("_", " ");
|
|
226
|
+
return /* @__PURE__ */ p("div", {
|
|
242
227
|
className: "space-y-6 p-6",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
|
|
244
229
|
className: "text-2xl font-semibold",
|
|
245
|
-
children:
|
|
246
|
-
}), /* @__PURE__ */
|
|
230
|
+
children: c.title
|
|
231
|
+
}), /* @__PURE__ */ p("p", {
|
|
247
232
|
className: "text-sm text-muted-foreground",
|
|
248
233
|
children: [
|
|
249
|
-
|
|
234
|
+
c.key,
|
|
250
235
|
" · ",
|
|
251
|
-
|
|
236
|
+
c.type.toLowerCase()
|
|
252
237
|
]
|
|
253
|
-
})] }), /* @__PURE__ */
|
|
238
|
+
})] }), /* @__PURE__ */ p("div", {
|
|
254
239
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ p("div", {
|
|
256
241
|
className: "lg:col-span-2 space-y-6",
|
|
257
242
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(v, { children: /* @__PURE__ */ f(y, { children: "Description" }) }), /* @__PURE__ */ f(_, { children: /* @__PURE__ */ f("p", {
|
|
259
244
|
className: "text-sm",
|
|
260
|
-
children:
|
|
245
|
+
children: c.description ?? "No description provided."
|
|
261
246
|
}) })] }),
|
|
262
|
-
/* @__PURE__ */
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
/* @__PURE__ */ f(
|
|
265
|
-
className: "space-y-3",
|
|
266
|
-
children: l.map((e, t) => /* @__PURE__ */ f("div", {
|
|
267
|
-
className: "flex gap-3",
|
|
268
|
-
children: [/* @__PURE__ */ f("div", {
|
|
269
|
-
className: "flex flex-col items-center",
|
|
270
|
-
children: [/* @__PURE__ */ d("div", { className: "h-2.5 w-2.5 rounded-full bg-primary mt-1.5" }), t < l.length - 1 && /* @__PURE__ */ d("div", { className: "w-px flex-1 bg-border" })]
|
|
271
|
-
}), /* @__PURE__ */ f("div", {
|
|
272
|
-
className: "pb-3",
|
|
273
|
-
children: [/* @__PURE__ */ d("p", {
|
|
274
|
-
className: "text-sm",
|
|
275
|
-
children: e.action
|
|
276
|
-
}), /* @__PURE__ */ f("p", {
|
|
277
|
-
className: "text-xs text-muted-foreground",
|
|
278
|
-
children: [
|
|
279
|
-
e.by,
|
|
280
|
-
" · ",
|
|
281
|
-
e.at
|
|
282
|
-
]
|
|
283
|
-
})]
|
|
284
|
-
})]
|
|
285
|
-
}, t))
|
|
286
|
-
}) })] })
|
|
247
|
+
/* @__PURE__ */ f(k, { workItemId: c.id }),
|
|
248
|
+
/* @__PURE__ */ f(r, { workItemId: c.id }),
|
|
249
|
+
/* @__PURE__ */ f(i, { workItemId: c.id })
|
|
287
250
|
]
|
|
288
|
-
}), /* @__PURE__ */
|
|
251
|
+
}), /* @__PURE__ */ f("div", {
|
|
289
252
|
className: "space-y-6",
|
|
290
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(v, { children: /* @__PURE__ */ f(y, { children: "Details" }) }), /* @__PURE__ */ p(_, {
|
|
291
254
|
className: "space-y-3 text-sm",
|
|
292
255
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
256
|
+
/* @__PURE__ */ p("div", {
|
|
294
257
|
className: "flex justify-between",
|
|
295
|
-
children: [/* @__PURE__ */
|
|
258
|
+
children: [/* @__PURE__ */ f("span", {
|
|
296
259
|
className: "text-muted-foreground",
|
|
297
260
|
children: "Status"
|
|
298
|
-
}), /* @__PURE__ */
|
|
299
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
300
|
-
children:
|
|
261
|
+
}), /* @__PURE__ */ f("span", {
|
|
262
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${D[c.status] ?? ""}`,
|
|
263
|
+
children: l
|
|
301
264
|
})]
|
|
302
265
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ p("div", {
|
|
304
267
|
className: "flex justify-between",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f("span", {
|
|
306
269
|
className: "text-muted-foreground",
|
|
307
270
|
children: "Priority"
|
|
308
|
-
}), /* @__PURE__ */
|
|
309
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
310
|
-
children:
|
|
271
|
+
}), /* @__PURE__ */ f("span", {
|
|
272
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${E[c.priority] ?? ""}`,
|
|
273
|
+
children: c.priority.toLowerCase()
|
|
311
274
|
})]
|
|
312
275
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ p("div", {
|
|
314
277
|
className: "flex justify-between",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
278
|
+
children: [/* @__PURE__ */ f("span", {
|
|
316
279
|
className: "text-muted-foreground",
|
|
317
280
|
children: "Type"
|
|
318
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ f(m, {
|
|
319
282
|
variant: "outline",
|
|
320
283
|
className: "capitalize",
|
|
321
|
-
children:
|
|
284
|
+
children: c.type.toLowerCase()
|
|
322
285
|
})]
|
|
323
286
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ p("div", {
|
|
325
288
|
className: "flex justify-between",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ f("span", {
|
|
327
290
|
className: "text-muted-foreground",
|
|
328
291
|
children: "Story Points"
|
|
329
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ f("span", {
|
|
330
293
|
className: "font-medium",
|
|
331
|
-
children:
|
|
294
|
+
children: c.storyPoints ?? 0
|
|
332
295
|
})]
|
|
333
296
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ p("div", {
|
|
335
298
|
className: "flex justify-between",
|
|
336
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ f("span", {
|
|
337
300
|
className: "text-muted-foreground",
|
|
338
301
|
children: "Assignee"
|
|
339
|
-
}), /* @__PURE__ */
|
|
302
|
+
}), /* @__PURE__ */ f("span", { children: c.assigneeId ?? "Unassigned" })]
|
|
340
303
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ p("div", {
|
|
342
305
|
className: "flex justify-between",
|
|
343
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ f("span", {
|
|
344
307
|
className: "text-muted-foreground",
|
|
345
308
|
children: "Reporter"
|
|
346
|
-
}), /* @__PURE__ */
|
|
309
|
+
}), /* @__PURE__ */ f("span", { children: c.reporterId ?? "Unknown" })]
|
|
347
310
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ p("div", {
|
|
349
312
|
className: "flex justify-between",
|
|
350
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ f("span", {
|
|
351
314
|
className: "text-muted-foreground",
|
|
352
315
|
children: "Key"
|
|
353
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ f("span", { children: c.key })]
|
|
354
317
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ p("div", {
|
|
356
319
|
className: "flex justify-between",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
320
|
+
children: [/* @__PURE__ */ f("span", {
|
|
358
321
|
className: "text-muted-foreground",
|
|
359
322
|
children: "Due Date"
|
|
360
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), /* @__PURE__ */ f("span", { children: c.dueDate ?? "Not set" })]
|
|
361
324
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ p("div", {
|
|
363
326
|
className: "flex justify-between",
|
|
364
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ f("span", {
|
|
365
328
|
className: "text-muted-foreground",
|
|
366
329
|
children: "Created"
|
|
367
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ f("span", { children: c.createdAt })]
|
|
368
331
|
}),
|
|
369
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ p("div", {
|
|
370
333
|
className: "flex justify-between",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ f("span", {
|
|
372
335
|
className: "text-muted-foreground",
|
|
373
336
|
children: "Updated"
|
|
374
|
-
}), /* @__PURE__ */
|
|
337
|
+
}), /* @__PURE__ */ f("span", { children: c.updatedAt })]
|
|
375
338
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("span", {
|
|
377
340
|
className: "text-muted-foreground text-xs",
|
|
378
341
|
children: "Labels"
|
|
379
|
-
}), /* @__PURE__ */
|
|
342
|
+
}), /* @__PURE__ */ f("div", {
|
|
380
343
|
className: "flex gap-1 mt-1 flex-wrap",
|
|
381
|
-
children: (
|
|
344
|
+
children: (c.labels ?? []).map((e) => /* @__PURE__ */ f("span", {
|
|
382
345
|
className: "text-xs px-2 py-0.5 rounded bg-muted",
|
|
383
346
|
children: e
|
|
384
347
|
}, e))
|
|
@@ -390,6 +353,6 @@ function k() {
|
|
|
390
353
|
});
|
|
391
354
|
}
|
|
392
355
|
//#endregion
|
|
393
|
-
export {
|
|
356
|
+
export { A as TasksTaskDetailPagePage };
|
|
394
357
|
|
|
395
358
|
//# sourceMappingURL=TasksTaskDetailPagePage.js.map
|