@burdenoff/microfe-planmagnet 2026.927.2 → 2026.927.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.d.ts.map +1 -1
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +128 -124
- package/dist/planmagnet/admin/PlanMagnetAdminRoot.js.map +1 -1
- package/dist/planmagnet/controls/ConfirmButton.d.ts +25 -0
- package/dist/planmagnet/controls/ConfirmButton.d.ts.map +1 -0
- package/dist/planmagnet/controls/ConfirmButton.js +30 -0
- package/dist/planmagnet/controls/ConfirmButton.js.map +1 -0
- package/dist/planmagnet/controls/FeatureControls.d.ts +26 -0
- package/dist/planmagnet/controls/FeatureControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/FeatureControls.js +318 -0
- package/dist/planmagnet/controls/FeatureControls.js.map +1 -0
- package/dist/planmagnet/controls/MilestoneControls.d.ts +17 -0
- package/dist/planmagnet/controls/MilestoneControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/MilestoneControls.js +200 -0
- package/dist/planmagnet/controls/MilestoneControls.js.map +1 -0
- package/dist/planmagnet/controls/ObjectiveControls.d.ts +31 -0
- package/dist/planmagnet/controls/ObjectiveControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/ObjectiveControls.js +296 -0
- package/dist/planmagnet/controls/ObjectiveControls.js.map +1 -0
- package/dist/planmagnet/controls/Pickers.d.ts +26 -0
- package/dist/planmagnet/controls/Pickers.d.ts.map +1 -0
- package/dist/planmagnet/controls/Pickers.js +171 -0
- package/dist/planmagnet/controls/Pickers.js.map +1 -0
- package/dist/planmagnet/controls/ProjectControls.d.ts +13 -0
- package/dist/planmagnet/controls/ProjectControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/ProjectControls.js +104 -0
- package/dist/planmagnet/controls/ProjectControls.js.map +1 -0
- package/dist/planmagnet/controls/ReleaseControls.d.ts +14 -0
- package/dist/planmagnet/controls/ReleaseControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/ReleaseControls.js +108 -0
- package/dist/planmagnet/controls/ReleaseControls.js.map +1 -0
- package/dist/planmagnet/controls/WorkItemControls.d.ts +52 -0
- package/dist/planmagnet/controls/WorkItemControls.d.ts.map +1 -0
- package/dist/planmagnet/controls/WorkItemControls.js +198 -0
- package/dist/planmagnet/controls/WorkItemControls.js.map +1 -0
- package/dist/planmagnet/pages/DocsDocDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js +188 -154
- package/dist/planmagnet/pages/DocsDocDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/DocsDocsPagePage.js +4 -4
- package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.js +63 -56
- package/dist/planmagnet/pages/GoalsCreateObjectivePagePage.js.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +229 -214
- package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js +142 -114
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditReleasePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsEditReleasePagePage.js +134 -105
- package/dist/planmagnet/pages/ProductsEditReleasePagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js +102 -108
- package/dist/planmagnet/pages/ProductsFeatureDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.js +119 -94
- package/dist/planmagnet/pages/ProductsNewFeaturePagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +97 -90
- 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 +107 -106
- package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js +2 -0
- package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +150 -111
- package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +116 -93
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +55 -63
- package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProjectsPlanningEditPagePage.js +4 -4
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +134 -132
- package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +6 -5
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +167 -116
- 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 +139 -107
- 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 +205 -158
- package/dist/planmagnet/pages/TasksTaskDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksTasksPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksTasksPagePage.js +1 -0
- package/dist/planmagnet/pages/TasksTasksPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.js +1 -1
- package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
- package/dist/planmagnet/people/People.js +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts +34 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.js +301 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -0
- package/dist/planmagnet/sprints/SprintControls.d.ts.map +1 -1
- package/dist/planmagnet/sprints/SprintControls.js +194 -215
- package/dist/planmagnet/sprints/SprintControls.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
|
|
2
2
|
import { PersonName as n } from "../people/People.js";
|
|
3
3
|
import { throwOnError as r } from "../utils/mutationResult.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { ConfirmButton as i } from "../controls/ConfirmButton.js";
|
|
5
|
+
import { KeyResultWorkItems as a, ObjectiveHeaderControls as o } from "../controls/ObjectiveControls.js";
|
|
6
|
+
import { useState as s } from "react";
|
|
7
|
+
import { ArrowLeft as c, Calendar as l, Flag as u, Plus as d, Trash2 as f, User as p } from "lucide-react";
|
|
8
|
+
import { gql as m } from "@apollo/client";
|
|
9
|
+
import { useMutation as h, useQuery as g } from "@apollo/client/react";
|
|
10
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
11
|
+
import { Badge as y, Button as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, Input as T } from "@burdenoff/fe-libs/ui";
|
|
10
12
|
//#region src/planmagnet/pages/GoalsObjectiveDetailPagePage.tsx
|
|
11
|
-
var
|
|
13
|
+
var E = m`
|
|
12
14
|
query GetObjectiveDetail($id: ID!) {
|
|
13
15
|
planmagnetObjective(id: $id) {
|
|
14
16
|
id
|
|
@@ -39,16 +41,22 @@ var C = d`
|
|
|
39
41
|
doneCount
|
|
40
42
|
completionRatio
|
|
41
43
|
}
|
|
44
|
+
linkedWorkItems {
|
|
45
|
+
id
|
|
46
|
+
key
|
|
47
|
+
title
|
|
48
|
+
status
|
|
49
|
+
}
|
|
42
50
|
}
|
|
43
51
|
}
|
|
44
52
|
}
|
|
45
|
-
`,
|
|
53
|
+
`, D = m`
|
|
46
54
|
mutation CreateKeyResult($input: PlanmagnetCreateKeyResultInput!) {
|
|
47
55
|
planmagnetCreateKeyResult(input: $input) {
|
|
48
56
|
id
|
|
49
57
|
}
|
|
50
58
|
}
|
|
51
|
-
`,
|
|
59
|
+
`, O = m`
|
|
52
60
|
mutation UpdateKeyResult($id: ID!, $input: PlanmagnetUpdateKeyResultInput!) {
|
|
53
61
|
planmagnetUpdateKeyResult(id: $id, input: $input) {
|
|
54
62
|
id
|
|
@@ -56,83 +64,95 @@ var C = d`
|
|
|
56
64
|
status
|
|
57
65
|
}
|
|
58
66
|
}
|
|
59
|
-
`,
|
|
67
|
+
`, k = m`
|
|
60
68
|
mutation DeleteKeyResult($id: ID!) {
|
|
61
69
|
planmagnetDeleteKeyResult(id: $id)
|
|
62
70
|
}
|
|
63
|
-
`,
|
|
71
|
+
`, A = m`
|
|
64
72
|
mutation DeleteObjective($id: ID!) {
|
|
65
73
|
planmagnetDeleteObjective(id: $id)
|
|
66
74
|
}
|
|
67
|
-
`,
|
|
68
|
-
DRAFT: "bg-gray-100 text-gray-800",
|
|
69
|
-
ACTIVE: "bg-blue-100 text-blue-800",
|
|
70
|
-
COMPLETED: "bg-green-100 text-green-800",
|
|
71
|
-
CANCELLED: "bg-red-100 text-red-800"
|
|
72
|
-
}, k = {
|
|
75
|
+
`, j = {
|
|
73
76
|
NOT_STARTED: "bg-gray-100 text-gray-800",
|
|
74
77
|
IN_PROGRESS: "bg-blue-100 text-blue-800",
|
|
75
78
|
AT_RISK: "bg-orange-100 text-orange-800",
|
|
76
79
|
COMPLETED: "bg-green-100 text-green-800"
|
|
77
80
|
};
|
|
78
|
-
function
|
|
79
|
-
return /* @__PURE__ */
|
|
81
|
+
function M({ progress: e }) {
|
|
82
|
+
return /* @__PURE__ */ _("div", {
|
|
80
83
|
className: "h-2 w-full rounded-full bg-muted overflow-hidden",
|
|
81
|
-
children: /* @__PURE__ */
|
|
84
|
+
children: /* @__PURE__ */ _("div", {
|
|
82
85
|
className: "h-full rounded-full bg-primary transition-all",
|
|
83
86
|
style: { width: `${Math.max(0, Math.min(100, Math.round(e)))}%` }
|
|
84
87
|
})
|
|
85
88
|
});
|
|
86
89
|
}
|
|
87
|
-
function
|
|
88
|
-
let [
|
|
89
|
-
|
|
90
|
+
function N({ kr: e, onUpdated: t, onDeleted: n }) {
|
|
91
|
+
let [o, c] = s(String(e.currentValue)), [l, { loading: u }] = h(O), [d, { loading: p }] = h(k), [m, g] = s(null), y = async () => {
|
|
92
|
+
let n = e.metricType === "BOOLEAN" ? +(o === "1") : Number(o);
|
|
93
|
+
if (!Number.isNaN(n)) {
|
|
94
|
+
g(null);
|
|
95
|
+
try {
|
|
96
|
+
await r(l({ variables: {
|
|
97
|
+
id: e.id,
|
|
98
|
+
input: { currentValue: n }
|
|
99
|
+
} })), t();
|
|
100
|
+
} catch (e) {
|
|
101
|
+
g(e instanceof Error ? e.message : "The progress could not be saved.");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}, x = async () => {
|
|
105
|
+
g(null);
|
|
106
|
+
try {
|
|
107
|
+
await r(d({ variables: { id: e.id } })), n();
|
|
108
|
+
} catch (e) {
|
|
109
|
+
g(e instanceof Error ? e.message : "The key result could not be deleted.");
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ v("div", {
|
|
90
113
|
className: "rounded-md border border-input p-4 space-y-3",
|
|
91
114
|
children: [
|
|
92
|
-
|
|
115
|
+
m && /* @__PURE__ */ _("p", {
|
|
93
116
|
role: "alert",
|
|
94
117
|
className: "text-sm text-destructive",
|
|
95
|
-
children:
|
|
118
|
+
children: m
|
|
96
119
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ v("div", {
|
|
98
121
|
className: "flex items-start justify-between gap-3",
|
|
99
|
-
children: [/* @__PURE__ */
|
|
122
|
+
children: [/* @__PURE__ */ v("div", {
|
|
100
123
|
className: "min-w-0",
|
|
101
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ _("p", {
|
|
102
125
|
className: "text-sm font-medium",
|
|
103
126
|
children: e.title
|
|
104
|
-
}), e.description && /* @__PURE__ */
|
|
127
|
+
}), e.description && /* @__PURE__ */ _("p", {
|
|
105
128
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
106
129
|
children: e.description
|
|
107
130
|
})]
|
|
108
|
-
}), /* @__PURE__ */
|
|
131
|
+
}), /* @__PURE__ */ v("div", {
|
|
109
132
|
className: "flex items-center gap-2 shrink-0",
|
|
110
|
-
children: [/* @__PURE__ */
|
|
111
|
-
className: `text-xs px-2 py-0.5 rounded-full capitalize ${
|
|
133
|
+
children: [/* @__PURE__ */ _("span", {
|
|
134
|
+
className: `text-xs px-2 py-0.5 rounded-full capitalize ${j[e.status] ?? ""}`,
|
|
112
135
|
children: e.status.toLowerCase().replace("_", " ")
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
},
|
|
125
|
-
"aria-label": `Delete ${e.title}`,
|
|
126
|
-
children: /* @__PURE__ */ m(l, { className: "h-4 w-4" })
|
|
136
|
+
}), /* @__PURE__ */ _(i, {
|
|
137
|
+
label: "",
|
|
138
|
+
ariaLabel: `Delete ${e.title}`,
|
|
139
|
+
variant: "outline",
|
|
140
|
+
icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" }),
|
|
141
|
+
title: `Delete "${e.title}"?`,
|
|
142
|
+
description: "The key result and its progress are deleted. This cannot be undone here.",
|
|
143
|
+
confirmLabel: "Delete key result",
|
|
144
|
+
destructive: !0,
|
|
145
|
+
disabled: p,
|
|
146
|
+
onConfirm: () => void x()
|
|
127
147
|
})]
|
|
128
148
|
})]
|
|
129
149
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ _(M, { progress: e.progress }),
|
|
151
|
+
/* @__PURE__ */ v("div", {
|
|
132
152
|
className: "flex items-center justify-between text-xs text-muted-foreground",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
153
|
+
children: [/* @__PURE__ */ _("span", { children: e.metricType === "BOOLEAN" ? e.currentValue > 0 ? "Done" : "Not done" : `${e.currentValue}${e.unit ? ` ${e.unit}` : ""} of ${e.targetValue}${e.unit ? ` ${e.unit}` : ""}` }), /* @__PURE__ */ v("span", { children: [Math.round(e.progress), "%"] })]
|
|
134
154
|
}),
|
|
135
|
-
e.linkedWorkItemRollup.totalLinked > 0 && /* @__PURE__ */
|
|
155
|
+
e.linkedWorkItemRollup.totalLinked > 0 && /* @__PURE__ */ v("p", {
|
|
136
156
|
className: "text-xs text-muted-foreground",
|
|
137
157
|
children: [
|
|
138
158
|
e.linkedWorkItemRollup.doneCount,
|
|
@@ -143,207 +163,229 @@ function j({ kr: e, onUpdated: t, onDeleted: n }) {
|
|
|
143
163
|
"%) — informational, update progress above manually"
|
|
144
164
|
]
|
|
145
165
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ _(a, {
|
|
167
|
+
keyResultId: e.id,
|
|
168
|
+
keyResultTitle: e.title,
|
|
169
|
+
linked: e.linkedWorkItems ?? []
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ v("div", {
|
|
147
172
|
className: "flex items-center gap-2",
|
|
148
|
-
children: [e.metricType === "BOOLEAN" ? /* @__PURE__ */
|
|
173
|
+
children: [e.metricType === "BOOLEAN" ? /* @__PURE__ */ v("select", {
|
|
149
174
|
className: "rounded-md border border-input bg-background px-3 py-1.5 text-sm",
|
|
150
|
-
value:
|
|
151
|
-
onChange: (e) =>
|
|
152
|
-
children: [/* @__PURE__ */
|
|
175
|
+
value: o,
|
|
176
|
+
onChange: (e) => c(e.target.value),
|
|
177
|
+
children: [/* @__PURE__ */ _("option", {
|
|
153
178
|
value: "0",
|
|
154
179
|
children: "Not done"
|
|
155
|
-
}), /* @__PURE__ */
|
|
180
|
+
}), /* @__PURE__ */ _("option", {
|
|
156
181
|
value: "1",
|
|
157
182
|
children: "Done"
|
|
158
183
|
})]
|
|
159
|
-
}) : /* @__PURE__ */
|
|
184
|
+
}) : /* @__PURE__ */ _(T, {
|
|
160
185
|
type: "number",
|
|
161
|
-
value:
|
|
162
|
-
onChange: (e) =>
|
|
186
|
+
value: o,
|
|
187
|
+
onChange: (e) => c(e.target.value),
|
|
163
188
|
className: "w-32"
|
|
164
|
-
}), /* @__PURE__ */
|
|
189
|
+
}), /* @__PURE__ */ _(b, {
|
|
165
190
|
size: "sm",
|
|
166
191
|
variant: "outline",
|
|
167
|
-
disabled:
|
|
168
|
-
onClick:
|
|
169
|
-
|
|
170
|
-
if (!Number.isNaN(n)) {
|
|
171
|
-
g(null);
|
|
172
|
-
try {
|
|
173
|
-
await r(s({ variables: {
|
|
174
|
-
id: e.id,
|
|
175
|
-
input: { currentValue: n }
|
|
176
|
-
} })), t();
|
|
177
|
-
} catch (e) {
|
|
178
|
-
g(e instanceof Error ? e.message : "The progress could not be saved.");
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
children: c ? "Saving..." : "Update progress"
|
|
192
|
+
disabled: u,
|
|
193
|
+
onClick: y,
|
|
194
|
+
children: u ? "Saving..." : "Update progress"
|
|
183
195
|
})]
|
|
184
196
|
})
|
|
185
197
|
]
|
|
186
198
|
});
|
|
187
199
|
}
|
|
188
|
-
function
|
|
189
|
-
let { workspaceId:
|
|
200
|
+
function P() {
|
|
201
|
+
let { workspaceId: a } = e(), m = t(), O = new URLSearchParams(window.location.search).get("objectiveId") ?? "", [k, j] = s(!1), [P, F] = s({
|
|
190
202
|
title: "",
|
|
191
203
|
metricType: "NUMERIC",
|
|
192
204
|
targetValue: "100",
|
|
193
205
|
unit: ""
|
|
194
|
-
}), { data:
|
|
195
|
-
variables: { id:
|
|
196
|
-
skip: !
|
|
197
|
-
}), [
|
|
198
|
-
if (
|
|
206
|
+
}), { data: I, loading: L, error: R, refetch: z } = g(E, {
|
|
207
|
+
variables: { id: O },
|
|
208
|
+
skip: !a || !O
|
|
209
|
+
}), [B, { loading: V }] = h(D), [H, { loading: U }] = h(A), [W, G] = s(null);
|
|
210
|
+
if (L && !I) return /* @__PURE__ */ _("div", {
|
|
199
211
|
className: "flex items-center justify-center p-12",
|
|
200
|
-
children: /* @__PURE__ */
|
|
212
|
+
children: /* @__PURE__ */ _("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
|
|
201
213
|
});
|
|
202
|
-
if (
|
|
214
|
+
if (R) return /* @__PURE__ */ v("div", {
|
|
203
215
|
className: "p-6 text-red-500",
|
|
204
|
-
children: ["Error: ",
|
|
216
|
+
children: ["Error: ", R.message]
|
|
205
217
|
});
|
|
206
|
-
let
|
|
207
|
-
|
|
218
|
+
let K = I?.planmagnetObjective;
|
|
219
|
+
if (!K) return /* @__PURE__ */ _("div", {
|
|
220
|
+
className: "p-6 text-muted-foreground",
|
|
221
|
+
children: "Objective not found."
|
|
222
|
+
});
|
|
223
|
+
let q = async () => {
|
|
224
|
+
if (!P.title.trim() || !O) return;
|
|
225
|
+
let e = Number(P.metricType === "BOOLEAN" ? 1 : P.targetValue);
|
|
226
|
+
if (!Number.isNaN(e)) {
|
|
227
|
+
G(null);
|
|
228
|
+
try {
|
|
229
|
+
await r(B({ variables: { input: {
|
|
230
|
+
objectiveId: O,
|
|
231
|
+
title: P.title.trim(),
|
|
232
|
+
metricType: P.metricType,
|
|
233
|
+
targetValue: e,
|
|
234
|
+
unit: P.unit.trim() || void 0
|
|
235
|
+
} } }));
|
|
236
|
+
} catch (e) {
|
|
237
|
+
G(e instanceof Error ? e.message : "The key result could not be added.");
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
F({
|
|
241
|
+
title: "",
|
|
242
|
+
metricType: "NUMERIC",
|
|
243
|
+
targetValue: "100",
|
|
244
|
+
unit: ""
|
|
245
|
+
}), j(!1), z();
|
|
246
|
+
}
|
|
247
|
+
}, J = async () => {
|
|
248
|
+
G(null);
|
|
249
|
+
try {
|
|
250
|
+
await r(H({ variables: { id: O } }));
|
|
251
|
+
} catch (e) {
|
|
252
|
+
G(e instanceof Error ? e.message : "The objective could not be deleted.");
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
m("/goals/goals-page");
|
|
256
|
+
};
|
|
257
|
+
return /* @__PURE__ */ v("div", {
|
|
208
258
|
className: "space-y-6 p-6",
|
|
209
259
|
children: [
|
|
210
|
-
|
|
260
|
+
W && /* @__PURE__ */ _("p", {
|
|
211
261
|
role: "alert",
|
|
212
262
|
className: "text-sm text-destructive",
|
|
213
|
-
children:
|
|
263
|
+
children: W
|
|
214
264
|
}),
|
|
215
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ v("div", {
|
|
216
266
|
className: "flex items-center justify-between",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ v("div", {
|
|
218
268
|
className: "flex items-center gap-3",
|
|
219
269
|
children: [
|
|
220
|
-
/* @__PURE__ */
|
|
270
|
+
/* @__PURE__ */ _(b, {
|
|
221
271
|
variant: "ghost",
|
|
222
272
|
size: "icon",
|
|
223
|
-
onClick: () =>
|
|
224
|
-
children: /* @__PURE__ */
|
|
273
|
+
onClick: () => m("/goals/goals-page"),
|
|
274
|
+
children: /* @__PURE__ */ _(c, { className: "h-4 w-4" })
|
|
225
275
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ _(u, { className: "h-6 w-6 text-primary" }),
|
|
277
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
|
|
228
278
|
className: "text-2xl font-semibold",
|
|
229
|
-
children:
|
|
230
|
-
}), /* @__PURE__ */
|
|
279
|
+
children: K.title
|
|
280
|
+
}), /* @__PURE__ */ _("p", {
|
|
231
281
|
className: "text-sm text-muted-foreground",
|
|
232
|
-
children:
|
|
282
|
+
children: K.periodLabel
|
|
233
283
|
})] })
|
|
234
284
|
]
|
|
235
|
-
}), /* @__PURE__ */
|
|
236
|
-
className: "flex items-
|
|
237
|
-
children: [/* @__PURE__ */
|
|
238
|
-
|
|
239
|
-
children: G.status.toLowerCase()
|
|
240
|
-
}), /* @__PURE__ */ h(_, {
|
|
285
|
+
}), /* @__PURE__ */ v("div", {
|
|
286
|
+
className: "flex items-start gap-2",
|
|
287
|
+
children: [/* @__PURE__ */ _(o, { objective: K }), /* @__PURE__ */ _(i, {
|
|
288
|
+
label: "Delete",
|
|
241
289
|
variant: "outline",
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
W(e instanceof Error ? e.message : "The objective could not be deleted.");
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
T("/goals/goals-page");
|
|
253
|
-
},
|
|
254
|
-
children: [/* @__PURE__ */ m(l, { className: "mr-1 h-4 w-4" }), "Delete"]
|
|
290
|
+
icon: /* @__PURE__ */ _(f, { className: "mr-1 h-4 w-4" }),
|
|
291
|
+
title: `Delete "${K.title}"?`,
|
|
292
|
+
description: "The objective and its key results are deleted. This cannot be undone here.",
|
|
293
|
+
confirmLabel: "Delete objective",
|
|
294
|
+
destructive: !0,
|
|
295
|
+
disabled: U,
|
|
296
|
+
onConfirm: () => void J()
|
|
255
297
|
})]
|
|
256
298
|
})]
|
|
257
299
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ v("div", {
|
|
259
301
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
302
|
+
children: [/* @__PURE__ */ v("div", {
|
|
261
303
|
className: "lg:col-span-2 space-y-6",
|
|
262
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ v(x, { children: [/* @__PURE__ */ v(C, {
|
|
263
305
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ _(w, { children: "Overview" }), /* @__PURE__ */ v(y, {
|
|
265
307
|
variant: "outline",
|
|
266
|
-
children: [Math.round(
|
|
308
|
+
children: [Math.round(K.progress), "% complete"]
|
|
267
309
|
})]
|
|
268
|
-
}), /* @__PURE__ */
|
|
310
|
+
}), /* @__PURE__ */ v(S, {
|
|
269
311
|
className: "space-y-4",
|
|
270
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ _("p", {
|
|
271
313
|
className: "text-sm",
|
|
272
|
-
children:
|
|
273
|
-
}), /* @__PURE__ */
|
|
274
|
-
})] }), /* @__PURE__ */
|
|
314
|
+
children: K.description ?? "No description provided."
|
|
315
|
+
}), /* @__PURE__ */ _(M, { progress: K.progress })]
|
|
316
|
+
})] }), /* @__PURE__ */ v(x, { children: [/* @__PURE__ */ v(C, {
|
|
275
317
|
className: "flex flex-row items-center justify-between space-y-0",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ _(w, { children: "Key Results" }), !k && /* @__PURE__ */ v(b, {
|
|
277
319
|
size: "sm",
|
|
278
320
|
variant: "outline",
|
|
279
|
-
onClick: () =>
|
|
280
|
-
children: [/* @__PURE__ */
|
|
321
|
+
onClick: () => j(!0),
|
|
322
|
+
children: [/* @__PURE__ */ _(d, { className: "mr-1 h-4 w-4" }), "Add Key Result"]
|
|
281
323
|
})]
|
|
282
|
-
}), /* @__PURE__ */
|
|
324
|
+
}), /* @__PURE__ */ v(S, {
|
|
283
325
|
className: "space-y-4",
|
|
284
326
|
children: [
|
|
285
|
-
k && /* @__PURE__ */
|
|
327
|
+
k && /* @__PURE__ */ v("div", {
|
|
286
328
|
className: "space-y-3 rounded-md border border-input p-3",
|
|
287
329
|
children: [
|
|
288
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ _(T, {
|
|
289
331
|
placeholder: "Key result title, e.g. Sign 10 new enterprise customers",
|
|
290
|
-
value:
|
|
291
|
-
onChange: (e) =>
|
|
292
|
-
...
|
|
332
|
+
value: P.title,
|
|
333
|
+
onChange: (e) => F({
|
|
334
|
+
...P,
|
|
293
335
|
title: e.target.value
|
|
294
336
|
})
|
|
295
337
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ v("div", {
|
|
297
339
|
className: "grid grid-cols-3 gap-3",
|
|
298
340
|
children: [
|
|
299
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ v("select", {
|
|
300
342
|
className: "rounded-md border border-input bg-background px-3 py-2 text-sm",
|
|
301
|
-
value:
|
|
302
|
-
onChange: (e) =>
|
|
303
|
-
...
|
|
343
|
+
value: P.metricType,
|
|
344
|
+
onChange: (e) => F({
|
|
345
|
+
...P,
|
|
304
346
|
metricType: e.target.value
|
|
305
347
|
}),
|
|
306
348
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
349
|
+
/* @__PURE__ */ _("option", {
|
|
308
350
|
value: "NUMERIC",
|
|
309
351
|
children: "Numeric"
|
|
310
352
|
}),
|
|
311
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ _("option", {
|
|
312
354
|
value: "PERCENTAGE",
|
|
313
355
|
children: "Percentage"
|
|
314
356
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ _("option", {
|
|
316
358
|
value: "BOOLEAN",
|
|
317
359
|
children: "Yes / No"
|
|
318
360
|
})
|
|
319
361
|
]
|
|
320
362
|
}),
|
|
321
|
-
|
|
363
|
+
P.metricType !== "BOOLEAN" && /* @__PURE__ */ _(T, {
|
|
322
364
|
type: "number",
|
|
323
365
|
placeholder: "Target value",
|
|
324
|
-
value:
|
|
325
|
-
onChange: (e) =>
|
|
326
|
-
...
|
|
366
|
+
value: P.targetValue,
|
|
367
|
+
onChange: (e) => F({
|
|
368
|
+
...P,
|
|
327
369
|
targetValue: e.target.value
|
|
328
370
|
})
|
|
329
371
|
}),
|
|
330
|
-
|
|
372
|
+
P.metricType === "NUMERIC" && /* @__PURE__ */ _(T, {
|
|
331
373
|
placeholder: "Unit (optional)",
|
|
332
|
-
value:
|
|
333
|
-
onChange: (e) =>
|
|
334
|
-
...
|
|
374
|
+
value: P.unit,
|
|
375
|
+
onChange: (e) => F({
|
|
376
|
+
...P,
|
|
335
377
|
unit: e.target.value
|
|
336
378
|
})
|
|
337
379
|
})
|
|
338
380
|
]
|
|
339
381
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ v("div", {
|
|
341
383
|
className: "flex gap-2 justify-end",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ _(b, {
|
|
343
385
|
size: "sm",
|
|
344
386
|
variant: "ghost",
|
|
345
387
|
onClick: () => {
|
|
346
|
-
|
|
388
|
+
j(!1), F({
|
|
347
389
|
title: "",
|
|
348
390
|
metricType: "NUMERIC",
|
|
349
391
|
targetValue: "100",
|
|
@@ -351,106 +393,82 @@ function M() {
|
|
|
351
393
|
});
|
|
352
394
|
},
|
|
353
395
|
children: "Cancel"
|
|
354
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ _(b, {
|
|
355
397
|
size: "sm",
|
|
356
|
-
disabled:
|
|
357
|
-
onClick:
|
|
358
|
-
|
|
359
|
-
let e = Number(N.metricType === "BOOLEAN" ? 1 : N.targetValue);
|
|
360
|
-
if (!Number.isNaN(e)) {
|
|
361
|
-
W(null);
|
|
362
|
-
try {
|
|
363
|
-
await r(z({ variables: { input: {
|
|
364
|
-
objectiveId: E,
|
|
365
|
-
title: N.title.trim(),
|
|
366
|
-
metricType: N.metricType,
|
|
367
|
-
targetValue: e,
|
|
368
|
-
unit: N.unit.trim() || void 0
|
|
369
|
-
} } }));
|
|
370
|
-
} catch (e) {
|
|
371
|
-
W(e instanceof Error ? e.message : "The key result could not be added.");
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
P({
|
|
375
|
-
title: "",
|
|
376
|
-
metricType: "NUMERIC",
|
|
377
|
-
targetValue: "100",
|
|
378
|
-
unit: ""
|
|
379
|
-
}), M(!1), R();
|
|
380
|
-
}
|
|
381
|
-
},
|
|
382
|
-
children: B ? "Adding..." : "Add Key Result"
|
|
398
|
+
disabled: V || !P.title.trim(),
|
|
399
|
+
onClick: q,
|
|
400
|
+
children: V ? "Adding..." : "Add Key Result"
|
|
383
401
|
})]
|
|
384
402
|
})
|
|
385
403
|
]
|
|
386
404
|
}),
|
|
387
|
-
|
|
405
|
+
K.keyResults.length === 0 && !k && /* @__PURE__ */ _("p", {
|
|
388
406
|
className: "text-sm text-muted-foreground",
|
|
389
407
|
children: "No key results yet. Add one to make this objective measurable."
|
|
390
408
|
}),
|
|
391
|
-
|
|
409
|
+
K.keyResults.map((e) => /* @__PURE__ */ _(N, {
|
|
392
410
|
kr: e,
|
|
393
|
-
onUpdated: () => void
|
|
394
|
-
onDeleted: () => void
|
|
411
|
+
onUpdated: () => void z(),
|
|
412
|
+
onDeleted: () => void z()
|
|
395
413
|
}, e.id))
|
|
396
414
|
]
|
|
397
415
|
})] })]
|
|
398
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ v(x, { children: [/* @__PURE__ */ _(C, { children: /* @__PURE__ */ _(w, { children: "Details" }) }), /* @__PURE__ */ v(S, {
|
|
399
417
|
className: "space-y-3 text-sm",
|
|
400
418
|
children: [
|
|
401
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ v("div", {
|
|
402
420
|
className: "flex items-center gap-2",
|
|
403
421
|
children: [
|
|
404
|
-
/* @__PURE__ */
|
|
405
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ _(p, { className: "h-4 w-4 text-muted-foreground" }),
|
|
423
|
+
/* @__PURE__ */ _("span", {
|
|
406
424
|
className: "text-muted-foreground",
|
|
407
425
|
children: "Owner:"
|
|
408
426
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ _("span", {
|
|
410
428
|
className: "font-medium",
|
|
411
|
-
children: /* @__PURE__ */
|
|
429
|
+
children: /* @__PURE__ */ _(n, { id: K.ownerId })
|
|
412
430
|
})
|
|
413
431
|
]
|
|
414
432
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ v("div", {
|
|
416
434
|
className: "flex items-center gap-2",
|
|
417
435
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
|
|
437
|
+
/* @__PURE__ */ _("span", {
|
|
420
438
|
className: "text-muted-foreground",
|
|
421
439
|
children: "Period:"
|
|
422
440
|
}),
|
|
423
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ _("span", {
|
|
424
442
|
className: "font-medium",
|
|
425
|
-
children:
|
|
443
|
+
children: K.periodLabel
|
|
426
444
|
})
|
|
427
445
|
]
|
|
428
446
|
}),
|
|
429
|
-
|
|
447
|
+
K.endDate && /* @__PURE__ */ v("div", {
|
|
430
448
|
className: "flex items-center gap-2",
|
|
431
449
|
children: [
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
|
|
451
|
+
/* @__PURE__ */ _("span", {
|
|
434
452
|
className: "text-muted-foreground",
|
|
435
453
|
children: "Target end:"
|
|
436
454
|
}),
|
|
437
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ _("span", {
|
|
438
456
|
className: "font-medium",
|
|
439
|
-
children: new Date(
|
|
457
|
+
children: new Date(K.endDate).toLocaleDateString()
|
|
440
458
|
})
|
|
441
459
|
]
|
|
442
460
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ v("div", {
|
|
444
462
|
className: "flex items-center gap-2",
|
|
445
463
|
children: [
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ _(l, { className: "h-4 w-4 text-muted-foreground" }),
|
|
465
|
+
/* @__PURE__ */ _("span", {
|
|
448
466
|
className: "text-muted-foreground",
|
|
449
467
|
children: "Created:"
|
|
450
468
|
}),
|
|
451
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ _("span", {
|
|
452
470
|
className: "font-medium",
|
|
453
|
-
children:
|
|
471
|
+
children: K.createdAt ? new Date(K.createdAt).toLocaleDateString() : "—"
|
|
454
472
|
})
|
|
455
473
|
]
|
|
456
474
|
})
|
|
@@ -458,12 +476,9 @@ function M() {
|
|
|
458
476
|
})] })]
|
|
459
477
|
})
|
|
460
478
|
]
|
|
461
|
-
}) : /* @__PURE__ */ m("div", {
|
|
462
|
-
className: "p-6 text-muted-foreground",
|
|
463
|
-
children: "Objective not found."
|
|
464
479
|
});
|
|
465
480
|
}
|
|
466
481
|
//#endregion
|
|
467
|
-
export {
|
|
482
|
+
export { P as GoalsObjectiveDetailPagePage };
|
|
468
483
|
|
|
469
484
|
//# sourceMappingURL=GoalsObjectiveDetailPagePage.js.map
|