@burdenoff/microfe-planmagnet 2026.1002.2 → 2026.1002.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.d.ts +574 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +486 -16
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +174 -168
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +63 -59
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/board/BulkActions.d.ts.map +1 -1
- package/dist/planmagnet/board/BulkActions.js +106 -55
- package/dist/planmagnet/board/BulkActions.js.map +1 -1
- package/dist/planmagnet/controls/Pickers.d.ts +3 -3
- package/dist/planmagnet/controls/Pickers.js.map +1 -1
- package/dist/planmagnet/dashboards/DashboardUI.d.ts +0 -4
- package/dist/planmagnet/dashboards/DashboardUI.d.ts.map +1 -1
- package/dist/planmagnet/dashboards/DashboardUI.js +6 -13
- package/dist/planmagnet/dashboards/DashboardUI.js.map +1 -1
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.d.ts.map +1 -1
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js +70 -59
- package/dist/planmagnet/dashboards/cards/SprintCapacityCard.js.map +1 -1
- package/dist/planmagnet/forecast/ResourceForecastCard.js +1 -1
- package/dist/planmagnet/forecast/ResourceForecastCard.js.map +1 -1
- package/dist/planmagnet/index.d.ts +1 -1
- package/dist/planmagnet/index.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts +3 -3
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +26 -19
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts +2 -2
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +18 -12
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.js +251 -0
- package/dist/planmagnet/pages/ProductsCustomerSatisfactionPagePage.js.map +1 -0
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +94 -92
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +116 -114
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +174 -159
- package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +159 -145
- 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 +161 -143
- 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 +157 -155
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.d.ts.map +1 -1
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js +97 -99
- package/dist/planmagnet/pages/analytics/DeliveryKpisCard.js.map +1 -1
- package/dist/planmagnet/product/FeatureLinkPanels.js +66 -66
- package/dist/planmagnet/product/ProductFeatureControls.js +38 -38
- package/dist/planmagnet/product/ProductFeatureLinkCard.js +8 -8
- package/dist/planmagnet/product/ProductLineControls.js +83 -83
- package/dist/planmagnet/product/ProductTeamsPanel.js +6 -6
- package/dist/planmagnet/product/routes.d.ts +6 -0
- package/dist/planmagnet/product/routes.d.ts.map +1 -1
- package/dist/planmagnet/product/routes.js +2 -2
- package/dist/planmagnet/product/routes.js.map +1 -1
- package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.d.ts +20 -0
- package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.js +55 -0
- package/dist/planmagnet/satisfaction/DeliverySatisfactionSection.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionFigures.d.ts +30 -0
- package/dist/planmagnet/satisfaction/SatisfactionFigures.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionFigures.js +282 -0
- package/dist/planmagnet/satisfaction/SatisfactionFigures.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionImportDialog.d.ts +9 -0
- package/dist/planmagnet/satisfaction/SatisfactionImportDialog.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionImportDialog.js +390 -0
- package/dist/planmagnet/satisfaction/SatisfactionImportDialog.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionLinkFields.d.ts +17 -0
- package/dist/planmagnet/satisfaction/SatisfactionLinkFields.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionLinkFields.js +77 -0
- package/dist/planmagnet/satisfaction/SatisfactionLinkFields.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.d.ts +18 -0
- package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.js +87 -0
- package/dist/planmagnet/satisfaction/SatisfactionReleaseSelect.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.d.ts +13 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.js +326 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponseDialog.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.d.ts +23 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.js +258 -0
- package/dist/planmagnet/satisfaction/SatisfactionResponsesTable.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.d.ts +6 -0
- package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.js +56 -0
- package/dist/planmagnet/satisfaction/SatisfactionSummaryCard.js.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.d.ts +16 -0
- package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.js +102 -0
- package/dist/planmagnet/satisfaction/SatisfactionWindowPicker.js.map +1 -0
- package/dist/planmagnet/satisfaction/satisfaction.d.ts +154 -0
- package/dist/planmagnet/satisfaction/satisfaction.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/satisfaction.js +210 -0
- package/dist/planmagnet/satisfaction/satisfaction.js.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionCsv.d.ts +108 -0
- package/dist/planmagnet/satisfaction/satisfactionCsv.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionCsv.js +211 -0
- package/dist/planmagnet/satisfaction/satisfactionCsv.js.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionForm.d.ts +90 -0
- package/dist/planmagnet/satisfaction/satisfactionForm.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionForm.js +90 -0
- package/dist/planmagnet/satisfaction/satisfactionForm.js.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionOperations.d.ts +116 -0
- package/dist/planmagnet/satisfaction/satisfactionOperations.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/satisfactionOperations.js +86 -0
- package/dist/planmagnet/satisfaction/satisfactionOperations.js.map +1 -0
- package/dist/planmagnet/satisfaction/useSatisfactionAccess.d.ts +20 -0
- package/dist/planmagnet/satisfaction/useSatisfactionAccess.d.ts.map +1 -0
- package/dist/planmagnet/satisfaction/useSatisfactionAccess.js +31 -0
- package/dist/planmagnet/satisfaction/useSatisfactionAccess.js.map +1 -0
- package/dist/planmagnet/skills/RequiredSkillsEditor.d.ts +35 -0
- package/dist/planmagnet/skills/RequiredSkillsEditor.d.ts.map +1 -0
- package/dist/planmagnet/skills/RequiredSkillsEditor.js +124 -0
- package/dist/planmagnet/skills/RequiredSkillsEditor.js.map +1 -0
- package/dist/planmagnet/skills/SkillChips.d.ts +30 -0
- package/dist/planmagnet/skills/SkillChips.d.ts.map +1 -0
- package/dist/planmagnet/skills/SkillChips.js +57 -0
- package/dist/planmagnet/skills/SkillChips.js.map +1 -0
- package/dist/planmagnet/skills/SkillCoverageCard.d.ts +24 -0
- package/dist/planmagnet/skills/SkillCoverageCard.d.ts.map +1 -0
- package/dist/planmagnet/skills/SkillCoverageCard.js +256 -0
- package/dist/planmagnet/skills/SkillCoverageCard.js.map +1 -0
- package/dist/planmagnet/skills/WorkItemRequiredSkills.d.ts +10 -0
- package/dist/planmagnet/skills/WorkItemRequiredSkills.d.ts.map +1 -0
- package/dist/planmagnet/skills/WorkItemRequiredSkills.js +65 -0
- package/dist/planmagnet/skills/WorkItemRequiredSkills.js.map +1 -0
- package/dist/planmagnet/skills/skillOperations.d.ts +52 -0
- package/dist/planmagnet/skills/skillOperations.d.ts.map +1 -0
- package/dist/planmagnet/skills/skillOperations.js +44 -0
- package/dist/planmagnet/skills/skillOperations.js.map +1 -0
- package/dist/planmagnet/skills/skillTags.d.ts +103 -0
- package/dist/planmagnet/skills/skillTags.d.ts.map +1 -0
- package/dist/planmagnet/skills/skillTags.js +115 -0
- package/dist/planmagnet/skills/skillTags.js.map +1 -0
- package/dist/planmagnet/skills/useRequiredSkillsDraft.d.ts +28 -0
- package/dist/planmagnet/skills/useRequiredSkillsDraft.d.ts.map +1 -0
- package/dist/planmagnet/skills/useRequiredSkillsDraft.js +30 -0
- package/dist/planmagnet/skills/useRequiredSkillsDraft.js.map +1 -0
- package/package.json +1 -1
|
@@ -4,9 +4,9 @@ import { throwOnError as r } from "../utils/mutationResult.js";
|
|
|
4
4
|
import { ErrorLine as i } from "../controls/ConfirmButton.js";
|
|
5
5
|
import { enumLabel as a } from "../controls/WorkItemControls.js";
|
|
6
6
|
import { detailPath as o } from "../utils/rowNavigation.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { refusalMessage as s } from "./refusal.js";
|
|
8
|
+
import { LINK_EPIC_TO_PRODUCT_FEATURE as c, LINK_FEATURE_REQUEST_TO_PRODUCT_FEATURE as l, PRODUCT_FEATURE_EPIC_CANDIDATES as u, PRODUCT_FEATURE_QUERIES as d, PRODUCT_FEATURE_REQUEST_CANDIDATES as f, UNLINK_EPIC_FROM_PRODUCT_FEATURE as p, UNLINK_FEATURE_REQUEST_FROM_PRODUCT_FEATURE as m } from "./hierarchyOperations.js";
|
|
9
|
+
import { linkableRequests as h } from "./hierarchy.js";
|
|
10
10
|
import { useDeferredValue as g, useState as _ } from "react";
|
|
11
11
|
import { Link2 as v, ThumbsUp as y, X as b } from "lucide-react";
|
|
12
12
|
import { useMutation as x, useQuery as S } from "@apollo/client/react";
|
|
@@ -14,7 +14,7 @@ import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
|
14
14
|
import { Badge as T, Button as E, Input as D } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/planmagnet/product/FeatureLinkPanels.tsx
|
|
16
16
|
var O = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", k = {
|
|
17
|
-
refetchQueries:
|
|
17
|
+
refetchQueries: d,
|
|
18
18
|
awaitRefetchQueries: !0
|
|
19
19
|
};
|
|
20
20
|
function A(e) {
|
|
@@ -23,16 +23,16 @@ function A(e) {
|
|
|
23
23
|
function j() {
|
|
24
24
|
return n()("planmagnet.productFeatures.errors.forbiddenLinks", "Your role cannot change what this feature is linked to.");
|
|
25
25
|
}
|
|
26
|
-
function M({ featureId: e, archived: o, epics:
|
|
27
|
-
let
|
|
26
|
+
function M({ featureId: e, archived: o, epics: c }) {
|
|
27
|
+
let l = n(), u = j(), d = t(), [f, m] = x(p, k), [h, g] = _(null), [v, y] = _(null), S = async (t) => {
|
|
28
28
|
y(null), g(t);
|
|
29
29
|
try {
|
|
30
|
-
await r(
|
|
30
|
+
await r(f({ variables: {
|
|
31
31
|
productFeatureId: e,
|
|
32
32
|
workItemId: t
|
|
33
33
|
} }));
|
|
34
34
|
} catch (e) {
|
|
35
|
-
y(
|
|
35
|
+
y(s(e, l("planmagnet.productFeatures.epics.errors.unlink", "The epic could not be unlinked."), u));
|
|
36
36
|
} finally {
|
|
37
37
|
g(null);
|
|
38
38
|
}
|
|
@@ -43,14 +43,14 @@ function M({ featureId: e, archived: o, epics: s }) {
|
|
|
43
43
|
children: [
|
|
44
44
|
/* @__PURE__ */ C("p", {
|
|
45
45
|
className: "text-sm text-muted-foreground",
|
|
46
|
-
children:
|
|
46
|
+
children: l("planmagnet.productFeatures.epics.subtitle", "Epics that deliver this feature. Stories reach it through their epic; unlinking an epic changes nothing about the epic or its stories.")
|
|
47
47
|
}),
|
|
48
|
-
|
|
48
|
+
c.length === 0 ? /* @__PURE__ */ C("p", {
|
|
49
49
|
className: "py-2 text-center text-sm text-muted-foreground",
|
|
50
|
-
children:
|
|
50
|
+
children: l("planmagnet.productFeatures.epics.empty", "No epics linked to this feature yet.")
|
|
51
51
|
}) : /* @__PURE__ */ C("ul", {
|
|
52
52
|
className: "space-y-2",
|
|
53
|
-
children:
|
|
53
|
+
children: c.map((e) => /* @__PURE__ */ w("li", {
|
|
54
54
|
className: "rounded-md border p-2 text-sm",
|
|
55
55
|
"data-testid": "feature-epic",
|
|
56
56
|
children: [/* @__PURE__ */ w("div", {
|
|
@@ -58,7 +58,7 @@ function M({ featureId: e, archived: o, epics: s }) {
|
|
|
58
58
|
children: [/* @__PURE__ */ w("button", {
|
|
59
59
|
type: "button",
|
|
60
60
|
className: "min-w-0 truncate text-left font-medium hover:underline",
|
|
61
|
-
onClick: () =>
|
|
61
|
+
onClick: () => d(A(e.id)),
|
|
62
62
|
children: [/* @__PURE__ */ C("span", {
|
|
63
63
|
className: "mr-2 text-muted-foreground",
|
|
64
64
|
children: e.key
|
|
@@ -72,16 +72,16 @@ function M({ featureId: e, archived: o, epics: s }) {
|
|
|
72
72
|
}), /* @__PURE__ */ C(E, {
|
|
73
73
|
size: "sm",
|
|
74
74
|
variant: "ghost",
|
|
75
|
-
"aria-label":
|
|
76
|
-
disabled:
|
|
75
|
+
"aria-label": l("planmagnet.productFeatures.epics.unlinkNamed", "Unlink {{key}}", { key: e.key }),
|
|
76
|
+
disabled: m.loading,
|
|
77
77
|
onClick: () => void S(e.id),
|
|
78
78
|
"data-testid": "feature-epic-unlink",
|
|
79
|
-
children:
|
|
79
|
+
children: h === e.id ? "…" : /* @__PURE__ */ C(b, { className: "h-4 w-4" })
|
|
80
80
|
})]
|
|
81
81
|
})]
|
|
82
82
|
}), e.children.length === 0 ? /* @__PURE__ */ C("p", {
|
|
83
83
|
className: "mt-1 pl-4 text-xs text-muted-foreground",
|
|
84
|
-
children:
|
|
84
|
+
children: l("planmagnet.productFeatures.epics.noStories", "No stories under this epic yet.")
|
|
85
85
|
}) : /* @__PURE__ */ C("ul", {
|
|
86
86
|
className: "mt-1 space-y-1 border-l pl-4",
|
|
87
87
|
"data-testid": "feature-epic-stories",
|
|
@@ -90,7 +90,7 @@ function M({ featureId: e, archived: o, epics: s }) {
|
|
|
90
90
|
children: [/* @__PURE__ */ w("button", {
|
|
91
91
|
type: "button",
|
|
92
92
|
className: "min-w-0 truncate text-left hover:underline",
|
|
93
|
-
onClick: () =>
|
|
93
|
+
onClick: () => d(A(e.id)),
|
|
94
94
|
children: [/* @__PURE__ */ C("span", {
|
|
95
95
|
className: "mr-2 text-muted-foreground",
|
|
96
96
|
children: e.key
|
|
@@ -110,35 +110,35 @@ function M({ featureId: e, archived: o, epics: s }) {
|
|
|
110
110
|
v && /* @__PURE__ */ C(i, { message: v }),
|
|
111
111
|
o ? /* @__PURE__ */ C("p", {
|
|
112
112
|
className: "text-xs text-muted-foreground",
|
|
113
|
-
children:
|
|
113
|
+
children: l("planmagnet.productFeatures.archivedNoLinks", "This feature is archived — unarchive it to link more.")
|
|
114
114
|
}) : /* @__PURE__ */ C(N, {
|
|
115
115
|
featureId: e,
|
|
116
|
-
linkedIds:
|
|
116
|
+
linkedIds: c.map((e) => e.id)
|
|
117
117
|
})
|
|
118
118
|
]
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
function N({ featureId: t, linkedIds: a }) {
|
|
122
|
-
let o = n(),
|
|
122
|
+
let o = n(), l = j(), { workspaceId: d } = e(), [f, p] = _(""), m = g(f.trim()), [h, y] = _(""), [b, T] = _(null), { data: A, loading: M, error: N } = S(u, {
|
|
123
123
|
variables: {
|
|
124
|
-
workspaceId:
|
|
124
|
+
workspaceId: d ?? "",
|
|
125
125
|
filter: {
|
|
126
126
|
type: "EPIC",
|
|
127
|
-
...
|
|
127
|
+
...m ? { search: m } : {},
|
|
128
128
|
...a.length ? { excludeIds: a } : {}
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
|
-
skip: !
|
|
132
|
-
}), [P, F] = x(
|
|
133
|
-
if (
|
|
131
|
+
skip: !d
|
|
132
|
+
}), [P, F] = x(c, k), I = A?.planmagnetWorkItems.items ?? [], L = A?.planmagnetWorkItems.totalCount ?? 0, R = I.find((e) => e.id === h) ?? null, z = async () => {
|
|
133
|
+
if (h) {
|
|
134
134
|
T(null);
|
|
135
135
|
try {
|
|
136
136
|
await r(P({ variables: {
|
|
137
137
|
productFeatureId: t,
|
|
138
|
-
workItemId:
|
|
139
|
-
} })), y(""),
|
|
138
|
+
workItemId: h
|
|
139
|
+
} })), y(""), p("");
|
|
140
140
|
} catch (e) {
|
|
141
|
-
T(
|
|
141
|
+
T(s(e, o("planmagnet.productFeatures.epics.errors.link", "The epic could not be linked."), l));
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
};
|
|
@@ -154,15 +154,15 @@ function N({ featureId: t, linkedIds: a }) {
|
|
|
154
154
|
/* @__PURE__ */ C(D, {
|
|
155
155
|
"aria-label": o("planmagnet.productFeatures.epics.search", "Search epics"),
|
|
156
156
|
placeholder: o("planmagnet.productFeatures.epics.searchPlaceholder", "Search epics by key or title"),
|
|
157
|
-
value:
|
|
158
|
-
onChange: (e) =>
|
|
157
|
+
value: f,
|
|
158
|
+
onChange: (e) => p(e.target.value)
|
|
159
159
|
}),
|
|
160
160
|
/* @__PURE__ */ w("div", {
|
|
161
161
|
className: "flex items-start gap-2",
|
|
162
162
|
children: [/* @__PURE__ */ w("select", {
|
|
163
163
|
id: `feature-epic-select-${t}`,
|
|
164
164
|
className: O,
|
|
165
|
-
value:
|
|
165
|
+
value: h,
|
|
166
166
|
onChange: (e) => y(e.target.value),
|
|
167
167
|
"data-testid": "feature-epic-select",
|
|
168
168
|
children: [/* @__PURE__ */ C("option", {
|
|
@@ -178,7 +178,7 @@ function N({ featureId: t, linkedIds: a }) {
|
|
|
178
178
|
}, e.id))]
|
|
179
179
|
}), /* @__PURE__ */ w(E, {
|
|
180
180
|
size: "sm",
|
|
181
|
-
disabled: !
|
|
181
|
+
disabled: !h || F.loading,
|
|
182
182
|
onClick: () => void z(),
|
|
183
183
|
"data-testid": "feature-epic-link-confirm",
|
|
184
184
|
children: [/* @__PURE__ */ C(v, { className: "mr-1 h-4 w-4" }), o("planmagnet.productFeatures.epics.link", "Link")]
|
|
@@ -203,16 +203,16 @@ function N({ featureId: t, linkedIds: a }) {
|
|
|
203
203
|
]
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
function P({ featureId: e, productId:
|
|
207
|
-
let
|
|
206
|
+
function P({ featureId: e, productId: c, archived: l, requests: u }) {
|
|
207
|
+
let d = n(), f = j(), p = t(), [h, g] = x(m, k), [v, S] = _(null), [D, O] = _(null), A = async (t) => {
|
|
208
208
|
O(null), S(t);
|
|
209
209
|
try {
|
|
210
|
-
await r(
|
|
210
|
+
await r(h({ variables: {
|
|
211
211
|
featureRequestId: t,
|
|
212
212
|
productFeatureId: e
|
|
213
213
|
} }));
|
|
214
214
|
} catch (e) {
|
|
215
|
-
O(
|
|
215
|
+
O(s(e, d("planmagnet.productFeatures.requests.errors.unlink", "The feature request could not be unlinked."), f));
|
|
216
216
|
} finally {
|
|
217
217
|
S(null);
|
|
218
218
|
}
|
|
@@ -223,20 +223,20 @@ function P({ featureId: e, productId: s, archived: c, requests: l }) {
|
|
|
223
223
|
children: [
|
|
224
224
|
/* @__PURE__ */ C("p", {
|
|
225
225
|
className: "text-sm text-muted-foreground",
|
|
226
|
-
children:
|
|
226
|
+
children: d("planmagnet.productFeatures.requests.subtitle", "Customer and user feedback this feature answers. A request stays a request — linking never converts or changes it.")
|
|
227
227
|
}),
|
|
228
|
-
|
|
228
|
+
u.length === 0 ? /* @__PURE__ */ C("p", {
|
|
229
229
|
className: "py-2 text-center text-sm text-muted-foreground",
|
|
230
|
-
children:
|
|
230
|
+
children: d("planmagnet.productFeatures.requests.empty", "No feature requests linked to this feature yet.")
|
|
231
231
|
}) : /* @__PURE__ */ C("ul", {
|
|
232
232
|
className: "space-y-1",
|
|
233
|
-
children:
|
|
233
|
+
children: u.map((e) => /* @__PURE__ */ w("li", {
|
|
234
234
|
className: "flex flex-wrap items-center justify-between gap-2 rounded-md border p-2 text-sm",
|
|
235
235
|
"data-testid": "feature-request-row",
|
|
236
236
|
children: [/* @__PURE__ */ C("button", {
|
|
237
237
|
type: "button",
|
|
238
238
|
className: "min-w-0 truncate text-left hover:underline",
|
|
239
|
-
onClick: () =>
|
|
239
|
+
onClick: () => p(o("/products/feature-detail-page", e.id)),
|
|
240
240
|
children: e.title
|
|
241
241
|
}), /* @__PURE__ */ w("div", {
|
|
242
242
|
className: "flex shrink-0 items-center gap-2",
|
|
@@ -253,7 +253,7 @@ function P({ featureId: e, productId: s, archived: c, requests: l }) {
|
|
|
253
253
|
/* @__PURE__ */ C(E, {
|
|
254
254
|
size: "sm",
|
|
255
255
|
variant: "ghost",
|
|
256
|
-
"aria-label":
|
|
256
|
+
"aria-label": d("planmagnet.productFeatures.requests.unlinkNamed", "Unlink {{title}}", { title: e.title }),
|
|
257
257
|
disabled: g.loading,
|
|
258
258
|
onClick: () => void A(e.id),
|
|
259
259
|
"data-testid": "feature-request-unlink",
|
|
@@ -264,38 +264,38 @@ function P({ featureId: e, productId: s, archived: c, requests: l }) {
|
|
|
264
264
|
}, e.id))
|
|
265
265
|
}),
|
|
266
266
|
D && /* @__PURE__ */ C(i, { message: D }),
|
|
267
|
-
|
|
267
|
+
l ? /* @__PURE__ */ C("p", {
|
|
268
268
|
className: "text-xs text-muted-foreground",
|
|
269
|
-
children:
|
|
269
|
+
children: d("planmagnet.productFeatures.archivedNoLinks", "This feature is archived — unarchive it to link more.")
|
|
270
270
|
}) : /* @__PURE__ */ C(F, {
|
|
271
271
|
featureId: e,
|
|
272
|
-
productId:
|
|
273
|
-
linkedIds:
|
|
272
|
+
productId: c,
|
|
273
|
+
linkedIds: u.map((e) => e.id)
|
|
274
274
|
})
|
|
275
275
|
]
|
|
276
276
|
});
|
|
277
277
|
}
|
|
278
278
|
function F({ featureId: t, productId: a, linkedIds: o }) {
|
|
279
|
-
let
|
|
279
|
+
let c = n(), u = j(), { workspaceId: d } = e(), [p, m] = _(""), y = g(p.trim()), [b, T] = _(""), [A, M] = _(null), { data: N, loading: P, error: F } = S(f, {
|
|
280
280
|
variables: {
|
|
281
|
-
workspaceId:
|
|
281
|
+
workspaceId: d ?? "",
|
|
282
282
|
sameProduct: {
|
|
283
283
|
productId: a,
|
|
284
284
|
...y ? { search: y } : {}
|
|
285
285
|
},
|
|
286
286
|
anyProduct: y ? { search: y } : void 0
|
|
287
287
|
},
|
|
288
|
-
skip: !
|
|
289
|
-
}), [I, L] = x(
|
|
288
|
+
skip: !d
|
|
289
|
+
}), [I, L] = x(l, k), R = h(N?.sameProduct.items ?? [], (N?.anyProduct.items ?? []).filter((e) => e.productId === null), a, o), z = R.find((e) => e.id === b) ?? null, B = !!N && (N.sameProduct.totalCount > N.sameProduct.items.length || N.anyProduct.totalCount > N.anyProduct.items.length), V = async () => {
|
|
290
290
|
if (b) {
|
|
291
291
|
M(null);
|
|
292
292
|
try {
|
|
293
293
|
await r(I({ variables: {
|
|
294
294
|
featureRequestId: b,
|
|
295
295
|
productFeatureId: t
|
|
296
|
-
} })), T(""),
|
|
296
|
+
} })), T(""), m("");
|
|
297
297
|
} catch (e) {
|
|
298
|
-
M(
|
|
298
|
+
M(s(e, c("planmagnet.productFeatures.requests.errors.link", "The feature request could not be linked."), u));
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}, H = R.filter((e) => e.productId === a), U = R.filter((e) => e.productId === null);
|
|
@@ -306,13 +306,13 @@ function F({ featureId: t, productId: a, linkedIds: o }) {
|
|
|
306
306
|
/* @__PURE__ */ C("label", {
|
|
307
307
|
htmlFor: `feature-request-select-${t}`,
|
|
308
308
|
className: "text-sm font-medium",
|
|
309
|
-
children:
|
|
309
|
+
children: c("planmagnet.productFeatures.requests.linkLabel", "Link a feature request")
|
|
310
310
|
}),
|
|
311
311
|
/* @__PURE__ */ C(D, {
|
|
312
|
-
"aria-label":
|
|
313
|
-
placeholder:
|
|
314
|
-
value:
|
|
315
|
-
onChange: (e) =>
|
|
312
|
+
"aria-label": c("planmagnet.productFeatures.requests.search", "Search feature requests"),
|
|
313
|
+
placeholder: c("planmagnet.productFeatures.requests.searchPlaceholder", "Search feature requests by title"),
|
|
314
|
+
value: p,
|
|
315
|
+
onChange: (e) => m(e.target.value)
|
|
316
316
|
}),
|
|
317
317
|
/* @__PURE__ */ w("div", {
|
|
318
318
|
className: "flex items-start gap-2",
|
|
@@ -325,17 +325,17 @@ function F({ featureId: t, productId: a, linkedIds: o }) {
|
|
|
325
325
|
children: [
|
|
326
326
|
/* @__PURE__ */ C("option", {
|
|
327
327
|
value: "",
|
|
328
|
-
children: P && !N ?
|
|
328
|
+
children: P && !N ? c("planmagnet.productFeatures.searching", "Searching…") : R.length ? c("planmagnet.productFeatures.requests.choose", "Choose a feature request") : c("planmagnet.productFeatures.requests.noMatch", "No feature request matches")
|
|
329
329
|
}),
|
|
330
330
|
H.length > 0 && /* @__PURE__ */ C("optgroup", {
|
|
331
|
-
label:
|
|
331
|
+
label: c("planmagnet.productFeatures.requests.groupOwn", "From this product"),
|
|
332
332
|
children: H.map((e) => /* @__PURE__ */ C("option", {
|
|
333
333
|
value: e.id,
|
|
334
334
|
children: e.title
|
|
335
335
|
}, e.id))
|
|
336
336
|
}),
|
|
337
337
|
U.length > 0 && /* @__PURE__ */ C("optgroup", {
|
|
338
|
-
label:
|
|
338
|
+
label: c("planmagnet.productFeatures.requests.groupNone", "Without a product"),
|
|
339
339
|
children: U.map((e) => /* @__PURE__ */ C("option", {
|
|
340
340
|
value: e.id,
|
|
341
341
|
children: e.title
|
|
@@ -347,21 +347,21 @@ function F({ featureId: t, productId: a, linkedIds: o }) {
|
|
|
347
347
|
disabled: !b || L.loading,
|
|
348
348
|
onClick: () => void V(),
|
|
349
349
|
"data-testid": "feature-request-link-confirm",
|
|
350
|
-
children: [/* @__PURE__ */ C(v, { className: "mr-1 h-4 w-4" }),
|
|
350
|
+
children: [/* @__PURE__ */ C(v, { className: "mr-1 h-4 w-4" }), c("planmagnet.productFeatures.requests.link", "Link")]
|
|
351
351
|
})]
|
|
352
352
|
}),
|
|
353
353
|
z?.productFeature && /* @__PURE__ */ C("p", {
|
|
354
354
|
className: "text-xs text-muted-foreground",
|
|
355
|
-
children:
|
|
355
|
+
children: c("planmagnet.productFeatures.requests.moves", "This request points at \"{{feature}}\" — a request points at one feature, so linking moves it here.", { feature: z.productFeature.name })
|
|
356
356
|
}),
|
|
357
357
|
z && z.productId === null && /* @__PURE__ */ C("p", {
|
|
358
358
|
className: "text-xs text-muted-foreground",
|
|
359
|
-
children:
|
|
359
|
+
children: c("planmagnet.productFeatures.requests.noProduct", "This request has no product. Linking does not set one.")
|
|
360
360
|
}),
|
|
361
|
-
F && /* @__PURE__ */ C(i, { message:
|
|
361
|
+
F && /* @__PURE__ */ C(i, { message: c("planmagnet.productFeatures.requests.errors.load", "Feature requests could not be searched: {{message}}", { message: F.message }) }),
|
|
362
362
|
B && /* @__PURE__ */ C("p", {
|
|
363
363
|
className: "text-xs text-muted-foreground",
|
|
364
|
-
children:
|
|
364
|
+
children: c("planmagnet.productFeatures.requests.narrow", "Only the first matches are listed — type to narrow the list.")
|
|
365
365
|
}),
|
|
366
366
|
A && /* @__PURE__ */ C(i, { message: A })
|
|
367
367
|
]
|
|
@@ -4,9 +4,9 @@ import { LEAVES_PAGE_CONTEXT as r, throwOnError as i } from "../utils/mutationRe
|
|
|
4
4
|
import { ConfirmButton as a, ErrorLine as o } from "../controls/ConfirmButton.js";
|
|
5
5
|
import { AssigneeSelect as s, enumLabel as c } from "../controls/WorkItemControls.js";
|
|
6
6
|
import { detailPath as l } from "../utils/rowNavigation.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { refusalMessage as u } from "./refusal.js";
|
|
8
|
+
import { ARCHIVE_PRODUCT_FEATURE as d, CREATE_PRODUCT_FEATURE as f, DELETE_PRODUCT_FEATURE as p, PRODUCT_FEATURES_LIST as m, PRODUCT_FEATURE_QUERIES as h, UNARCHIVE_PRODUCT_FEATURE as g, UPDATE_PRODUCT_FEATURE as _ } from "./hierarchyOperations.js";
|
|
9
|
+
import { PRODUCT_FEATURE_STATUSES as v, changedFields as y, normalizeText as b, productFeatureStatusVariant as x } from "./hierarchy.js";
|
|
10
10
|
import { useState as S } from "react";
|
|
11
11
|
import { Archive as C, ArchiveRestore as w, Pencil as T, Plus as E, Puzzle as D, Trash2 as O } from "lucide-react";
|
|
12
12
|
import { useMutation as k, useQuery as A } from "@apollo/client/react";
|
|
@@ -14,7 +14,7 @@ import { jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
|
14
14
|
import { Badge as N, Button as P, Input as F, ResponsiveDialog as I, ResponsiveDialogContent as L, ResponsiveDialogDescription as R, ResponsiveDialogFooter as z, ResponsiveDialogHeader as B, ResponsiveDialogTitle as V, ResponsiveDialogTrigger as H } from "@burdenoff/fe-libs/ui";
|
|
15
15
|
//#region src/planmagnet/product/ProductFeatureControls.tsx
|
|
16
16
|
var U = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]", W = "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", G = {
|
|
17
|
-
refetchQueries:
|
|
17
|
+
refetchQueries: h,
|
|
18
18
|
awaitRefetchQueries: !0
|
|
19
19
|
};
|
|
20
20
|
function K() {
|
|
@@ -22,31 +22,31 @@ function K() {
|
|
|
22
22
|
}
|
|
23
23
|
function q({ status: e }) {
|
|
24
24
|
return /* @__PURE__ */ j(N, {
|
|
25
|
-
variant:
|
|
25
|
+
variant: x(e),
|
|
26
26
|
className: "text-xs",
|
|
27
27
|
"data-testid": "product-feature-status",
|
|
28
28
|
children: c(e)
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
32
|
-
let l = n(),
|
|
32
|
+
let l = n(), d = K(), { currentUser: p } = e(), m = {
|
|
33
33
|
name: r?.name ?? "",
|
|
34
34
|
description: r?.description ?? "",
|
|
35
35
|
status: r?.status ?? "BACKLOG",
|
|
36
|
-
ownerId: r ? r.ownerId ?? "" :
|
|
37
|
-
}, [
|
|
36
|
+
ownerId: r ? r.ownerId ?? "" : p?.id ?? ""
|
|
37
|
+
}, [h, g] = S(!1), [x, C] = S(m), [w, D] = S(null), [O, A] = k(f, G), [N, q] = k(_, G), J = A.loading || q.loading, Y = x.name.trim() !== "" && !J, X = r ? `product-feature-edit-${r.id}` : `product-feature-new-${t}`, Z = v.includes(x.status) ? v : [x.status, ...v], Q = async () => {
|
|
38
38
|
D(null);
|
|
39
39
|
let e = {
|
|
40
|
-
name:
|
|
41
|
-
description:
|
|
42
|
-
status:
|
|
43
|
-
ownerId:
|
|
40
|
+
name: x.name.trim(),
|
|
41
|
+
description: b(x.description),
|
|
42
|
+
status: x.status,
|
|
43
|
+
ownerId: x.ownerId || null
|
|
44
44
|
};
|
|
45
45
|
try {
|
|
46
46
|
if (r) {
|
|
47
|
-
let t =
|
|
47
|
+
let t = y({
|
|
48
48
|
name: r.name.trim(),
|
|
49
|
-
description:
|
|
49
|
+
description: b(r.description ?? ""),
|
|
50
50
|
status: r.status,
|
|
51
51
|
ownerId: r.ownerId
|
|
52
52
|
}, e);
|
|
@@ -61,15 +61,15 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
61
61
|
...e.description ? { description: e.description } : {},
|
|
62
62
|
...e.ownerId ? { ownerId: e.ownerId } : {}
|
|
63
63
|
} } }));
|
|
64
|
-
|
|
64
|
+
g(!1);
|
|
65
65
|
} catch (e) {
|
|
66
|
-
D(
|
|
66
|
+
D(u(e, r ? l("planmagnet.productFeatures.errors.save", "The feature could not be saved.") : l("planmagnet.productFeatures.errors.create", "The feature could not be created."), d));
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
69
|
return /* @__PURE__ */ M(I, {
|
|
70
|
-
open:
|
|
70
|
+
open: h,
|
|
71
71
|
onOpenChange: (e) => {
|
|
72
|
-
|
|
72
|
+
g(e), e ? C(m) : D(null);
|
|
73
73
|
},
|
|
74
74
|
children: [/* @__PURE__ */ j(H, {
|
|
75
75
|
asChild: !0,
|
|
@@ -98,10 +98,10 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
98
98
|
}), /* @__PURE__ */ j(F, {
|
|
99
99
|
id: `${X}-name`,
|
|
100
100
|
className: "mt-1",
|
|
101
|
-
value:
|
|
101
|
+
value: x.name,
|
|
102
102
|
placeholder: l("planmagnet.productFeatures.fields.namePlaceholder", "e.g. Single sign-on"),
|
|
103
103
|
onChange: (e) => C({
|
|
104
|
-
...
|
|
104
|
+
...x,
|
|
105
105
|
name: e.target.value
|
|
106
106
|
}),
|
|
107
107
|
"data-testid": "product-feature-name"
|
|
@@ -113,9 +113,9 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
113
113
|
}), /* @__PURE__ */ j("textarea", {
|
|
114
114
|
id: `${X}-description`,
|
|
115
115
|
className: U,
|
|
116
|
-
value:
|
|
116
|
+
value: x.description,
|
|
117
117
|
onChange: (e) => C({
|
|
118
|
-
...
|
|
118
|
+
...x,
|
|
119
119
|
description: e.target.value
|
|
120
120
|
}),
|
|
121
121
|
"data-testid": "product-feature-description"
|
|
@@ -129,9 +129,9 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
129
129
|
}), /* @__PURE__ */ j("select", {
|
|
130
130
|
id: `${X}-status`,
|
|
131
131
|
className: W,
|
|
132
|
-
value:
|
|
132
|
+
value: x.status,
|
|
133
133
|
onChange: (e) => C({
|
|
134
|
-
...
|
|
134
|
+
...x,
|
|
135
135
|
status: e.target.value
|
|
136
136
|
}),
|
|
137
137
|
"data-testid": "product-feature-status-select",
|
|
@@ -147,10 +147,10 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
147
147
|
className: "mt-1",
|
|
148
148
|
children: /* @__PURE__ */ j(s, {
|
|
149
149
|
id: `${X}-owner`,
|
|
150
|
-
value:
|
|
150
|
+
value: x.ownerId,
|
|
151
151
|
noneLabel: l("planmagnet.productFeatures.fields.noOwner", "No owner"),
|
|
152
152
|
onChange: (e) => C({
|
|
153
|
-
...
|
|
153
|
+
...x,
|
|
154
154
|
ownerId: e
|
|
155
155
|
})
|
|
156
156
|
})
|
|
@@ -170,19 +170,19 @@ function J({ productId: t, feature: r, disabled: a = !1 }) {
|
|
|
170
170
|
});
|
|
171
171
|
}
|
|
172
172
|
function Y({ feature: e, epicCount: s, requestCount: c }) {
|
|
173
|
-
let
|
|
173
|
+
let f = n(), m = K(), h = t(), [_, v] = k(d, G), [y, b] = k(g, G), [x, T] = k(p, { context: r }), [E, D] = S(null), A = v.loading || b.loading || T.loading, N = async () => {
|
|
174
174
|
D(null);
|
|
175
175
|
try {
|
|
176
|
-
e.archivedAt ? await i(
|
|
176
|
+
e.archivedAt ? await i(y({ variables: { id: e.id } })) : await i(_({ variables: { id: e.id } }));
|
|
177
177
|
} catch (e) {
|
|
178
|
-
D(
|
|
178
|
+
D(u(e, f("planmagnet.productFeatures.errors.update", "The feature could not be updated."), m));
|
|
179
179
|
}
|
|
180
180
|
}, F = async () => {
|
|
181
181
|
D(null);
|
|
182
182
|
try {
|
|
183
|
-
await i(
|
|
183
|
+
await i(x({ variables: { id: e.id } })), h(l("/products/product-detail-page", e.productId));
|
|
184
184
|
} catch (e) {
|
|
185
|
-
D(
|
|
185
|
+
D(u(e, f("planmagnet.productFeatures.errors.delete", "The feature could not be deleted."), m));
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
return /* @__PURE__ */ M("div", {
|
|
@@ -200,19 +200,19 @@ function Y({ feature: e, epicCount: s, requestCount: c }) {
|
|
|
200
200
|
disabled: A,
|
|
201
201
|
onClick: () => void N(),
|
|
202
202
|
"data-testid": "product-feature-toggle-archive",
|
|
203
|
-
children: [e.archivedAt ? /* @__PURE__ */ j(w, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ j(C, { className: "mr-1 h-4 w-4" }), e.archivedAt ?
|
|
203
|
+
children: [e.archivedAt ? /* @__PURE__ */ j(w, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ j(C, { className: "mr-1 h-4 w-4" }), e.archivedAt ? f("planmagnet.productFeatures.actions.unarchive", "Unarchive") : f("planmagnet.productFeatures.actions.archive", "Archive")]
|
|
204
204
|
}),
|
|
205
205
|
/* @__PURE__ */ j(a, {
|
|
206
|
-
label:
|
|
206
|
+
label: f("planmagnet.productFeatures.actions.delete", "Delete"),
|
|
207
207
|
variant: "outline",
|
|
208
208
|
icon: /* @__PURE__ */ j(O, { className: "mr-1 h-4 w-4" }),
|
|
209
209
|
testId: "product-feature-delete",
|
|
210
|
-
title:
|
|
211
|
-
description:
|
|
210
|
+
title: f("planmagnet.productFeatures.confirmDelete.title", "Delete {{name}}?", { name: e.name }),
|
|
211
|
+
description: f("planmagnet.productFeatures.confirmDelete.description", "Its {{requests}} feature request(s) and {{epics}} epic(s) are kept — only their links to this feature are removed, and stories stay under their epics. No request or work item is deleted or changed. This cannot be undone here.", {
|
|
212
212
|
requests: c,
|
|
213
213
|
epics: s
|
|
214
214
|
}),
|
|
215
|
-
confirmLabel:
|
|
215
|
+
confirmLabel: f("planmagnet.productFeatures.confirmDelete.confirm", "Delete feature"),
|
|
216
216
|
destructive: !0,
|
|
217
217
|
disabled: A,
|
|
218
218
|
onConfirm: () => void F()
|
|
@@ -222,14 +222,14 @@ function Y({ feature: e, epicCount: s, requestCount: c }) {
|
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
function X({ productId: r, productArchived: i }) {
|
|
225
|
-
let a = n(), { workspaceId: s } = e(), c = t(), [u, d] = S(!1), { data: f, previousData:
|
|
225
|
+
let a = n(), { workspaceId: s } = e(), c = t(), [u, d] = S(!1), { data: f, previousData: p, loading: h, error: g } = A(m, {
|
|
226
226
|
variables: {
|
|
227
227
|
workspaceId: s ?? "",
|
|
228
228
|
productId: r,
|
|
229
229
|
filter: u ? void 0 : { isActive: !0 }
|
|
230
230
|
},
|
|
231
231
|
skip: !s || !r
|
|
232
|
-
}), _ = (f ??
|
|
232
|
+
}), _ = (f ?? p)?.planmagnetProductFeatures, v = _?.items ?? [];
|
|
233
233
|
return /* @__PURE__ */ M("div", {
|
|
234
234
|
className: "space-y-3",
|
|
235
235
|
"data-testid": "product-features",
|
|
@@ -4,8 +4,8 @@ import { throwOnError as r } from "../utils/mutationResult.js";
|
|
|
4
4
|
import { ErrorLine as i } from "../controls/ConfirmButton.js";
|
|
5
5
|
import { detailPath as a } from "../utils/rowNavigation.js";
|
|
6
6
|
import { ProductSelect as o } from "../controls/Pickers.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { refusalMessage as s } from "./refusal.js";
|
|
8
|
+
import { FEATURE_REQUEST_FEATURE_OPTIONS as c, FEATURE_REQUEST_PRODUCT_FEATURE as l, LINK_FEATURE_REQUEST_TO_PRODUCT_FEATURE as u, PRODUCT_FEATURE_QUERIES as d, UNLINK_FEATURE_REQUEST_FROM_PRODUCT_FEATURE as f } from "./hierarchyOperations.js";
|
|
9
9
|
import { ProductFeatureStatusBadge as p } from "./ProductFeatureControls.js";
|
|
10
10
|
import { useState as m } from "react";
|
|
11
11
|
import { Link2 as h, Puzzle as g, X as _ } from "lucide-react";
|
|
@@ -15,19 +15,19 @@ import { Badge as S, Button as C, Card as w, CardContent as T, CardHeader as E,
|
|
|
15
15
|
//#region src/planmagnet/product/ProductFeatureLinkCard.tsx
|
|
16
16
|
var O = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60";
|
|
17
17
|
function k({ featureRequestId: k }) {
|
|
18
|
-
let A = n(), { workspaceId: j } = e(), M = t(), [N, P] = m(!1), [F, I] = m(""), [L, R] = m(""), [z, B] = m(null), V = y(
|
|
18
|
+
let A = n(), { workspaceId: j } = e(), M = t(), [N, P] = m(!1), [F, I] = m(""), [L, R] = m(""), [z, B] = m(null), V = y(l, {
|
|
19
19
|
variables: { id: k },
|
|
20
20
|
skip: !k
|
|
21
|
-
}), H = V.data?.planmagnetFeatureRequest ?? null, U = H?.productFeature ?? null, W = H?.productId ?? F, G = y(
|
|
21
|
+
}), H = V.data?.planmagnetFeatureRequest ?? null, U = H?.productFeature ?? null, W = H?.productId ?? F, G = y(c, {
|
|
22
22
|
variables: {
|
|
23
23
|
workspaceId: j ?? "",
|
|
24
24
|
productId: W
|
|
25
25
|
},
|
|
26
26
|
skip: !N || !j || !W
|
|
27
27
|
}), K = {
|
|
28
|
-
refetchQueries:
|
|
28
|
+
refetchQueries: d,
|
|
29
29
|
awaitRefetchQueries: !0
|
|
30
|
-
}, [q, J] = v(
|
|
30
|
+
}, [q, J] = v(u, K), [Y, X] = v(f, K), Z = A("planmagnet.productFeatures.errors.forbiddenLinks", "Your role cannot change what this feature is linked to."), Q = (G.data?.planmagnetProductFeatures.items ?? []).filter((e) => e.id !== U?.id), $ = () => {
|
|
31
31
|
P(!1), I(""), R("");
|
|
32
32
|
}, ee = async () => {
|
|
33
33
|
if (L) {
|
|
@@ -38,7 +38,7 @@ function k({ featureRequestId: k }) {
|
|
|
38
38
|
productFeatureId: L
|
|
39
39
|
} })), $();
|
|
40
40
|
} catch (e) {
|
|
41
|
-
B(
|
|
41
|
+
B(s(e, A("planmagnet.productFeatures.requestCard.errors.link", "The request could not be linked to the feature."), Z));
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}, te = async () => {
|
|
@@ -50,7 +50,7 @@ function k({ featureRequestId: k }) {
|
|
|
50
50
|
productFeatureId: U.id
|
|
51
51
|
} }));
|
|
52
52
|
} catch (e) {
|
|
53
|
-
B(
|
|
53
|
+
B(s(e, A("planmagnet.productFeatures.requestCard.errors.unlink", "The request could not be unlinked from the feature."), Z));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
};
|