@burdenoff/microfe-planmagnet 2026.1002.2 → 2026.1008.1
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/TeamInviteMemberPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamInviteMemberPagePage.js +142 -82
- package/dist/planmagnet/pages/TeamInviteMemberPagePage.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/dist/planmagnet/team/PendingInvitations.d.ts +27 -0
- package/dist/planmagnet/team/PendingInvitations.d.ts.map +1 -0
- package/dist/planmagnet/team/PendingInvitations.js +220 -0
- package/dist/planmagnet/team/PendingInvitations.js.map +1 -0
- package/dist/planmagnet/team/invitationEmail.d.ts +35 -0
- package/dist/planmagnet/team/invitationEmail.d.ts.map +1 -0
- package/dist/planmagnet/team/invitationEmail.js +73 -0
- package/dist/planmagnet/team/invitationEmail.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StatTile as e } from "./DeliveryHealthCards.js";
|
|
2
|
-
import {
|
|
2
|
+
import { DeliverySatisfactionSection as t } from "../../satisfaction/DeliverySatisfactionSection.js";
|
|
3
|
+
import { Target as n } from "lucide-react";
|
|
3
4
|
import { gql as r } from "@apollo/client";
|
|
4
5
|
import { useQuery as i } from "@apollo/client/react";
|
|
5
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -87,8 +88,8 @@ function m({ workspaceId: r, projectId: m, startDate: h, endDate: g }) {
|
|
|
87
88
|
children: [/* @__PURE__ */ a(n, { className: "h-4 w-4" }), _("planmagnet.analytics.delivery.kpiTitle", "Delivery")]
|
|
88
89
|
}), /* @__PURE__ */ a("p", {
|
|
89
90
|
className: "text-xs text-muted-foreground",
|
|
90
|
-
children: _("planmagnet.analytics.delivery.
|
|
91
|
-
})] }), /* @__PURE__ */
|
|
91
|
+
children: _("planmagnet.analytics.delivery.kpiSubtitleWithSatisfaction", "On-time delivery and scope adherence for sprints/releases/milestones completed in the selected range, and customer satisfaction from the responses given in it.")
|
|
92
|
+
})] }), /* @__PURE__ */ o(c, { children: [y ? /* @__PURE__ */ a("p", {
|
|
92
93
|
className: "text-sm text-muted-foreground",
|
|
93
94
|
children: _("planmagnet.analytics.loading", "Loading…")
|
|
94
95
|
}) : b ? /* @__PURE__ */ o("p", {
|
|
@@ -101,108 +102,105 @@ function m({ workspaceId: r, projectId: m, startDate: h, endDate: g }) {
|
|
|
101
102
|
]
|
|
102
103
|
}) : x ? /* @__PURE__ */ o("div", {
|
|
103
104
|
className: "space-y-4",
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ a("h3", {
|
|
107
|
-
className: "text-sm font-medium mb-1",
|
|
108
|
-
children: _("planmagnet.analytics.delivery.onTimeTitle", "On-time rate")
|
|
109
|
-
}),
|
|
110
|
-
/* @__PURE__ */ a(p, {
|
|
111
|
-
label: _("planmagnet.analytics.delivery.sprints", "Sprints"),
|
|
112
|
-
onTime: x.sprintsOnTime,
|
|
113
|
-
total: x.sprintCount,
|
|
114
|
-
withoutPlan: x.sprintsWithoutPlan,
|
|
115
|
-
rate: x.sprintOnTimeRate,
|
|
116
|
-
noPlanNoun: _("planmagnet.analytics.delivery.sprintPlanNoun", "planned end date")
|
|
117
|
-
}),
|
|
118
|
-
/* @__PURE__ */ a(p, {
|
|
119
|
-
label: _("planmagnet.analytics.delivery.releases", "Releases"),
|
|
120
|
-
onTime: x.releasesOnTime,
|
|
121
|
-
total: x.releaseCount,
|
|
122
|
-
withoutPlan: x.releasesWithoutPlannedDate,
|
|
123
|
-
rate: x.releaseOnTimeRate,
|
|
124
|
-
noPlanNoun: _("planmagnet.analytics.delivery.releasePlanNoun", "planned date")
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ a(p, {
|
|
127
|
-
label: _("planmagnet.analytics.delivery.milestones", "Milestones"),
|
|
128
|
-
onTime: x.milestonesOnTime,
|
|
129
|
-
total: x.milestoneCount,
|
|
130
|
-
withoutPlan: x.milestonesWithoutDueDate,
|
|
131
|
-
rate: x.milestoneOnTimeRate,
|
|
132
|
-
noPlanNoun: _("planmagnet.analytics.delivery.milestonePlanNoun", "due date")
|
|
133
|
-
})
|
|
134
|
-
] }),
|
|
135
|
-
/* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h3", {
|
|
105
|
+
children: [/* @__PURE__ */ o("div", { children: [
|
|
106
|
+
/* @__PURE__ */ a("h3", {
|
|
136
107
|
className: "text-sm font-medium mb-1",
|
|
137
|
-
children: _("planmagnet.analytics.delivery.
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
108
|
+
children: _("planmagnet.analytics.delivery.onTimeTitle", "On-time rate")
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ a(p, {
|
|
111
|
+
label: _("planmagnet.analytics.delivery.sprints", "Sprints"),
|
|
112
|
+
onTime: x.sprintsOnTime,
|
|
113
|
+
total: x.sprintCount,
|
|
114
|
+
withoutPlan: x.sprintsWithoutPlan,
|
|
115
|
+
rate: x.sprintOnTimeRate,
|
|
116
|
+
noPlanNoun: _("planmagnet.analytics.delivery.sprintPlanNoun", "planned end date")
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ a(p, {
|
|
119
|
+
label: _("planmagnet.analytics.delivery.releases", "Releases"),
|
|
120
|
+
onTime: x.releasesOnTime,
|
|
121
|
+
total: x.releaseCount,
|
|
122
|
+
withoutPlan: x.releasesWithoutPlannedDate,
|
|
123
|
+
rate: x.releaseOnTimeRate,
|
|
124
|
+
noPlanNoun: _("planmagnet.analytics.delivery.releasePlanNoun", "planned date")
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ a(p, {
|
|
127
|
+
label: _("planmagnet.analytics.delivery.milestones", "Milestones"),
|
|
128
|
+
onTime: x.milestonesOnTime,
|
|
129
|
+
total: x.milestoneCount,
|
|
130
|
+
withoutPlan: x.milestonesWithoutDueDate,
|
|
131
|
+
rate: x.milestoneOnTimeRate,
|
|
132
|
+
noPlanNoun: _("planmagnet.analytics.delivery.milestonePlanNoun", "due date")
|
|
133
|
+
})
|
|
134
|
+
] }), /* @__PURE__ */ o("div", { children: [/* @__PURE__ */ a("h3", {
|
|
135
|
+
className: "text-sm font-medium mb-1",
|
|
136
|
+
children: _("planmagnet.analytics.delivery.scopeAdherence", "Scope adherence")
|
|
137
|
+
}), S && S.sprints.length === 0 ? /* @__PURE__ */ a("p", {
|
|
138
|
+
className: "text-sm text-muted-foreground py-2",
|
|
139
|
+
children: _("planmagnet.analytics.delivery.scopeAdherenceEmpty", "No completed sprint with a committed plan in this range.")
|
|
140
|
+
}) : S && /* @__PURE__ */ o("div", {
|
|
141
|
+
className: "space-y-2",
|
|
142
|
+
children: [/* @__PURE__ */ o("div", {
|
|
143
|
+
className: "grid grid-cols-3 gap-3",
|
|
144
|
+
children: [
|
|
145
|
+
/* @__PURE__ */ a(e, {
|
|
146
|
+
label: _("planmagnet.analytics.delivery.committed", "Committed"),
|
|
147
|
+
value: `${S.committedPoints} pts`
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ a(e, {
|
|
150
|
+
label: _("planmagnet.analytics.delivery.delivered", "Delivered"),
|
|
151
|
+
value: `${S.deliveredPoints} pts`
|
|
152
|
+
}),
|
|
153
|
+
/* @__PURE__ */ a(e, {
|
|
154
|
+
label: _("planmagnet.analytics.delivery.adherenceRate", "Adherence"),
|
|
155
|
+
value: C === null ? "—" : `${C}%`
|
|
156
|
+
})
|
|
157
|
+
]
|
|
158
|
+
}), /* @__PURE__ */ o("table", {
|
|
159
|
+
className: "w-full text-sm",
|
|
160
|
+
children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", {
|
|
161
|
+
className: "text-left text-xs text-muted-foreground",
|
|
145
162
|
children: [
|
|
146
|
-
/* @__PURE__ */ a(
|
|
147
|
-
|
|
148
|
-
|
|
163
|
+
/* @__PURE__ */ a("th", {
|
|
164
|
+
className: "py-1 pr-2 font-normal",
|
|
165
|
+
children: _("planmagnet.analytics.delivery.sprint", "Sprint")
|
|
149
166
|
}),
|
|
150
|
-
/* @__PURE__ */ a(
|
|
151
|
-
|
|
152
|
-
|
|
167
|
+
/* @__PURE__ */ a("th", {
|
|
168
|
+
className: "py-1 pr-2 text-right font-normal",
|
|
169
|
+
children: _("planmagnet.analytics.delivery.committed", "Committed")
|
|
153
170
|
}),
|
|
154
|
-
/* @__PURE__ */ a(
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
/* @__PURE__ */ a("th", {
|
|
172
|
+
className: "py-1 text-right font-normal",
|
|
173
|
+
children: _("planmagnet.analytics.delivery.delivered", "Delivered")
|
|
157
174
|
})
|
|
158
175
|
]
|
|
159
|
-
}), /* @__PURE__ */ o("
|
|
160
|
-
className: "
|
|
161
|
-
children: [
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}),
|
|
188
|
-
/* @__PURE__ */ a("td", {
|
|
189
|
-
className: "py-1.5 text-right tabular-nums",
|
|
190
|
-
children: e.delivered
|
|
191
|
-
})
|
|
192
|
-
]
|
|
193
|
-
}, e.id)) })]
|
|
194
|
-
})]
|
|
195
|
-
})] }),
|
|
196
|
-
/* @__PURE__ */ o("p", {
|
|
197
|
-
className: "flex items-start gap-1.5 text-xs text-muted-foreground border-t pt-2",
|
|
198
|
-
"data-testid": "delivery-no-csat-note",
|
|
199
|
-
children: [/* @__PURE__ */ a(t, {
|
|
200
|
-
className: "h-3.5 w-3.5 shrink-0 mt-0.5",
|
|
201
|
-
"aria-hidden": !0
|
|
202
|
-
}), _("planmagnet.analytics.delivery.noCsat", "Customer satisfaction is not shown here: PlanMagnet has no survey/NPS/CSAT data source to compute it from.")]
|
|
203
|
-
})
|
|
204
|
-
]
|
|
205
|
-
}) : null })]
|
|
176
|
+
}) }), /* @__PURE__ */ a("tbody", { children: S.sprints.map((e) => /* @__PURE__ */ o("tr", {
|
|
177
|
+
className: "border-t",
|
|
178
|
+
children: [
|
|
179
|
+
/* @__PURE__ */ a("td", {
|
|
180
|
+
className: "py-1.5 pr-2",
|
|
181
|
+
children: e.name
|
|
182
|
+
}),
|
|
183
|
+
/* @__PURE__ */ a("td", {
|
|
184
|
+
className: "py-1.5 pr-2 text-right tabular-nums",
|
|
185
|
+
children: e.committed
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ a("td", {
|
|
188
|
+
className: "py-1.5 text-right tabular-nums",
|
|
189
|
+
children: e.delivered
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
}, e.id)) })]
|
|
193
|
+
})]
|
|
194
|
+
})] })]
|
|
195
|
+
}) : null, r && /* @__PURE__ */ a("div", {
|
|
196
|
+
className: "mt-4 border-t pt-3",
|
|
197
|
+
children: /* @__PURE__ */ a(t, {
|
|
198
|
+
workspaceId: r,
|
|
199
|
+
projectId: m,
|
|
200
|
+
startDate: h,
|
|
201
|
+
endDate: g
|
|
202
|
+
})
|
|
203
|
+
})] })]
|
|
206
204
|
});
|
|
207
205
|
}
|
|
208
206
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeliveryKpisCard.js","names":[],"sources":["../../../../src/planmagnet/pages/analytics/DeliveryKpisCard.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Info, Target } from 'lucide-react';\nimport { StatTile } from './DeliveryHealthCards';\n\n/**\n * ANR-21: on-time delivery rate and scope adherence, for the workspace or one project, over the page's date\n * range. `planmagnetDeliveryKpis` deliberately has no `customerSatisfaction` field — PlanMagnet has no\n * survey/NPS/CSAT data source to back one (see the type's own doc comment in graphql/wspace.graphql) — so this\n * card says that explicitly (`delivery-no-csat-note`) instead of the gap just being silent.\n */\n\nconst GET_DELIVERY_KPIS = gql`\n query GetAnalyticsDeliveryKpis(\n $workspaceId: ID!\n $projectId: ID\n $startDate: DateTime\n $endDate: DateTime\n ) {\n planmagnetDeliveryKpis(\n workspaceId: $workspaceId\n projectId: $projectId\n startDate: $startDate\n endDate: $endDate\n ) {\n sprintCount\n sprintsOnTime\n sprintsWithoutPlan\n sprintOnTimeRate\n releaseCount\n releasesOnTime\n releasesWithoutPlannedDate\n releaseOnTimeRate\n milestoneCount\n milestonesOnTime\n milestonesWithoutDueDate\n milestoneOnTimeRate\n scopeAdherence {\n committedPoints\n deliveredPoints\n adherenceRate\n sprints {\n id\n name\n committed\n delivered\n }\n }\n }\n }\n`;\n\ninterface DeliveryKpisData {\n planmagnetDeliveryKpis: {\n sprintCount: number;\n sprintsOnTime: number;\n sprintsWithoutPlan: number;\n sprintOnTimeRate: number | null;\n releaseCount: number;\n releasesOnTime: number;\n releasesWithoutPlannedDate: number;\n releaseOnTimeRate: number | null;\n milestoneCount: number;\n milestonesOnTime: number;\n milestonesWithoutDueDate: number;\n milestoneOnTimeRate: number | null;\n scopeAdherence: {\n committedPoints: number;\n deliveredPoints: number;\n adherenceRate: number | null;\n sprints: Array<{ id: string; name: string; committed: number; delivered: number }>;\n };\n };\n}\n\n/** One on-time row: `x of y on time`, the count with no plan/due date to measure against, and the rate — or \"—\"\n * with the reason, never an invented 0%. */\nfunction OnTimeRow({\n label,\n onTime,\n total,\n withoutPlan,\n rate,\n noPlanNoun,\n}: {\n label: string;\n onTime: number;\n total: number;\n withoutPlan: number;\n rate: number | null;\n noPlanNoun: string;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-3 border-t py-2 first:border-t-0 first:pt-0\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium\">{label}</p>\n <p className=\"text-xs text-muted-foreground\">\n {onTime} / {total - withoutPlan} on time\n {withoutPlan > 0 ? ` · ${withoutPlan} with no ${noPlanNoun}` : ''}\n {total === 0 ? ' · none in range' : ''}\n </p>\n </div>\n <span className=\"text-lg font-semibold tabular-nums shrink-0\">\n {rate === null ? '—' : `${Math.round(rate * 100)}%`}\n </span>\n </div>\n );\n}\n\nexport function DeliveryKpisCard({\n workspaceId,\n projectId,\n startDate,\n endDate,\n}: {\n workspaceId?: string | null;\n /** Omitted = every project in the workspace (ANR-09 project scope set to \"All projects\"). */\n projectId?: string;\n startDate: string;\n endDate: string;\n}) {\n const { t } = useI18n();\n const { data, loading, error } = useQuery<DeliveryKpisData>(GET_DELIVERY_KPIS, {\n variables: { workspaceId, projectId, startDate, endDate },\n skip: !workspaceId,\n });\n const k = data?.planmagnetDeliveryKpis;\n const adherence = k?.scopeAdherence;\n const adherencePercent =\n adherence?.adherenceRate == null ? null : Math.round(adherence.adherenceRate * 100);\n\n return (\n <Card data-testid=\"delivery-card\">\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Target className=\"h-4 w-4\" />\n {t('planmagnet.analytics.delivery.kpiTitle', 'Delivery')}\n </CardTitle>\n <p className=\"text-xs text-muted-foreground\">\n {t(\n 'planmagnet.analytics.delivery.kpiSubtitle',\n 'On-time delivery and scope adherence, for sprints/releases/milestones completed in the selected range.'\n )}\n </p>\n </CardHeader>\n <CardContent>\n {loading ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.analytics.loading', 'Loading…')}\n </p>\n ) : error ? (\n <p className=\"text-sm text-status-error-text\">\n {t('planmagnet.analytics.delivery.error', 'Delivery KPIs could not be loaded')}:{' '}\n {error.message}\n </p>\n ) : !k ? null : (\n <div className=\"space-y-4\">\n <div>\n <h3 className=\"text-sm font-medium mb-1\">\n {t('planmagnet.analytics.delivery.onTimeTitle', 'On-time rate')}\n </h3>\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.sprints', 'Sprints')}\n onTime={k.sprintsOnTime}\n total={k.sprintCount}\n withoutPlan={k.sprintsWithoutPlan}\n rate={k.sprintOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.sprintPlanNoun', 'planned end date')}\n />\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.releases', 'Releases')}\n onTime={k.releasesOnTime}\n total={k.releaseCount}\n withoutPlan={k.releasesWithoutPlannedDate}\n rate={k.releaseOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.releasePlanNoun', 'planned date')}\n />\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.milestones', 'Milestones')}\n onTime={k.milestonesOnTime}\n total={k.milestoneCount}\n withoutPlan={k.milestonesWithoutDueDate}\n rate={k.milestoneOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.milestonePlanNoun', 'due date')}\n />\n </div>\n\n <div>\n <h3 className=\"text-sm font-medium mb-1\">\n {t('planmagnet.analytics.delivery.scopeAdherence', 'Scope adherence')}\n </h3>\n {adherence && adherence.sprints.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-2\">\n {t(\n 'planmagnet.analytics.delivery.scopeAdherenceEmpty',\n 'No completed sprint with a committed plan in this range.'\n )}\n </p>\n ) : (\n adherence && (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-3 gap-3\">\n <StatTile\n label={t('planmagnet.analytics.delivery.committed', 'Committed')}\n value={`${adherence.committedPoints} pts`}\n />\n <StatTile\n label={t('planmagnet.analytics.delivery.delivered', 'Delivered')}\n value={`${adherence.deliveredPoints} pts`}\n />\n <StatTile\n label={t('planmagnet.analytics.delivery.adherenceRate', 'Adherence')}\n value={adherencePercent === null ? '—' : `${adherencePercent}%`}\n />\n </div>\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"text-left text-xs text-muted-foreground\">\n <th className=\"py-1 pr-2 font-normal\">\n {t('planmagnet.analytics.delivery.sprint', 'Sprint')}\n </th>\n <th className=\"py-1 pr-2 text-right font-normal\">\n {t('planmagnet.analytics.delivery.committed', 'Committed')}\n </th>\n <th className=\"py-1 text-right font-normal\">\n {t('planmagnet.analytics.delivery.delivered', 'Delivered')}\n </th>\n </tr>\n </thead>\n <tbody>\n {adherence.sprints.map((s) => (\n <tr key={s.id} className=\"border-t\">\n <td className=\"py-1.5 pr-2\">{s.name}</td>\n <td className=\"py-1.5 pr-2 text-right tabular-nums\">{s.committed}</td>\n <td className=\"py-1.5 text-right tabular-nums\">{s.delivered}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n )}\n </div>\n\n <p\n className=\"flex items-start gap-1.5 text-xs text-muted-foreground border-t pt-2\"\n data-testid=\"delivery-no-csat-note\"\n >\n <Info className=\"h-3.5 w-3.5 shrink-0 mt-0.5\" aria-hidden={true} />\n {t(\n 'planmagnet.analytics.delivery.noCsat',\n 'Customer satisfaction is not shown here: PlanMagnet has no survey/NPS/CSAT data source to compute it from.'\n )}\n </p>\n </div>\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ACE,OAAO,EAAE,+CAA+C,YAAY;QACpE,OAAO,MAAqB,OAAO,MAAM,GAAG,EAAiB;QAC7D,CAAA;OACE;SACN,kBAAC,SAAD;MAAO,WAAU;gBAAjB,CACE,kBAAC,SAAD,EAAA,UACE,kBAAC,MAAD;OAAI,WAAU;iBAAd;QACE,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,wCAAwC,SAAS;SACjD,CAAA;QACL,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,2CAA2C,YAAY;SACvD,CAAA;QACL,kBAAC,MAAD;SAAI,WAAU;mBACX,EAAE,2CAA2C,YAAY;SACvD,CAAA;QACF;UACC,CAAA,EACR,kBAAC,SAAD,EAAA,UACG,EAAU,QAAQ,KAAK,MACtB,kBAAC,MAAD;OAAe,WAAU;iBAAzB;QACE,kBAAC,MAAD;SAAI,WAAU;mBAAe,EAAE;SAAU,CAAA;QACzC,kBAAC,MAAD;SAAI,WAAU;mBAAuC,EAAE;SAAe,CAAA;QACtE,kBAAC,MAAD;SAAI,WAAU;mBAAkC,EAAE;SAAe,CAAA;QAC9D;SAJI,EAAE,GAIN,CACL,EACI,CAAA,CACF;QACJ;OAGN,EAAA,CAAA;IAEN,kBAAC,KAAD;KACE,WAAU;KACV,eAAY;eAFd,CAIE,kBAAC,GAAD;MAAM,WAAU;MAA8B,eAAa;MAAQ,CAAA,EAClE,EACC,wCACA,6GACD,CACC;;IACA;OAnGC,MAqGG,CAAA,CACT"}
|
|
1
|
+
{"version":3,"file":"DeliveryKpisCard.js","names":[],"sources":["../../../../src/planmagnet/pages/analytics/DeliveryKpisCard.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle } from '@burdenoff/fe-libs/ui';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { Target } from 'lucide-react';\nimport { DeliverySatisfactionSection } from '../../satisfaction/DeliverySatisfactionSection';\nimport { StatTile } from './DeliveryHealthCards';\n\n/**\n * ANR-21: on-time delivery rate, scope adherence and customer satisfaction (CSAT, the default delivery KPI, and NPS),\n * for the workspace or one project, over the page's date range. Satisfaction comes from recorded customer responses\n * and is read by its own query (see DeliverySatisfactionSection), so it can never take the on-time and scope figures\n * down with it.\n */\n\nconst GET_DELIVERY_KPIS = gql`\n query GetAnalyticsDeliveryKpis(\n $workspaceId: ID!\n $projectId: ID\n $startDate: DateTime\n $endDate: DateTime\n ) {\n planmagnetDeliveryKpis(\n workspaceId: $workspaceId\n projectId: $projectId\n startDate: $startDate\n endDate: $endDate\n ) {\n sprintCount\n sprintsOnTime\n sprintsWithoutPlan\n sprintOnTimeRate\n releaseCount\n releasesOnTime\n releasesWithoutPlannedDate\n releaseOnTimeRate\n milestoneCount\n milestonesOnTime\n milestonesWithoutDueDate\n milestoneOnTimeRate\n scopeAdherence {\n committedPoints\n deliveredPoints\n adherenceRate\n sprints {\n id\n name\n committed\n delivered\n }\n }\n }\n }\n`;\n\ninterface DeliveryKpisData {\n planmagnetDeliveryKpis: {\n sprintCount: number;\n sprintsOnTime: number;\n sprintsWithoutPlan: number;\n sprintOnTimeRate: number | null;\n releaseCount: number;\n releasesOnTime: number;\n releasesWithoutPlannedDate: number;\n releaseOnTimeRate: number | null;\n milestoneCount: number;\n milestonesOnTime: number;\n milestonesWithoutDueDate: number;\n milestoneOnTimeRate: number | null;\n scopeAdherence: {\n committedPoints: number;\n deliveredPoints: number;\n adherenceRate: number | null;\n sprints: Array<{ id: string; name: string; committed: number; delivered: number }>;\n };\n };\n}\n\n/** One on-time row: `x of y on time`, the count with no plan/due date to measure against, and the rate — or \"—\"\n * with the reason, never an invented 0%. */\nfunction OnTimeRow({\n label,\n onTime,\n total,\n withoutPlan,\n rate,\n noPlanNoun,\n}: {\n label: string;\n onTime: number;\n total: number;\n withoutPlan: number;\n rate: number | null;\n noPlanNoun: string;\n}) {\n return (\n <div className=\"flex items-center justify-between gap-3 border-t py-2 first:border-t-0 first:pt-0\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-medium\">{label}</p>\n <p className=\"text-xs text-muted-foreground\">\n {onTime} / {total - withoutPlan} on time\n {withoutPlan > 0 ? ` · ${withoutPlan} with no ${noPlanNoun}` : ''}\n {total === 0 ? ' · none in range' : ''}\n </p>\n </div>\n <span className=\"text-lg font-semibold tabular-nums shrink-0\">\n {rate === null ? '—' : `${Math.round(rate * 100)}%`}\n </span>\n </div>\n );\n}\n\nexport function DeliveryKpisCard({\n workspaceId,\n projectId,\n startDate,\n endDate,\n}: {\n workspaceId?: string | null;\n /** Omitted = every project in the workspace (ANR-09 project scope set to \"All projects\"). */\n projectId?: string;\n startDate: string;\n endDate: string;\n}) {\n const { t } = useI18n();\n const { data, loading, error } = useQuery<DeliveryKpisData>(GET_DELIVERY_KPIS, {\n variables: { workspaceId, projectId, startDate, endDate },\n skip: !workspaceId,\n });\n const k = data?.planmagnetDeliveryKpis;\n const adherence = k?.scopeAdherence;\n const adherencePercent =\n adherence?.adherenceRate == null ? null : Math.round(adherence.adherenceRate * 100);\n\n return (\n <Card data-testid=\"delivery-card\">\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Target className=\"h-4 w-4\" />\n {t('planmagnet.analytics.delivery.kpiTitle', 'Delivery')}\n </CardTitle>\n <p className=\"text-xs text-muted-foreground\">\n {t(\n 'planmagnet.analytics.delivery.kpiSubtitleWithSatisfaction',\n 'On-time delivery and scope adherence for sprints/releases/milestones completed in the selected range, and customer satisfaction from the responses given in it.'\n )}\n </p>\n </CardHeader>\n <CardContent>\n {loading ? (\n <p className=\"text-sm text-muted-foreground\">\n {t('planmagnet.analytics.loading', 'Loading…')}\n </p>\n ) : error ? (\n <p className=\"text-sm text-status-error-text\">\n {t('planmagnet.analytics.delivery.error', 'Delivery KPIs could not be loaded')}:{' '}\n {error.message}\n </p>\n ) : !k ? null : (\n <div className=\"space-y-4\">\n <div>\n <h3 className=\"text-sm font-medium mb-1\">\n {t('planmagnet.analytics.delivery.onTimeTitle', 'On-time rate')}\n </h3>\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.sprints', 'Sprints')}\n onTime={k.sprintsOnTime}\n total={k.sprintCount}\n withoutPlan={k.sprintsWithoutPlan}\n rate={k.sprintOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.sprintPlanNoun', 'planned end date')}\n />\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.releases', 'Releases')}\n onTime={k.releasesOnTime}\n total={k.releaseCount}\n withoutPlan={k.releasesWithoutPlannedDate}\n rate={k.releaseOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.releasePlanNoun', 'planned date')}\n />\n <OnTimeRow\n label={t('planmagnet.analytics.delivery.milestones', 'Milestones')}\n onTime={k.milestonesOnTime}\n total={k.milestoneCount}\n withoutPlan={k.milestonesWithoutDueDate}\n rate={k.milestoneOnTimeRate}\n noPlanNoun={t('planmagnet.analytics.delivery.milestonePlanNoun', 'due date')}\n />\n </div>\n\n <div>\n <h3 className=\"text-sm font-medium mb-1\">\n {t('planmagnet.analytics.delivery.scopeAdherence', 'Scope adherence')}\n </h3>\n {adherence && adherence.sprints.length === 0 ? (\n <p className=\"text-sm text-muted-foreground py-2\">\n {t(\n 'planmagnet.analytics.delivery.scopeAdherenceEmpty',\n 'No completed sprint with a committed plan in this range.'\n )}\n </p>\n ) : (\n adherence && (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-3 gap-3\">\n <StatTile\n label={t('planmagnet.analytics.delivery.committed', 'Committed')}\n value={`${adherence.committedPoints} pts`}\n />\n <StatTile\n label={t('planmagnet.analytics.delivery.delivered', 'Delivered')}\n value={`${adherence.deliveredPoints} pts`}\n />\n <StatTile\n label={t('planmagnet.analytics.delivery.adherenceRate', 'Adherence')}\n value={adherencePercent === null ? '—' : `${adherencePercent}%`}\n />\n </div>\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"text-left text-xs text-muted-foreground\">\n <th className=\"py-1 pr-2 font-normal\">\n {t('planmagnet.analytics.delivery.sprint', 'Sprint')}\n </th>\n <th className=\"py-1 pr-2 text-right font-normal\">\n {t('planmagnet.analytics.delivery.committed', 'Committed')}\n </th>\n <th className=\"py-1 text-right font-normal\">\n {t('planmagnet.analytics.delivery.delivered', 'Delivered')}\n </th>\n </tr>\n </thead>\n <tbody>\n {adherence.sprints.map((s) => (\n <tr key={s.id} className=\"border-t\">\n <td className=\"py-1.5 pr-2\">{s.name}</td>\n <td className=\"py-1.5 pr-2 text-right tabular-nums\">{s.committed}</td>\n <td className=\"py-1.5 text-right tabular-nums\">{s.delivered}</td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )\n )}\n </div>\n </div>\n )}\n {workspaceId && (\n <div className=\"mt-4 border-t pt-3\">\n <DeliverySatisfactionSection\n workspaceId={workspaceId}\n projectId={projectId}\n startDate={startDate}\n endDate={endDate}\n />\n </div>\n )}\n </CardContent>\n </Card>\n );\n}\n"],"mappings":";;;;;;;;;AAeA,IAAM,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiE7B,SAAS,EAAU,EACjB,UACA,WACA,UACA,gBACA,SACA,iBAQC;AACD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,KAAD;IAAG,WAAU;cAAuB;IAAU,CAAA,EAC9C,kBAAC,KAAD;IAAG,WAAU;cAAb;KACG;KAAO;KAAI,IAAQ;KAAY;KAC/B,IAAc,IAAI,MAAM,EAAY,WAAW,MAAe;KAC9D,MAAU,IAAI,qBAAqB;KAClC;MACA;MACN,kBAAC,QAAD;GAAM,WAAU;aACb,MAAS,OAAO,MAAM,GAAG,KAAK,MAAM,IAAO,IAAI,CAAC;GAC5C,CAAA,CACH;;;AAIV,SAAgB,EAAiB,EAC/B,gBACA,cACA,cACA,cAOC;CACD,IAAM,EAAE,SAAM,GAAS,EACjB,EAAE,SAAM,YAAS,aAAU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AA;OAC9D;QAJI,EAAE,GAIN,CACL,EACI,CAAA,CACF;OACJ;MAGN,EAAA,CAAA,CACF;OAxFC,MA0FR,KACC,kBAAC,OAAD;GAAK,WAAU;aACb,kBAAC,GAAD;IACe;IACF;IACA;IACF;IACT,CAAA;GACE,CAAA,CAEI,EAAA,CAAA,CACT"}
|
|
@@ -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
|
]
|