@burdenoff/microfe-planmagnet 2026.925.9 → 2026.925.11
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 +84 -87
- package/dist/planmagnet/comments/WorkItemComments.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/sprints/SprintControls.d.ts.map +1 -1
- package/dist/planmagnet/sprints/SprintControls.js +1 -1
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TasksTaskDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TasksTaskDetailPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { throwOnError } from '../utils/mutationResult';\nimport { WorkItemComments } from '../comments/WorkItemComments';\nimport { gql } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Badge,\n Button,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { FileText, Plus, X } from 'lucide-react';\nimport { MarkdownEditor } from '#src/components/MarkdownEditor';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\n\nconst GET_WORK_ITEM = gql`\n query GetWorkItemDetail($workItemId: ID!) {\n planmagnetWorkItem(id: $workItemId) {\n id\n title\n description\n type\n status\n priority\n key\n assigneeId\n reporterId\n sprintId\n storyPoints\n estimateMinutes\n dueDate\n labels\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nconst GET_WORK_ITEM_DOCS = gql`\n query GetWorkItemDocs($workItemId: ID!) {\n planmagnetWorkItemDocs(workItemId: $workItemId) {\n id\n title\n status\n version\n updatedAt\n }\n }\n`;\n\nconst CREATE_DOC = gql`\n mutation CreateDocForWorkItem($input: PlanmagnetCreateDocInput!) {\n planmagnetCreateDoc(input: $input) {\n id\n }\n }\n`;\n\nconst LINK_DOC_TO_WORK_ITEM = gql`\n mutation LinkDocToWorkItem($docId: ID!, $workItemId: ID!) {\n planmagnetLinkDocToWorkItem(docId: $docId, workItemId: $workItemId) {\n id\n }\n }\n`;\n\nconst UNLINK_DOC_FROM_WORK_ITEM = gql`\n mutation UnlinkDocFromWorkItem($docId: ID!, $workItemId: ID!) {\n planmagnetUnlinkDocFromWorkItem(docId: $docId, workItemId: $workItemId)\n }\n`;\n\ninterface WorkItemNode {\n id: string;\n title: string;\n description: string | null;\n type: string;\n status: string;\n priority: string;\n key: string;\n assigneeId: string | null;\n reporterId: string | null;\n sprintId: string | null;\n storyPoints: number | null;\n estimateMinutes: number | null;\n dueDate: string | null;\n labels: string[];\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\ninterface WorkItemDocNode {\n id: string;\n title: string;\n status: string;\n version: number;\n updatedAt: string;\n}\n\nconst priorityColor: Record<string, string> = {\n LOW: 'bg-gray-100 text-gray-800',\n MEDIUM: 'bg-blue-100 text-blue-800',\n HIGH: 'bg-orange-100 text-orange-800',\n CRITICAL: 'bg-red-100 text-red-800',\n};\n\nconst statusColor: Record<string, string> = {\n BACKLOG: 'bg-gray-100 text-gray-800',\n TODO: 'bg-blue-100 text-blue-800',\n IN_PROGRESS: 'bg-yellow-100 text-yellow-800',\n IN_REVIEW: 'bg-purple-100 text-purple-800',\n DONE: 'bg-green-100 text-green-800',\n BLOCKED: 'bg-red-100 text-red-800',\n TESTING: 'bg-teal-100 text-teal-800',\n CANCELLED: 'bg-gray-100 text-gray-800',\n};\n\nconst docStatusColor: Record<string, string> = {\n DRAFT: 'bg-gray-100 text-gray-800',\n PUBLISHED: 'bg-green-100 text-green-800',\n ARCHIVED: 'bg-gray-100 text-gray-500',\n};\n\n/**\n * Linked-docs panel (BOFF-4443): create a doc and link it to this work item\n * in one action, view currently-linked docs, and unlink one. Reads/writes go\n * through the real planmagnetWorkItemDocs / planmagnetCreateDoc /\n * planmagnetLinkDocToWorkItem / planmagnetUnlinkDocFromWorkItem GraphQL\n * fields — no fabricated data. Full doc editing (revisions, revert) lives on\n * a dedicated doc detail view; this panel is scoped to linking.\n */\nfunction LinkedDocsPanel({ workItemId }: { workItemId: string }) {\n const [isComposing, setIsComposing] = useState(false);\n const [newTitle, setNewTitle] = useState('');\n const [newContent, setNewContent] = useState('');\n\n const { data, loading, error, refetch } = useQuery<{\n planmagnetWorkItemDocs: WorkItemDocNode[];\n }>(GET_WORK_ITEM_DOCS, {\n variables: { workItemId },\n skip: !workItemId,\n });\n\n const [createDoc, { loading: creating }] = useMutation(CREATE_DOC);\n const [linkDoc] = useMutation(LINK_DOC_TO_WORK_ITEM);\n const [unlinkDoc, { loading: unlinking }] = useMutation(UNLINK_DOC_FROM_WORK_ITEM);\n // A refused mutation resolves with { error } (fe-libs errorPolicy 'all');\n // the composer used to clear itself as if the doc had been saved.\n const [actionError, setActionError] = useState<string | null>(null);\n\n const docs = data?.planmagnetWorkItemDocs ?? [];\n\n const handleCreateAndLink = async () => {\n if (!newTitle.trim() || !newContent.trim()) return;\n setActionError(null);\n try {\n const result = await throwOnError(\n createDoc({ variables: { input: { title: newTitle.trim(), content: newContent.trim() } } })\n );\n const docId = result.data?.planmagnetCreateDoc?.id;\n if (docId) {\n await throwOnError(linkDoc({ variables: { docId, workItemId } }));\n }\n } catch (e) {\n setActionError(e instanceof Error ? e.message : 'The doc could not be saved.');\n return;\n }\n setNewTitle('');\n setNewContent('');\n setIsComposing(false);\n void refetch();\n };\n\n const handleUnlink = async (docId: string) => {\n setActionError(null);\n try {\n await throwOnError(unlinkDoc({ variables: { docId, workItemId } }));\n } catch (e) {\n setActionError(e instanceof Error ? e.message : 'The doc could not be unlinked.');\n return;\n }\n void refetch();\n };\n\n return (\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0\">\n <CardTitle>Linked Docs</CardTitle>\n {!isComposing && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => setIsComposing(true)}>\n <Plus className=\"h-4 w-4 mr-1\" />\n New Doc\n </Button>\n )}\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {isComposing && (\n <div className=\"space-y-3 rounded-md border border-input p-3\">\n <Input\n placeholder=\"Doc title\"\n value={newTitle}\n onChange={(e) => setNewTitle(e.target.value)}\n />\n <MarkdownEditor\n value={newContent}\n onChange={setNewContent}\n placeholder=\"Write the spec/doc content...\"\n minHeight={140}\n />\n <div className=\"flex gap-2 justify-end\">\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={() => {\n setIsComposing(false);\n setNewTitle('');\n setNewContent('');\n }}\n >\n Cancel\n </Button>\n <Button\n size=\"sm\"\n disabled={creating || !newTitle.trim() || !newContent.trim()}\n onClick={handleCreateAndLink}\n >\n {creating ? 'Creating...' : 'Create & Link'}\n </Button>\n </div>\n </div>\n )}\n\n {loading && <p className=\"text-sm text-muted-foreground\">Loading docs...</p>}\n {error && <p className=\"text-sm text-red-500\">Error: {error.message}</p>}\n {actionError && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {actionError}\n </p>\n )}\n {!loading && !error && docs.length === 0 && !isComposing && (\n <p className=\"text-sm text-muted-foreground\">No docs linked to this work item yet.</p>\n )}\n {docs.map((doc) => (\n <div\n key={doc.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <FileText className=\"h-4 w-4 text-muted-foreground shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium truncate\">{doc.title}</p>\n <p className=\"text-xs text-muted-foreground\">v{doc.version}</p>\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${docStatusColor[doc.status] ?? ''}`}\n >\n {doc.status.toLowerCase()}\n </span>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n disabled={unlinking}\n onClick={() => handleUnlink(doc.id)}\n aria-label={`Unlink ${doc.title}`}\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n );\n}\n\nexport function TasksTaskDetailPagePage() {\n const { workspaceId } = usePlanMagnet();\n\n // In a real app, workItemId comes from route params.\n const workItemId = new URLSearchParams(window.location.search).get('taskId') ?? '';\n\n const { data, loading, error } = useQuery<{\n planmagnetWorkItem: WorkItemNode;\n }>(GET_WORK_ITEM, {\n variables: { workItemId },\n skip: !workspaceId || !workItemId,\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 }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n const task = data?.planmagnetWorkItem;\n if (!task) return <div className=\"p-6 text-muted-foreground\">Task not found.</div>;\n\n const statusDisplay = task.status.toLowerCase().replace('_', ' ');\n\n const activityLog = [\n { action: 'Task created', by: task.reporterId ?? 'Unknown', at: task.createdAt },\n {\n action: `Assigned to ${task.assigneeId ?? 'Unassigned'}`,\n by: task.reporterId ?? 'Unknown',\n at: task.createdAt,\n },\n {\n action: `Status changed to ${statusDisplay}`,\n by: task.assigneeId ?? 'Unknown',\n at: task.updatedAt,\n },\n ];\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">{task.title}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {task.key} · {task.type.toLowerCase()}\n </p>\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>Description</CardTitle>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm\">{task.description ?? 'No description provided.'}</p>\n </CardContent>\n </Card>\n <LinkedDocsPanel workItemId={task.id} />\n <WorkItemComments workItemId={task.id} />\n <Card>\n <CardHeader>\n <CardTitle>Activity</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-3\">\n {activityLog.map((a, i) => (\n <div key={i} className=\"flex gap-3\">\n <div className=\"flex flex-col items-center\">\n <div className=\"h-2.5 w-2.5 rounded-full bg-primary mt-1.5\" />\n {i < activityLog.length - 1 && <div className=\"w-px flex-1 bg-border\" />}\n </div>\n <div className=\"pb-3\">\n <p className=\"text-sm\">{a.action}</p>\n <p className=\"text-xs text-muted-foreground\">\n {a.by} · {a.at}\n </p>\n </div>\n </div>\n ))}\n </div>\n </CardContent>\n </Card>\n </div>\n <div className=\"space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3 text-sm\">\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Status</span>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[task.status] ?? ''}`}\n >\n {statusDisplay}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Priority</span>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${priorityColor[task.priority] ?? ''}`}\n >\n {task.priority.toLowerCase()}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Type</span>\n <Badge variant=\"outline\" className=\"capitalize\">\n {task.type.toLowerCase()}\n </Badge>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Story Points</span>\n <span className=\"font-medium\">{task.storyPoints ?? 0}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Assignee</span>\n <span>{task.assigneeId ?? 'Unassigned'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Reporter</span>\n <span>{task.reporterId ?? 'Unknown'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Key</span>\n <span>{task.key}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Due Date</span>\n <span>{task.dueDate ?? 'Not set'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Created</span>\n <span>{task.createdAt}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Updated</span>\n <span>{task.updatedAt}</span>\n </div>\n <div>\n <span className=\"text-muted-foreground text-xs\">Labels</span>\n <div className=\"flex gap-1 mt-1 flex-wrap\">\n {(task.labels ?? []).map((l) => (\n <span key={l} className=\"text-xs px-2 py-0.5 rounded bg-muted\">\n {l}\n </span>\n ))}\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAoBA,IAAM,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;GAwBnB,IAAqB,CAAG;;;;;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|
+
{"version":3,"file":"TasksTaskDetailPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TasksTaskDetailPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { throwOnError } from '../utils/mutationResult';\nimport { WorkItemComments } from '../comments/WorkItemComments';\nimport { WorkItemActivity } from '../comments/WorkItemActivity';\nimport { gql } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\nimport {\n Card,\n CardContent,\n CardHeader,\n CardTitle,\n Badge,\n Button,\n Input,\n} from '@burdenoff/fe-libs/ui';\nimport { FileText, Plus, X } from 'lucide-react';\nimport { MarkdownEditor } from '#src/components/MarkdownEditor';\nimport { usePlanMagnet } from '../providers/PlanMagnetProvider';\n\nconst GET_WORK_ITEM = gql`\n query GetWorkItemDetail($workItemId: ID!) {\n planmagnetWorkItem(id: $workItemId) {\n id\n title\n description\n type\n status\n priority\n key\n assigneeId\n reporterId\n sprintId\n storyPoints\n estimateMinutes\n dueDate\n labels\n tags\n createdAt\n updatedAt\n }\n }\n`;\n\nconst GET_WORK_ITEM_DOCS = gql`\n query GetWorkItemDocs($workItemId: ID!) {\n planmagnetWorkItemDocs(workItemId: $workItemId) {\n id\n title\n status\n version\n updatedAt\n }\n }\n`;\n\nconst CREATE_DOC = gql`\n mutation CreateDocForWorkItem($input: PlanmagnetCreateDocInput!) {\n planmagnetCreateDoc(input: $input) {\n id\n }\n }\n`;\n\nconst LINK_DOC_TO_WORK_ITEM = gql`\n mutation LinkDocToWorkItem($docId: ID!, $workItemId: ID!) {\n planmagnetLinkDocToWorkItem(docId: $docId, workItemId: $workItemId) {\n id\n }\n }\n`;\n\nconst UNLINK_DOC_FROM_WORK_ITEM = gql`\n mutation UnlinkDocFromWorkItem($docId: ID!, $workItemId: ID!) {\n planmagnetUnlinkDocFromWorkItem(docId: $docId, workItemId: $workItemId)\n }\n`;\n\ninterface WorkItemNode {\n id: string;\n title: string;\n description: string | null;\n type: string;\n status: string;\n priority: string;\n key: string;\n assigneeId: string | null;\n reporterId: string | null;\n sprintId: string | null;\n storyPoints: number | null;\n estimateMinutes: number | null;\n dueDate: string | null;\n labels: string[];\n tags: string[];\n createdAt: string;\n updatedAt: string;\n}\n\ninterface WorkItemDocNode {\n id: string;\n title: string;\n status: string;\n version: number;\n updatedAt: string;\n}\n\nconst priorityColor: Record<string, string> = {\n LOW: 'bg-gray-100 text-gray-800',\n MEDIUM: 'bg-blue-100 text-blue-800',\n HIGH: 'bg-orange-100 text-orange-800',\n CRITICAL: 'bg-red-100 text-red-800',\n};\n\nconst statusColor: Record<string, string> = {\n BACKLOG: 'bg-gray-100 text-gray-800',\n TODO: 'bg-blue-100 text-blue-800',\n IN_PROGRESS: 'bg-yellow-100 text-yellow-800',\n IN_REVIEW: 'bg-purple-100 text-purple-800',\n DONE: 'bg-green-100 text-green-800',\n BLOCKED: 'bg-red-100 text-red-800',\n TESTING: 'bg-teal-100 text-teal-800',\n CANCELLED: 'bg-gray-100 text-gray-800',\n};\n\nconst docStatusColor: Record<string, string> = {\n DRAFT: 'bg-gray-100 text-gray-800',\n PUBLISHED: 'bg-green-100 text-green-800',\n ARCHIVED: 'bg-gray-100 text-gray-500',\n};\n\n/**\n * Linked-docs panel (BOFF-4443): create a doc and link it to this work item\n * in one action, view currently-linked docs, and unlink one. Reads/writes go\n * through the real planmagnetWorkItemDocs / planmagnetCreateDoc /\n * planmagnetLinkDocToWorkItem / planmagnetUnlinkDocFromWorkItem GraphQL\n * fields — no fabricated data. Full doc editing (revisions, revert) lives on\n * a dedicated doc detail view; this panel is scoped to linking.\n */\nfunction LinkedDocsPanel({ workItemId }: { workItemId: string }) {\n const [isComposing, setIsComposing] = useState(false);\n const [newTitle, setNewTitle] = useState('');\n const [newContent, setNewContent] = useState('');\n\n const { data, loading, error, refetch } = useQuery<{\n planmagnetWorkItemDocs: WorkItemDocNode[];\n }>(GET_WORK_ITEM_DOCS, {\n variables: { workItemId },\n skip: !workItemId,\n });\n\n const [createDoc, { loading: creating }] = useMutation(CREATE_DOC);\n const [linkDoc] = useMutation(LINK_DOC_TO_WORK_ITEM);\n const [unlinkDoc, { loading: unlinking }] = useMutation(UNLINK_DOC_FROM_WORK_ITEM);\n // A refused mutation resolves with { error } (fe-libs errorPolicy 'all');\n // the composer used to clear itself as if the doc had been saved.\n const [actionError, setActionError] = useState<string | null>(null);\n\n const docs = data?.planmagnetWorkItemDocs ?? [];\n\n const handleCreateAndLink = async () => {\n if (!newTitle.trim() || !newContent.trim()) return;\n setActionError(null);\n try {\n const result = await throwOnError(\n createDoc({ variables: { input: { title: newTitle.trim(), content: newContent.trim() } } })\n );\n const docId = result.data?.planmagnetCreateDoc?.id;\n if (docId) {\n await throwOnError(linkDoc({ variables: { docId, workItemId } }));\n }\n } catch (e) {\n setActionError(e instanceof Error ? e.message : 'The doc could not be saved.');\n return;\n }\n setNewTitle('');\n setNewContent('');\n setIsComposing(false);\n void refetch();\n };\n\n const handleUnlink = async (docId: string) => {\n setActionError(null);\n try {\n await throwOnError(unlinkDoc({ variables: { docId, workItemId } }));\n } catch (e) {\n setActionError(e instanceof Error ? e.message : 'The doc could not be unlinked.');\n return;\n }\n void refetch();\n };\n\n return (\n <Card>\n <CardHeader className=\"flex flex-row items-center justify-between space-y-0\">\n <CardTitle>Linked Docs</CardTitle>\n {!isComposing && (\n <Button size=\"sm\" variant=\"outline\" onClick={() => setIsComposing(true)}>\n <Plus className=\"h-4 w-4 mr-1\" />\n New Doc\n </Button>\n )}\n </CardHeader>\n <CardContent className=\"space-y-4\">\n {isComposing && (\n <div className=\"space-y-3 rounded-md border border-input p-3\">\n <Input\n placeholder=\"Doc title\"\n value={newTitle}\n onChange={(e) => setNewTitle(e.target.value)}\n />\n <MarkdownEditor\n value={newContent}\n onChange={setNewContent}\n placeholder=\"Write the spec/doc content...\"\n minHeight={140}\n />\n <div className=\"flex gap-2 justify-end\">\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={() => {\n setIsComposing(false);\n setNewTitle('');\n setNewContent('');\n }}\n >\n Cancel\n </Button>\n <Button\n size=\"sm\"\n disabled={creating || !newTitle.trim() || !newContent.trim()}\n onClick={handleCreateAndLink}\n >\n {creating ? 'Creating...' : 'Create & Link'}\n </Button>\n </div>\n </div>\n )}\n\n {loading && <p className=\"text-sm text-muted-foreground\">Loading docs...</p>}\n {error && <p className=\"text-sm text-red-500\">Error: {error.message}</p>}\n {actionError && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {actionError}\n </p>\n )}\n {!loading && !error && docs.length === 0 && !isComposing && (\n <p className=\"text-sm text-muted-foreground\">No docs linked to this work item yet.</p>\n )}\n {docs.map((doc) => (\n <div\n key={doc.id}\n className=\"flex items-center justify-between gap-3 rounded-md border border-input p-3\"\n >\n <div className=\"flex items-center gap-2 min-w-0\">\n <FileText className=\"h-4 w-4 text-muted-foreground shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium truncate\">{doc.title}</p>\n <p className=\"text-xs text-muted-foreground\">v{doc.version}</p>\n </div>\n </div>\n <div className=\"flex items-center gap-2 shrink-0\">\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${docStatusColor[doc.status] ?? ''}`}\n >\n {doc.status.toLowerCase()}\n </span>\n <Button\n size=\"icon\"\n variant=\"ghost\"\n disabled={unlinking}\n onClick={() => handleUnlink(doc.id)}\n aria-label={`Unlink ${doc.title}`}\n >\n <X className=\"h-4 w-4\" />\n </Button>\n </div>\n </div>\n ))}\n </CardContent>\n </Card>\n );\n}\n\nexport function TasksTaskDetailPagePage() {\n const { workspaceId } = usePlanMagnet();\n\n // In a real app, workItemId comes from route params.\n const workItemId = new URLSearchParams(window.location.search).get('taskId') ?? '';\n\n const { data, loading, error } = useQuery<{\n planmagnetWorkItem: WorkItemNode;\n }>(GET_WORK_ITEM, {\n variables: { workItemId },\n skip: !workspaceId || !workItemId,\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 }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n const task = data?.planmagnetWorkItem;\n if (!task) return <div className=\"p-6 text-muted-foreground\">Task not found.</div>;\n\n const statusDisplay = task.status.toLowerCase().replace('_', ' ');\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <h1 className=\"text-2xl font-semibold\">{task.title}</h1>\n <p className=\"text-sm text-muted-foreground\">\n {task.key} · {task.type.toLowerCase()}\n </p>\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>Description</CardTitle>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm\">{task.description ?? 'No description provided.'}</p>\n </CardContent>\n </Card>\n <LinkedDocsPanel workItemId={task.id} />\n <WorkItemComments workItemId={task.id} />\n <WorkItemActivity workItemId={task.id} />\n </div>\n <div className=\"space-y-6\">\n <Card>\n <CardHeader>\n <CardTitle>Details</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3 text-sm\">\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Status</span>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${statusColor[task.status] ?? ''}`}\n >\n {statusDisplay}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Priority</span>\n <span\n className={`text-xs px-2 py-0.5 rounded-full capitalize ${priorityColor[task.priority] ?? ''}`}\n >\n {task.priority.toLowerCase()}\n </span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Type</span>\n <Badge variant=\"outline\" className=\"capitalize\">\n {task.type.toLowerCase()}\n </Badge>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Story Points</span>\n <span className=\"font-medium\">{task.storyPoints ?? 0}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Assignee</span>\n <span>{task.assigneeId ?? 'Unassigned'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Reporter</span>\n <span>{task.reporterId ?? 'Unknown'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Key</span>\n <span>{task.key}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Due Date</span>\n <span>{task.dueDate ?? 'Not set'}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Created</span>\n <span>{task.createdAt}</span>\n </div>\n <div className=\"flex justify-between\">\n <span className=\"text-muted-foreground\">Updated</span>\n <span>{task.updatedAt}</span>\n </div>\n <div>\n <span className=\"text-muted-foreground text-xs\">Labels</span>\n <div className=\"flex gap-1 mt-1 flex-wrap\">\n {(task.labels ?? []).map((l) => (\n <span key={l} className=\"text-xs px-2 py-0.5 rounded bg-muted\">\n {l}\n </span>\n ))}\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAqBA,IAAM,IAAgB,CAAG;;;;;;;;;;;;;;;;;;;;;;GAwBnB,IAAqB,CAAG;;;;;;;;;;GAYxB,IAAa,CAAG;;;;;;GAQhB,IAAwB,CAAG;;;;;;GAQ3B,IAA4B,CAAG;;;;GAkC/B,IAAwC;CAC5C,KAAK;CACL,QAAQ;CACR,MAAM;CACN,UAAU;CACX,EAEK,IAAsC;CAC1C,SAAS;CACT,MAAM;CACN,aAAa;CACb,WAAW;CACX,MAAM;CACN,SAAS;CACT,SAAS;CACT,WAAW;CACZ,EAEK,IAAyC;CAC7C,OAAO;CACP,WAAW;CACX,UAAU;CACX;AAUD,SAAS,EAAgB,EAAE,iBAAsC;CAC/D,IAAM,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAU,KAAe,EAAS,GAAG,EACtC,CAAC,GAAY,KAAi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version":3,"file":"SprintControls.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/sprints/SprintControls.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AACxF,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAQ3D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAI/D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAsCD,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,
|
|
1
|
+
{"version":3,"file":"SprintControls.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/sprints/SprintControls.tsx"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,WAAW,CAAC;AACxF,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAQ3D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAI/D;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAExD;AAsCD,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,kDA2DA;AAsFD,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAQD,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,SAAS,EACT,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,2CA2EA;AAqKD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,2CAuKvF"}
|
|
@@ -61,7 +61,7 @@ function H({ sprintId: e, sprintName: n, status: o }) {
|
|
|
61
61
|
refetchQueries: L,
|
|
62
62
|
awaitRefetchQueries: !0
|
|
63
63
|
}, [l, d] = u(R, s), [m, h] = u(z, s), [g, _] = u(B, s), [v, y] = r(null), b = d.loading || h.loading || _.loading, x = F(o);
|
|
64
|
-
if (x.length === 0) return null;
|
|
64
|
+
if (x.length === 0) return v ? /* @__PURE__ */ f(V, { message: v }) : null;
|
|
65
65
|
let S = async (n) => {
|
|
66
66
|
y(null);
|
|
67
67
|
try {
|