@burdenoff/microfe-planmagnet 2026.930.1 → 2026.930.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/planmagnet/milestones/MilestoneControls.d.ts +41 -0
- package/dist/planmagnet/milestones/MilestoneControls.d.ts.map +1 -0
- package/dist/planmagnet/milestones/MilestoneControls.js +420 -0
- package/dist/planmagnet/milestones/MilestoneControls.js.map +1 -0
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +59 -59
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +114 -95
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js +57 -48
- package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +151 -134
- 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 +149 -126
- 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 +150 -137
- 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 +239 -243
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
|
2
2
|
import { throwOnError as t } from "../utils/mutationResult.js";
|
|
3
3
|
import { ConfirmButton as n, ErrorLine as r } from "../controls/ConfirmButton.js";
|
|
4
4
|
import { TeamSelect as i } from "../controls/Pickers.js";
|
|
5
|
-
import {
|
|
6
|
-
import { CheckCircle2 as
|
|
7
|
-
import { gql as
|
|
8
|
-
import { useApolloClient as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { Badge as
|
|
5
|
+
import { Fragment as a, useDeferredValue as o, useEffect as s, useState as c } from "react";
|
|
6
|
+
import { CheckCircle2 as l, Play as u, Plus as d, X as f, XCircle as p } from "lucide-react";
|
|
7
|
+
import { gql as m } from "@apollo/client";
|
|
8
|
+
import { useApolloClient as h, useMutation as g, useQuery as _ } from "@apollo/client/react";
|
|
9
|
+
import { jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
10
|
+
import { Badge as b, Button as x, Checkbox as S, Input as C, ResponsiveDialog as w, ResponsiveDialogContent as T, ResponsiveDialogDescription as E, ResponsiveDialogFooter as D, ResponsiveDialogHeader as O, ResponsiveDialogTitle as k, ResponsiveDialogTrigger as A } from "@burdenoff/fe-libs/ui";
|
|
11
11
|
//#region src/planmagnet/sprints/SprintControls.tsx
|
|
12
|
-
var
|
|
12
|
+
var j = {
|
|
13
13
|
start: ["PLANNING"],
|
|
14
14
|
complete: ["ACTIVE", "REVIEW"],
|
|
15
15
|
cancel: [
|
|
@@ -18,32 +18,32 @@ var A = {
|
|
|
18
18
|
"REVIEW"
|
|
19
19
|
]
|
|
20
20
|
};
|
|
21
|
-
function j(e) {
|
|
22
|
-
return Object.keys(A).filter((t) => A[t].includes(e));
|
|
23
|
-
}
|
|
24
21
|
function M(e) {
|
|
22
|
+
return Object.keys(j).filter((t) => j[t].includes(e));
|
|
23
|
+
}
|
|
24
|
+
function N(e) {
|
|
25
25
|
return e === "COMPLETED" || e === "CANCELLED";
|
|
26
26
|
}
|
|
27
|
-
var
|
|
27
|
+
var P = [
|
|
28
28
|
"GetSprints",
|
|
29
29
|
"GetSprintDetail",
|
|
30
30
|
"GetSprintForEdit",
|
|
31
31
|
"GetDashboardData"
|
|
32
|
-
],
|
|
32
|
+
], F = m`
|
|
33
33
|
mutation SprintControlsStart($id: ID!) {
|
|
34
34
|
planmagnetStartSprint(id: $id) {
|
|
35
35
|
id
|
|
36
36
|
status
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
`,
|
|
39
|
+
`, I = m`
|
|
40
40
|
mutation SprintControlsComplete($id: ID!, $input: PlanmagnetCompleteSprintInput) {
|
|
41
41
|
planmagnetCompleteSprint(id: $id, input: $input) {
|
|
42
42
|
id
|
|
43
43
|
status
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
`,
|
|
46
|
+
`, L = m`
|
|
47
47
|
query SprintControlsCompleteScope($id: ID!) {
|
|
48
48
|
planmagnetSprint(id: $id) {
|
|
49
49
|
id
|
|
@@ -51,7 +51,7 @@ var N = [
|
|
|
51
51
|
teamId
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
`,
|
|
54
|
+
`, R = m`
|
|
55
55
|
query SprintControlsCompleteTargets($workspaceId: ID!, $projectId: String, $teamId: String) {
|
|
56
56
|
planmagnetSprints(
|
|
57
57
|
workspaceId: $workspaceId
|
|
@@ -66,112 +66,108 @@ var N = [
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
`;
|
|
69
|
-
function
|
|
70
|
-
let { workspaceId:
|
|
69
|
+
function z({ sprintId: t, sprintName: n, disabled: r, error: i, onComplete: o }) {
|
|
70
|
+
let { workspaceId: s } = e(), [u, d] = c(!1), [f, p] = c("MOVE_TO_BACKLOG"), [m, h] = c(""), g = _(L, {
|
|
71
71
|
variables: { id: t },
|
|
72
|
-
skip: !
|
|
73
|
-
}).data?.planmagnetSprint,
|
|
72
|
+
skip: !u
|
|
73
|
+
}).data?.planmagnetSprint, b = _(R, {
|
|
74
74
|
variables: {
|
|
75
|
-
workspaceId:
|
|
76
|
-
projectId:
|
|
77
|
-
teamId:
|
|
75
|
+
workspaceId: s,
|
|
76
|
+
projectId: g?.teamId ? null : g?.projectId ?? null,
|
|
77
|
+
teamId: g?.teamId ?? null
|
|
78
78
|
},
|
|
79
|
-
skip: !
|
|
80
|
-
}),
|
|
81
|
-
await
|
|
82
|
-
openItems:
|
|
83
|
-
targetSprintId:
|
|
84
|
-
} : { openItems:
|
|
79
|
+
skip: !u || !g || !s
|
|
80
|
+
}), S = (b.data?.planmagnetSprints.items ?? []).filter((e) => e.id !== t && e.status !== "COMPLETED" && e.status !== "CANCELLED"), C = f !== "MOVE_TO_SPRINT" || m !== "", j = async () => {
|
|
81
|
+
await o(f === "MOVE_TO_SPRINT" ? {
|
|
82
|
+
openItems: f,
|
|
83
|
+
targetSprintId: m
|
|
84
|
+
} : { openItems: f }) && d(!1);
|
|
85
85
|
};
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
-
open:
|
|
88
|
-
onOpenChange:
|
|
89
|
-
children: [/* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ y(w, {
|
|
87
|
+
open: u,
|
|
88
|
+
onOpenChange: d,
|
|
89
|
+
children: [/* @__PURE__ */ v(A, {
|
|
90
90
|
asChild: !0,
|
|
91
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ y(x, {
|
|
92
92
|
size: "sm",
|
|
93
93
|
disabled: r,
|
|
94
94
|
"data-testid": "sprint-complete-open",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ v(l, { className: "mr-1 h-4 w-4" }), "Complete sprint"]
|
|
96
96
|
})
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ y(T, {
|
|
98
98
|
className: "max-w-lg",
|
|
99
99
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ y(O, { children: [/* @__PURE__ */ y(k, { children: [
|
|
101
101
|
"Complete ",
|
|
102
102
|
n,
|
|
103
103
|
"?"
|
|
104
|
-
] }), /* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
104
|
+
] }), /* @__PURE__ */ v(E, { children: "The sprint is closed and cannot be reopened. Choose what happens to work items that are not done or cancelled." })] }),
|
|
105
|
+
/* @__PURE__ */ y("fieldset", {
|
|
106
106
|
className: "space-y-2",
|
|
107
107
|
"data-testid": "sprint-complete-choice",
|
|
108
|
-
children: [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
[
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
})
|
|
158
|
-
]
|
|
159
|
-
})
|
|
160
|
-
]
|
|
108
|
+
children: [/* @__PURE__ */ v("legend", {
|
|
109
|
+
className: "sr-only",
|
|
110
|
+
children: "Unfinished work items"
|
|
111
|
+
}), [
|
|
112
|
+
["MOVE_TO_BACKLOG", "Return them to the backlog"],
|
|
113
|
+
["MOVE_TO_SPRINT", "Carry them into another sprint"],
|
|
114
|
+
["KEEP_IN_SPRINT", "Keep them in this sprint's record"]
|
|
115
|
+
].map(([e, t]) => /* @__PURE__ */ y(a, { children: [/* @__PURE__ */ y("label", {
|
|
116
|
+
className: "flex items-center gap-2 text-sm cursor-pointer",
|
|
117
|
+
children: [/* @__PURE__ */ v("input", {
|
|
118
|
+
type: "radio",
|
|
119
|
+
name: "sprint-open-items",
|
|
120
|
+
value: e,
|
|
121
|
+
checked: f === e,
|
|
122
|
+
onChange: () => p(e)
|
|
123
|
+
}), t]
|
|
124
|
+
}), e === "MOVE_TO_SPRINT" && f === "MOVE_TO_SPRINT" && /* @__PURE__ */ y("div", {
|
|
125
|
+
className: "pl-6",
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ v("label", {
|
|
128
|
+
htmlFor: "sprint-complete-target",
|
|
129
|
+
className: "text-xs text-muted-foreground",
|
|
130
|
+
children: "Sprint to carry them into"
|
|
131
|
+
}),
|
|
132
|
+
/* @__PURE__ */ y("select", {
|
|
133
|
+
id: "sprint-complete-target",
|
|
134
|
+
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
135
|
+
value: m,
|
|
136
|
+
onChange: (e) => h(e.target.value),
|
|
137
|
+
"data-testid": "sprint-complete-target",
|
|
138
|
+
children: [/* @__PURE__ */ v("option", {
|
|
139
|
+
value: "",
|
|
140
|
+
children: "Choose a sprint…"
|
|
141
|
+
}), S.map((e) => /* @__PURE__ */ y("option", {
|
|
142
|
+
value: e.id,
|
|
143
|
+
children: [
|
|
144
|
+
e.name,
|
|
145
|
+
" (",
|
|
146
|
+
e.status.toLowerCase(),
|
|
147
|
+
")"
|
|
148
|
+
]
|
|
149
|
+
}, e.id))]
|
|
150
|
+
}),
|
|
151
|
+
b.data && S.length === 0 && /* @__PURE__ */ v("p", {
|
|
152
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
153
|
+
children: "No other unfinished sprint in this project or team."
|
|
154
|
+
})
|
|
155
|
+
]
|
|
156
|
+
})] }, e))]
|
|
161
157
|
}),
|
|
162
|
-
i && /* @__PURE__ */
|
|
158
|
+
i && /* @__PURE__ */ v("p", {
|
|
163
159
|
role: "alert",
|
|
164
160
|
className: "text-sm text-destructive",
|
|
165
161
|
"data-testid": "sprint-complete-error",
|
|
166
162
|
children: i
|
|
167
163
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ y(D, { children: [/* @__PURE__ */ v(x, {
|
|
169
165
|
variant: "outline",
|
|
170
|
-
onClick: () =>
|
|
166
|
+
onClick: () => d(!1),
|
|
171
167
|
children: "Keep it open"
|
|
172
|
-
}), /* @__PURE__ */
|
|
173
|
-
onClick: () => void
|
|
174
|
-
disabled: r || !
|
|
168
|
+
}), /* @__PURE__ */ v(x, {
|
|
169
|
+
onClick: () => void j(),
|
|
170
|
+
disabled: r || !C,
|
|
175
171
|
"data-testid": "sprint-complete-confirm",
|
|
176
172
|
children: "Complete sprint"
|
|
177
173
|
})] })
|
|
@@ -179,7 +175,7 @@ function R({ sprintId: t, sprintName: n, disabled: r, error: i, onComplete: a })
|
|
|
179
175
|
})]
|
|
180
176
|
});
|
|
181
177
|
}
|
|
182
|
-
var
|
|
178
|
+
var B = m`
|
|
183
179
|
mutation SprintControlsCancel($id: ID!) {
|
|
184
180
|
planmagnetCancelSprint(id: $id) {
|
|
185
181
|
id
|
|
@@ -187,46 +183,46 @@ var z = p`
|
|
|
187
183
|
}
|
|
188
184
|
}
|
|
189
185
|
`;
|
|
190
|
-
function
|
|
186
|
+
function V({ sprintId: e, sprintName: i, status: a }) {
|
|
191
187
|
let o = {
|
|
192
|
-
refetchQueries:
|
|
188
|
+
refetchQueries: P,
|
|
193
189
|
awaitRefetchQueries: !0
|
|
194
|
-
}, [
|
|
195
|
-
if (C.length === 0) return
|
|
190
|
+
}, [s, l] = g(F, o), [d, f] = g(I, o), [m, h] = g(B, o), [_, b] = c(null), S = l.loading || f.loading || h.loading, C = M(a);
|
|
191
|
+
if (C.length === 0) return _ ? /* @__PURE__ */ v(r, { message: _ }) : null;
|
|
196
192
|
let w = async (n, r) => {
|
|
197
|
-
|
|
193
|
+
b(null);
|
|
198
194
|
try {
|
|
199
195
|
return await t(n({ variables: {
|
|
200
196
|
id: e,
|
|
201
197
|
...r ? { input: r } : {}
|
|
202
198
|
} })), !0;
|
|
203
199
|
} catch (e) {
|
|
204
|
-
return
|
|
200
|
+
return b(e instanceof Error ? e.message : "The sprint could not be updated."), !1;
|
|
205
201
|
}
|
|
206
202
|
};
|
|
207
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ y("div", {
|
|
208
204
|
className: "flex flex-col items-end gap-2",
|
|
209
205
|
"data-testid": "sprint-lifecycle-actions",
|
|
210
|
-
children: [/* @__PURE__ */
|
|
206
|
+
children: [/* @__PURE__ */ y("div", {
|
|
211
207
|
className: "flex gap-2",
|
|
212
208
|
children: [
|
|
213
|
-
C.includes("start") && /* @__PURE__ */
|
|
209
|
+
C.includes("start") && /* @__PURE__ */ y(x, {
|
|
214
210
|
size: "sm",
|
|
215
|
-
onClick: () => w(
|
|
211
|
+
onClick: () => w(s),
|
|
216
212
|
disabled: S,
|
|
217
|
-
children: [/* @__PURE__ */
|
|
213
|
+
children: [/* @__PURE__ */ v(u, { className: "mr-1 h-4 w-4" }), "Start sprint"]
|
|
218
214
|
}),
|
|
219
|
-
C.includes("complete") && /* @__PURE__ */
|
|
215
|
+
C.includes("complete") && /* @__PURE__ */ v(z, {
|
|
220
216
|
sprintId: e,
|
|
221
217
|
sprintName: i,
|
|
222
218
|
disabled: S,
|
|
223
|
-
error:
|
|
219
|
+
error: _,
|
|
224
220
|
onComplete: (e) => w(d, e)
|
|
225
221
|
}),
|
|
226
|
-
C.includes("cancel") && /* @__PURE__ */
|
|
222
|
+
C.includes("cancel") && /* @__PURE__ */ v(n, {
|
|
227
223
|
label: "Cancel sprint",
|
|
228
224
|
variant: "outline",
|
|
229
|
-
icon: /* @__PURE__ */
|
|
225
|
+
icon: /* @__PURE__ */ v(p, { className: "mr-1 h-4 w-4" }),
|
|
230
226
|
title: `Cancel ${i}?`,
|
|
231
227
|
description: "The sprint is abandoned and cannot be restarted. Its work items stay in it for the record. This cannot be undone.",
|
|
232
228
|
confirmLabel: "Cancel sprint",
|
|
@@ -235,22 +231,22 @@ function B({ sprintId: e, sprintName: i, status: a }) {
|
|
|
235
231
|
onConfirm: () => w(m)
|
|
236
232
|
})
|
|
237
233
|
]
|
|
238
|
-
}),
|
|
234
|
+
}), _ && /* @__PURE__ */ v(r, { message: _ })]
|
|
239
235
|
});
|
|
240
236
|
}
|
|
241
|
-
var
|
|
237
|
+
var H = m`
|
|
242
238
|
mutation SprintControlsAddItems($id: ID!, $input: PlanmagnetSprintWorkItemsInput!) {
|
|
243
239
|
planmagnetAddWorkItemsToSprint(id: $id, input: $input) {
|
|
244
240
|
id
|
|
245
241
|
}
|
|
246
242
|
}
|
|
247
|
-
`,
|
|
243
|
+
`, U = m`
|
|
248
244
|
mutation SprintControlsRemoveItems($id: ID!, $input: PlanmagnetSprintWorkItemsInput!) {
|
|
249
245
|
planmagnetRemoveWorkItemsFromSprint(id: $id, input: $input) {
|
|
250
246
|
id
|
|
251
247
|
}
|
|
252
248
|
}
|
|
253
|
-
`,
|
|
249
|
+
`, W = m`
|
|
254
250
|
query SprintControlsCandidates($workspaceId: ID!, $filter: PlanmagnetWorkItemFilter) {
|
|
255
251
|
planmagnetWorkItems(workspaceId: $workspaceId, filter: $filter, pagination: { first: 100 }) {
|
|
256
252
|
totalCount
|
|
@@ -265,13 +261,13 @@ var V = p`
|
|
|
265
261
|
}
|
|
266
262
|
}
|
|
267
263
|
}
|
|
268
|
-
`,
|
|
269
|
-
function
|
|
270
|
-
let
|
|
271
|
-
refetchQueries:
|
|
264
|
+
`, G = (e) => e.toLowerCase().replace(/_/g, " ");
|
|
265
|
+
function K({ sprintId: e, eligibleProjectIds: n, projectNames: i, status: a, items: o }) {
|
|
266
|
+
let s = N(a), [l, u] = g(U, {
|
|
267
|
+
refetchQueries: P,
|
|
272
268
|
awaitRefetchQueries: !0
|
|
273
|
-
}), [
|
|
274
|
-
p(null),
|
|
269
|
+
}), [d, p] = c(null), [m, h] = c(null), _ = async (n) => {
|
|
270
|
+
p(null), h(n);
|
|
275
271
|
try {
|
|
276
272
|
await t(l({ variables: {
|
|
277
273
|
id: e,
|
|
@@ -280,74 +276,74 @@ function G({ sprintId: e, eligibleProjectIds: n, projectNames: i, status: a, ite
|
|
|
280
276
|
} catch (e) {
|
|
281
277
|
p(e instanceof Error ? e.message : "The work item could not be removed.");
|
|
282
278
|
} finally {
|
|
283
|
-
|
|
279
|
+
h(null);
|
|
284
280
|
}
|
|
285
281
|
};
|
|
286
|
-
return /* @__PURE__ */
|
|
282
|
+
return /* @__PURE__ */ y("div", {
|
|
287
283
|
className: "space-y-3",
|
|
288
284
|
"data-testid": "sprint-work-items",
|
|
289
285
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ y("div", {
|
|
291
287
|
className: "flex items-center justify-between",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ y("p", {
|
|
293
289
|
className: "text-sm text-muted-foreground",
|
|
294
290
|
children: [
|
|
295
291
|
o.length,
|
|
296
292
|
" work item",
|
|
297
293
|
o.length === 1 ? "" : "s"
|
|
298
294
|
]
|
|
299
|
-
}), !
|
|
295
|
+
}), !s && n.length > 0 && /* @__PURE__ */ v(q, {
|
|
300
296
|
sprintId: e,
|
|
301
297
|
eligibleProjectIds: n,
|
|
302
298
|
projectNames: i,
|
|
303
299
|
memberIds: o.map((e) => e.id)
|
|
304
300
|
})]
|
|
305
301
|
}),
|
|
306
|
-
|
|
302
|
+
s && /* @__PURE__ */ y("p", {
|
|
307
303
|
className: "text-xs text-muted-foreground",
|
|
308
304
|
children: [
|
|
309
305
|
"This sprint is ",
|
|
310
|
-
|
|
306
|
+
G(a),
|
|
311
307
|
"; its work items can no longer be changed."
|
|
312
308
|
]
|
|
313
309
|
}),
|
|
314
|
-
!
|
|
310
|
+
!s && n.length === 0 && /* @__PURE__ */ v("p", {
|
|
315
311
|
className: "text-xs text-muted-foreground",
|
|
316
312
|
children: "This team has no projects yet — add a project to the team before adding work items."
|
|
317
313
|
}),
|
|
318
|
-
|
|
319
|
-
o.length === 0 ? /* @__PURE__ */
|
|
314
|
+
d && /* @__PURE__ */ v(r, { message: d }),
|
|
315
|
+
o.length === 0 ? /* @__PURE__ */ v("p", {
|
|
320
316
|
className: "text-sm text-muted-foreground text-center py-4",
|
|
321
317
|
children: "No work items in this sprint yet."
|
|
322
|
-
}) : /* @__PURE__ */
|
|
318
|
+
}) : /* @__PURE__ */ v("ul", {
|
|
323
319
|
className: "space-y-1",
|
|
324
|
-
children: o.map((e) => /* @__PURE__ */
|
|
320
|
+
children: o.map((e) => /* @__PURE__ */ y("li", {
|
|
325
321
|
className: "flex items-center justify-between gap-2 border rounded-md p-2 text-sm",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ y("span", {
|
|
327
323
|
className: "min-w-0 truncate",
|
|
328
|
-
children: [/* @__PURE__ */
|
|
324
|
+
children: [/* @__PURE__ */ v("span", {
|
|
329
325
|
className: "text-muted-foreground mr-2",
|
|
330
326
|
children: e.key
|
|
331
327
|
}), e.title]
|
|
332
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ y("span", {
|
|
333
329
|
className: "flex items-center gap-2 shrink-0",
|
|
334
330
|
children: [
|
|
335
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ v(b, {
|
|
336
332
|
variant: "secondary",
|
|
337
333
|
className: "text-xs capitalize",
|
|
338
|
-
children:
|
|
334
|
+
children: G(e.status)
|
|
339
335
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ y("span", {
|
|
341
337
|
className: "text-xs text-muted-foreground",
|
|
342
338
|
children: [e.storyPoints ?? 0, " pts"]
|
|
343
339
|
}),
|
|
344
|
-
!
|
|
340
|
+
!s && /* @__PURE__ */ v(x, {
|
|
345
341
|
size: "sm",
|
|
346
342
|
variant: "ghost",
|
|
347
343
|
"aria-label": `Remove ${e.key} from sprint`,
|
|
348
344
|
disabled: u.loading,
|
|
349
|
-
onClick: () =>
|
|
350
|
-
children: m === e.id ? "…" : /* @__PURE__ */
|
|
345
|
+
onClick: () => _(e.id),
|
|
346
|
+
children: m === e.id ? "…" : /* @__PURE__ */ v(f, { className: "h-4 w-4" })
|
|
351
347
|
})
|
|
352
348
|
]
|
|
353
349
|
})]
|
|
@@ -356,23 +352,23 @@ function G({ sprintId: e, eligibleProjectIds: n, projectNames: i, status: a, ite
|
|
|
356
352
|
]
|
|
357
353
|
});
|
|
358
354
|
}
|
|
359
|
-
function
|
|
360
|
-
let { workspaceId:
|
|
355
|
+
function q({ sprintId: n, eligibleProjectIds: i, projectNames: a, memberIds: l }) {
|
|
356
|
+
let { workspaceId: u } = e(), f = h(), [p, m] = c(!1), [_, j] = c(""), M = o(_.trim()), [N, F] = c(/* @__PURE__ */ new Set()), [I, L] = c(null), R = `${i.join(",")}|${l.join(",")}|${M}`, [z, B] = c({
|
|
361
357
|
key: null,
|
|
362
358
|
items: [],
|
|
363
359
|
fetchedCount: 0,
|
|
364
360
|
totalCount: 0,
|
|
365
361
|
error: null
|
|
366
362
|
});
|
|
367
|
-
|
|
368
|
-
if (!p || !
|
|
363
|
+
s(() => {
|
|
364
|
+
if (!p || !u || i.length === 0) return;
|
|
369
365
|
let e = !1;
|
|
370
366
|
return (async () => {
|
|
371
367
|
try {
|
|
372
368
|
let t = await Promise.all(i.map((e) => f.query({
|
|
373
|
-
query:
|
|
369
|
+
query: W,
|
|
374
370
|
variables: {
|
|
375
|
-
workspaceId:
|
|
371
|
+
workspaceId: u,
|
|
376
372
|
filter: {
|
|
377
373
|
projectId: e,
|
|
378
374
|
excludeIds: l,
|
|
@@ -404,95 +400,95 @@ function K({ sprintId: n, eligibleProjectIds: i, projectNames: c, memberIds: l }
|
|
|
404
400
|
};
|
|
405
401
|
}, [
|
|
406
402
|
p,
|
|
407
|
-
|
|
403
|
+
u,
|
|
408
404
|
i,
|
|
409
405
|
l,
|
|
410
406
|
M,
|
|
411
407
|
f,
|
|
412
408
|
R
|
|
413
409
|
]);
|
|
414
|
-
let [
|
|
415
|
-
refetchQueries:
|
|
410
|
+
let [V, U] = g(H, {
|
|
411
|
+
refetchQueries: P,
|
|
416
412
|
awaitRefetchQueries: !0
|
|
417
|
-
}), K = z.items.filter((e) => e.sprintId !== n), { totalCount: q, fetchedCount: J } = z, Y = p && z.key !== R, X = i.length > 1 && !!
|
|
413
|
+
}), K = z.items.filter((e) => e.sprintId !== n), { totalCount: q, fetchedCount: J } = z, Y = p && z.key !== R, X = i.length > 1 && !!a, Z = (e, t) => F((n) => {
|
|
418
414
|
let r = new Set(n);
|
|
419
415
|
return t ? r.add(e) : r.delete(e), r;
|
|
420
416
|
}), Q = () => {
|
|
421
417
|
F(/* @__PURE__ */ new Set()), j(""), L(null);
|
|
422
418
|
};
|
|
423
|
-
return /* @__PURE__ */
|
|
419
|
+
return /* @__PURE__ */ y(w, {
|
|
424
420
|
open: p,
|
|
425
421
|
onOpenChange: (e) => {
|
|
426
|
-
|
|
422
|
+
m(e), e || Q();
|
|
427
423
|
},
|
|
428
|
-
children: [/* @__PURE__ */
|
|
424
|
+
children: [/* @__PURE__ */ v(A, {
|
|
429
425
|
asChild: !0,
|
|
430
|
-
children: /* @__PURE__ */
|
|
426
|
+
children: /* @__PURE__ */ y(x, {
|
|
431
427
|
size: "sm",
|
|
432
428
|
variant: "outline",
|
|
433
|
-
children: [/* @__PURE__ */
|
|
429
|
+
children: [/* @__PURE__ */ v(d, { className: "mr-1 h-4 w-4" }), "Add work items"]
|
|
434
430
|
})
|
|
435
|
-
}), /* @__PURE__ */
|
|
431
|
+
}), /* @__PURE__ */ y(T, {
|
|
436
432
|
className: "max-w-lg",
|
|
437
433
|
children: [
|
|
438
|
-
/* @__PURE__ */
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
value:
|
|
434
|
+
/* @__PURE__ */ y(O, { children: [/* @__PURE__ */ v(k, { children: "Add work items" }), /* @__PURE__ */ v(E, { children: i.length > 1 ? "Work items from this team's projects. An item already in another sprint moves here." : "Work items from this sprint's project. An item already in another sprint moves here." })] }),
|
|
435
|
+
/* @__PURE__ */ v(C, {
|
|
436
|
+
value: _,
|
|
441
437
|
onChange: (e) => j(e.target.value),
|
|
442
438
|
placeholder: "Search by title",
|
|
443
439
|
"aria-label": "Search work items"
|
|
444
440
|
}),
|
|
445
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ y("div", {
|
|
446
442
|
className: "max-h-80 overflow-y-auto space-y-1",
|
|
447
443
|
"data-testid": "sprint-add-candidates",
|
|
448
444
|
children: [
|
|
449
|
-
Y && /* @__PURE__ */
|
|
445
|
+
Y && /* @__PURE__ */ v("p", {
|
|
450
446
|
className: "text-sm text-muted-foreground py-4 text-center",
|
|
451
447
|
children: "Loading…"
|
|
452
448
|
}),
|
|
453
|
-
!Y && z.error && /* @__PURE__ */
|
|
449
|
+
!Y && z.error && /* @__PURE__ */ v("p", {
|
|
454
450
|
className: "text-sm text-destructive py-4 text-center",
|
|
455
451
|
children: z.error
|
|
456
452
|
}),
|
|
457
|
-
!Y && !z.error && K.length === 0 && /* @__PURE__ */
|
|
453
|
+
!Y && !z.error && K.length === 0 && /* @__PURE__ */ v("p", {
|
|
458
454
|
className: "text-sm text-muted-foreground py-4 text-center",
|
|
459
455
|
children: M ? "No matching work items." : i.length > 1 ? "Every work item in this team's projects is already in this sprint." : "Every work item in this project is already in this sprint."
|
|
460
456
|
}),
|
|
461
457
|
K.map((e) => {
|
|
462
458
|
let t = `sprint-add-${e.id}`;
|
|
463
|
-
return /* @__PURE__ */
|
|
459
|
+
return /* @__PURE__ */ y("label", {
|
|
464
460
|
htmlFor: t,
|
|
465
461
|
className: "flex items-center gap-3 border rounded-md p-2 text-sm cursor-pointer hover:bg-muted",
|
|
466
462
|
children: [
|
|
467
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ v(S, {
|
|
468
464
|
id: t,
|
|
469
|
-
checked:
|
|
465
|
+
checked: N.has(e.id),
|
|
470
466
|
onCheckedChange: (t) => Z(e.id, t === !0)
|
|
471
467
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ y("span", {
|
|
473
469
|
className: "min-w-0 flex-1 truncate",
|
|
474
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ v("span", {
|
|
475
471
|
className: "text-muted-foreground mr-2",
|
|
476
472
|
children: e.key
|
|
477
473
|
}), e.title]
|
|
478
474
|
}),
|
|
479
|
-
X && /* @__PURE__ */
|
|
475
|
+
X && /* @__PURE__ */ v("span", {
|
|
480
476
|
className: "text-xs text-muted-foreground shrink-0",
|
|
481
|
-
children:
|
|
477
|
+
children: a?.[e.projectId] ?? e.projectId
|
|
482
478
|
}),
|
|
483
|
-
e.sprintId && /* @__PURE__ */
|
|
479
|
+
e.sprintId && /* @__PURE__ */ v("span", {
|
|
484
480
|
className: "text-xs text-muted-foreground shrink-0",
|
|
485
481
|
children: "in another sprint"
|
|
486
482
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
483
|
+
/* @__PURE__ */ v(b, {
|
|
488
484
|
variant: "secondary",
|
|
489
485
|
className: "text-xs capitalize shrink-0",
|
|
490
|
-
children:
|
|
486
|
+
children: G(e.status)
|
|
491
487
|
})
|
|
492
488
|
]
|
|
493
489
|
}, e.id);
|
|
494
490
|
}),
|
|
495
|
-
J < q && /* @__PURE__ */
|
|
491
|
+
J < q && /* @__PURE__ */ y("p", {
|
|
496
492
|
className: "text-xs text-muted-foreground pt-2",
|
|
497
493
|
children: [
|
|
498
494
|
"Showing the first ",
|
|
@@ -504,34 +500,34 @@ function K({ sprintId: n, eligibleProjectIds: i, projectNames: c, memberIds: l }
|
|
|
504
500
|
})
|
|
505
501
|
]
|
|
506
502
|
}),
|
|
507
|
-
I && /* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
503
|
+
I && /* @__PURE__ */ v(r, { message: I }),
|
|
504
|
+
/* @__PURE__ */ v(D, { children: /* @__PURE__ */ v(x, {
|
|
509
505
|
onClick: async () => {
|
|
510
506
|
L(null);
|
|
511
507
|
try {
|
|
512
|
-
await t(
|
|
508
|
+
await t(V({ variables: {
|
|
513
509
|
id: n,
|
|
514
|
-
input: { workItemIds: [...
|
|
515
|
-
} })), Q(),
|
|
510
|
+
input: { workItemIds: [...N] }
|
|
511
|
+
} })), Q(), m(!1);
|
|
516
512
|
} catch (e) {
|
|
517
513
|
L(e instanceof Error ? e.message : "The work items could not be added.");
|
|
518
514
|
}
|
|
519
515
|
},
|
|
520
|
-
disabled:
|
|
516
|
+
disabled: N.size === 0 || U.loading,
|
|
521
517
|
"data-testid": "sprint-add-confirm",
|
|
522
|
-
children:
|
|
518
|
+
children: U.loading ? "Adding…" : `Add ${N.size} work item${N.size === 1 ? "" : "s"}`
|
|
523
519
|
}) })
|
|
524
520
|
]
|
|
525
521
|
})]
|
|
526
522
|
});
|
|
527
523
|
}
|
|
528
|
-
var
|
|
524
|
+
var J = m`
|
|
529
525
|
mutation SprintControlsCreate($input: PlanmagnetCreateSprintInput!) {
|
|
530
526
|
planmagnetCreateSprint(input: $input) {
|
|
531
527
|
id
|
|
532
528
|
}
|
|
533
529
|
}
|
|
534
|
-
`,
|
|
530
|
+
`, Y = m`
|
|
535
531
|
query SprintControlsProjects($workspaceId: ID!) {
|
|
536
532
|
planmagnetProjects(workspaceId: $workspaceId, pagination: { first: 100 }) {
|
|
537
533
|
items {
|
|
@@ -540,7 +536,7 @@ var q = p`
|
|
|
540
536
|
}
|
|
541
537
|
}
|
|
542
538
|
}
|
|
543
|
-
`,
|
|
539
|
+
`, X = {
|
|
544
540
|
name: "",
|
|
545
541
|
projectId: "",
|
|
546
542
|
startDate: "",
|
|
@@ -548,37 +544,37 @@ var q = p`
|
|
|
548
544
|
goal: "",
|
|
549
545
|
capacity: ""
|
|
550
546
|
};
|
|
551
|
-
function
|
|
552
|
-
let { workspaceId:
|
|
553
|
-
variables: { workspaceId:
|
|
554
|
-
skip: !l || !
|
|
555
|
-
}), R =
|
|
556
|
-
refetchQueries:
|
|
547
|
+
function Z({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
548
|
+
let { workspaceId: s } = e(), [l, u] = c(!1), [f, p] = c(X), [m, h] = c(a ?? "project"), [b, S] = c(o ?? ""), [j, M] = c(null), { data: N, loading: F, error: I, refetch: L } = _(Y, {
|
|
549
|
+
variables: { workspaceId: s ?? "" },
|
|
550
|
+
skip: !l || !s || m !== "project"
|
|
551
|
+
}), R = N?.planmagnetProjects.items ?? [], z = f.projectId || R[0]?.id || "", [B, { loading: V }] = g(J, {
|
|
552
|
+
refetchQueries: P,
|
|
557
553
|
awaitRefetchQueries: !0
|
|
558
|
-
}), H = f.capacity.trim() === "" ? void 0 : Number(f.capacity), U = H !== void 0 && (!Number.isInteger(H) || H < 0), W = !!(f.startDate && f.endDate && f.endDate < f.startDate), G = m === "project" ? z !== "" :
|
|
559
|
-
return /* @__PURE__ */
|
|
554
|
+
}), H = f.capacity.trim() === "" ? void 0 : Number(f.capacity), U = H !== void 0 && (!Number.isInteger(H) || H < 0), W = !!(f.startDate && f.endDate && f.endDate < f.startDate), G = m === "project" ? z !== "" : b !== "", K = f.name.trim() !== "" && G && !U && !W && !V;
|
|
555
|
+
return /* @__PURE__ */ y(w, {
|
|
560
556
|
open: l,
|
|
561
557
|
onOpenChange: (e) => {
|
|
562
|
-
|
|
558
|
+
u(e), e || M(null);
|
|
563
559
|
},
|
|
564
|
-
children: [/* @__PURE__ */
|
|
560
|
+
children: [/* @__PURE__ */ v(A, {
|
|
565
561
|
asChild: !0,
|
|
566
|
-
children: /* @__PURE__ */
|
|
562
|
+
children: /* @__PURE__ */ y(x, {
|
|
567
563
|
size: "sm",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ v(d, { className: "mr-1 h-4 w-4" }), "New sprint"]
|
|
569
565
|
})
|
|
570
|
-
}), /* @__PURE__ */
|
|
566
|
+
}), /* @__PURE__ */ y(T, {
|
|
571
567
|
className: "max-w-lg",
|
|
572
568
|
children: [
|
|
573
|
-
/* @__PURE__ */
|
|
574
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ y(O, { children: [/* @__PURE__ */ v(k, { children: "New sprint" }), /* @__PURE__ */ v(E, { children: "The sprint starts in Planning. Start it when it is ready." })] }),
|
|
570
|
+
/* @__PURE__ */ y("div", {
|
|
575
571
|
className: "space-y-3",
|
|
576
572
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
578
574
|
htmlFor: "new-sprint-name",
|
|
579
575
|
className: "text-sm font-medium",
|
|
580
576
|
children: "Name"
|
|
581
|
-
}), /* @__PURE__ */
|
|
577
|
+
}), /* @__PURE__ */ v(C, {
|
|
582
578
|
id: "new-sprint-name",
|
|
583
579
|
className: "mt-1",
|
|
584
580
|
value: f.name,
|
|
@@ -587,38 +583,38 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
587
583
|
name: e.target.value
|
|
588
584
|
})
|
|
589
585
|
})] }),
|
|
590
|
-
/* @__PURE__ */
|
|
586
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("span", {
|
|
591
587
|
className: "text-sm font-medium",
|
|
592
588
|
children: "Belongs to"
|
|
593
|
-
}), /* @__PURE__ */
|
|
589
|
+
}), /* @__PURE__ */ y("div", {
|
|
594
590
|
className: "mt-1 flex gap-2",
|
|
595
591
|
role: "radiogroup",
|
|
596
592
|
"aria-label": "Sprint scope",
|
|
597
|
-
children: [/* @__PURE__ */
|
|
593
|
+
children: [/* @__PURE__ */ v(x, {
|
|
598
594
|
type: "button",
|
|
599
595
|
size: "sm",
|
|
600
596
|
variant: m === "project" ? "default" : "outline",
|
|
601
597
|
"aria-pressed": m === "project",
|
|
602
598
|
"data-testid": "new-sprint-scope-project",
|
|
603
|
-
onClick: () =>
|
|
599
|
+
onClick: () => h("project"),
|
|
604
600
|
children: "A project"
|
|
605
|
-
}), /* @__PURE__ */
|
|
601
|
+
}), /* @__PURE__ */ v(x, {
|
|
606
602
|
type: "button",
|
|
607
603
|
size: "sm",
|
|
608
604
|
variant: m === "team" ? "default" : "outline",
|
|
609
605
|
"aria-pressed": m === "team",
|
|
610
606
|
"data-testid": "new-sprint-scope-team",
|
|
611
|
-
onClick: () =>
|
|
607
|
+
onClick: () => h("team"),
|
|
612
608
|
children: "A team"
|
|
613
609
|
})]
|
|
614
610
|
})] }),
|
|
615
|
-
m === "project" ? /* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */
|
|
611
|
+
m === "project" ? /* @__PURE__ */ y("div", { children: [
|
|
612
|
+
/* @__PURE__ */ v("label", {
|
|
617
613
|
htmlFor: "new-sprint-project",
|
|
618
614
|
className: "text-sm font-medium",
|
|
619
615
|
children: "Project"
|
|
620
616
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ y("select", {
|
|
622
618
|
id: "new-sprint-project",
|
|
623
619
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
624
620
|
value: z,
|
|
@@ -626,18 +622,18 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
626
622
|
...f,
|
|
627
623
|
projectId: e.target.value
|
|
628
624
|
}),
|
|
629
|
-
children: [R.length === 0 && /* @__PURE__ */
|
|
625
|
+
children: [R.length === 0 && /* @__PURE__ */ v("option", {
|
|
630
626
|
value: "",
|
|
631
|
-
children: F && !
|
|
632
|
-
}), R.map((e) => /* @__PURE__ */
|
|
627
|
+
children: F && !N ? "Loading projects…" : I ? "Projects could not be loaded" : "No projects yet"
|
|
628
|
+
}), R.map((e) => /* @__PURE__ */ v("option", {
|
|
633
629
|
value: e.id,
|
|
634
630
|
children: e.name
|
|
635
631
|
}, e.id))]
|
|
636
632
|
}),
|
|
637
|
-
I && /* @__PURE__ */
|
|
633
|
+
I && /* @__PURE__ */ y("p", {
|
|
638
634
|
role: "alert",
|
|
639
635
|
className: "mt-1 flex items-center gap-2 text-xs text-destructive",
|
|
640
|
-
children: [I.message, /* @__PURE__ */
|
|
636
|
+
children: [I.message, /* @__PURE__ */ v(x, {
|
|
641
637
|
type: "button",
|
|
642
638
|
size: "sm",
|
|
643
639
|
variant: "ghost",
|
|
@@ -646,36 +642,36 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
646
642
|
children: "Retry"
|
|
647
643
|
})]
|
|
648
644
|
}),
|
|
649
|
-
!F && !I &&
|
|
645
|
+
!F && !I && N && R.length === 0 && /* @__PURE__ */ v("p", {
|
|
650
646
|
className: "mt-1 text-xs text-muted-foreground",
|
|
651
647
|
children: "Create a project first (Projects → New project)."
|
|
652
648
|
})
|
|
653
|
-
] }) : /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
649
|
+
] }) : /* @__PURE__ */ y("div", { children: [
|
|
650
|
+
/* @__PURE__ */ v("label", {
|
|
655
651
|
htmlFor: "new-sprint-team",
|
|
656
652
|
className: "text-sm font-medium",
|
|
657
653
|
children: "Team"
|
|
658
654
|
}),
|
|
659
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ v("div", {
|
|
660
656
|
className: "mt-1",
|
|
661
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ v(i, {
|
|
662
658
|
id: "new-sprint-team",
|
|
663
|
-
value:
|
|
664
|
-
onChange:
|
|
659
|
+
value: b,
|
|
660
|
+
onChange: S
|
|
665
661
|
})
|
|
666
662
|
}),
|
|
667
|
-
/* @__PURE__ */
|
|
663
|
+
/* @__PURE__ */ v("p", {
|
|
668
664
|
className: "mt-1 text-xs text-muted-foreground",
|
|
669
665
|
children: "Only work items from the team's own projects can join this sprint."
|
|
670
666
|
})
|
|
671
667
|
] }),
|
|
672
|
-
/* @__PURE__ */
|
|
668
|
+
/* @__PURE__ */ y("div", {
|
|
673
669
|
className: "grid grid-cols-2 gap-3",
|
|
674
|
-
children: [/* @__PURE__ */
|
|
670
|
+
children: [/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
675
671
|
htmlFor: "new-sprint-start",
|
|
676
672
|
className: "text-sm font-medium",
|
|
677
673
|
children: "Start date"
|
|
678
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ v(C, {
|
|
679
675
|
id: "new-sprint-start",
|
|
680
676
|
type: "date",
|
|
681
677
|
className: "mt-1",
|
|
@@ -684,11 +680,11 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
684
680
|
...f,
|
|
685
681
|
startDate: e.target.value
|
|
686
682
|
})
|
|
687
|
-
})] }), /* @__PURE__ */
|
|
683
|
+
})] }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
688
684
|
htmlFor: "new-sprint-end",
|
|
689
685
|
className: "text-sm font-medium",
|
|
690
686
|
children: "End date"
|
|
691
|
-
}), /* @__PURE__ */
|
|
687
|
+
}), /* @__PURE__ */ v(C, {
|
|
692
688
|
id: "new-sprint-end",
|
|
693
689
|
type: "date",
|
|
694
690
|
className: "mt-1",
|
|
@@ -699,12 +695,12 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
699
695
|
})
|
|
700
696
|
})] })]
|
|
701
697
|
}),
|
|
702
|
-
W && /* @__PURE__ */
|
|
703
|
-
/* @__PURE__ */
|
|
698
|
+
W && /* @__PURE__ */ v(r, { message: "The end date is before the start date." }),
|
|
699
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
704
700
|
htmlFor: "new-sprint-capacity",
|
|
705
701
|
className: "text-sm font-medium",
|
|
706
702
|
children: "Capacity (story points)"
|
|
707
|
-
}), /* @__PURE__ */
|
|
703
|
+
}), /* @__PURE__ */ v(C, {
|
|
708
704
|
id: "new-sprint-capacity",
|
|
709
705
|
type: "number",
|
|
710
706
|
min: 0,
|
|
@@ -715,12 +711,12 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
715
711
|
capacity: e.target.value
|
|
716
712
|
})
|
|
717
713
|
})] }),
|
|
718
|
-
U && /* @__PURE__ */
|
|
719
|
-
/* @__PURE__ */
|
|
714
|
+
U && /* @__PURE__ */ v(r, { message: "Capacity must be a whole number, 0 or more." }),
|
|
715
|
+
/* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
|
|
720
716
|
htmlFor: "new-sprint-goal",
|
|
721
717
|
className: "text-sm font-medium",
|
|
722
718
|
children: "Goal"
|
|
723
|
-
}), /* @__PURE__ */
|
|
719
|
+
}), /* @__PURE__ */ v(C, {
|
|
724
720
|
id: "new-sprint-goal",
|
|
725
721
|
className: "mt-1",
|
|
726
722
|
value: f.goal,
|
|
@@ -731,20 +727,20 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
731
727
|
})] })
|
|
732
728
|
]
|
|
733
729
|
}),
|
|
734
|
-
j && /* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
730
|
+
j && /* @__PURE__ */ v(r, { message: j }),
|
|
731
|
+
/* @__PURE__ */ v(D, { children: /* @__PURE__ */ v(x, {
|
|
736
732
|
onClick: async () => {
|
|
737
733
|
M(null);
|
|
738
734
|
try {
|
|
739
735
|
let e = (await t(B({ variables: { input: {
|
|
740
736
|
name: f.name.trim(),
|
|
741
|
-
...m === "team" ? { teamId:
|
|
737
|
+
...m === "team" ? { teamId: b } : { projectId: z },
|
|
742
738
|
startDate: f.startDate || void 0,
|
|
743
739
|
endDate: f.endDate || void 0,
|
|
744
740
|
goal: f.goal.trim() || void 0,
|
|
745
741
|
capacity: H
|
|
746
742
|
} } }))).data?.planmagnetCreateSprint.id;
|
|
747
|
-
p(
|
|
743
|
+
p(X), u(!1), e && n(e);
|
|
748
744
|
} catch (e) {
|
|
749
745
|
M(e instanceof Error ? e.message : "The sprint could not be created.");
|
|
750
746
|
}
|
|
@@ -758,6 +754,6 @@ function X({ onCreated: n, initialScope: a, initialTeamId: o }) {
|
|
|
758
754
|
});
|
|
759
755
|
}
|
|
760
756
|
//#endregion
|
|
761
|
-
export {
|
|
757
|
+
export { Z as NewSprintDialog, V as SprintLifecycleActions, K as SprintWorkItemsPanel };
|
|
762
758
|
|
|
763
759
|
//# sourceMappingURL=SprintControls.js.map
|