@burdenoff/microfe-planmagnet 2026.930.12 → 2026.930.13
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/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +20 -11
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +227 -223
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +37 -37
- package/dist/planmagnet/automation/AutomationRuleFields.js +41 -41
- package/dist/planmagnet/board/BulkActions.js +6 -6
- package/dist/planmagnet/board/ProjectBoard.js +24 -24
- package/dist/planmagnet/budgets/BudgetControls.js +18 -18
- package/dist/planmagnet/controls/FeatureControls.js +24 -24
- package/dist/planmagnet/controls/ObjectiveControls.js +11 -11
- package/dist/planmagnet/controls/ProgramControls.js +9 -9
- package/dist/planmagnet/controls/WorkItemControls.js +27 -27
- package/dist/planmagnet/dependency/DependencyPanel.js +7 -7
- package/dist/planmagnet/pages/AiPlanPagePage.js +6 -6
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +370 -221
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +140 -135
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js +160 -108
- package/dist/planmagnet/pages/ProjectsBudgetDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +5 -5
- package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsWorkflowPagePage.js +30 -30
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.js +329 -0
- package/dist/planmagnet/pages/TasksMyDashboardPagePage.js.map +1 -0
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js +26 -26
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts +14 -2
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.d.ts.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js +173 -113
- package/dist/planmagnet/pages/analytics/DeliveryHealthCards.js.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js +211 -0
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.js +177 -0
- package/dist/planmagnet/pages/analytics/QualityMetricsCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts +7 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.js +137 -0
- package/dist/planmagnet/pages/analytics/ThroughputCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.d.ts +42 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.js +47 -0
- package/dist/planmagnet/pages/analytics/analyticsRange.js.map +1 -0
- package/dist/planmagnet/time/TimeEntryControls.js +12 -12
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AssigneeSelect as e, WORK_ITEM_PRIORITIES as t, WORK_ITEM_STATUSES as n, enumLabel as r } from "../controls/WorkItemControls.js";
|
|
2
|
+
import { ProjectSelect as i } from "../controls/Pickers.js";
|
|
3
3
|
import { ACTION_TYPES as a, ACTION_TYPE_LABEL as o, AUTOMATIC_TRIGGER_TYPES as s, CONDITION_FIELDS as c, CONDITION_OPERATORS as l, CONDITION_OPERATOR_LABEL as u, TRIGGER_TYPES as d, TRIGGER_TYPE_LABEL as f } from "./automationRuleTypes.js";
|
|
4
4
|
import { Plus as p, X as m } from "lucide-react";
|
|
5
5
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
import { Button as _, Input as v } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/planmagnet/automation/AutomationRuleFields.tsx
|
|
8
8
|
var y = "rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", b = `mt-1 w-full ${y}`, x = "text-foreground";
|
|
9
|
-
function S({ action:
|
|
10
|
-
switch (
|
|
11
|
-
case "ASSIGN_TO_USER": return /* @__PURE__ */ h(
|
|
12
|
-
value:
|
|
9
|
+
function S({ action: i, onChange: a }) {
|
|
10
|
+
switch (i.type) {
|
|
11
|
+
case "ASSIGN_TO_USER": return /* @__PURE__ */ h(e, {
|
|
12
|
+
value: i.value,
|
|
13
13
|
onChange: a
|
|
14
14
|
});
|
|
15
15
|
case "SET_STATUS": return /* @__PURE__ */ g("select", {
|
|
16
16
|
className: `${y} w-full`,
|
|
17
|
-
value:
|
|
17
|
+
value: i.value,
|
|
18
18
|
onChange: (e) => a(e.target.value),
|
|
19
19
|
children: [/* @__PURE__ */ h("option", {
|
|
20
20
|
value: "",
|
|
21
21
|
children: "Choose a status"
|
|
22
|
-
}),
|
|
22
|
+
}), n.map((e) => /* @__PURE__ */ h("option", {
|
|
23
23
|
value: e,
|
|
24
|
-
children:
|
|
24
|
+
children: r(e)
|
|
25
25
|
}, e))]
|
|
26
26
|
});
|
|
27
27
|
case "SET_PRIORITY": return /* @__PURE__ */ g("select", {
|
|
28
28
|
className: `${y} w-full`,
|
|
29
|
-
value:
|
|
29
|
+
value: i.value,
|
|
30
30
|
onChange: (e) => a(e.target.value),
|
|
31
31
|
children: [/* @__PURE__ */ h("option", {
|
|
32
32
|
value: "",
|
|
33
33
|
children: "Choose a priority"
|
|
34
|
-
}),
|
|
34
|
+
}), t.map((e) => /* @__PURE__ */ h("option", {
|
|
35
35
|
value: e,
|
|
36
|
-
children:
|
|
36
|
+
children: r(e)
|
|
37
37
|
}, e))]
|
|
38
38
|
});
|
|
39
39
|
default: return /* @__PURE__ */ h(v, {
|
|
40
40
|
"aria-label": "Label",
|
|
41
41
|
className: x,
|
|
42
42
|
placeholder: "e.g. needs-review",
|
|
43
|
-
value:
|
|
43
|
+
value: i.value,
|
|
44
44
|
onChange: (e) => a(e.target.value)
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -182,7 +182,7 @@ function w({ conditions: e, onChange: t }) {
|
|
|
182
182
|
]
|
|
183
183
|
});
|
|
184
184
|
}
|
|
185
|
-
function T({ form:
|
|
185
|
+
function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
186
186
|
return /* @__PURE__ */ g("div", {
|
|
187
187
|
className: "space-y-4",
|
|
188
188
|
children: [
|
|
@@ -193,10 +193,10 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
193
193
|
}), /* @__PURE__ */ h(v, {
|
|
194
194
|
id: "automation-name",
|
|
195
195
|
className: `mt-1 ${x}`,
|
|
196
|
-
value:
|
|
197
|
-
onChange: (
|
|
198
|
-
...
|
|
199
|
-
name:
|
|
196
|
+
value: e.name,
|
|
197
|
+
onChange: (n) => t({
|
|
198
|
+
...e,
|
|
199
|
+
name: n.target.value
|
|
200
200
|
}),
|
|
201
201
|
placeholder: "e.g. Assign new bugs to triage"
|
|
202
202
|
})] }),
|
|
@@ -207,10 +207,10 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
207
207
|
}), /* @__PURE__ */ h("textarea", {
|
|
208
208
|
id: "automation-description",
|
|
209
209
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]",
|
|
210
|
-
value:
|
|
211
|
-
onChange: (
|
|
212
|
-
...
|
|
213
|
-
description:
|
|
210
|
+
value: e.description,
|
|
211
|
+
onChange: (n) => t({
|
|
212
|
+
...e,
|
|
213
|
+
description: n.target.value
|
|
214
214
|
}),
|
|
215
215
|
placeholder: "What this rule is for"
|
|
216
216
|
})] }),
|
|
@@ -220,17 +220,17 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
220
220
|
htmlFor: "automation-project",
|
|
221
221
|
className: "text-sm font-medium",
|
|
222
222
|
children: "Project"
|
|
223
|
-
}),
|
|
223
|
+
}), n ? /* @__PURE__ */ h("p", {
|
|
224
224
|
className: "mt-1 text-sm text-muted-foreground",
|
|
225
225
|
children: "A rule's project cannot be changed after it is created."
|
|
226
226
|
}) : /* @__PURE__ */ h("div", {
|
|
227
227
|
className: "mt-1",
|
|
228
|
-
children: /* @__PURE__ */ h(
|
|
228
|
+
children: /* @__PURE__ */ h(i, {
|
|
229
229
|
id: "automation-project",
|
|
230
|
-
value:
|
|
231
|
-
onChange: (
|
|
232
|
-
...
|
|
233
|
-
projectId:
|
|
230
|
+
value: e.projectId,
|
|
231
|
+
onChange: (n) => t({
|
|
232
|
+
...e,
|
|
233
|
+
projectId: n
|
|
234
234
|
})
|
|
235
235
|
})
|
|
236
236
|
})] }), /* @__PURE__ */ g("div", { children: [
|
|
@@ -242,17 +242,17 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
242
242
|
/* @__PURE__ */ h("select", {
|
|
243
243
|
id: "automation-trigger",
|
|
244
244
|
className: b,
|
|
245
|
-
value:
|
|
246
|
-
onChange: (
|
|
247
|
-
...
|
|
248
|
-
triggerType:
|
|
245
|
+
value: e.triggerType,
|
|
246
|
+
onChange: (n) => t({
|
|
247
|
+
...e,
|
|
248
|
+
triggerType: n.target.value
|
|
249
249
|
}),
|
|
250
250
|
children: d.map((e) => /* @__PURE__ */ g("option", {
|
|
251
251
|
value: e,
|
|
252
252
|
children: [f[e], s.has(e) ? "" : " (not yet automatic)"]
|
|
253
253
|
}, e))
|
|
254
254
|
}),
|
|
255
|
-
!s.has(
|
|
255
|
+
!s.has(e.triggerType) && /* @__PURE__ */ g("p", {
|
|
256
256
|
className: "mt-1 text-xs text-muted-foreground",
|
|
257
257
|
children: [
|
|
258
258
|
"This trigger is saved but does not fire on its own yet — use",
|
|
@@ -276,10 +276,10 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
276
276
|
children: "All conditions must match. Leave empty to match every event."
|
|
277
277
|
}),
|
|
278
278
|
/* @__PURE__ */ h(w, {
|
|
279
|
-
conditions:
|
|
280
|
-
onChange: (
|
|
281
|
-
...
|
|
282
|
-
conditions:
|
|
279
|
+
conditions: e.conditions,
|
|
280
|
+
onChange: (n) => t({
|
|
281
|
+
...e,
|
|
282
|
+
conditions: n
|
|
283
283
|
})
|
|
284
284
|
})
|
|
285
285
|
] }),
|
|
@@ -293,10 +293,10 @@ function T({ form: t, onChange: n, projectLocked: r = !1 }) {
|
|
|
293
293
|
children: "Run in order when the conditions match."
|
|
294
294
|
}),
|
|
295
295
|
/* @__PURE__ */ h(C, {
|
|
296
|
-
actions:
|
|
297
|
-
onChange: (
|
|
298
|
-
...
|
|
299
|
-
actions:
|
|
296
|
+
actions: e.actions,
|
|
297
|
+
onChange: (n) => t({
|
|
298
|
+
...e,
|
|
299
|
+
actions: n
|
|
300
300
|
})
|
|
301
301
|
})
|
|
302
302
|
] })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlanMagnet as e } from "../providers/PlanMagnetProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { workflowLabel as t } from "../hooks/useProjectWorkflow.js";
|
|
3
|
+
import { throwOnError as n } from "../utils/mutationResult.js";
|
|
4
|
+
import { ErrorLine as r } from "../controls/ConfirmButton.js";
|
|
5
5
|
import { WORK_ITEM_PRIORITIES as i, enumLabel as a, useAssigneeOptions as o } from "../controls/WorkItemControls.js";
|
|
6
6
|
import { useState as s } from "react";
|
|
7
7
|
import { X as c } from "lucide-react";
|
|
@@ -62,7 +62,7 @@ function S({ projectId: l, selectedIds: S, workflow: C, onDone: w }) {
|
|
|
62
62
|
let e = { ids: S };
|
|
63
63
|
E !== h && (e.status = E), O !== h && (e.priority = O), A !== h && (e.assigneeId = A === g ? null : A), M !== h && (e.sprintId = M === _ ? null : M);
|
|
64
64
|
try {
|
|
65
|
-
L((await
|
|
65
|
+
L((await n(V({ variables: { input: e } }))).data?.planmagnetBulkUpdateWorkItems.length ?? S.length), G();
|
|
66
66
|
} catch (e) {
|
|
67
67
|
F(e instanceof Error ? e.message : "The selected tasks could not be updated.");
|
|
68
68
|
}
|
|
@@ -89,7 +89,7 @@ function S({ projectId: l, selectedIds: S, workflow: C, onDone: w }) {
|
|
|
89
89
|
children: "Status: no change"
|
|
90
90
|
}), U.map((e) => /* @__PURE__ */ p("option", {
|
|
91
91
|
value: e.status,
|
|
92
|
-
children: ["Status: ",
|
|
92
|
+
children: ["Status: ", t(C, e.status)]
|
|
93
93
|
}, e.status))]
|
|
94
94
|
}),
|
|
95
95
|
/* @__PURE__ */ p("select", {
|
|
@@ -172,7 +172,7 @@ function S({ projectId: l, selectedIds: S, workflow: C, onDone: w }) {
|
|
|
172
172
|
" updated."
|
|
173
173
|
]
|
|
174
174
|
}),
|
|
175
|
-
P && /* @__PURE__ */ f(
|
|
175
|
+
P && /* @__PURE__ */ f(r, { message: P })
|
|
176
176
|
]
|
|
177
177
|
});
|
|
178
178
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
3
|
+
import { allowedTargets as r, useProjectWorkflow as i, workflowLabel as a } from "../hooks/useProjectWorkflow.js";
|
|
4
|
+
import { throwOnError as o } from "../utils/mutationResult.js";
|
|
5
5
|
import { enumLabel as s } from "../controls/WorkItemControls.js";
|
|
6
6
|
import { useProjectMilestones as c } from "../milestones/MilestoneControls.js";
|
|
7
7
|
import { BulkActionsBar as l } from "./BulkActions.js";
|
|
@@ -24,7 +24,7 @@ var V = [
|
|
|
24
24
|
"CANCELLED"
|
|
25
25
|
], H = f(null), U = () => {
|
|
26
26
|
let e = p(H);
|
|
27
|
-
return (t) =>
|
|
27
|
+
return (t) => a(e, t);
|
|
28
28
|
}, W = 100, oe = b`
|
|
29
29
|
query ProjectBoards($workspaceId: ID!, $projectId: String) {
|
|
30
30
|
planmagnetBoards(
|
|
@@ -189,7 +189,7 @@ function $({ message: e }) {
|
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
191
|
function _e({ projectId: t, projectName: n }) {
|
|
192
|
-
let { workspaceId:
|
|
192
|
+
let { workspaceId: r } = e(), a = x(), [s, f] = m(null), [p, h] = m(null), [g] = m(() => Date.now()), [v, b] = m({
|
|
193
193
|
filter: void 0,
|
|
194
194
|
sort: {
|
|
195
195
|
field: "RANK",
|
|
@@ -202,18 +202,18 @@ function _e({ projectId: t, projectName: n }) {
|
|
|
202
202
|
"STORY_POINTS"
|
|
203
203
|
],
|
|
204
204
|
filterActive: !1
|
|
205
|
-
}), E = u(
|
|
205
|
+
}), E = u(r, t), D = c(t), [O, ee] = m({
|
|
206
206
|
key: null,
|
|
207
207
|
byColumn: {}
|
|
208
208
|
}), [k, A] = m(null), [j, M] = m(/* @__PURE__ */ new Set()), N = (e) => M((t) => {
|
|
209
209
|
let n = new Set(t);
|
|
210
210
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
211
|
-
}), P = () => M(/* @__PURE__ */ new Set()), L =
|
|
211
|
+
}), P = () => M(/* @__PURE__ */ new Set()), L = i(t), { data: R, loading: ne } = C(oe, {
|
|
212
212
|
variables: {
|
|
213
|
-
workspaceId:
|
|
213
|
+
workspaceId: r,
|
|
214
214
|
projectId: t
|
|
215
215
|
},
|
|
216
|
-
skip: !
|
|
216
|
+
skip: !r
|
|
217
217
|
}), z = R?.planmagnetBoards.items ?? [], B = (s && z.some((e) => e.id === s) ? s : null) ?? z.find((e) => e.isDefault)?.id ?? z[0]?.id ?? null, [re, ie] = m(B);
|
|
218
218
|
re !== B && (ie(B), M(/* @__PURE__ */ new Set()));
|
|
219
219
|
let { data: ae, previousData: V, loading: U } = C(K, {
|
|
@@ -235,7 +235,7 @@ function _e({ projectId: t, projectName: n }) {
|
|
|
235
235
|
if (!(!W || !t)) {
|
|
236
236
|
h(null), A(e.id);
|
|
237
237
|
try {
|
|
238
|
-
let n = await
|
|
238
|
+
let n = await a.query({
|
|
239
239
|
query: se,
|
|
240
240
|
variables: {
|
|
241
241
|
boardId: W.id,
|
|
@@ -276,7 +276,7 @@ function _e({ projectId: t, projectName: n }) {
|
|
|
276
276
|
}), Z = async (e, t) => {
|
|
277
277
|
h(null);
|
|
278
278
|
try {
|
|
279
|
-
await
|
|
279
|
+
await o(e());
|
|
280
280
|
} catch (e) {
|
|
281
281
|
h(Q(e, t));
|
|
282
282
|
}
|
|
@@ -424,8 +424,8 @@ function _e({ projectId: t, projectName: n }) {
|
|
|
424
424
|
]
|
|
425
425
|
}) });
|
|
426
426
|
}
|
|
427
|
-
function ve({ card: e, column:
|
|
428
|
-
let _ = t(), v = p(H), y = pe(e.statusSince, f), b =
|
|
427
|
+
function ve({ card: e, column: i, columns: o, visibleFields: c, sprintOptions: l, milestoneOptions: u, busy: d, now: f, selected: m, onToggleSelect: h, onMove: g }) {
|
|
428
|
+
let _ = t(), v = p(H), y = pe(e.statusSince, f), b = r(v, e.status, V), x = o.filter((e) => e.id !== i.id && (!e.mappedStatus || b.includes(e.mappedStatus))), S = (e) => c.includes(e), C = e.sprintId ? l.find((t) => t.id === e.sprintId)?.name : null, E = e.milestoneId ? u.find((t) => t.id === e.milestoneId)?.name : null, D = [];
|
|
429
429
|
return S("TYPE") && D.push({
|
|
430
430
|
key: "type",
|
|
431
431
|
text: s(e.type)
|
|
@@ -480,7 +480,7 @@ function ve({ card: e, column: r, columns: a, visibleFields: c, sprintOptions: l
|
|
|
480
480
|
y !== null && /* @__PURE__ */ w("span", {
|
|
481
481
|
"data-testid": "card-age",
|
|
482
482
|
className: me(y),
|
|
483
|
-
title: `In ${
|
|
483
|
+
title: `In ${a(v, e.status)} since ${new Date(e.statusSince ?? "").toLocaleDateString()}`,
|
|
484
484
|
children: y === 0 ? "today" : `${y}d in status`
|
|
485
485
|
}),
|
|
486
486
|
S("STORY_POINTS") && /* @__PURE__ */ T("span", { children: [e.storyPoints ?? 0, " pts"] })
|
|
@@ -760,35 +760,35 @@ function Ce({ boardId: e, column: t, columns: n, cards: r, visibleFields: i, fil
|
|
|
760
760
|
});
|
|
761
761
|
}
|
|
762
762
|
function we({ boardId: e, column: t }) {
|
|
763
|
-
let n = t !== void 0,
|
|
763
|
+
let n = t !== void 0, r = U(), [i, a] = m(!1), [s, c] = m(t?.name ?? ""), [l, u] = m(t?.mappedStatus ?? ""), [d, f] = m(t?.wipLimit ? String(t.wipLimit) : ""), [p, h] = m(null), g = {
|
|
764
764
|
refetchQueries: Y,
|
|
765
765
|
awaitRefetchQueries: !0
|
|
766
766
|
}, [_, b] = S(q, g), [x, C] = S(J, g), [P, te] = S(ue, g), I = b.loading || C.loading || te.loading, H = d.trim() === "" ? null : Number(d), W = H !== null && (!Number.isInteger(H) || H < 1), oe = s.trim() !== "" && !W && !I, G = () => {
|
|
767
767
|
c(t?.name ?? ""), u(t?.mappedStatus ?? ""), f(t?.wipLimit ? String(t.wipLimit) : ""), h(null);
|
|
768
768
|
}, se = async () => {
|
|
769
769
|
h(null);
|
|
770
|
-
let
|
|
770
|
+
let r = {
|
|
771
771
|
name: s.trim(),
|
|
772
772
|
mappedStatus: l || null,
|
|
773
773
|
wipLimit: H
|
|
774
774
|
};
|
|
775
775
|
try {
|
|
776
|
-
n ? await
|
|
776
|
+
n ? await o(x({ variables: {
|
|
777
777
|
id: t.id,
|
|
778
|
-
input:
|
|
779
|
-
} })) : await
|
|
778
|
+
input: r
|
|
779
|
+
} })) : await o(_({ variables: { input: {
|
|
780
780
|
boardId: e,
|
|
781
781
|
type: "CUSTOM",
|
|
782
|
-
...
|
|
783
|
-
} } })),
|
|
782
|
+
...r
|
|
783
|
+
} } })), a(!1);
|
|
784
784
|
} catch (e) {
|
|
785
785
|
h(Q(e, "The column could not be saved."));
|
|
786
786
|
}
|
|
787
787
|
}, K = n ? `column-${t.id}` : "new-column";
|
|
788
788
|
return /* @__PURE__ */ T(R, {
|
|
789
|
-
open:
|
|
789
|
+
open: i,
|
|
790
790
|
onOpenChange: (e) => {
|
|
791
|
-
|
|
791
|
+
a(e), e && G();
|
|
792
792
|
},
|
|
793
793
|
children: [/* @__PURE__ */ w(ae, {
|
|
794
794
|
asChild: !0,
|
|
@@ -834,7 +834,7 @@ function we({ boardId: e, column: t }) {
|
|
|
834
834
|
children: "No status (cards keep theirs)"
|
|
835
835
|
}), V.map((e) => /* @__PURE__ */ w("option", {
|
|
836
836
|
value: e,
|
|
837
|
-
children:
|
|
837
|
+
children: r(e)
|
|
838
838
|
}, e))]
|
|
839
839
|
})] }),
|
|
840
840
|
/* @__PURE__ */ T("div", { children: [
|
|
@@ -873,7 +873,7 @@ function we({ boardId: e, column: t }) {
|
|
|
873
873
|
className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
874
874
|
onClick: async () => {
|
|
875
875
|
try {
|
|
876
|
-
await
|
|
876
|
+
await o(P({ variables: { id: t.id } })), a(!1);
|
|
877
877
|
} catch (e) {
|
|
878
878
|
h(Q(e, "The column could not be deleted."));
|
|
879
879
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { LEAVES_PAGE_CONTEXT as t, throwOnError as n } from "../utils/mutationResult.js";
|
|
3
3
|
import { ConfirmButton as r, ErrorLine as i } from "../controls/ConfirmButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { enumLabel as a } from "../controls/WorkItemControls.js";
|
|
5
|
+
import { ProjectSelect as o } from "../controls/Pickers.js";
|
|
6
6
|
import { toDateInputValue as s } from "../time/timeShared.js";
|
|
7
7
|
import { useState as c } from "react";
|
|
8
8
|
import { CheckCircle2 as l, Pencil as u, Plus as d, Trash2 as f } from "lucide-react";
|
|
@@ -63,7 +63,7 @@ var E = [
|
|
|
63
63
|
}
|
|
64
64
|
`, N = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", P = (e, t) => e instanceof Error ? e.message : t;
|
|
65
65
|
function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
66
|
-
let
|
|
66
|
+
let a = {
|
|
67
67
|
projectId: e ?? "",
|
|
68
68
|
name: "",
|
|
69
69
|
description: "",
|
|
@@ -71,7 +71,7 @@ function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
|
71
71
|
currency: "USD",
|
|
72
72
|
periodStart: "",
|
|
73
73
|
periodEnd: ""
|
|
74
|
-
}, [s, l] = c(!1), [u, f] = c(
|
|
74
|
+
}, [s, l] = c(!1), [u, f] = c(a), [p, E] = c(null), [D, { loading: A }] = m(k, {
|
|
75
75
|
refetchQueries: O,
|
|
76
76
|
awaitRefetchQueries: !0
|
|
77
77
|
}), j = u.periodStart && u.periodEnd && u.periodEnd < u.periodStart, M = Number(u.plannedAmount), F = !A && u.name.trim() !== "" && !!u.projectId && Number.isFinite(M) && M >= 0 && u.currency.trim() !== "" && !j, I = async () => {
|
|
@@ -86,7 +86,7 @@ function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
|
86
86
|
...u.periodStart ? { periodStart: u.periodStart } : {},
|
|
87
87
|
...u.periodEnd ? { periodEnd: u.periodEnd } : {}
|
|
88
88
|
} } }))).data?.planmagnetCreateBudget.id;
|
|
89
|
-
l(!1), f(
|
|
89
|
+
l(!1), f(a), e && t?.(e);
|
|
90
90
|
} catch (e) {
|
|
91
91
|
E(P(e, "The budget could not be created."));
|
|
92
92
|
}
|
|
@@ -94,7 +94,7 @@ function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
|
94
94
|
return /* @__PURE__ */ g(y, {
|
|
95
95
|
open: s,
|
|
96
96
|
onOpenChange: (e) => {
|
|
97
|
-
l(e), e ? f(
|
|
97
|
+
l(e), e ? f(a) : E(null);
|
|
98
98
|
},
|
|
99
99
|
children: [/* @__PURE__ */ h(T, {
|
|
100
100
|
asChild: !0,
|
|
@@ -116,7 +116,7 @@ function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
|
116
116
|
children: "Project"
|
|
117
117
|
}), /* @__PURE__ */ h("div", {
|
|
118
118
|
className: "mt-1",
|
|
119
|
-
children: /* @__PURE__ */ h(
|
|
119
|
+
children: /* @__PURE__ */ h(o, {
|
|
120
120
|
id: "new-budget-project",
|
|
121
121
|
value: u.projectId,
|
|
122
122
|
onChange: (e) => f({
|
|
@@ -233,7 +233,7 @@ function F({ presetProjectId: e, onCreated: t, triggerSize: r = "sm" }) {
|
|
|
233
233
|
})]
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
function I({ budget:
|
|
236
|
+
function I({ budget: o }) {
|
|
237
237
|
let s = e(), [u, d] = m(A, {
|
|
238
238
|
refetchQueries: O,
|
|
239
239
|
awaitRefetchQueries: !0
|
|
@@ -243,11 +243,11 @@ function I({ budget: a }) {
|
|
|
243
243
|
}), [y, b] = m(M, {
|
|
244
244
|
refetchQueries: ["BudgetsList", "ProjectBudgetsSummary"],
|
|
245
245
|
context: t
|
|
246
|
-
}), [x, S] = c(null), C = d.loading || v.loading || b.loading, w = D.includes(
|
|
246
|
+
}), [x, S] = c(null), C = d.loading || v.loading || b.loading, w = D.includes(o.status) ? D : [o.status, ...D], T = async (e) => {
|
|
247
247
|
S(null);
|
|
248
248
|
try {
|
|
249
249
|
await n(u({ variables: {
|
|
250
|
-
id:
|
|
250
|
+
id: o.id,
|
|
251
251
|
input: { status: e }
|
|
252
252
|
} }));
|
|
253
253
|
} catch (e) {
|
|
@@ -256,14 +256,14 @@ function I({ budget: a }) {
|
|
|
256
256
|
}, E = async () => {
|
|
257
257
|
S(null);
|
|
258
258
|
try {
|
|
259
|
-
await n(p({ variables: { id:
|
|
259
|
+
await n(p({ variables: { id: o.id } }));
|
|
260
260
|
} catch (e) {
|
|
261
261
|
S(P(e, "The budget could not be approved."));
|
|
262
262
|
}
|
|
263
263
|
}, k = async () => {
|
|
264
264
|
S(null);
|
|
265
265
|
try {
|
|
266
|
-
await n(y({ variables: { id:
|
|
266
|
+
await n(y({ variables: { id: o.id } })), s("/projects/budgets-page");
|
|
267
267
|
} catch (e) {
|
|
268
268
|
S(P(e, "The budget could not be deleted."));
|
|
269
269
|
}
|
|
@@ -277,29 +277,29 @@ function I({ budget: a }) {
|
|
|
277
277
|
"aria-label": "Status",
|
|
278
278
|
"data-testid": "budget-status",
|
|
279
279
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm disabled:opacity-60",
|
|
280
|
-
value:
|
|
280
|
+
value: o.status,
|
|
281
281
|
disabled: C,
|
|
282
282
|
onChange: (e) => {
|
|
283
|
-
e.target.value !==
|
|
283
|
+
e.target.value !== o.status && T(e.target.value);
|
|
284
284
|
},
|
|
285
285
|
children: w.map((e) => /* @__PURE__ */ h("option", {
|
|
286
286
|
value: e,
|
|
287
|
-
children:
|
|
287
|
+
children: a(e)
|
|
288
288
|
}, e))
|
|
289
289
|
}),
|
|
290
|
-
|
|
290
|
+
o.status !== "APPROVED" && o.status !== "CLOSED" && /* @__PURE__ */ g(_, {
|
|
291
291
|
size: "sm",
|
|
292
292
|
variant: "outline",
|
|
293
293
|
disabled: C,
|
|
294
294
|
onClick: () => void E(),
|
|
295
295
|
children: [/* @__PURE__ */ h(l, { className: "mr-1 h-4 w-4" }), "Approve"]
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */ h(L, { budget:
|
|
297
|
+
/* @__PURE__ */ h(L, { budget: o }),
|
|
298
298
|
/* @__PURE__ */ h(r, {
|
|
299
299
|
label: "Delete",
|
|
300
300
|
variant: "outline",
|
|
301
301
|
icon: /* @__PURE__ */ h(f, { className: "mr-1 h-4 w-4" }),
|
|
302
|
-
title: `Delete "${
|
|
302
|
+
title: `Delete "${o.name}"?`,
|
|
303
303
|
description: "The budget and its logged expenses are removed. This cannot be undone here.",
|
|
304
304
|
confirmLabel: "Delete budget",
|
|
305
305
|
destructive: !0,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { LEAVES_PAGE_CONTEXT as t, throwOnError as n } from "../utils/mutationResult.js";
|
|
3
3
|
import { ConfirmButton as r, ErrorLine as i } from "./ConfirmButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { enumLabel as a } from "./WorkItemControls.js";
|
|
5
|
+
import { ProjectSelect as o, WorkItemSearchSelect as s } from "./Pickers.js";
|
|
6
6
|
import { parseIntField as c } from "../utils/formValidation.js";
|
|
7
7
|
import { detailPath as l } from "../utils/rowNavigation.js";
|
|
8
8
|
import { useState as u } from "react";
|
|
@@ -81,15 +81,15 @@ function F({ featureId: e, voted: t }) {
|
|
|
81
81
|
}), c && /* @__PURE__ */ _(i, { message: c })]
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
function I({ feature:
|
|
85
|
-
let
|
|
84
|
+
function I({ feature: o }) {
|
|
85
|
+
let s = e(), [c, f] = g(M, P), [p, h] = g(N, {
|
|
86
86
|
refetchQueries: k.filter((e) => e !== "GetFeatureRequest"),
|
|
87
87
|
context: t
|
|
88
|
-
}), [b, x] = u(null), S = f.loading || h.loading, C = O.includes(
|
|
88
|
+
}), [b, x] = u(null), S = f.loading || h.loading, C = O.includes(o.status) ? O : [o.status, ...O], w = async (e) => {
|
|
89
89
|
x(null);
|
|
90
90
|
try {
|
|
91
91
|
await n(c({ variables: {
|
|
92
|
-
id:
|
|
92
|
+
id: o.id,
|
|
93
93
|
input: { status: e }
|
|
94
94
|
} }));
|
|
95
95
|
} catch (e) {
|
|
@@ -98,7 +98,7 @@ function I({ feature: a }) {
|
|
|
98
98
|
}, T = async () => {
|
|
99
99
|
x(null);
|
|
100
100
|
try {
|
|
101
|
-
await n(p({ variables: { id:
|
|
101
|
+
await n(p({ variables: { id: o.id } })), s("/products/features-page");
|
|
102
102
|
} catch (e) {
|
|
103
103
|
x(e instanceof Error ? e.message : "The request could not be deleted.");
|
|
104
104
|
}
|
|
@@ -112,29 +112,29 @@ function I({ feature: a }) {
|
|
|
112
112
|
"aria-label": "Status",
|
|
113
113
|
"data-testid": "feature-status",
|
|
114
114
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm disabled:opacity-60",
|
|
115
|
-
value:
|
|
115
|
+
value: o.status,
|
|
116
116
|
disabled: S,
|
|
117
117
|
onChange: (e) => {
|
|
118
|
-
e.target.value !==
|
|
118
|
+
e.target.value !== o.status && w(e.target.value);
|
|
119
119
|
},
|
|
120
120
|
children: C.map((e) => /* @__PURE__ */ _("option", {
|
|
121
121
|
value: e,
|
|
122
|
-
children:
|
|
122
|
+
children: a(e)
|
|
123
123
|
}, e))
|
|
124
124
|
}),
|
|
125
|
-
/* @__PURE__ */ _(L, { feature:
|
|
125
|
+
/* @__PURE__ */ _(L, { feature: o }),
|
|
126
126
|
/* @__PURE__ */ v(y, {
|
|
127
127
|
size: "sm",
|
|
128
128
|
variant: "outline",
|
|
129
129
|
"data-testid": "feature-analytics",
|
|
130
|
-
onClick: () =>
|
|
130
|
+
onClick: () => s(l("/products/feature-analytics-page", o.id)),
|
|
131
131
|
children: [/* @__PURE__ */ _(d, { className: "mr-1 h-4 w-4" }), "Analytics"]
|
|
132
132
|
}),
|
|
133
133
|
/* @__PURE__ */ _(r, {
|
|
134
134
|
label: "Delete",
|
|
135
135
|
variant: "outline",
|
|
136
136
|
icon: /* @__PURE__ */ _(m, { className: "mr-1 h-4 w-4" }),
|
|
137
|
-
title: `Delete "${
|
|
137
|
+
title: `Delete "${o.title}"?`,
|
|
138
138
|
description: "The request and its votes are deleted. This cannot be undone here.",
|
|
139
139
|
confirmLabel: "Delete request",
|
|
140
140
|
destructive: !0,
|
|
@@ -153,7 +153,7 @@ function L({ feature: e }) {
|
|
|
153
153
|
effortEstimate: e.effortEstimate ?? "",
|
|
154
154
|
projectId: e.projectId ?? "",
|
|
155
155
|
workItemId: e.workItemId ?? ""
|
|
156
|
-
}, [r,
|
|
156
|
+
}, [r, a] = u(!1), [l, d] = u(t), [p, m] = u(null), [h, O] = g(M, P), k = c(l.businessValue, {
|
|
157
157
|
min: 0,
|
|
158
158
|
max: 100
|
|
159
159
|
}), A = l.title.trim() !== "" && !k.invalid && !O.loading, j = async () => {
|
|
@@ -165,23 +165,23 @@ function L({ feature: e }) {
|
|
|
165
165
|
effortEstimate: r(l.effortEstimate),
|
|
166
166
|
projectId: l.projectId || null,
|
|
167
167
|
workItemId: l.workItemId || null
|
|
168
|
-
},
|
|
168
|
+
}, o = {
|
|
169
169
|
title: t.title,
|
|
170
170
|
description: r(t.description),
|
|
171
171
|
businessValue: t.businessValue === "" ? null : Number(t.businessValue),
|
|
172
172
|
effortEstimate: r(t.effortEstimate),
|
|
173
173
|
projectId: t.projectId || null,
|
|
174
174
|
workItemId: t.workItemId || null
|
|
175
|
-
},
|
|
176
|
-
if (Object.keys(
|
|
177
|
-
|
|
175
|
+
}, s = Object.fromEntries(Object.entries(i).filter(([e, t]) => t !== o[e]));
|
|
176
|
+
if (Object.keys(s).length === 0) {
|
|
177
|
+
a(!1);
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
try {
|
|
181
181
|
await n(h({ variables: {
|
|
182
182
|
id: e.id,
|
|
183
|
-
input:
|
|
184
|
-
} })),
|
|
183
|
+
input: s
|
|
184
|
+
} })), a(!1);
|
|
185
185
|
} catch (e) {
|
|
186
186
|
m(e instanceof Error ? e.message : "The request could not be saved.");
|
|
187
187
|
}
|
|
@@ -189,7 +189,7 @@ function L({ feature: e }) {
|
|
|
189
189
|
return /* @__PURE__ */ v(x, {
|
|
190
190
|
open: r,
|
|
191
191
|
onOpenChange: (e) => {
|
|
192
|
-
|
|
192
|
+
a(e), e ? d(t) : m(null);
|
|
193
193
|
},
|
|
194
194
|
children: [/* @__PURE__ */ _(D, {
|
|
195
195
|
asChild: !0,
|
|
@@ -272,7 +272,7 @@ function L({ feature: e }) {
|
|
|
272
272
|
children: "Project"
|
|
273
273
|
}), /* @__PURE__ */ _("div", {
|
|
274
274
|
className: "mt-1",
|
|
275
|
-
children: /* @__PURE__ */ _(
|
|
275
|
+
children: /* @__PURE__ */ _(o, {
|
|
276
276
|
id: "feature-edit-project",
|
|
277
277
|
value: l.projectId,
|
|
278
278
|
noneLabel: "No project",
|
|
@@ -289,7 +289,7 @@ function L({ feature: e }) {
|
|
|
289
289
|
children: "Delivered by work item"
|
|
290
290
|
}), /* @__PURE__ */ _("div", {
|
|
291
291
|
className: "mt-1",
|
|
292
|
-
children: /* @__PURE__ */ _(
|
|
292
|
+
children: /* @__PURE__ */ _(s, {
|
|
293
293
|
id: "feature-edit-workitem",
|
|
294
294
|
projectId: l.projectId || void 0,
|
|
295
295
|
value: l.workItemId,
|
|
@@ -304,7 +304,7 @@ function L({ feature: e }) {
|
|
|
304
304
|
}),
|
|
305
305
|
/* @__PURE__ */ v(w, { children: [/* @__PURE__ */ _(y, {
|
|
306
306
|
variant: "outline",
|
|
307
|
-
onClick: () =>
|
|
307
|
+
onClick: () => a(!1),
|
|
308
308
|
children: "Cancel"
|
|
309
309
|
}), /* @__PURE__ */ _(y, {
|
|
310
310
|
onClick: () => void j(),
|