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