@burdenoff/microfe-planmagnet 2026.925.8 → 2026.925.10
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 +49 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/planmagnet/comments/WorkItemComments.d.ts +4 -0
- package/dist/planmagnet/comments/WorkItemComments.d.ts.map +1 -0
- package/dist/planmagnet/comments/WorkItemComments.js +257 -0
- package/dist/planmagnet/comments/WorkItemComments.js.map +1 -0
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +129 -127
- 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
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
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
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { WorkItemComments as r } from "../comments/WorkItemComments.js";
|
|
5
|
+
import { useState as i } from "react";
|
|
6
|
+
import { FileText as a, Plus as o, X as s } from "lucide-react";
|
|
7
|
+
import { gql as c } from "@apollo/client";
|
|
8
|
+
import { useMutation as l, useQuery as u } from "@apollo/client/react";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { Badge as p, Button as m, Card as h, CardContent as g, CardHeader as _, CardTitle as v, Input as y } from "@burdenoff/fe-libs/ui";
|
|
10
11
|
//#region src/planmagnet/pages/TasksTaskDetailPagePage.tsx
|
|
11
|
-
var
|
|
12
|
+
var b = c`
|
|
12
13
|
query GetWorkItemDetail($workItemId: ID!) {
|
|
13
14
|
planmagnetWorkItem(id: $workItemId) {
|
|
14
15
|
id
|
|
@@ -30,7 +31,7 @@ var y = s`
|
|
|
30
31
|
updatedAt
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
`,
|
|
34
|
+
`, x = c`
|
|
34
35
|
query GetWorkItemDocs($workItemId: ID!) {
|
|
35
36
|
planmagnetWorkItemDocs(workItemId: $workItemId) {
|
|
36
37
|
id
|
|
@@ -40,28 +41,28 @@ var y = s`
|
|
|
40
41
|
updatedAt
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
`,
|
|
44
|
+
`, S = c`
|
|
44
45
|
mutation CreateDocForWorkItem($input: PlanmagnetCreateDocInput!) {
|
|
45
46
|
planmagnetCreateDoc(input: $input) {
|
|
46
47
|
id
|
|
47
48
|
}
|
|
48
49
|
}
|
|
49
|
-
`,
|
|
50
|
+
`, C = c`
|
|
50
51
|
mutation LinkDocToWorkItem($docId: ID!, $workItemId: ID!) {
|
|
51
52
|
planmagnetLinkDocToWorkItem(docId: $docId, workItemId: $workItemId) {
|
|
52
53
|
id
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
`,
|
|
56
|
+
`, w = c`
|
|
56
57
|
mutation UnlinkDocFromWorkItem($docId: ID!, $workItemId: ID!) {
|
|
57
58
|
planmagnetUnlinkDocFromWorkItem(docId: $docId, workItemId: $workItemId)
|
|
58
59
|
}
|
|
59
|
-
`,
|
|
60
|
+
`, T = {
|
|
60
61
|
LOW: "bg-gray-100 text-gray-800",
|
|
61
62
|
MEDIUM: "bg-blue-100 text-blue-800",
|
|
62
63
|
HIGH: "bg-orange-100 text-orange-800",
|
|
63
64
|
CRITICAL: "bg-red-100 text-red-800"
|
|
64
|
-
},
|
|
65
|
+
}, E = {
|
|
65
66
|
BACKLOG: "bg-gray-100 text-gray-800",
|
|
66
67
|
TODO: "bg-blue-100 text-blue-800",
|
|
67
68
|
IN_PROGRESS: "bg-yellow-100 text-yellow-800",
|
|
@@ -70,21 +71,21 @@ var y = s`
|
|
|
70
71
|
BLOCKED: "bg-red-100 text-red-800",
|
|
71
72
|
TESTING: "bg-teal-100 text-teal-800",
|
|
72
73
|
CANCELLED: "bg-gray-100 text-gray-800"
|
|
73
|
-
},
|
|
74
|
+
}, D = {
|
|
74
75
|
DRAFT: "bg-gray-100 text-gray-800",
|
|
75
76
|
PUBLISHED: "bg-green-100 text-green-800",
|
|
76
77
|
ARCHIVED: "bg-gray-100 text-gray-500"
|
|
77
78
|
};
|
|
78
|
-
function
|
|
79
|
-
let [
|
|
79
|
+
function O({ workItemId: e }) {
|
|
80
|
+
let [r, c] = i(!1), [p, b] = i(""), [T, E] = i(""), { data: O, loading: k, error: A, refetch: j } = u(x, {
|
|
80
81
|
variables: { workItemId: e },
|
|
81
82
|
skip: !e
|
|
82
|
-
}), [M, { loading: N }] =
|
|
83
|
-
if (!(!
|
|
83
|
+
}), [M, { loading: N }] = l(S), [P] = l(C), [F, { loading: I }] = l(w), [L, R] = i(null), z = O?.planmagnetWorkItemDocs ?? [], B = async () => {
|
|
84
|
+
if (!(!p.trim() || !T.trim())) {
|
|
84
85
|
R(null);
|
|
85
86
|
try {
|
|
86
87
|
let n = (await t(M({ variables: { input: {
|
|
87
|
-
title:
|
|
88
|
+
title: p.trim(),
|
|
88
89
|
content: T.trim()
|
|
89
90
|
} } }))).data?.planmagnetCreateDoc?.id;
|
|
90
91
|
n && await t(P({ variables: {
|
|
@@ -95,7 +96,7 @@ function D({ workItemId: e }) {
|
|
|
95
96
|
R(e instanceof Error ? e.message : "The doc could not be saved.");
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
|
-
|
|
99
|
+
b(""), E(""), c(!1), j();
|
|
99
100
|
}
|
|
100
101
|
}, V = async (n) => {
|
|
101
102
|
R(null);
|
|
@@ -110,168 +111,169 @@ function D({ workItemId: e }) {
|
|
|
110
111
|
}
|
|
111
112
|
j();
|
|
112
113
|
};
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
+
return /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ f(_, {
|
|
114
115
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
116
|
+
children: [/* @__PURE__ */ d(v, { children: "Linked Docs" }), !r && /* @__PURE__ */ f(m, {
|
|
116
117
|
size: "sm",
|
|
117
118
|
variant: "outline",
|
|
118
|
-
onClick: () =>
|
|
119
|
-
children: [/* @__PURE__ */
|
|
119
|
+
onClick: () => c(!0),
|
|
120
|
+
children: [/* @__PURE__ */ d(o, { className: "h-4 w-4 mr-1" }), "New Doc"]
|
|
120
121
|
})]
|
|
121
|
-
}), /* @__PURE__ */
|
|
122
|
+
}), /* @__PURE__ */ f(g, {
|
|
122
123
|
className: "space-y-4",
|
|
123
124
|
children: [
|
|
124
|
-
|
|
125
|
+
r && /* @__PURE__ */ f("div", {
|
|
125
126
|
className: "space-y-3 rounded-md border border-input p-3",
|
|
126
127
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ d(y, {
|
|
128
129
|
placeholder: "Doc title",
|
|
129
|
-
value:
|
|
130
|
-
onChange: (e) =>
|
|
130
|
+
value: p,
|
|
131
|
+
onChange: (e) => b(e.target.value)
|
|
131
132
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ d(n, {
|
|
133
134
|
value: T,
|
|
134
|
-
onChange:
|
|
135
|
+
onChange: E,
|
|
135
136
|
placeholder: "Write the spec/doc content...",
|
|
136
137
|
minHeight: 140
|
|
137
138
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ f("div", {
|
|
139
140
|
className: "flex gap-2 justify-end",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ d(m, {
|
|
141
142
|
size: "sm",
|
|
142
143
|
variant: "ghost",
|
|
143
144
|
onClick: () => {
|
|
144
|
-
|
|
145
|
+
c(!1), b(""), E("");
|
|
145
146
|
},
|
|
146
147
|
children: "Cancel"
|
|
147
|
-
}), /* @__PURE__ */
|
|
148
|
+
}), /* @__PURE__ */ d(m, {
|
|
148
149
|
size: "sm",
|
|
149
|
-
disabled: N || !
|
|
150
|
+
disabled: N || !p.trim() || !T.trim(),
|
|
150
151
|
onClick: B,
|
|
151
152
|
children: N ? "Creating..." : "Create & Link"
|
|
152
153
|
})]
|
|
153
154
|
})
|
|
154
155
|
]
|
|
155
156
|
}),
|
|
156
|
-
k && /* @__PURE__ */
|
|
157
|
+
k && /* @__PURE__ */ d("p", {
|
|
157
158
|
className: "text-sm text-muted-foreground",
|
|
158
159
|
children: "Loading docs..."
|
|
159
160
|
}),
|
|
160
|
-
A && /* @__PURE__ */
|
|
161
|
+
A && /* @__PURE__ */ f("p", {
|
|
161
162
|
className: "text-sm text-red-500",
|
|
162
163
|
children: ["Error: ", A.message]
|
|
163
164
|
}),
|
|
164
|
-
L && /* @__PURE__ */
|
|
165
|
+
L && /* @__PURE__ */ d("p", {
|
|
165
166
|
role: "alert",
|
|
166
167
|
className: "text-sm text-destructive",
|
|
167
168
|
children: L
|
|
168
169
|
}),
|
|
169
|
-
!k && !A && z.length === 0 && !
|
|
170
|
+
!k && !A && z.length === 0 && !r && /* @__PURE__ */ d("p", {
|
|
170
171
|
className: "text-sm text-muted-foreground",
|
|
171
172
|
children: "No docs linked to this work item yet."
|
|
172
173
|
}),
|
|
173
|
-
z.map((e) => /* @__PURE__ */
|
|
174
|
+
z.map((e) => /* @__PURE__ */ f("div", {
|
|
174
175
|
className: "flex items-center justify-between gap-3 rounded-md border border-input p-3",
|
|
175
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ f("div", {
|
|
176
177
|
className: "flex items-center gap-2 min-w-0",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ d(a, { className: "h-4 w-4 text-muted-foreground shrink-0" }), /* @__PURE__ */ f("div", {
|
|
178
179
|
className: "min-w-0",
|
|
179
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ d("p", {
|
|
180
181
|
className: "text-sm font-medium truncate",
|
|
181
182
|
children: e.title
|
|
182
|
-
}), /* @__PURE__ */
|
|
183
|
+
}), /* @__PURE__ */ f("p", {
|
|
183
184
|
className: "text-xs text-muted-foreground",
|
|
184
185
|
children: ["v", e.version]
|
|
185
186
|
})]
|
|
186
187
|
})]
|
|
187
|
-
}), /* @__PURE__ */
|
|
188
|
+
}), /* @__PURE__ */ f("div", {
|
|
188
189
|
className: "flex items-center gap-2 shrink-0",
|
|
189
|
-
children: [/* @__PURE__ */
|
|
190
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
190
|
+
children: [/* @__PURE__ */ d("span", {
|
|
191
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${D[e.status] ?? ""}`,
|
|
191
192
|
children: e.status.toLowerCase()
|
|
192
|
-
}), /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ d(m, {
|
|
193
194
|
size: "icon",
|
|
194
195
|
variant: "ghost",
|
|
195
196
|
disabled: I,
|
|
196
197
|
onClick: () => V(e.id),
|
|
197
198
|
"aria-label": `Unlink ${e.title}`,
|
|
198
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ d(s, { className: "h-4 w-4" })
|
|
199
200
|
})]
|
|
200
201
|
})]
|
|
201
202
|
}, e.id))
|
|
202
203
|
]
|
|
203
204
|
})] });
|
|
204
205
|
}
|
|
205
|
-
function
|
|
206
|
-
let { workspaceId: t } = e(), n = new URLSearchParams(window.location.search).get("taskId") ?? "", { data:
|
|
206
|
+
function k() {
|
|
207
|
+
let { workspaceId: t } = e(), n = new URLSearchParams(window.location.search).get("taskId") ?? "", { data: i, loading: a, error: o } = u(b, {
|
|
207
208
|
variables: { workItemId: n },
|
|
208
209
|
skip: !t || !n
|
|
209
210
|
});
|
|
210
|
-
if (
|
|
211
|
+
if (a) return /* @__PURE__ */ d("div", {
|
|
211
212
|
className: "flex items-center justify-center p-12",
|
|
212
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ d("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
213
214
|
});
|
|
214
|
-
if (
|
|
215
|
+
if (o) return /* @__PURE__ */ f("div", {
|
|
215
216
|
className: "p-6 text-red-500",
|
|
216
|
-
children: ["Error: ",
|
|
217
|
+
children: ["Error: ", o.message]
|
|
217
218
|
});
|
|
218
|
-
let
|
|
219
|
-
if (!
|
|
219
|
+
let s = i?.planmagnetWorkItem;
|
|
220
|
+
if (!s) return /* @__PURE__ */ d("div", {
|
|
220
221
|
className: "p-6 text-muted-foreground",
|
|
221
222
|
children: "Task not found."
|
|
222
223
|
});
|
|
223
|
-
let
|
|
224
|
+
let c = s.status.toLowerCase().replace("_", " "), l = [
|
|
224
225
|
{
|
|
225
226
|
action: "Task created",
|
|
226
|
-
by:
|
|
227
|
-
at:
|
|
227
|
+
by: s.reporterId ?? "Unknown",
|
|
228
|
+
at: s.createdAt
|
|
228
229
|
},
|
|
229
230
|
{
|
|
230
|
-
action: `Assigned to ${
|
|
231
|
-
by:
|
|
232
|
-
at:
|
|
231
|
+
action: `Assigned to ${s.assigneeId ?? "Unassigned"}`,
|
|
232
|
+
by: s.reporterId ?? "Unknown",
|
|
233
|
+
at: s.createdAt
|
|
233
234
|
},
|
|
234
235
|
{
|
|
235
|
-
action: `Status changed to ${
|
|
236
|
-
by:
|
|
237
|
-
at:
|
|
236
|
+
action: `Status changed to ${c}`,
|
|
237
|
+
by: s.assigneeId ?? "Unknown",
|
|
238
|
+
at: s.updatedAt
|
|
238
239
|
}
|
|
239
240
|
];
|
|
240
|
-
return /* @__PURE__ */
|
|
241
|
+
return /* @__PURE__ */ f("div", {
|
|
241
242
|
className: "space-y-6 p-6",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h1", {
|
|
243
244
|
className: "text-2xl font-semibold",
|
|
244
|
-
children:
|
|
245
|
-
}), /* @__PURE__ */
|
|
245
|
+
children: s.title
|
|
246
|
+
}), /* @__PURE__ */ f("p", {
|
|
246
247
|
className: "text-sm text-muted-foreground",
|
|
247
248
|
children: [
|
|
248
|
-
|
|
249
|
+
s.key,
|
|
249
250
|
" · ",
|
|
250
|
-
|
|
251
|
+
s.type.toLowerCase()
|
|
251
252
|
]
|
|
252
|
-
})] }), /* @__PURE__ */
|
|
253
|
+
})] }), /* @__PURE__ */ f("div", {
|
|
253
254
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
+
children: [/* @__PURE__ */ f("div", {
|
|
255
256
|
className: "lg:col-span-2 space-y-6",
|
|
256
257
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
+
/* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(_, { children: /* @__PURE__ */ d(v, { children: "Description" }) }), /* @__PURE__ */ d(g, { children: /* @__PURE__ */ d("p", {
|
|
258
259
|
className: "text-sm",
|
|
259
|
-
children:
|
|
260
|
+
children: s.description ?? "No description provided."
|
|
260
261
|
}) })] }),
|
|
261
|
-
/* @__PURE__ */
|
|
262
|
-
/* @__PURE__ */ d(
|
|
262
|
+
/* @__PURE__ */ d(O, { workItemId: s.id }),
|
|
263
|
+
/* @__PURE__ */ d(r, { workItemId: s.id }),
|
|
264
|
+
/* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(_, { children: /* @__PURE__ */ d(v, { children: "Activity" }) }), /* @__PURE__ */ d(g, { children: /* @__PURE__ */ d("div", {
|
|
263
265
|
className: "space-y-3",
|
|
264
|
-
children:
|
|
266
|
+
children: l.map((e, t) => /* @__PURE__ */ f("div", {
|
|
265
267
|
className: "flex gap-3",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f("div", {
|
|
267
269
|
className: "flex flex-col items-center",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
269
|
-
}), /* @__PURE__ */
|
|
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", {
|
|
270
272
|
className: "pb-3",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
273
|
+
children: [/* @__PURE__ */ d("p", {
|
|
272
274
|
className: "text-sm",
|
|
273
275
|
children: e.action
|
|
274
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ f("p", {
|
|
275
277
|
className: "text-xs text-muted-foreground",
|
|
276
278
|
children: [
|
|
277
279
|
e.by,
|
|
@@ -283,100 +285,100 @@ function O() {
|
|
|
283
285
|
}, t))
|
|
284
286
|
}) })] })
|
|
285
287
|
]
|
|
286
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ d("div", {
|
|
287
289
|
className: "space-y-6",
|
|
288
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ f(h, { children: [/* @__PURE__ */ d(_, { children: /* @__PURE__ */ d(v, { children: "Details" }) }), /* @__PURE__ */ f(g, {
|
|
289
291
|
className: "space-y-3 text-sm",
|
|
290
292
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ f("div", {
|
|
292
294
|
className: "flex justify-between",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ d("span", {
|
|
294
296
|
className: "text-muted-foreground",
|
|
295
297
|
children: "Status"
|
|
296
|
-
}), /* @__PURE__ */
|
|
297
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
298
|
-
children:
|
|
298
|
+
}), /* @__PURE__ */ d("span", {
|
|
299
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${E[s.status] ?? ""}`,
|
|
300
|
+
children: c
|
|
299
301
|
})]
|
|
300
302
|
}),
|
|
301
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ f("div", {
|
|
302
304
|
className: "flex justify-between",
|
|
303
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ d("span", {
|
|
304
306
|
className: "text-muted-foreground",
|
|
305
307
|
children: "Priority"
|
|
306
|
-
}), /* @__PURE__ */
|
|
307
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
308
|
-
children:
|
|
308
|
+
}), /* @__PURE__ */ d("span", {
|
|
309
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${T[s.priority] ?? ""}`,
|
|
310
|
+
children: s.priority.toLowerCase()
|
|
309
311
|
})]
|
|
310
312
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ f("div", {
|
|
312
314
|
className: "flex justify-between",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ d("span", {
|
|
314
316
|
className: "text-muted-foreground",
|
|
315
317
|
children: "Type"
|
|
316
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ d(p, {
|
|
317
319
|
variant: "outline",
|
|
318
320
|
className: "capitalize",
|
|
319
|
-
children:
|
|
321
|
+
children: s.type.toLowerCase()
|
|
320
322
|
})]
|
|
321
323
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ f("div", {
|
|
323
325
|
className: "flex justify-between",
|
|
324
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ d("span", {
|
|
325
327
|
className: "text-muted-foreground",
|
|
326
328
|
children: "Story Points"
|
|
327
|
-
}), /* @__PURE__ */
|
|
329
|
+
}), /* @__PURE__ */ d("span", {
|
|
328
330
|
className: "font-medium",
|
|
329
|
-
children:
|
|
331
|
+
children: s.storyPoints ?? 0
|
|
330
332
|
})]
|
|
331
333
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ f("div", {
|
|
333
335
|
className: "flex justify-between",
|
|
334
|
-
children: [/* @__PURE__ */
|
|
336
|
+
children: [/* @__PURE__ */ d("span", {
|
|
335
337
|
className: "text-muted-foreground",
|
|
336
338
|
children: "Assignee"
|
|
337
|
-
}), /* @__PURE__ */
|
|
339
|
+
}), /* @__PURE__ */ d("span", { children: s.assigneeId ?? "Unassigned" })]
|
|
338
340
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ f("div", {
|
|
340
342
|
className: "flex justify-between",
|
|
341
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ d("span", {
|
|
342
344
|
className: "text-muted-foreground",
|
|
343
345
|
children: "Reporter"
|
|
344
|
-
}), /* @__PURE__ */
|
|
346
|
+
}), /* @__PURE__ */ d("span", { children: s.reporterId ?? "Unknown" })]
|
|
345
347
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ f("div", {
|
|
347
349
|
className: "flex justify-between",
|
|
348
|
-
children: [/* @__PURE__ */
|
|
350
|
+
children: [/* @__PURE__ */ d("span", {
|
|
349
351
|
className: "text-muted-foreground",
|
|
350
352
|
children: "Key"
|
|
351
|
-
}), /* @__PURE__ */
|
|
353
|
+
}), /* @__PURE__ */ d("span", { children: s.key })]
|
|
352
354
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
355
|
+
/* @__PURE__ */ f("div", {
|
|
354
356
|
className: "flex justify-between",
|
|
355
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ d("span", {
|
|
356
358
|
className: "text-muted-foreground",
|
|
357
359
|
children: "Due Date"
|
|
358
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ d("span", { children: s.dueDate ?? "Not set" })]
|
|
359
361
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ f("div", {
|
|
361
363
|
className: "flex justify-between",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ d("span", {
|
|
363
365
|
className: "text-muted-foreground",
|
|
364
366
|
children: "Created"
|
|
365
|
-
}), /* @__PURE__ */
|
|
367
|
+
}), /* @__PURE__ */ d("span", { children: s.createdAt })]
|
|
366
368
|
}),
|
|
367
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ f("div", {
|
|
368
370
|
className: "flex justify-between",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ d("span", {
|
|
370
372
|
className: "text-muted-foreground",
|
|
371
373
|
children: "Updated"
|
|
372
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ d("span", { children: s.updatedAt })]
|
|
373
375
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("span", {
|
|
375
377
|
className: "text-muted-foreground text-xs",
|
|
376
378
|
children: "Labels"
|
|
377
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ d("div", {
|
|
378
380
|
className: "flex gap-1 mt-1 flex-wrap",
|
|
379
|
-
children: (
|
|
381
|
+
children: (s.labels ?? []).map((e) => /* @__PURE__ */ d("span", {
|
|
380
382
|
className: "text-xs px-2 py-0.5 rounded bg-muted",
|
|
381
383
|
children: e
|
|
382
384
|
}, e))
|
|
@@ -388,6 +390,6 @@ function O() {
|
|
|
388
390
|
});
|
|
389
391
|
}
|
|
390
392
|
//#endregion
|
|
391
|
-
export {
|
|
393
|
+
export { k as TasksTaskDetailPagePage };
|
|
392
394
|
|
|
393
395
|
//# 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 { 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 <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":";;;;;;;;;;AAmBA,IAAM,IAAgB,CAAG;;;;;;;;;;;;;;;;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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,IA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CACF,EAAA,CAAA;MACM;OACT,EAAA,CAAA;IACH,CAAA,CACF;KACF"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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 {
|