@burdenoff/microfe-planmagnet 2026.930.12 → 2026.930.14
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 +144 -128
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +231 -223
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/activity/activityDescribe.d.ts +38 -0
- package/dist/planmagnet/activity/activityDescribe.d.ts.map +1 -0
- package/dist/planmagnet/activity/activityDescribe.js +123 -0
- package/dist/planmagnet/activity/activityDescribe.js.map +1 -0
- package/dist/planmagnet/activity/relativeTime.d.ts +8 -0
- package/dist/planmagnet/activity/relativeTime.d.ts.map +1 -0
- package/dist/planmagnet/activity/relativeTime.js +38 -0
- package/dist/planmagnet/activity/relativeTime.js.map +1 -0
- 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/comments/WorkItemActivity.d.ts.map +1 -1
- package/dist/planmagnet/comments/WorkItemActivity.js +35 -38
- package/dist/planmagnet/comments/WorkItemActivity.js.map +1 -1
- package/dist/planmagnet/controls/FeatureControls.js +46 -46
- package/dist/planmagnet/controls/ObjectiveControls.js +11 -11
- package/dist/planmagnet/controls/ProgramControls.js +9 -9
- package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/ProjectControls.js +53 -46
- package/dist/planmagnet/controls/ProjectControls.js.map +1 -1
- package/dist/planmagnet/controls/WorkItemControls.js +27 -27
- package/dist/planmagnet/dependency/DependencyPanel.js +7 -7
- package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.js +291 -0
- package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -0
- 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/AutomationAutomationRulesPagePage.js +15 -15
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +9 -9
- 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/ProductsEditProductPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +118 -109
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProgramsEditProgramPagePage.js +4 -4
- 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 +11 -11
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +13 -13
- package/dist/planmagnet/pages/ProjectsQualityGatesPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsWorkflowPagePage.js +30 -30
- package/dist/planmagnet/pages/RisksRiskDetailPagePage.js +4 -4
- 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/TeamCreateTeamPagePage.js +4 -4
- package/dist/planmagnet/pages/TeamTeamDetailPagePage.js +6 -6
- package/dist/planmagnet/pages/TeamTeamEditPagePage.js +6 -6
- 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/roadmaps/RoadmapControls.js +21 -21
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts +29 -0
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js +1 -1
- package/dist/planmagnet/roadmaps/RoadmapNowNextLater.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts +37 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.js +210 -0
- package/dist/planmagnet/roadmaps/RoadmapPresentation.js.map +1 -0
- package/dist/planmagnet/team/TeamControls.d.ts.map +1 -1
- package/dist/planmagnet/team/TeamControls.js +134 -124
- package/dist/planmagnet/team/TeamControls.js.map +1 -1
- package/dist/planmagnet/time/TimeEntryControls.js +12 -12
- package/package.json +1 -1
|
@@ -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkItemActivity.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/comments/WorkItemActivity.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkItemActivity.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/comments/WorkItemActivity.tsx"],"names":[],"mappings":"AAqDA,wBAAgB,gBAAgB,CAAC,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,2CAmDtE"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PersonName as e } from "../people/People.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { isForbidden as t } from "../utils/graphqlErrors.js";
|
|
3
|
+
import { ActivityEventSentence as n } from "../activity/activityDescribe.js";
|
|
4
|
+
import { gql as r } from "@apollo/client";
|
|
5
|
+
import { useQuery as i } from "@apollo/client/react";
|
|
6
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
+
import { Card as s, CardContent as c, CardHeader as l, CardTitle as u } from "@burdenoff/fe-libs/ui";
|
|
6
8
|
//#region src/planmagnet/comments/WorkItemActivity.tsx
|
|
7
|
-
var
|
|
9
|
+
var d = r`
|
|
8
10
|
query WorkItemActivity($workItemId: ID!) {
|
|
9
11
|
planmagnetWorkItemActivity(workItemId: $workItemId, first: 50) {
|
|
10
12
|
totalCount
|
|
@@ -17,54 +19,49 @@ var l = t`
|
|
|
17
19
|
fromStatus
|
|
18
20
|
toStatus
|
|
19
21
|
excerpt
|
|
22
|
+
field
|
|
23
|
+
fromValue
|
|
24
|
+
toValue
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function f({ workItemId: t }) {
|
|
33
|
-
let { data: u, loading: f, error: p } = n(l, {
|
|
34
|
-
variables: { workItemId: t },
|
|
35
|
-
skip: !t
|
|
36
|
-
}), m = u?.planmagnetWorkItemActivity, h = m?.items ?? [];
|
|
37
|
-
return /* @__PURE__ */ i(a, {
|
|
28
|
+
`;
|
|
29
|
+
function f({ workItemId: r }) {
|
|
30
|
+
let { data: f, loading: p, error: m } = i(d, {
|
|
31
|
+
variables: { workItemId: r },
|
|
32
|
+
skip: !r
|
|
33
|
+
}), h = f?.planmagnetWorkItemActivity, g = h?.items ?? [];
|
|
34
|
+
return /* @__PURE__ */ o(s, {
|
|
38
35
|
"data-testid": "work-item-activity",
|
|
39
|
-
children: [/* @__PURE__ */
|
|
36
|
+
children: [/* @__PURE__ */ a(l, { children: /* @__PURE__ */ a(u, { children: "Activity" }) }), /* @__PURE__ */ o(c, {
|
|
40
37
|
className: "space-y-3",
|
|
41
38
|
children: [
|
|
42
|
-
|
|
39
|
+
p && !f && /* @__PURE__ */ a("p", {
|
|
43
40
|
className: "text-sm text-muted-foreground",
|
|
44
41
|
children: "Loading activity…"
|
|
45
42
|
}),
|
|
46
|
-
|
|
43
|
+
m && /* @__PURE__ */ a("p", {
|
|
47
44
|
role: "alert",
|
|
48
45
|
className: "text-sm text-destructive",
|
|
49
|
-
children:
|
|
46
|
+
children: t(m) ? "You do not have access to this item’s activity." : `Activity could not be loaded: ${m.message}`
|
|
50
47
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ a("ol", {
|
|
52
49
|
className: "space-y-3",
|
|
53
|
-
children:
|
|
50
|
+
children: g.map((t, r) => /* @__PURE__ */ o("li", {
|
|
54
51
|
className: "flex gap-3",
|
|
55
52
|
"data-testid": "activity-event",
|
|
56
|
-
children: [/* @__PURE__ */
|
|
53
|
+
children: [/* @__PURE__ */ o("div", {
|
|
57
54
|
className: "flex flex-col items-center",
|
|
58
|
-
children: [/* @__PURE__ */
|
|
59
|
-
}), /* @__PURE__ */
|
|
55
|
+
children: [/* @__PURE__ */ a("div", { className: "h-2.5 w-2.5 rounded-full bg-primary mt-1.5" }), r < g.length - 1 && /* @__PURE__ */ a("div", { className: "w-px flex-1 bg-border" })]
|
|
56
|
+
}), /* @__PURE__ */ o("div", {
|
|
60
57
|
className: "pb-1 min-w-0",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
58
|
+
children: [/* @__PURE__ */ a("p", {
|
|
62
59
|
className: "text-sm break-words",
|
|
63
|
-
children:
|
|
64
|
-
}), /* @__PURE__ */
|
|
60
|
+
children: /* @__PURE__ */ a(n, { event: t })
|
|
61
|
+
}), /* @__PURE__ */ o("p", {
|
|
65
62
|
className: "text-xs text-muted-foreground",
|
|
66
63
|
children: [
|
|
67
|
-
t.actorId ? /* @__PURE__ */
|
|
64
|
+
t.actorId ? /* @__PURE__ */ a(e, { id: t.actorId }) : "Unknown",
|
|
68
65
|
" ·",
|
|
69
66
|
" ",
|
|
70
67
|
new Date(t.at).toLocaleString()
|
|
@@ -73,19 +70,19 @@ function f({ workItemId: t }) {
|
|
|
73
70
|
})]
|
|
74
71
|
}, t.id))
|
|
75
72
|
}),
|
|
76
|
-
|
|
73
|
+
h?.truncated && /* @__PURE__ */ o("p", {
|
|
77
74
|
className: "text-xs text-muted-foreground",
|
|
78
75
|
children: [
|
|
79
76
|
"Showing the latest ",
|
|
80
|
-
|
|
77
|
+
g.length,
|
|
81
78
|
" of ",
|
|
82
|
-
|
|
79
|
+
h.totalCount,
|
|
83
80
|
" events."
|
|
84
81
|
]
|
|
85
82
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ a("p", {
|
|
87
84
|
className: "text-xs text-muted-foreground",
|
|
88
|
-
children: "Creation, status changes and comments are recorded.
|
|
85
|
+
children: "Creation, status changes, field edits and comments are recorded."
|
|
89
86
|
})
|
|
90
87
|
]
|
|
91
88
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkItemActivity.js","names":[],"sources":["../../../src/planmagnet/comments/WorkItemActivity.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { PersonName } from '../people/People';\n\n/**\n * A work item's recorded history (P1.4). This card used to synthesise three\n * entries client-side, including \"Status changed to X\" attributed to whoever\n * was assigned, at the item's updatedAt. That was fabricated history. It now\n * shows only what the server has recorded: creation, status changes and\n * comments
|
|
1
|
+
{"version":3,"file":"WorkItemActivity.js","names":[],"sources":["../../../src/planmagnet/comments/WorkItemActivity.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { PersonName } from '../people/People';\nimport { ActivityEventSentence } from '../activity/activityDescribe';\nimport { isForbidden } from '../utils/graphqlErrors';\n\n/**\n * A work item's recorded history (P1.4). This card used to synthesise three\n * entries client-side, including \"Status changed to X\" attributed to whoever\n * was assigned, at the item's updatedAt. That was fabricated history. It now\n * shows only what the server has recorded: creation, status changes and\n * comments.\n *\n * CWF-09 added a fourth kind, FIELD_CHANGED (assignment and the other tracked fields —\n * `field`/`fromValue`/`toValue`), rendered through the same sentence builder the workspace Activity page uses\n * (`activity/activityDescribe.tsx`) so the two surfaces never disagree on wording.\n */\n\nconst ACTIVITY = gql`\n query WorkItemActivity($workItemId: ID!) {\n planmagnetWorkItemActivity(workItemId: $workItemId, first: 50) {\n totalCount\n truncated\n items {\n id\n kind\n actorId\n at\n fromStatus\n toStatus\n excerpt\n field\n fromValue\n toValue\n }\n }\n }\n`;\n\ninterface ActivityEvent {\n id: string;\n kind: string;\n actorId: string | null;\n at: string;\n fromStatus: string | null;\n toStatus: string | null;\n excerpt: string | null;\n field: string | null;\n fromValue: string | null;\n toValue: string | null;\n}\n\nexport function WorkItemActivity({ workItemId }: { workItemId: string }) {\n const { data, loading, error } = useQuery<{\n planmagnetWorkItemActivity: { totalCount: number; truncated: boolean; items: ActivityEvent[] };\n }>(ACTIVITY, { variables: { workItemId }, skip: !workItemId });\n const activity = data?.planmagnetWorkItemActivity;\n const events = activity?.items ?? [];\n\n return (\n <Card data-testid=\"work-item-activity\">\n <CardHeader>\n <CardTitle>Activity</CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-3\">\n {loading && !data && <p className=\"text-sm text-muted-foreground\">Loading activity…</p>}\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {isForbidden(error)\n ? 'You do not have access to this item’s activity.'\n : `Activity could not be loaded: ${error.message}`}\n </p>\n )}\n <ol className=\"space-y-3\">\n {events.map((event, i) => (\n <li key={event.id} className=\"flex gap-3\" data-testid=\"activity-event\">\n <div className=\"flex flex-col items-center\">\n <div className=\"h-2.5 w-2.5 rounded-full bg-primary mt-1.5\" />\n {i < events.length - 1 && <div className=\"w-px flex-1 bg-border\" />}\n </div>\n <div className=\"pb-1 min-w-0\">\n <p className=\"text-sm break-words\">\n <ActivityEventSentence event={event} />\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {event.actorId ? <PersonName id={event.actorId} /> : 'Unknown'} ·{' '}\n {new Date(event.at).toLocaleString()}\n </p>\n </div>\n </li>\n ))}\n </ol>\n {activity?.truncated && (\n <p className=\"text-xs text-muted-foreground\">\n Showing the latest {events.length} of {activity.totalCount} events.\n </p>\n )}\n <p className=\"text-xs text-muted-foreground\">\n Creation, status changes, field edits and comments are recorded.\n </p>\n </CardContent>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;AAmBA,IAAM,IAAW,CAAG;;;;;;;;;;;;;;;;;;;;AAkCpB,SAAgB,EAAiB,EAAE,iBAAsC;CACvE,IAAM,EAAE,SAAM,YAAS,aAAU,EAE9B,GAAU;EAAE,WAAW,EAAE,eAAY;EAAE,MAAM,CAAC;EAAY,CAAC,EACxD,IAAW,GAAM,4BACjB,IAAS,GAAU,SAAS,EAAE;AAEpC,QACE,kBAAC,GAAD;EAAM,eAAY;YAAlB,CACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAW,YAAoB,CAAA,EACpB,CAAA,EACb,kBAAC,GAAD;GAAa,WAAU;aAAvB;IACG,KAAW,CAAC,KAAQ,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAAqB,CAAA;IACtF,KACC,kBAAC,KAAD;KAAG,MAAK;KAAQ,WAAU;eACvB,EAAY,EAAM,GACf,oDACA,iCAAiC,EAAM;KACzC,CAAA;IAEN,kBAAC,MAAD;KAAI,WAAU;eACX,EAAO,KAAK,GAAO,MAClB,kBAAC,MAAD;MAAmB,WAAU;MAAa,eAAY;gBAAtD,CACE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,OAAD,EAAK,WAAU,8CAA+C,CAAA,EAC7D,IAAI,EAAO,SAAS,KAAK,kBAAC,OAAD,EAAK,WAAU,yBAA0B,CAAA,CAC/D;UACN,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,KAAD;QAAG,WAAU;kBACX,kBAAC,GAAD,EAA8B,UAAS,CAAA;QACrC,CAAA,EACJ,kBAAC,KAAD;QAAG,WAAU;kBAAb;SACG,EAAM,UAAU,kBAAC,GAAD,EAAY,IAAI,EAAM,SAAW,CAAA,GAAG;SAAU;SAAG;SACjE,IAAI,KAAK,EAAM,GAAG,CAAC,gBAAgB;SAClC;UACA;SACH;QAdI,EAAM,GAcV,CACL;KACC,CAAA;IACJ,GAAU,aACT,kBAAC,KAAD;KAAG,WAAU;eAAb;MAA6C;MACvB,EAAO;MAAO;MAAK,EAAS;MAAW;MACzD;;IAEN,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAEzC,CAAA;IACQ;KACT"}
|
|
@@ -1,10 +1,10 @@
|
|
|
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 {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { enumLabel as a } from "./WorkItemControls.js";
|
|
5
|
+
import { ProjectSelect as o, WorkItemSearchSelect as s } from "./Pickers.js";
|
|
6
|
+
import { detailPath as c } from "../utils/rowNavigation.js";
|
|
7
|
+
import { parseIntField as l } from "../utils/formValidation.js";
|
|
8
8
|
import { useState as u } from "react";
|
|
9
9
|
import { BarChart3 as d, Pencil as f, ThumbsUp as p, Trash2 as m } from "lucide-react";
|
|
10
10
|
import { gql as h } from "@apollo/client";
|
|
@@ -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(), [l, 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
|
-
await n(
|
|
92
|
-
id:
|
|
91
|
+
await n(l({ variables: {
|
|
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(c("/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,35 +153,35 @@ 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), [c, d] = u(t), [p, m] = u(null), [h, O] = g(M, P), k = l(c.businessValue, {
|
|
157
157
|
min: 0,
|
|
158
158
|
max: 100
|
|
159
|
-
}), A =
|
|
159
|
+
}), A = c.title.trim() !== "" && !k.invalid && !O.loading, j = async () => {
|
|
160
160
|
m(null);
|
|
161
161
|
let r = (e) => e.trim() ? e.trim() : null, i = {
|
|
162
|
-
title:
|
|
163
|
-
description: r(
|
|
162
|
+
title: c.title.trim(),
|
|
163
|
+
description: r(c.description),
|
|
164
164
|
businessValue: k.value ?? null,
|
|
165
|
-
effortEstimate: r(
|
|
166
|
-
projectId:
|
|
167
|
-
workItemId:
|
|
168
|
-
},
|
|
165
|
+
effortEstimate: r(c.effortEstimate),
|
|
166
|
+
projectId: c.projectId || null,
|
|
167
|
+
workItemId: c.workItemId || null
|
|
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,
|
|
@@ -213,9 +213,9 @@ function L({ feature: e }) {
|
|
|
213
213
|
}), /* @__PURE__ */ _(b, {
|
|
214
214
|
id: "feature-edit-title",
|
|
215
215
|
className: "mt-1",
|
|
216
|
-
value:
|
|
216
|
+
value: c.title,
|
|
217
217
|
onChange: (e) => d({
|
|
218
|
-
...
|
|
218
|
+
...c,
|
|
219
219
|
title: e.target.value
|
|
220
220
|
})
|
|
221
221
|
})] }),
|
|
@@ -226,9 +226,9 @@ function L({ feature: e }) {
|
|
|
226
226
|
}), /* @__PURE__ */ _("textarea", {
|
|
227
227
|
id: "feature-edit-description",
|
|
228
228
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]",
|
|
229
|
-
value:
|
|
229
|
+
value: c.description,
|
|
230
230
|
onChange: (e) => d({
|
|
231
|
-
...
|
|
231
|
+
...c,
|
|
232
232
|
description: e.target.value
|
|
233
233
|
})
|
|
234
234
|
})] }),
|
|
@@ -244,10 +244,10 @@ function L({ feature: e }) {
|
|
|
244
244
|
min: 0,
|
|
245
245
|
max: 100,
|
|
246
246
|
className: "mt-1",
|
|
247
|
-
value:
|
|
247
|
+
value: c.businessValue,
|
|
248
248
|
"aria-invalid": k.invalid,
|
|
249
249
|
onChange: (e) => d({
|
|
250
|
-
...
|
|
250
|
+
...c,
|
|
251
251
|
businessValue: e.target.value
|
|
252
252
|
})
|
|
253
253
|
})] }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
|
|
@@ -258,9 +258,9 @@ function L({ feature: e }) {
|
|
|
258
258
|
id: "feature-edit-effort",
|
|
259
259
|
className: "mt-1",
|
|
260
260
|
placeholder: "e.g. M",
|
|
261
|
-
value:
|
|
261
|
+
value: c.effortEstimate,
|
|
262
262
|
onChange: (e) => d({
|
|
263
|
-
...
|
|
263
|
+
...c,
|
|
264
264
|
effortEstimate: e.target.value
|
|
265
265
|
})
|
|
266
266
|
})] })]
|
|
@@ -272,12 +272,12 @@ 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
|
-
value:
|
|
277
|
+
value: c.projectId,
|
|
278
278
|
noneLabel: "No project",
|
|
279
279
|
onChange: (e) => d({
|
|
280
|
-
...
|
|
280
|
+
...c,
|
|
281
281
|
projectId: e,
|
|
282
282
|
workItemId: ""
|
|
283
283
|
})
|
|
@@ -289,12 +289,12 @@ 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
|
-
projectId:
|
|
295
|
-
value:
|
|
294
|
+
projectId: c.projectId || void 0,
|
|
295
|
+
value: c.workItemId,
|
|
296
296
|
onChange: (e) => d({
|
|
297
|
-
...
|
|
297
|
+
...c,
|
|
298
298
|
workItemId: e
|
|
299
299
|
})
|
|
300
300
|
})
|
|
@@ -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(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { throwOnError as e } from "../utils/mutationResult.js";
|
|
2
2
|
import { ErrorLine as t } from "./ConfirmButton.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { enumLabel as n } from "./WorkItemControls.js";
|
|
4
|
+
import { WorkItemSearchSelect as r } from "./Pickers.js";
|
|
5
5
|
import { endBeforeStart as i } from "../utils/formValidation.js";
|
|
6
6
|
import { useState as a } from "react";
|
|
7
7
|
import { Link2 as o, Pencil as s, X as c } from "lucide-react";
|
|
@@ -41,12 +41,12 @@ var S = [
|
|
|
41
41
|
refetchQueries: C,
|
|
42
42
|
awaitRefetchQueries: !0
|
|
43
43
|
};
|
|
44
|
-
function O({ objective:
|
|
45
|
-
let [i, o] = u(w, D), [s, c] = a(null), l = S.includes(
|
|
44
|
+
function O({ objective: r }) {
|
|
45
|
+
let [i, o] = u(w, D), [s, c] = a(null), l = S.includes(r.status) ? S : [r.status, ...S], p = async (t) => {
|
|
46
46
|
c(null);
|
|
47
47
|
try {
|
|
48
48
|
await e(i({ variables: {
|
|
49
|
-
id:
|
|
49
|
+
id: r.id,
|
|
50
50
|
input: { status: t }
|
|
51
51
|
} }));
|
|
52
52
|
} catch (e) {
|
|
@@ -61,16 +61,16 @@ function O({ objective: n }) {
|
|
|
61
61
|
"aria-label": "Objective status",
|
|
62
62
|
"data-testid": "objective-status",
|
|
63
63
|
className: "rounded-md border border-input bg-background px-2 py-1 text-sm disabled:opacity-60",
|
|
64
|
-
value:
|
|
64
|
+
value: r.status,
|
|
65
65
|
disabled: o.loading,
|
|
66
66
|
onChange: (e) => {
|
|
67
|
-
e.target.value !==
|
|
67
|
+
e.target.value !== r.status && p(e.target.value);
|
|
68
68
|
},
|
|
69
69
|
children: l.map((e) => /* @__PURE__ */ d("option", {
|
|
70
70
|
value: e,
|
|
71
|
-
children:
|
|
71
|
+
children: n(e)
|
|
72
72
|
}, e))
|
|
73
|
-
}), /* @__PURE__ */ d(A, { objective:
|
|
73
|
+
}), /* @__PURE__ */ d(A, { objective: r })]
|
|
74
74
|
}), s && /* @__PURE__ */ d(t, { message: s })]
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -241,7 +241,7 @@ function j({ keyResultId: i, keyResultTitle: s, linked: l }) {
|
|
|
241
241
|
className: "text-muted-foreground",
|
|
242
242
|
children: [
|
|
243
243
|
"(",
|
|
244
|
-
|
|
244
|
+
n(e.status),
|
|
245
245
|
")"
|
|
246
246
|
]
|
|
247
247
|
})
|
|
@@ -259,7 +259,7 @@ function j({ keyResultId: i, keyResultTitle: s, linked: l }) {
|
|
|
259
259
|
}),
|
|
260
260
|
v ? /* @__PURE__ */ f("div", {
|
|
261
261
|
className: "space-y-2 rounded-md border border-input p-2",
|
|
262
|
-
children: [/* @__PURE__ */ d(
|
|
262
|
+
children: [/* @__PURE__ */ d(r, {
|
|
263
263
|
id: `kr-link-${i}`,
|
|
264
264
|
value: b,
|
|
265
265
|
onChange: x,
|
|
@@ -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 } from "./Pickers.js";
|
|
6
6
|
import { detailPath as s } from "../utils/rowNavigation.js";
|
|
7
7
|
import { PROJECT_STATUSES as c } from "./ProjectControls.js";
|
|
8
8
|
import { useState as l } from "react";
|
|
@@ -28,7 +28,7 @@ var v = c, y = [
|
|
|
28
28
|
planmagnetDeleteProgram(id: $id)
|
|
29
29
|
}
|
|
30
30
|
`;
|
|
31
|
-
function S({ programId:
|
|
31
|
+
function S({ programId: o, name: c, status: f }) {
|
|
32
32
|
let p = e(), [S, C] = m(b, {
|
|
33
33
|
refetchQueries: y,
|
|
34
34
|
awaitRefetchQueries: !0
|
|
@@ -39,7 +39,7 @@ function S({ programId: a, name: c, status: f }) {
|
|
|
39
39
|
D(null);
|
|
40
40
|
try {
|
|
41
41
|
await n(S({ variables: {
|
|
42
|
-
id:
|
|
42
|
+
id: o,
|
|
43
43
|
input: { status: e }
|
|
44
44
|
} }));
|
|
45
45
|
} catch (e) {
|
|
@@ -48,7 +48,7 @@ function S({ programId: a, name: c, status: f }) {
|
|
|
48
48
|
}, j = async () => {
|
|
49
49
|
D(null);
|
|
50
50
|
try {
|
|
51
|
-
await n(w({ variables: { id:
|
|
51
|
+
await n(w({ variables: { id: o } })), p("/products/programs-page");
|
|
52
52
|
} catch (e) {
|
|
53
53
|
D(e instanceof Error ? e.message : "The program could not be deleted.");
|
|
54
54
|
}
|
|
@@ -69,14 +69,14 @@ function S({ programId: a, name: c, status: f }) {
|
|
|
69
69
|
},
|
|
70
70
|
children: k.map((e) => /* @__PURE__ */ h("option", {
|
|
71
71
|
value: e,
|
|
72
|
-
children:
|
|
72
|
+
children: a(e)
|
|
73
73
|
}, e))
|
|
74
74
|
}),
|
|
75
75
|
/* @__PURE__ */ g(_, {
|
|
76
76
|
size: "sm",
|
|
77
77
|
variant: "outline",
|
|
78
78
|
"data-testid": "program-edit",
|
|
79
|
-
onClick: () => p(s("/products/edit-program-page",
|
|
79
|
+
onClick: () => p(s("/products/edit-program-page", o)),
|
|
80
80
|
children: [/* @__PURE__ */ h(u, { className: "mr-1 h-4 w-4" }), "Edit"]
|
|
81
81
|
}),
|
|
82
82
|
/* @__PURE__ */ h(r, {
|
|
@@ -147,7 +147,7 @@ function w({ programId: t, projects: r }) {
|
|
|
147
147
|
}),
|
|
148
148
|
/* @__PURE__ */ h("span", {
|
|
149
149
|
className: "text-xs text-muted-foreground capitalize",
|
|
150
|
-
children:
|
|
150
|
+
children: a(e.status)
|
|
151
151
|
}),
|
|
152
152
|
/* @__PURE__ */ h(_, {
|
|
153
153
|
size: "sm",
|
|
@@ -163,7 +163,7 @@ function w({ programId: t, projects: r }) {
|
|
|
163
163
|
className: "flex items-center gap-2 pt-2 border-t",
|
|
164
164
|
children: [/* @__PURE__ */ h("div", {
|
|
165
165
|
className: "flex-1",
|
|
166
|
-
children: /* @__PURE__ */ h(
|
|
166
|
+
children: /* @__PURE__ */ h(o, {
|
|
167
167
|
id: "program-add-project",
|
|
168
168
|
value: u,
|
|
169
169
|
onChange: d,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectControls.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/controls/ProjectControls.tsx"],"names":[],"mappings":"AAWA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,kFAOnB,CAAC;AAyBX,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EACJ,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,
|
|
1
|
+
{"version":3,"file":"ProjectControls.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/controls/ProjectControls.tsx"],"names":[],"mappings":"AAWA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,kFAOnB,CAAC;AAyBX,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,IAAI,EACJ,MAAM,GACP,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,2CA6GA"}
|