@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.
Files changed (68) hide show
  1. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  2. package/dist/planmagnet/PlanMagnetRoot.js +93 -142
  3. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  4. package/dist/planmagnet/admin/PlanMagnetAdminRoot.d.ts.map +1 -1
  5. package/dist/planmagnet/admin/PlanMagnetAdminRoot.js +150 -149
  6. package/dist/planmagnet/admin/PlanMagnetAdminRoot.js.map +1 -1
  7. package/dist/planmagnet/pages/DashboardDashboardPagePage.d.ts.map +1 -1
  8. package/dist/planmagnet/pages/DashboardDashboardPagePage.js +113 -116
  9. package/dist/planmagnet/pages/DashboardDashboardPagePage.js.map +1 -1
  10. package/dist/planmagnet/pages/GoalsGoalsPagePage.d.ts.map +1 -1
  11. package/dist/planmagnet/pages/GoalsGoalsPagePage.js +59 -58
  12. package/dist/planmagnet/pages/GoalsGoalsPagePage.js.map +1 -1
  13. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.d.ts.map +1 -1
  14. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js +150 -149
  15. package/dist/planmagnet/pages/GoalsObjectiveDetailPagePage.js.map +1 -1
  16. package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
  17. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +108 -107
  18. package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
  19. package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
  20. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +93 -92
  21. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
  22. package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
  23. package/dist/planmagnet/pages/ProductsProductsPagePage.js +89 -87
  24. package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
  25. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.d.ts.map +1 -1
  26. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js +94 -93
  27. package/dist/planmagnet/pages/ProductsReleaseDetailPagePage.js.map +1 -1
  28. package/dist/planmagnet/pages/ProductsReleasesPagePage.d.ts.map +1 -1
  29. package/dist/planmagnet/pages/ProductsReleasesPagePage.js +57 -56
  30. package/dist/planmagnet/pages/ProductsReleasesPagePage.js.map +1 -1
  31. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.d.ts.map +1 -1
  32. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js +82 -81
  33. package/dist/planmagnet/pages/ProductsRoadmapDetailPagePage.js.map +1 -1
  34. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.d.ts.map +1 -1
  35. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js +72 -71
  36. package/dist/planmagnet/pages/ProductsRoadmapsPagePage.js.map +1 -1
  37. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.d.ts.map +1 -1
  38. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js +38 -37
  39. package/dist/planmagnet/pages/ProjectsActiveProjectsPagePage.js.map +1 -1
  40. package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.d.ts.map +1 -1
  41. package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js +72 -71
  42. package/dist/planmagnet/pages/ProjectsMilestoneDetailPagePage.js.map +1 -1
  43. package/dist/planmagnet/pages/ProjectsMilestonesPagePage.d.ts.map +1 -1
  44. package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js +47 -46
  45. package/dist/planmagnet/pages/ProjectsMilestonesPagePage.js.map +1 -1
  46. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.d.ts.map +1 -1
  47. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js +120 -119
  48. package/dist/planmagnet/pages/ProjectsPlanningDetailPagePage.js.map +1 -1
  49. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.d.ts.map +1 -1
  50. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js +131 -130
  51. package/dist/planmagnet/pages/ProjectsProjectDetailPagePage.js.map +1 -1
  52. package/dist/planmagnet/pages/ProjectsProjectsPagePage.d.ts.map +1 -1
  53. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js +77 -75
  54. package/dist/planmagnet/pages/ProjectsProjectsPagePage.js.map +1 -1
  55. package/dist/planmagnet/pages/ReportsReportsPagePage.d.ts.map +1 -1
  56. package/dist/planmagnet/pages/ReportsReportsPagePage.js +71 -70
  57. package/dist/planmagnet/pages/ReportsReportsPagePage.js.map +1 -1
  58. package/dist/planmagnet/pages/TeamTeamPagePage.d.ts.map +1 -1
  59. package/dist/planmagnet/pages/TeamTeamPagePage.js +58 -57
  60. package/dist/planmagnet/pages/TeamTeamPagePage.js.map +1 -1
  61. package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.d.ts.map +1 -1
  62. package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.js +81 -72
  63. package/dist/planmagnet/pages/WorkspaceCreateWorkspacePagePage.js.map +1 -1
  64. package/dist/planmagnet/people/People.d.ts +20 -0
  65. package/dist/planmagnet/people/People.d.ts.map +1 -0
  66. package/dist/planmagnet/people/People.js +42 -0
  67. package/dist/planmagnet/people/People.js.map +1 -0
  68. package/package.json +1 -1
@@ -1,12 +1,13 @@
1
1
  import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
- import { useState as n } from "react";
3
- import { ArrowLeft as r, Calendar as i, Flag as a, Plus as o, Trash2 as s, User as c } from "lucide-react";
4
- import { gql as l } from "@apollo/client";
5
- import { useMutation as u, useQuery as d } from "@apollo/client/react";
6
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import { Badge as m, Button as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y, Input as b } from "@burdenoff/fe-libs/ui";
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 x = l`
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
- `, S = l`
44
+ `, C = u`
44
45
  mutation CreateKeyResult($input: PlanmagnetCreateKeyResultInput!) {
45
46
  planmagnetCreateKeyResult(input: $input) {
46
47
  id
47
48
  }
48
49
  }
49
- `, C = l`
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
- `, w = l`
58
+ `, T = u`
58
59
  mutation DeleteKeyResult($id: ID!) {
59
60
  planmagnetDeleteKeyResult(id: $id)
60
61
  }
61
- `, T = l`
62
+ `, E = u`
62
63
  mutation DeleteObjective($id: ID!) {
63
64
  planmagnetDeleteObjective(id: $id)
64
65
  }
65
- `, E = {
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
- }, D = {
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 O({ progress: e }) {
77
- return /* @__PURE__ */ f("div", {
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__ */ f("div", {
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 k({ kr: e, onUpdated: t, onDeleted: r }) {
86
- let [i, a] = n(String(e.currentValue)), [o, { loading: c }] = u(C), [l, { loading: d }] = u(w);
87
- return /* @__PURE__ */ p("div", {
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__ */ p("div", {
91
+ /* @__PURE__ */ m("div", {
91
92
  className: "flex items-start justify-between gap-3",
92
- children: [/* @__PURE__ */ p("div", {
93
+ children: [/* @__PURE__ */ m("div", {
93
94
  className: "min-w-0",
94
- children: [/* @__PURE__ */ f("p", {
95
+ children: [/* @__PURE__ */ p("p", {
95
96
  className: "text-sm font-medium",
96
97
  children: e.title
97
- }), e.description && /* @__PURE__ */ f("p", {
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__ */ p("div", {
102
+ }), /* @__PURE__ */ m("div", {
102
103
  className: "flex items-center gap-2 shrink-0",
103
- children: [/* @__PURE__ */ f("span", {
104
- className: `text-xs px-2 py-0.5 rounded-full capitalize ${D[e.status] ?? ""}`,
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__ */ f(h, {
107
+ }), /* @__PURE__ */ p(g, {
107
108
  size: "icon",
108
109
  variant: "ghost",
109
- disabled: d,
110
+ disabled: u,
110
111
  onClick: async () => {
111
- await l({ variables: { id: e.id } }), r();
112
+ await l({ variables: { id: e.id } }), n();
112
113
  },
113
114
  "aria-label": `Delete ${e.title}`,
114
- children: /* @__PURE__ */ f(s, { className: "h-4 w-4" })
115
+ children: /* @__PURE__ */ p(c, { className: "h-4 w-4" })
115
116
  })]
116
117
  })]
117
118
  }),
118
- /* @__PURE__ */ f(O, { progress: e.progress }),
119
- /* @__PURE__ */ p("div", {
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__ */ f("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__ */ p("span", { children: [Math.round(e.progress), "%"] })]
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__ */ p("p", {
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__ */ p("div", {
135
+ /* @__PURE__ */ m("div", {
135
136
  className: "flex items-center gap-2",
136
- children: [e.metricType === "BOOLEAN" ? /* @__PURE__ */ p("select", {
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__ */ f("option", {
141
+ children: [/* @__PURE__ */ p("option", {
141
142
  value: "0",
142
143
  children: "Not done"
143
- }), /* @__PURE__ */ f("option", {
144
+ }), /* @__PURE__ */ p("option", {
144
145
  value: "1",
145
146
  children: "Done"
146
147
  })]
147
- }) : /* @__PURE__ */ f(b, {
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__ */ f(h, {
153
+ }), /* @__PURE__ */ p(g, {
153
154
  size: "sm",
154
155
  variant: "outline",
155
- disabled: c,
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: c ? "Saving..." : "Update progress"
164
+ children: s ? "Saving..." : "Update progress"
164
165
  })]
165
166
  })
166
167
  ]
167
168
  });
168
169
  }
169
- function A() {
170
- let { workspaceId: l } = e(), C = t(), w = new URLSearchParams(window.location.search).get("objectiveId") ?? "", [D, A] = n(!1), [j, M] = n({
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: N, loading: P, error: F, refetch: I } = d(x, {
176
- variables: { id: w },
177
- skip: !l || !w
178
- }), [L, { loading: R }] = u(S), [z, { loading: B }] = u(T);
179
- if (P) return /* @__PURE__ */ f("div", {
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__ */ f("div", { className: "animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full" })
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 (F) return /* @__PURE__ */ p("div", {
184
+ if (I) return /* @__PURE__ */ m("div", {
184
185
  className: "p-6 text-red-500",
185
- children: ["Error: ", F.message]
186
+ children: ["Error: ", I.message]
186
187
  });
187
- let V = N?.planmagnetObjective;
188
- return V ? /* @__PURE__ */ p("div", {
188
+ let H = P?.planmagnetObjective;
189
+ return H ? /* @__PURE__ */ m("div", {
189
190
  className: "space-y-6 p-6",
190
- children: [/* @__PURE__ */ p("div", {
191
+ children: [/* @__PURE__ */ m("div", {
191
192
  className: "flex items-center justify-between",
192
- children: [/* @__PURE__ */ p("div", {
193
+ children: [/* @__PURE__ */ m("div", {
193
194
  className: "flex items-center gap-3",
194
195
  children: [
195
- /* @__PURE__ */ f(h, {
196
+ /* @__PURE__ */ p(g, {
196
197
  variant: "ghost",
197
198
  size: "icon",
198
- onClick: () => C("/goals/goals-page"),
199
- children: /* @__PURE__ */ f(r, { className: "h-4 w-4" })
199
+ onClick: () => w("/goals/goals-page"),
200
+ children: /* @__PURE__ */ p(i, { className: "h-4 w-4" })
200
201
  }),
201
- /* @__PURE__ */ f(a, { className: "h-6 w-6 text-primary" }),
202
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("h1", {
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: V.title
205
- }), /* @__PURE__ */ f("p", {
205
+ children: H.title
206
+ }), /* @__PURE__ */ p("p", {
206
207
  className: "text-sm text-muted-foreground",
207
- children: V.periodLabel
208
+ children: H.periodLabel
208
209
  })] })
209
210
  ]
210
- }), /* @__PURE__ */ p("div", {
211
+ }), /* @__PURE__ */ m("div", {
211
212
  className: "flex items-center gap-2",
212
- children: [/* @__PURE__ */ f("span", {
213
- className: `text-xs px-3 py-1 rounded-full capitalize ${E[V.status] ?? "bg-gray-100"}`,
214
- children: V.status.toLowerCase()
215
- }), /* @__PURE__ */ p(h, {
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: B,
219
+ disabled: V,
219
220
  onClick: async () => {
220
- await z({ variables: { id: w } }), C("/goals/goals-page");
221
+ await B({ variables: { id: T } }), w("/goals/goals-page");
221
222
  },
222
- children: [/* @__PURE__ */ f(s, { className: "mr-1 h-4 w-4" }), "Delete"]
223
+ children: [/* @__PURE__ */ p(c, { className: "mr-1 h-4 w-4" }), "Delete"]
223
224
  })]
224
225
  })]
225
- }), /* @__PURE__ */ p("div", {
226
+ }), /* @__PURE__ */ m("div", {
226
227
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
227
- children: [/* @__PURE__ */ p("div", {
228
+ children: [/* @__PURE__ */ m("div", {
228
229
  className: "lg:col-span-2 space-y-6",
229
- children: [/* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
230
+ children: [/* @__PURE__ */ m(_, { children: [/* @__PURE__ */ m(y, {
230
231
  className: "flex flex-row items-center justify-between space-y-0",
231
- children: [/* @__PURE__ */ f(y, { children: "Overview" }), /* @__PURE__ */ p(m, {
232
+ children: [/* @__PURE__ */ p(b, { children: "Overview" }), /* @__PURE__ */ m(h, {
232
233
  variant: "outline",
233
- children: [Math.round(V.progress), "% complete"]
234
+ children: [Math.round(H.progress), "% complete"]
234
235
  })]
235
- }), /* @__PURE__ */ p(_, {
236
+ }), /* @__PURE__ */ m(v, {
236
237
  className: "space-y-4",
237
- children: [/* @__PURE__ */ f("p", {
238
+ children: [/* @__PURE__ */ p("p", {
238
239
  className: "text-sm",
239
- children: V.description ?? "No description provided."
240
- }), /* @__PURE__ */ f(O, { progress: V.progress })]
241
- })] }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ p(v, {
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__ */ f(y, { children: "Key Results" }), !D && /* @__PURE__ */ p(h, {
244
+ children: [/* @__PURE__ */ p(b, { children: "Key Results" }), !O && /* @__PURE__ */ m(g, {
244
245
  size: "sm",
245
246
  variant: "outline",
246
- onClick: () => A(!0),
247
- children: [/* @__PURE__ */ f(o, { className: "mr-1 h-4 w-4" }), "Add Key Result"]
247
+ onClick: () => j(!0),
248
+ children: [/* @__PURE__ */ p(s, { className: "mr-1 h-4 w-4" }), "Add Key Result"]
248
249
  })]
249
- }), /* @__PURE__ */ p(_, {
250
+ }), /* @__PURE__ */ m(v, {
250
251
  className: "space-y-4",
251
252
  children: [
252
- D && /* @__PURE__ */ p("div", {
253
+ O && /* @__PURE__ */ m("div", {
253
254
  className: "space-y-3 rounded-md border border-input p-3",
254
255
  children: [
255
- /* @__PURE__ */ f(b, {
256
+ /* @__PURE__ */ p(x, {
256
257
  placeholder: "Key result title, e.g. Sign 10 new enterprise customers",
257
- value: j.title,
258
- onChange: (e) => M({
259
- ...j,
258
+ value: M.title,
259
+ onChange: (e) => N({
260
+ ...M,
260
261
  title: e.target.value
261
262
  })
262
263
  }),
263
- /* @__PURE__ */ p("div", {
264
+ /* @__PURE__ */ m("div", {
264
265
  className: "grid grid-cols-3 gap-3",
265
266
  children: [
266
- /* @__PURE__ */ p("select", {
267
+ /* @__PURE__ */ m("select", {
267
268
  className: "rounded-md border border-input bg-background px-3 py-2 text-sm",
268
- value: j.metricType,
269
- onChange: (e) => M({
270
- ...j,
269
+ value: M.metricType,
270
+ onChange: (e) => N({
271
+ ...M,
271
272
  metricType: e.target.value
272
273
  }),
273
274
  children: [
274
- /* @__PURE__ */ f("option", {
275
+ /* @__PURE__ */ p("option", {
275
276
  value: "NUMERIC",
276
277
  children: "Numeric"
277
278
  }),
278
- /* @__PURE__ */ f("option", {
279
+ /* @__PURE__ */ p("option", {
279
280
  value: "PERCENTAGE",
280
281
  children: "Percentage"
281
282
  }),
282
- /* @__PURE__ */ f("option", {
283
+ /* @__PURE__ */ p("option", {
283
284
  value: "BOOLEAN",
284
285
  children: "Yes / No"
285
286
  })
286
287
  ]
287
288
  }),
288
- j.metricType !== "BOOLEAN" && /* @__PURE__ */ f(b, {
289
+ M.metricType !== "BOOLEAN" && /* @__PURE__ */ p(x, {
289
290
  type: "number",
290
291
  placeholder: "Target value",
291
- value: j.targetValue,
292
- onChange: (e) => M({
293
- ...j,
292
+ value: M.targetValue,
293
+ onChange: (e) => N({
294
+ ...M,
294
295
  targetValue: e.target.value
295
296
  })
296
297
  }),
297
- j.metricType === "NUMERIC" && /* @__PURE__ */ f(b, {
298
+ M.metricType === "NUMERIC" && /* @__PURE__ */ p(x, {
298
299
  placeholder: "Unit (optional)",
299
- value: j.unit,
300
- onChange: (e) => M({
301
- ...j,
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__ */ p("div", {
308
+ /* @__PURE__ */ m("div", {
308
309
  className: "flex gap-2 justify-end",
309
- children: [/* @__PURE__ */ f(h, {
310
+ children: [/* @__PURE__ */ p(g, {
310
311
  size: "sm",
311
312
  variant: "ghost",
312
313
  onClick: () => {
313
- A(!1), M({
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__ */ f(h, {
322
+ }), /* @__PURE__ */ p(g, {
322
323
  size: "sm",
323
- disabled: R || !j.title.trim(),
324
+ disabled: z || !M.title.trim(),
324
325
  onClick: async () => {
325
- if (!j.title.trim() || !w) return;
326
- let e = Number(j.metricType === "BOOLEAN" ? 1 : j.targetValue);
327
- Number.isNaN(e) || (await L({ variables: { input: {
328
- objectiveId: w,
329
- title: j.title.trim(),
330
- metricType: j.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: j.unit.trim() || void 0
333
- } } }), M({
333
+ unit: M.unit.trim() || void 0
334
+ } } }), N({
334
335
  title: "",
335
336
  metricType: "NUMERIC",
336
337
  targetValue: "100",
337
338
  unit: ""
338
- }), A(!1), I());
339
+ }), j(!1), L());
339
340
  },
340
- children: R ? "Adding..." : "Add Key Result"
341
+ children: z ? "Adding..." : "Add Key Result"
341
342
  })]
342
343
  })
343
344
  ]
344
345
  }),
345
- V.keyResults.length === 0 && !D && /* @__PURE__ */ f("p", {
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
- V.keyResults.map((e) => /* @__PURE__ */ f(k, {
350
+ H.keyResults.map((e) => /* @__PURE__ */ p(A, {
350
351
  kr: e,
351
- onUpdated: () => void I(),
352
- onDeleted: () => void I()
352
+ onUpdated: () => void L(),
353
+ onDeleted: () => void L()
353
354
  }, e.id))
354
355
  ]
355
356
  })] })]
356
- }), /* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(v, { children: /* @__PURE__ */ f(y, { children: "Details" }) }), /* @__PURE__ */ p(_, {
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__ */ p("div", {
360
+ /* @__PURE__ */ m("div", {
360
361
  className: "flex items-center gap-2",
361
362
  children: [
362
- /* @__PURE__ */ f(c, { className: "h-4 w-4 text-muted-foreground" }),
363
- /* @__PURE__ */ f("span", {
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__ */ f("span", {
368
+ /* @__PURE__ */ p("span", {
368
369
  className: "font-medium",
369
- children: V.ownerId
370
+ children: /* @__PURE__ */ p(n, { id: H.ownerId })
370
371
  })
371
372
  ]
372
373
  }),
373
- /* @__PURE__ */ p("div", {
374
+ /* @__PURE__ */ m("div", {
374
375
  className: "flex items-center gap-2",
375
376
  children: [
376
- /* @__PURE__ */ f(i, { className: "h-4 w-4 text-muted-foreground" }),
377
- /* @__PURE__ */ f("span", {
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__ */ f("span", {
382
+ /* @__PURE__ */ p("span", {
382
383
  className: "font-medium",
383
- children: V.periodLabel
384
+ children: H.periodLabel
384
385
  })
385
386
  ]
386
387
  }),
387
- V.endDate && /* @__PURE__ */ p("div", {
388
+ H.endDate && /* @__PURE__ */ m("div", {
388
389
  className: "flex items-center gap-2",
389
390
  children: [
390
- /* @__PURE__ */ f(i, { className: "h-4 w-4 text-muted-foreground" }),
391
- /* @__PURE__ */ f("span", {
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__ */ f("span", {
396
+ /* @__PURE__ */ p("span", {
396
397
  className: "font-medium",
397
- children: new Date(V.endDate).toLocaleDateString()
398
+ children: new Date(H.endDate).toLocaleDateString()
398
399
  })
399
400
  ]
400
401
  }),
401
- /* @__PURE__ */ p("div", {
402
+ /* @__PURE__ */ m("div", {
402
403
  className: "flex items-center gap-2",
403
404
  children: [
404
- /* @__PURE__ */ f(i, { className: "h-4 w-4 text-muted-foreground" }),
405
- /* @__PURE__ */ f("span", {
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__ */ f("span", {
410
+ /* @__PURE__ */ p("span", {
410
411
  className: "font-medium",
411
- children: V.createdAt ? new Date(V.createdAt).toLocaleDateString() : "—"
412
+ children: H.createdAt ? new Date(H.createdAt).toLocaleDateString() : "—"
412
413
  })
413
414
  ]
414
415
  })
415
416
  ]
416
417
  })] })]
417
418
  })]
418
- }) : /* @__PURE__ */ f("div", {
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 { A as GoalsObjectiveDetailPagePage };
425
+ export { j as GoalsObjectiveDetailPagePage };
425
426
 
426
427
  //# sourceMappingURL=GoalsObjectiveDetailPagePage.js.map