@burdenoff/microfe-planmagnet 2026.925.7 → 2026.925.9
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/board/ProjectBoard.d.ts.map +1 -1
- package/dist/planmagnet/board/ProjectBoard.js +159 -158
- package/dist/planmagnet/board/ProjectBoard.js.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 +260 -0
- package/dist/planmagnet/comments/WorkItemComments.js.map +1 -0
- package/dist/planmagnet/create/CreateDialogs.d.ts.map +1 -1
- package/dist/planmagnet/create/CreateDialogs.js +118 -117
- package/dist/planmagnet/create/CreateDialogs.js.map +1 -1
- package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +322 -280
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksEditTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +166 -143
- 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 +202 -201
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/dist/planmagnet/utils/mutationResult.d.ts +16 -0
- package/dist/planmagnet/utils/mutationResult.d.ts.map +1 -0
- package/dist/planmagnet/utils/mutationResult.js +10 -0
- package/dist/planmagnet/utils/mutationResult.js.map +1 -0
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectBoard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProjectBoard.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/board/ProjectBoard.tsx"],"names":[],"mappings":"AAwLA,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,WAAW,GACZ,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,2CAiKA"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { throwOnError as r } from "../utils/mutationResult.js";
|
|
4
|
+
import { useState as i } from "react";
|
|
5
|
+
import { ChevronLeft as a, ChevronRight as o, LayoutGrid as s, Pencil as c, Plus as l } from "lucide-react";
|
|
6
|
+
import { gql as u } from "@apollo/client";
|
|
7
|
+
import { useMutation as d, useQuery as f } from "@apollo/client/react";
|
|
8
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
|
+
import { AlertDialog as h, AlertDialogAction as g, AlertDialogCancel as _, AlertDialogContent as v, AlertDialogDescription as y, AlertDialogFooter as b, AlertDialogHeader as x, AlertDialogTitle as S, AlertDialogTrigger as C, Button as w, Card as T, CardContent as E, Input as D, ResponsiveDialog as O, ResponsiveDialogContent as k, ResponsiveDialogDescription as A, ResponsiveDialogFooter as j, ResponsiveDialogHeader as M, ResponsiveDialogTitle as N, ResponsiveDialogTrigger as ee } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/planmagnet/board/ProjectBoard.tsx
|
|
10
|
-
var
|
|
11
|
+
var te = [
|
|
11
12
|
"BACKLOG",
|
|
12
13
|
"TODO",
|
|
13
14
|
"IN_PROGRESS",
|
|
@@ -15,7 +16,7 @@ var ee = [
|
|
|
15
16
|
"TESTING",
|
|
16
17
|
"DONE",
|
|
17
18
|
"CANCELLED"
|
|
18
|
-
], P = (e) => e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "), F = 100, I =
|
|
19
|
+
], P = (e) => e.charAt(0) + e.slice(1).toLowerCase().replace(/_/g, " "), F = 100, I = u`
|
|
19
20
|
query ProjectBoards($workspaceId: ID!, $projectId: String) {
|
|
20
21
|
planmagnetBoards(
|
|
21
22
|
workspaceId: $workspaceId
|
|
@@ -29,7 +30,7 @@ var ee = [
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
|
-
`, L =
|
|
33
|
+
`, L = u`
|
|
33
34
|
query ProjectBoard($id: ID!) {
|
|
34
35
|
planmagnetBoard(id: $id) {
|
|
35
36
|
id
|
|
@@ -56,35 +57,35 @@ var ee = [
|
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
`, R =
|
|
60
|
+
`, R = u`
|
|
60
61
|
mutation ProjectBoardMoveCard($boardId: ID!, $input: PlanmagnetMoveCardInput!) {
|
|
61
62
|
planmagnetMoveCard(boardId: $boardId, input: $input) {
|
|
62
63
|
id
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
`, z =
|
|
66
|
+
`, z = u`
|
|
66
67
|
mutation ProjectBoardCreate($input: PlanmagnetCreateBoardInput!) {
|
|
67
68
|
planmagnetCreateBoard(input: $input) {
|
|
68
69
|
id
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
`, B =
|
|
72
|
+
`, B = u`
|
|
72
73
|
mutation ProjectBoardCreateColumn($input: PlanmagnetCreateBoardColumnInput!) {
|
|
73
74
|
planmagnetCreateBoardColumn(input: $input) {
|
|
74
75
|
id
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
`, V =
|
|
78
|
+
`, V = u`
|
|
78
79
|
mutation ProjectBoardUpdateColumn($id: ID!, $input: PlanmagnetUpdateBoardColumnInput!) {
|
|
79
80
|
planmagnetUpdateBoardColumn(id: $id, input: $input) {
|
|
80
81
|
id
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
|
-
`, H =
|
|
84
|
+
`, H = u`
|
|
84
85
|
mutation ProjectBoardDeleteColumn($id: ID!) {
|
|
85
86
|
planmagnetDeleteBoardColumn(id: $id)
|
|
86
87
|
}
|
|
87
|
-
`, U =
|
|
88
|
+
`, U = u`
|
|
88
89
|
mutation ProjectBoardReorder($boardId: ID!, $input: PlanmagnetReorderColumnsInput!) {
|
|
89
90
|
planmagnetReorderColumns(boardId: $boardId, input: $input) {
|
|
90
91
|
id
|
|
@@ -98,145 +99,145 @@ var ee = [
|
|
|
98
99
|
"GetDashboardData"
|
|
99
100
|
], G = (e, t) => e instanceof Error ? e.message : t;
|
|
100
101
|
function K({ message: e }) {
|
|
101
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ p("p", {
|
|
102
103
|
role: "alert",
|
|
103
104
|
className: "text-sm text-destructive",
|
|
104
105
|
children: e
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
function q({ projectId: t, projectName: n }) {
|
|
108
|
-
let { workspaceId:
|
|
109
|
+
let { workspaceId: a } = e(), [o, c] = i(null), [u, h] = i(null), { data: g, loading: _ } = f(I, {
|
|
109
110
|
variables: {
|
|
110
|
-
workspaceId:
|
|
111
|
+
workspaceId: a,
|
|
111
112
|
projectId: t
|
|
112
113
|
},
|
|
113
|
-
skip: !
|
|
114
|
-
}),
|
|
115
|
-
variables: { id:
|
|
116
|
-
skip: !
|
|
117
|
-
}),
|
|
114
|
+
skip: !a
|
|
115
|
+
}), v = g?.planmagnetBoards.items ?? [], y = (o && v.some((e) => e.id === o) ? o : null) ?? v.find((e) => e.isDefault)?.id ?? v[0]?.id ?? null, { data: b, loading: x } = f(L, {
|
|
116
|
+
variables: { id: y },
|
|
117
|
+
skip: !y
|
|
118
|
+
}), S = b?.planmagnetBoard ?? null, [C, D] = d(z, {
|
|
118
119
|
refetchQueries: W,
|
|
119
120
|
awaitRefetchQueries: !0
|
|
120
|
-
}), [
|
|
121
|
+
}), [O, k] = d(R, {
|
|
121
122
|
refetchQueries: W,
|
|
122
123
|
awaitRefetchQueries: !0
|
|
123
|
-
}), [
|
|
124
|
+
}), [A] = d(U, {
|
|
124
125
|
refetchQueries: W,
|
|
125
126
|
awaitRefetchQueries: !0
|
|
126
|
-
}),
|
|
127
|
-
|
|
127
|
+
}), j = async (e, t) => {
|
|
128
|
+
h(null);
|
|
128
129
|
try {
|
|
129
|
-
await e();
|
|
130
|
+
await r(e());
|
|
130
131
|
} catch (e) {
|
|
131
|
-
|
|
132
|
+
h(G(e, t));
|
|
132
133
|
}
|
|
133
|
-
},
|
|
134
|
-
boardId:
|
|
134
|
+
}, M = (e, t) => j(() => O({ variables: {
|
|
135
|
+
boardId: y,
|
|
135
136
|
input: {
|
|
136
137
|
workItemId: e,
|
|
137
138
|
targetColumnId: t
|
|
138
139
|
}
|
|
139
|
-
} }), "The card could not be moved."),
|
|
140
|
-
if (!
|
|
141
|
-
let n =
|
|
142
|
-
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]],
|
|
143
|
-
boardId:
|
|
140
|
+
} }), "The card could not be moved."), N = (e, t) => {
|
|
141
|
+
if (!S) return;
|
|
142
|
+
let n = S.columns.map((e) => e.id), r = e + t;
|
|
143
|
+
if (!(r < 0 || r >= n.length)) return [n[e], n[r]] = [n[r], n[e]], j(() => A({ variables: {
|
|
144
|
+
boardId: y,
|
|
144
145
|
input: { columnIds: n }
|
|
145
146
|
} }), "The columns could not be reordered.");
|
|
146
147
|
};
|
|
147
|
-
return
|
|
148
|
+
return _ && !g ? /* @__PURE__ */ p("p", {
|
|
148
149
|
className: "text-sm text-muted-foreground p-4",
|
|
149
150
|
children: "Loading board…"
|
|
150
|
-
}) :
|
|
151
|
+
}) : y ? /* @__PURE__ */ m("div", {
|
|
151
152
|
className: "space-y-3",
|
|
152
153
|
"data-testid": "project-board",
|
|
153
154
|
children: [
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ m("div", {
|
|
155
156
|
className: "flex flex-wrap items-center gap-3",
|
|
156
157
|
children: [
|
|
157
|
-
|
|
158
|
+
v.length > 1 && /* @__PURE__ */ p("select", {
|
|
158
159
|
"aria-label": "Board",
|
|
159
160
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm",
|
|
160
|
-
value:
|
|
161
|
-
onChange: (e) =>
|
|
162
|
-
children:
|
|
161
|
+
value: y,
|
|
162
|
+
onChange: (e) => c(e.target.value),
|
|
163
|
+
children: v.map((e) => /* @__PURE__ */ p("option", {
|
|
163
164
|
value: e.id,
|
|
164
165
|
children: e.name
|
|
165
166
|
}, e.id))
|
|
166
167
|
}),
|
|
167
|
-
|
|
168
|
+
S && S.unplacedCount > 0 && /* @__PURE__ */ m("p", {
|
|
168
169
|
className: "text-xs text-muted-foreground",
|
|
169
170
|
"data-testid": "board-unplaced",
|
|
170
171
|
children: [
|
|
171
|
-
|
|
172
|
+
S.unplacedCount,
|
|
172
173
|
" work item",
|
|
173
|
-
|
|
174
|
+
S.unplacedCount === 1 ? " is" : "s are",
|
|
174
175
|
" not on this board: ",
|
|
175
|
-
|
|
176
|
+
S.unplacedCount === 1 ? "its status has" : "their status has",
|
|
176
177
|
" no column."
|
|
177
178
|
]
|
|
178
179
|
}),
|
|
179
|
-
|
|
180
|
+
S && /* @__PURE__ */ p("div", {
|
|
180
181
|
className: "ml-auto",
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
+
children: /* @__PURE__ */ p(Y, { boardId: S.id })
|
|
182
183
|
})
|
|
183
184
|
]
|
|
184
185
|
}),
|
|
185
|
-
|
|
186
|
-
|
|
186
|
+
u && /* @__PURE__ */ p(K, { message: u }),
|
|
187
|
+
x && !S ? /* @__PURE__ */ p("p", {
|
|
187
188
|
className: "text-sm text-muted-foreground p-4",
|
|
188
189
|
children: "Loading board…"
|
|
189
|
-
}) : /* @__PURE__ */
|
|
190
|
+
}) : /* @__PURE__ */ m("div", {
|
|
190
191
|
className: "flex gap-3 overflow-x-auto pb-2",
|
|
191
|
-
children: [
|
|
192
|
-
boardId:
|
|
192
|
+
children: [S?.columns.map((e, t) => /* @__PURE__ */ p(J, {
|
|
193
|
+
boardId: S.id,
|
|
193
194
|
column: e,
|
|
194
|
-
columns:
|
|
195
|
+
columns: S.columns,
|
|
195
196
|
isFirst: t === 0,
|
|
196
|
-
isLast: t ===
|
|
197
|
-
busy:
|
|
198
|
-
onMove:
|
|
199
|
-
onShift: (e) =>
|
|
200
|
-
}, e.id)),
|
|
197
|
+
isLast: t === S.columns.length - 1,
|
|
198
|
+
busy: k.loading,
|
|
199
|
+
onMove: M,
|
|
200
|
+
onShift: (e) => N(t, e)
|
|
201
|
+
}, e.id)), S && S.columns.length === 0 && /* @__PURE__ */ p("p", {
|
|
201
202
|
className: "text-sm text-muted-foreground p-4",
|
|
202
203
|
children: "This board has no columns. Add one to start placing work."
|
|
203
204
|
})]
|
|
204
205
|
})
|
|
205
206
|
]
|
|
206
|
-
}) : /* @__PURE__ */
|
|
207
|
+
}) : /* @__PURE__ */ p(T, { children: /* @__PURE__ */ m(E, {
|
|
207
208
|
className: "p-8 text-center space-y-3",
|
|
208
209
|
"data-testid": "board-empty",
|
|
209
210
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ p(s, { className: "h-8 w-8 mx-auto text-muted-foreground" }),
|
|
212
|
+
/* @__PURE__ */ m("p", {
|
|
212
213
|
className: "text-sm text-muted-foreground",
|
|
213
214
|
children: [n, " has no board yet."]
|
|
214
215
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ m(w, {
|
|
216
217
|
size: "sm",
|
|
217
|
-
disabled:
|
|
218
|
-
onClick: () =>
|
|
218
|
+
disabled: D.loading,
|
|
219
|
+
onClick: () => j(() => C({ variables: { input: {
|
|
219
220
|
projectId: t,
|
|
220
221
|
name: `${n} board`,
|
|
221
222
|
type: "KANBAN",
|
|
222
223
|
isDefault: !0,
|
|
223
224
|
withDefaultColumns: !0
|
|
224
225
|
} } }), "The board could not be created."),
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ p(l, { className: "mr-1 h-4 w-4" }), D.loading ? "Creating…" : "Create board"]
|
|
226
227
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ p("p", {
|
|
228
229
|
className: "text-xs text-muted-foreground",
|
|
229
230
|
children: "Starts with one column per status: Backlog, To Do, In Progress, In Review, Testing, Done."
|
|
230
231
|
}),
|
|
231
|
-
|
|
232
|
+
u && /* @__PURE__ */ p(K, { message: u })
|
|
232
233
|
]
|
|
233
234
|
}) });
|
|
234
235
|
}
|
|
235
|
-
function J({ boardId: e, column:
|
|
236
|
-
let h = t(), [g, _] =
|
|
237
|
-
return /* @__PURE__ */
|
|
238
|
-
"aria-label": `${
|
|
239
|
-
"data-testid": `board-column-${
|
|
236
|
+
function J({ boardId: e, column: r, columns: s, isFirst: c, isLast: l, busy: u, onMove: d, onShift: f }) {
|
|
237
|
+
let h = t(), [g, _] = i(!1), v = r.cards.totalCount, y = r.wipLimit != null && r.wipLimit > 0 && v >= r.wipLimit, b = v - r.cards.items.length;
|
|
238
|
+
return /* @__PURE__ */ m("section", {
|
|
239
|
+
"aria-label": `${r.name} column`,
|
|
240
|
+
"data-testid": `board-column-${r.name}`,
|
|
240
241
|
className: `min-w-[240px] w-[240px] shrink-0 rounded-md border bg-muted/30 ${g ? "ring-2 ring-primary" : ""}`,
|
|
241
242
|
onDragOver: (e) => {
|
|
242
243
|
e.preventDefault(), _(!0);
|
|
@@ -245,59 +246,59 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
|
|
|
245
246
|
onDrop: (e) => {
|
|
246
247
|
e.preventDefault(), _(!1);
|
|
247
248
|
let t = e.dataTransfer.getData("text/plain");
|
|
248
|
-
t && d(t,
|
|
249
|
+
t && d(t, r.id);
|
|
249
250
|
},
|
|
250
251
|
children: [
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ m("header", {
|
|
252
253
|
className: "p-2 border-b space-y-1",
|
|
253
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ m("div", {
|
|
254
255
|
className: "flex items-center justify-between gap-1",
|
|
255
|
-
children: [/* @__PURE__ */
|
|
256
|
+
children: [/* @__PURE__ */ p("h3", {
|
|
256
257
|
className: "text-sm font-medium truncate",
|
|
257
|
-
children:
|
|
258
|
-
}), /* @__PURE__ */
|
|
259
|
-
"data-testid": `board-column-count-${
|
|
258
|
+
children: r.name
|
|
259
|
+
}), /* @__PURE__ */ p("span", {
|
|
260
|
+
"data-testid": `board-column-count-${r.name}`,
|
|
260
261
|
className: `text-xs rounded-full px-1.5 ${y ? "bg-status-warning-subtle text-status-warning" : "bg-muted"}`,
|
|
261
|
-
title:
|
|
262
|
-
children:
|
|
262
|
+
title: r.wipLimit ? `WIP limit ${r.wipLimit}` : void 0,
|
|
263
|
+
children: r.wipLimit ? `${v} / ${r.wipLimit}` : v
|
|
263
264
|
})]
|
|
264
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ m("div", {
|
|
265
266
|
className: "flex items-center justify-between gap-1",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ p("span", {
|
|
267
268
|
className: "text-[11px] text-muted-foreground",
|
|
268
|
-
children:
|
|
269
|
-
}), /* @__PURE__ */
|
|
269
|
+
children: r.mappedStatus ? `Sets status: ${P(r.mappedStatus)}` : "No status"
|
|
270
|
+
}), /* @__PURE__ */ m("span", {
|
|
270
271
|
className: "flex",
|
|
271
272
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ p(w, {
|
|
273
274
|
size: "icon",
|
|
274
275
|
variant: "ghost",
|
|
275
276
|
className: "h-6 w-6",
|
|
276
|
-
"aria-label": `Move ${
|
|
277
|
+
"aria-label": `Move ${r.name} column left`,
|
|
277
278
|
disabled: c,
|
|
278
|
-
onClick: () =>
|
|
279
|
-
children: /* @__PURE__ */
|
|
279
|
+
onClick: () => f(-1),
|
|
280
|
+
children: /* @__PURE__ */ p(a, { className: "h-3.5 w-3.5" })
|
|
280
281
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ p(w, {
|
|
282
283
|
size: "icon",
|
|
283
284
|
variant: "ghost",
|
|
284
285
|
className: "h-6 w-6",
|
|
285
|
-
"aria-label": `Move ${
|
|
286
|
+
"aria-label": `Move ${r.name} column right`,
|
|
286
287
|
disabled: l,
|
|
287
|
-
onClick: () =>
|
|
288
|
-
children: /* @__PURE__ */
|
|
288
|
+
onClick: () => f(1),
|
|
289
|
+
children: /* @__PURE__ */ p(o, { className: "h-3.5 w-3.5" })
|
|
289
290
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ p(Y, {
|
|
291
292
|
boardId: e,
|
|
292
|
-
column:
|
|
293
|
+
column: r
|
|
293
294
|
})
|
|
294
295
|
]
|
|
295
296
|
})]
|
|
296
297
|
})]
|
|
297
298
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
+
/* @__PURE__ */ m("ul", {
|
|
299
300
|
className: "p-2 space-y-2 min-h-[80px]",
|
|
300
|
-
children: [
|
|
301
|
+
children: [r.cards.items.map((e) => /* @__PURE__ */ m("li", {
|
|
301
302
|
draggable: !0,
|
|
302
303
|
onDragStart: (t) => {
|
|
303
304
|
t.dataTransfer.setData("text/plain", e.id), t.dataTransfer.effectAllowed = "move";
|
|
@@ -305,43 +306,43 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
|
|
|
305
306
|
className: "rounded-md border bg-background p-2 space-y-1 cursor-grab",
|
|
306
307
|
"data-testid": "board-card",
|
|
307
308
|
children: [
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ p("button", {
|
|
309
310
|
type: "button",
|
|
310
311
|
className: "text-left text-sm font-medium leading-tight hover:underline",
|
|
311
312
|
onClick: () => h(`/tasks/task-detail-page?taskId=${encodeURIComponent(e.id)}`),
|
|
312
313
|
children: e.title
|
|
313
314
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ m("div", {
|
|
315
316
|
className: "flex items-center justify-between text-[11px] text-muted-foreground",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
317
|
+
children: [/* @__PURE__ */ p("span", { children: e.key }), /* @__PURE__ */ m("span", { children: [e.storyPoints ?? 0, " pts"] })]
|
|
317
318
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ m("div", {
|
|
319
320
|
className: "flex items-center justify-between gap-1 text-[11px] text-muted-foreground",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ p("span", {
|
|
321
322
|
className: "truncate",
|
|
322
|
-
children: e.assigneeId ? /* @__PURE__ */
|
|
323
|
-
}), /* @__PURE__ */
|
|
323
|
+
children: e.assigneeId ? /* @__PURE__ */ p(n, { id: e.assigneeId }) : "Unassigned"
|
|
324
|
+
}), /* @__PURE__ */ m("select", {
|
|
324
325
|
"aria-label": `Move ${e.key} to column`,
|
|
325
326
|
className: "rounded border border-input bg-background px-1 py-0.5 text-[11px]",
|
|
326
327
|
value: "",
|
|
327
328
|
disabled: u,
|
|
328
329
|
onChange: (t) => t.target.value && d(e.id, t.target.value),
|
|
329
|
-
children: [/* @__PURE__ */
|
|
330
|
+
children: [/* @__PURE__ */ p("option", {
|
|
330
331
|
value: "",
|
|
331
332
|
children: "Move…"
|
|
332
|
-
}), s.filter((e) => e.id !==
|
|
333
|
+
}), s.filter((e) => e.id !== r.id).map((e) => /* @__PURE__ */ p("option", {
|
|
333
334
|
value: e.id,
|
|
334
335
|
children: e.name
|
|
335
336
|
}, e.id))]
|
|
336
337
|
})]
|
|
337
338
|
})
|
|
338
339
|
]
|
|
339
|
-
}, e.id)), v === 0 && /* @__PURE__ */
|
|
340
|
+
}, e.id)), v === 0 && /* @__PURE__ */ p("li", {
|
|
340
341
|
className: "text-xs text-muted-foreground text-center py-4",
|
|
341
342
|
children: "Empty"
|
|
342
343
|
})]
|
|
343
344
|
}),
|
|
344
|
-
b > 0 && /* @__PURE__ */
|
|
345
|
+
b > 0 && /* @__PURE__ */ m("p", {
|
|
345
346
|
className: "px-2 pb-2 text-xs text-muted-foreground",
|
|
346
347
|
children: [
|
|
347
348
|
"+",
|
|
@@ -355,128 +356,128 @@ function J({ boardId: e, column: o, columns: s, isFirst: c, isLast: l, busy: u,
|
|
|
355
356
|
});
|
|
356
357
|
}
|
|
357
358
|
function Y({ boardId: e, column: t }) {
|
|
358
|
-
let n = t !== void 0, [
|
|
359
|
+
let n = t !== void 0, [a, o] = i(!1), [s, u] = i(t?.name ?? ""), [f, T] = i(t?.mappedStatus ?? ""), [E, F] = i(t?.wipLimit ? String(t.wipLimit) : ""), [I, L] = i(null), R = {
|
|
359
360
|
refetchQueries: W,
|
|
360
361
|
awaitRefetchQueries: !0
|
|
361
|
-
}, [z, U] =
|
|
362
|
-
|
|
363
|
-
},
|
|
362
|
+
}, [z, U] = d(B, R), [q, J] = d(V, R), [Y, ne] = d(H, R), X = U.loading || J.loading || ne.loading, Z = E.trim() === "" ? null : Number(E), Q = Z !== null && (!Number.isInteger(Z) || Z < 1), re = s.trim() !== "" && !Q && !X, ie = () => {
|
|
363
|
+
u(t?.name ?? ""), T(t?.mappedStatus ?? ""), F(t?.wipLimit ? String(t.wipLimit) : ""), L(null);
|
|
364
|
+
}, ae = async () => {
|
|
364
365
|
L(null);
|
|
365
|
-
let
|
|
366
|
-
name:
|
|
367
|
-
mappedStatus:
|
|
366
|
+
let i = {
|
|
367
|
+
name: s.trim(),
|
|
368
|
+
mappedStatus: f || null,
|
|
368
369
|
wipLimit: Z
|
|
369
370
|
};
|
|
370
371
|
try {
|
|
371
|
-
n ? await q({ variables: {
|
|
372
|
+
n ? await r(q({ variables: {
|
|
372
373
|
id: t.id,
|
|
373
|
-
input:
|
|
374
|
-
} }) : await z({ variables: { input: {
|
|
374
|
+
input: i
|
|
375
|
+
} })) : await r(z({ variables: { input: {
|
|
375
376
|
boardId: e,
|
|
376
377
|
type: "CUSTOM",
|
|
377
|
-
...
|
|
378
|
-
} } }),
|
|
378
|
+
...i
|
|
379
|
+
} } })), o(!1);
|
|
379
380
|
} catch (e) {
|
|
380
381
|
L(G(e, "The column could not be saved."));
|
|
381
382
|
}
|
|
382
383
|
}, $ = n ? `column-${t.id}` : "new-column";
|
|
383
|
-
return /* @__PURE__ */
|
|
384
|
-
open:
|
|
384
|
+
return /* @__PURE__ */ m(O, {
|
|
385
|
+
open: a,
|
|
385
386
|
onOpenChange: (e) => {
|
|
386
|
-
|
|
387
|
+
o(e), e && ie();
|
|
387
388
|
},
|
|
388
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ p(ee, {
|
|
389
390
|
asChild: !0,
|
|
390
|
-
children: n ? /* @__PURE__ */
|
|
391
|
+
children: n ? /* @__PURE__ */ p(w, {
|
|
391
392
|
size: "icon",
|
|
392
393
|
variant: "ghost",
|
|
393
394
|
className: "h-6 w-6",
|
|
394
395
|
"aria-label": `Edit ${t.name} column`,
|
|
395
|
-
children: /* @__PURE__ */
|
|
396
|
-
}) : /* @__PURE__ */
|
|
396
|
+
children: /* @__PURE__ */ p(c, { className: "h-3.5 w-3.5" })
|
|
397
|
+
}) : /* @__PURE__ */ m(w, {
|
|
397
398
|
size: "sm",
|
|
398
399
|
variant: "outline",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
400
|
+
children: [/* @__PURE__ */ p(l, { className: "mr-1 h-4 w-4" }), "Add column"]
|
|
400
401
|
})
|
|
401
|
-
}), /* @__PURE__ */
|
|
402
|
+
}), /* @__PURE__ */ m(k, {
|
|
402
403
|
className: "max-w-md",
|
|
403
404
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
405
|
+
/* @__PURE__ */ m(M, { children: [/* @__PURE__ */ p(N, { children: n ? `Edit ${t.name}` : "Add column" }), /* @__PURE__ */ p(A, { children: "Moving a card into a column that sets a status changes the work item's status." })] }),
|
|
406
|
+
/* @__PURE__ */ m("div", {
|
|
406
407
|
className: "space-y-3",
|
|
407
408
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
409
410
|
htmlFor: `${$}-name`,
|
|
410
411
|
className: "text-sm font-medium",
|
|
411
412
|
children: "Name"
|
|
412
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ p(D, {
|
|
413
414
|
id: `${$}-name`,
|
|
414
415
|
className: "mt-1",
|
|
415
|
-
value:
|
|
416
|
-
onChange: (e) =>
|
|
416
|
+
value: s,
|
|
417
|
+
onChange: (e) => u(e.target.value)
|
|
417
418
|
})] }),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
419
420
|
htmlFor: `${$}-status`,
|
|
420
421
|
className: "text-sm font-medium",
|
|
421
422
|
children: "Sets status"
|
|
422
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ m("select", {
|
|
423
424
|
id: `${$}-status`,
|
|
424
425
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
425
|
-
value:
|
|
426
|
-
onChange: (e) =>
|
|
427
|
-
children: [/* @__PURE__ */
|
|
426
|
+
value: f,
|
|
427
|
+
onChange: (e) => T(e.target.value),
|
|
428
|
+
children: [/* @__PURE__ */ p("option", {
|
|
428
429
|
value: "",
|
|
429
430
|
children: "No status (cards keep theirs)"
|
|
430
|
-
}),
|
|
431
|
+
}), te.map((e) => /* @__PURE__ */ p("option", {
|
|
431
432
|
value: e,
|
|
432
433
|
children: P(e)
|
|
433
434
|
}, e))]
|
|
434
435
|
})] }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ m("div", { children: [
|
|
437
|
+
/* @__PURE__ */ p("label", {
|
|
437
438
|
htmlFor: `${$}-wip`,
|
|
438
439
|
className: "text-sm font-medium",
|
|
439
440
|
children: "WIP limit (blank for none)"
|
|
440
441
|
}),
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ p(D, {
|
|
442
443
|
id: `${$}-wip`,
|
|
443
444
|
type: "number",
|
|
444
445
|
min: 1,
|
|
445
446
|
className: "mt-1",
|
|
446
|
-
value:
|
|
447
|
+
value: E,
|
|
447
448
|
onChange: (e) => F(e.target.value)
|
|
448
449
|
}),
|
|
449
|
-
Q && /* @__PURE__ */
|
|
450
|
+
Q && /* @__PURE__ */ p(K, { message: "The WIP limit must be a whole number, 1 or more." })
|
|
450
451
|
] })
|
|
451
452
|
]
|
|
452
453
|
}),
|
|
453
|
-
I && /* @__PURE__ */
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
I && /* @__PURE__ */ p(K, { message: I }),
|
|
455
|
+
/* @__PURE__ */ m(j, {
|
|
455
456
|
className: "gap-2",
|
|
456
|
-
children: [n && /* @__PURE__ */
|
|
457
|
+
children: [n && /* @__PURE__ */ m(h, { children: [/* @__PURE__ */ p(C, {
|
|
457
458
|
asChild: !0,
|
|
458
|
-
children: /* @__PURE__ */
|
|
459
|
+
children: /* @__PURE__ */ p(w, {
|
|
459
460
|
variant: "outline",
|
|
460
461
|
disabled: X,
|
|
461
462
|
children: "Delete column"
|
|
462
463
|
})
|
|
463
|
-
}), /* @__PURE__ */
|
|
464
|
+
}), /* @__PURE__ */ m(v, { children: [/* @__PURE__ */ m(x, { children: [/* @__PURE__ */ m(S, { children: [
|
|
464
465
|
"Delete ",
|
|
465
466
|
t.name,
|
|
466
467
|
"?"
|
|
467
|
-
] }), /* @__PURE__ */
|
|
468
|
+
] }), /* @__PURE__ */ p(y, { children: "Its cards are not deleted: each goes back to the column for its status, or off the board if no column sets that status." })] }), /* @__PURE__ */ m(b, { children: [/* @__PURE__ */ p(_, { children: "Keep it" }), /* @__PURE__ */ p(g, {
|
|
468
469
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
469
470
|
onClick: async () => {
|
|
470
471
|
try {
|
|
471
|
-
await Y({ variables: { id: t.id } }),
|
|
472
|
+
await r(Y({ variables: { id: t.id } })), o(!1);
|
|
472
473
|
} catch (e) {
|
|
473
474
|
L(G(e, "The column could not be deleted."));
|
|
474
475
|
}
|
|
475
476
|
},
|
|
476
477
|
children: "Delete column"
|
|
477
|
-
})] })] })] }), /* @__PURE__ */
|
|
478
|
-
onClick:
|
|
479
|
-
disabled: !
|
|
478
|
+
})] })] })] }), /* @__PURE__ */ p(w, {
|
|
479
|
+
onClick: ae,
|
|
480
|
+
disabled: !re,
|
|
480
481
|
"data-testid": `${$}-save`,
|
|
481
482
|
children: X ? "Saving…" : n ? "Save" : "Add column"
|
|
482
483
|
})]
|