@burdenoff/microfe-planmagnet 2026.928.9 → 2026.928.11

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 (43) hide show
  1. package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
  2. package/dist/planmagnet/PlanMagnetRoot.js +1 -1
  3. package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
  4. package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
  5. package/dist/planmagnet/PlanMagnetRoutes.js +217 -209
  6. package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
  7. package/dist/planmagnet/automation/AutomationRuleFields.d.ts.map +1 -1
  8. package/dist/planmagnet/automation/AutomationRuleFields.js +18 -18
  9. package/dist/planmagnet/automation/AutomationRuleFields.js.map +1 -1
  10. package/dist/planmagnet/pages/ProductsCreateProductPagePage.d.ts.map +1 -1
  11. package/dist/planmagnet/pages/ProductsCreateProductPagePage.js +198 -99
  12. package/dist/planmagnet/pages/ProductsCreateProductPagePage.js.map +1 -1
  13. package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
  14. package/dist/planmagnet/pages/ProductsEditProductPagePage.js +272 -170
  15. package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
  16. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.d.ts +2 -0
  17. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.d.ts.map +1 -0
  18. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +283 -0
  19. package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js.map +1 -0
  20. package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
  21. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +166 -246
  22. package/dist/planmagnet/pages/ProductsProductDetailPagePage.js.map +1 -1
  23. package/dist/planmagnet/pages/ProductsProductsPagePage.d.ts.map +1 -1
  24. package/dist/planmagnet/pages/ProductsProductsPagePage.js +147 -117
  25. package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
  26. package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
  27. package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +159 -124
  28. package/dist/planmagnet/pages/TasksCreateTaskPagePage.js.map +1 -1
  29. package/dist/planmagnet/pages/TasksEditTaskPagePage.d.ts.map +1 -1
  30. package/dist/planmagnet/pages/TasksEditTaskPagePage.js +166 -128
  31. package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
  32. package/dist/planmagnet/product/ProductControls.d.ts +52 -0
  33. package/dist/planmagnet/product/ProductControls.d.ts.map +1 -0
  34. package/dist/planmagnet/product/ProductControls.js +780 -0
  35. package/dist/planmagnet/product/ProductControls.js.map +1 -0
  36. package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
  37. package/dist/planmagnet/roadmaps/RoadmapControls.js +1 -1
  38. package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
  39. package/dist/planmagnet/utils/formValidation.d.ts +11 -0
  40. package/dist/planmagnet/utils/formValidation.d.ts.map +1 -1
  41. package/dist/planmagnet/utils/formValidation.js +13 -1
  42. package/dist/planmagnet/utils/formValidation.js.map +1 -1
  43. package/package.json +1 -1
@@ -1,278 +1,380 @@
1
- import { usePlanMagnet as e, usePlanMagnetNavigate as t } from "../providers/PlanMagnetProvider.js";
2
- import { PersonName as n } from "../people/People.js";
3
- import { LEAVES_PAGE_CONTEXT as r, throwOnError as i } from "../utils/mutationResult.js";
4
- import { ConfirmButton as a } from "../controls/ConfirmButton.js";
5
- import { PlanningFocusBadge as o, PlanningFocusSelect as s } from "../roadmaps/planningFocus.js";
6
- import { useMemo as c, useState as l } from "react";
7
- import { ArrowLeft as u, Loader2 as d, Package as f, Save as p, Trash2 as m } from "lucide-react";
8
- import { useParams as h } from "react-router";
9
- import { gql as g } from "@apollo/client";
10
- import { useMutation as _, useQuery as v } from "@apollo/client/react";
11
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
12
- import { Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, Input as E } from "@burdenoff/fe-libs/ui";
1
+ import { usePlanMagnetNavigate as e } from "../providers/PlanMagnetProvider.js";
2
+ import { PersonName as t } from "../people/People.js";
3
+ import { throwOnError as n } from "../utils/mutationResult.js";
4
+ import { useEntityId as r } from "../hooks/useEntityId.js";
5
+ import { enumLabel as i } from "../controls/WorkItemControls.js";
6
+ import { detailPath as a } from "../utils/rowNavigation.js";
7
+ import { ProductHeaderActions as o } from "../product/ProductControls.js";
8
+ import { useMemo as s, useState as c } from "react";
9
+ import { ArrowLeft as l, Loader2 as u, Package as d, Save as f } from "lucide-react";
10
+ import { gql as p } from "@apollo/client";
11
+ import { useMutation as m, useQuery as h } from "@apollo/client/react";
12
+ import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
+ import { Button as v, Card as y, CardContent as b, CardHeader as x, CardTitle as S, Input as C } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/planmagnet/pages/ProductsEditProductPagePage.tsx
14
- var D = g`
15
- query GetRoadmapForEdit($id: ID!) {
16
- planmagnetRoadmap(id: $id) {
15
+ var w = [
16
+ "CONCEPT",
17
+ "DEVELOPMENT",
18
+ "BETA",
19
+ "LAUNCHED",
20
+ "MATURE",
21
+ "DEPRECATED"
22
+ ], T = p`
23
+ query GetProductForEdit($id: ID!) {
24
+ planmagnetProduct(id: $id) {
17
25
  id
18
26
  workspaceId
19
27
  name
20
28
  description
21
- type
22
- planningFocus
23
- isPublic
29
+ vision
30
+ lifecycleStage
24
31
  ownerId
32
+ archivedAt
33
+ northStar {
34
+ name
35
+ unit
36
+ target
37
+ current
38
+ window
39
+ }
25
40
  createdAt
26
41
  updatedAt
27
- items {
28
- id
29
- status
30
- }
31
42
  }
32
43
  }
33
- `, O = g`
34
- mutation UpdateRoadmap($id: ID!, $input: PlanmagnetUpdateRoadmapInput!) {
35
- planmagnetUpdateRoadmap(id: $id, input: $input) {
44
+ `, E = p`
45
+ mutation UpdateProduct($id: ID!, $input: PlanmagnetUpdateProductInput!) {
46
+ planmagnetUpdateProduct(id: $id, input: $input) {
36
47
  id
37
48
  name
38
49
  description
39
- type
40
- planningFocus
41
- isPublic
50
+ vision
51
+ lifecycleStage
42
52
  ownerId
53
+ northStar {
54
+ name
55
+ unit
56
+ target
57
+ current
58
+ window
59
+ }
43
60
  updatedAt
44
61
  }
45
62
  }
46
- `, k = g`
47
- mutation DeleteRoadmap($id: ID!) {
48
- planmagnetDeleteRoadmap(id: $id)
49
- }
50
- `;
51
- function A() {
52
- let { workspaceId: g } = e(), A = t(), j = h().id ?? "", { data: M, loading: N, error: P } = v(D, {
53
- variables: { id: j },
54
- skip: !j
55
- }), [F, { loading: I }] = _(O, {
63
+ `, D = {
64
+ name: "",
65
+ unit: "",
66
+ target: "",
67
+ current: "",
68
+ window: ""
69
+ };
70
+ function O() {
71
+ let p = e(), O = r("productId") ?? "", { data: k, loading: A, error: j } = h(T, {
72
+ variables: { id: O },
73
+ skip: !O
74
+ }), [M, { loading: N }] = m(E, {
56
75
  refetchQueries: [
57
- "ListRoadmaps",
58
- "ListRoadmapsPage",
59
- "GetRoadmapForEdit",
60
- "GetRoadmapDetail",
61
- "GetRoadmapDetailPage"
76
+ "GetProducts",
77
+ "GetProductForEdit",
78
+ "GetProductDetail"
62
79
  ],
63
80
  awaitRefetchQueries: !0
64
- }), [L, { loading: R }] = _(k, {
65
- refetchQueries: ["ListRoadmaps", "ListRoadmapsPage"],
66
- context: r
67
- }), [z, B] = l(null), [V, H] = l(!1), U = M?.planmagnetRoadmap, W = c(() => ({
68
- name: U?.name ?? "",
69
- description: U?.description ?? "",
70
- planningFocus: U?.planningFocus ?? null,
71
- isPublic: U?.isPublic ?? !1
72
- }), [U]), [G, K] = l({}), q = {
73
- ...W,
81
+ }), [P, F] = c(null), [I, L] = c(!1), R = k?.planmagnetProduct, z = s(() => ({
82
+ name: R?.name ?? "",
83
+ description: R?.description ?? "",
84
+ vision: R?.vision ?? "",
85
+ lifecycleStage: R?.lifecycleStage ?? "CONCEPT"
86
+ }), [R]), B = s(() => R?.northStar ? {
87
+ name: R.northStar.name,
88
+ unit: R.northStar.unit,
89
+ target: String(R.northStar.target),
90
+ current: String(R.northStar.current),
91
+ window: R.northStar.window
92
+ } : D, [R]), [V, H] = c({}), U = {
93
+ ...z,
94
+ ...V
95
+ }, W = (e) => H(e), [G, K] = c({}), q = {
96
+ ...B,
74
97
  ...G
75
- }, J = (e) => K(e), Y = async () => {
76
- B(null), H(!1);
98
+ }, J = (e) => K(e), Y = Object.values(q).some((e) => e.trim() !== ""), X = q.name.trim() && q.unit.trim() && q.window.trim() && q.target.trim() !== "" && !Number.isNaN(Number(q.target)) && q.current.trim() !== "" && !Number.isNaN(Number(q.current)), Z = U.vision.trim() === "", Q = U.name.trim() !== "" && !Z && (!Y || X), $ = async () => {
99
+ F(null), L(!1);
77
100
  try {
78
- await i(F({ variables: {
79
- id: j,
101
+ await n(M({ variables: {
102
+ id: O,
80
103
  input: {
81
- name: q.name,
82
- description: q.description.trim() || null,
83
- planningFocus: q.planningFocus,
84
- isPublic: q.isPublic
104
+ name: U.name,
105
+ description: U.description.trim() || null,
106
+ vision: U.vision,
107
+ lifecycleStage: U.lifecycleStage,
108
+ ...X ? { northStar: {
109
+ name: q.name,
110
+ unit: q.unit,
111
+ target: Number(q.target),
112
+ current: Number(q.current),
113
+ window: q.window
114
+ } } : {}
85
115
  }
86
- } })), H(!0);
116
+ } })), L(!0);
87
117
  } catch (e) {
88
- B(e instanceof Error ? e.message : "The product could not be saved.");
89
- }
90
- }, X = async () => {
91
- B(null);
92
- try {
93
- await i(L({ variables: { id: j } })), A("/products/products-page");
94
- } catch (e) {
95
- B(e instanceof Error ? e.message : "The product could not be deleted.");
118
+ F(e instanceof Error ? e.message : "The product could not be saved.");
96
119
  }
97
120
  };
98
- return N && !M ? /* @__PURE__ */ y("div", {
121
+ return A && !k ? /* @__PURE__ */ g("div", {
99
122
  className: "flex items-center justify-center p-12",
100
- children: /* @__PURE__ */ y(d, { className: "h-8 w-8 animate-spin text-muted-foreground" })
101
- }) : P ? /* @__PURE__ */ b("div", {
123
+ children: /* @__PURE__ */ g(u, { className: "h-8 w-8 animate-spin text-muted-foreground" })
124
+ }) : j ? /* @__PURE__ */ _("div", {
102
125
  className: "p-6 text-destructive",
103
- children: ["Failed to load product: ", P.message]
104
- }) : U ? /* @__PURE__ */ b("div", {
126
+ children: ["Failed to load product: ", j.message]
127
+ }) : R ? /* @__PURE__ */ _("div", {
105
128
  className: "space-y-6 p-6",
106
129
  children: [
107
- /* @__PURE__ */ b("div", {
130
+ /* @__PURE__ */ _("div", {
108
131
  className: "flex items-center justify-between",
109
- children: [/* @__PURE__ */ b("div", {
132
+ children: [/* @__PURE__ */ _("div", {
110
133
  className: "flex items-center gap-3",
111
- children: [/* @__PURE__ */ y(x, {
134
+ children: [/* @__PURE__ */ g(v, {
112
135
  variant: "ghost",
113
136
  size: "sm",
114
- onClick: () => A("/products/products-page"),
115
- children: /* @__PURE__ */ y(u, { className: "h-4 w-4" })
116
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("h1", {
137
+ onClick: () => p(a("/products/product-detail-page", R.id)),
138
+ children: /* @__PURE__ */ g(l, { className: "h-4 w-4" })
139
+ }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
117
140
  className: "text-2xl font-semibold",
118
141
  children: "Edit Product"
119
- }), /* @__PURE__ */ b("p", {
142
+ }), /* @__PURE__ */ _("p", {
120
143
  className: "text-sm text-muted-foreground",
121
- children: ["Editing ", U.name]
144
+ children: ["Editing ", R.name]
122
145
  })] })]
123
- }), /* @__PURE__ */ b(x, {
124
- size: "sm",
125
- onClick: Y,
126
- disabled: I,
127
- children: [I ? /* @__PURE__ */ y(d, { className: "mr-1 h-4 w-4 animate-spin" }) : /* @__PURE__ */ y(p, { className: "mr-1 h-4 w-4" }), "Save Changes"]
146
+ }), /* @__PURE__ */ _("div", {
147
+ className: "flex items-center gap-2",
148
+ children: [/* @__PURE__ */ _(v, {
149
+ size: "sm",
150
+ onClick: () => void $(),
151
+ disabled: N || !Q,
152
+ children: [N ? /* @__PURE__ */ g(u, { className: "mr-1 h-4 w-4 animate-spin" }) : /* @__PURE__ */ g(f, { className: "mr-1 h-4 w-4" }), "Save Changes"]
153
+ }), /* @__PURE__ */ g(o, {
154
+ productId: R.id,
155
+ name: R.name,
156
+ archivedAt: R.archivedAt
157
+ })]
128
158
  })]
129
159
  }),
130
- V && /* @__PURE__ */ y("div", {
160
+ I && /* @__PURE__ */ g("div", {
131
161
  role: "status",
132
162
  className: "p-3 bg-muted text-status-success-text rounded-md text-sm",
133
163
  children: "Changes saved."
134
164
  }),
135
- z && /* @__PURE__ */ y("div", {
165
+ P && /* @__PURE__ */ g("div", {
136
166
  role: "alert",
137
167
  className: "p-3 rounded-md bg-destructive/10 text-destructive text-sm",
138
- children: z
168
+ children: P
139
169
  }),
140
- /* @__PURE__ */ b("div", {
170
+ /* @__PURE__ */ _("div", {
141
171
  className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
142
- children: [/* @__PURE__ */ y("div", {
172
+ children: [/* @__PURE__ */ _("div", {
143
173
  className: "lg:col-span-2 space-y-6",
144
- children: /* @__PURE__ */ b(S, { children: [/* @__PURE__ */ y(w, { children: /* @__PURE__ */ y(T, { children: "Basic Information" }) }), /* @__PURE__ */ b(C, {
174
+ children: [/* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g(x, { children: /* @__PURE__ */ g(S, { children: "Basic Information" }) }), /* @__PURE__ */ _(b, {
145
175
  className: "space-y-4",
146
176
  children: [
147
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
177
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
148
178
  className: "text-sm font-medium",
149
179
  children: "Product Name"
150
- }), /* @__PURE__ */ y(E, {
151
- value: q.name,
152
- onChange: (e) => J({
153
- ...q,
180
+ }), /* @__PURE__ */ g(C, {
181
+ value: U.name,
182
+ onChange: (e) => W({
183
+ ...U,
154
184
  name: e.target.value
155
185
  }),
156
186
  className: "mt-1"
157
187
  })] }),
158
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
188
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
159
189
  className: "text-sm font-medium",
160
190
  children: "Description"
161
- }), /* @__PURE__ */ y("textarea", {
162
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
163
- value: q.description,
164
- onChange: (e) => J({
165
- ...q,
191
+ }), /* @__PURE__ */ g("textarea", {
192
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[60px]",
193
+ value: U.description,
194
+ onChange: (e) => W({
195
+ ...U,
166
196
  description: e.target.value
167
197
  })
168
198
  })] }),
169
- /* @__PURE__ */ y(s, {
170
- value: q.planningFocus,
171
- onChange: (e) => J({
172
- ...q,
173
- planningFocus: e
199
+ /* @__PURE__ */ _("div", { children: [
200
+ /* @__PURE__ */ g("label", {
201
+ htmlFor: "product-edit-vision",
202
+ className: "text-sm font-medium",
203
+ children: "Vision *"
204
+ }),
205
+ /* @__PURE__ */ g("textarea", {
206
+ id: "product-edit-vision",
207
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
208
+ value: U.vision,
209
+ "aria-invalid": Z,
210
+ "aria-describedby": Z ? "product-edit-vision-hint" : void 0,
211
+ onChange: (e) => W({
212
+ ...U,
213
+ vision: e.target.value
214
+ })
215
+ }),
216
+ Z && /* @__PURE__ */ g("p", {
217
+ id: "product-edit-vision-hint",
218
+ className: "mt-1 text-xs text-muted-foreground",
219
+ children: "Add a vision to save changes."
174
220
  })
175
- }),
176
- /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
221
+ ] }),
222
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
177
223
  className: "text-sm font-medium",
178
- children: "Visibility"
179
- }), /* @__PURE__ */ y("div", {
180
- className: "mt-1 flex gap-2",
181
- children: [!1, !0].map((e) => /* @__PURE__ */ y("button", {
182
- onClick: () => J({
183
- ...q,
184
- isPublic: e
185
- }),
186
- className: `rounded-md px-3 py-1.5 text-sm ${q.isPublic === e ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"}`,
187
- children: e ? "Public" : "Private"
188
- }, String(e)))
224
+ children: "Lifecycle Stage"
225
+ }), /* @__PURE__ */ g("select", {
226
+ "aria-label": "Lifecycle stage",
227
+ "data-testid": "product-lifecycle-stage",
228
+ className: "mt-1 w-full rounded-md border border-input bg-background px-2 py-1.5 text-sm",
229
+ value: U.lifecycleStage,
230
+ onChange: (e) => W({
231
+ ...U,
232
+ lifecycleStage: e.target.value
233
+ }),
234
+ children: w.map((e) => /* @__PURE__ */ g("option", {
235
+ value: e,
236
+ children: i(e)
237
+ }, e))
189
238
  })] })
190
239
  ]
191
- })] })
192
- }), /* @__PURE__ */ b("div", {
240
+ })] }), /* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g(x, { children: /* @__PURE__ */ g(S, { children: "North Star metric" }) }), /* @__PURE__ */ _(b, {
241
+ className: "space-y-4",
242
+ children: [/* @__PURE__ */ _("div", {
243
+ className: "grid grid-cols-2 gap-4",
244
+ children: [
245
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
246
+ className: "text-sm font-medium",
247
+ children: "Metric name"
248
+ }), /* @__PURE__ */ g(C, {
249
+ value: q.name,
250
+ onChange: (e) => J({
251
+ ...q,
252
+ name: e.target.value
253
+ }),
254
+ className: "mt-1"
255
+ })] }),
256
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
257
+ className: "text-sm font-medium",
258
+ children: "Unit"
259
+ }), /* @__PURE__ */ g(C, {
260
+ value: q.unit,
261
+ onChange: (e) => J({
262
+ ...q,
263
+ unit: e.target.value
264
+ }),
265
+ className: "mt-1"
266
+ })] }),
267
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
268
+ className: "text-sm font-medium",
269
+ children: "Target"
270
+ }), /* @__PURE__ */ g(C, {
271
+ type: "number",
272
+ value: q.target,
273
+ onChange: (e) => J({
274
+ ...q,
275
+ target: e.target.value
276
+ }),
277
+ className: "mt-1"
278
+ })] }),
279
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
280
+ className: "text-sm font-medium",
281
+ children: "Current"
282
+ }), /* @__PURE__ */ g(C, {
283
+ type: "number",
284
+ value: q.current,
285
+ onChange: (e) => J({
286
+ ...q,
287
+ current: e.target.value
288
+ }),
289
+ className: "mt-1"
290
+ })] }),
291
+ /* @__PURE__ */ _("div", {
292
+ className: "col-span-2",
293
+ children: [/* @__PURE__ */ g("label", {
294
+ className: "text-sm font-medium",
295
+ children: "Window"
296
+ }), /* @__PURE__ */ g(C, {
297
+ value: q.window,
298
+ onChange: (e) => J({
299
+ ...q,
300
+ window: e.target.value
301
+ }),
302
+ className: "mt-1"
303
+ })]
304
+ })
305
+ ]
306
+ }), Y && !X && /* @__PURE__ */ g("p", {
307
+ className: "text-xs text-destructive",
308
+ children: "Fill in every North Star field (or clear them all) — name, unit, target, current and window are all required together."
309
+ })]
310
+ })] })]
311
+ }), /* @__PURE__ */ g("div", {
193
312
  className: "space-y-6",
194
- children: [/* @__PURE__ */ b(S, { children: [/* @__PURE__ */ y(w, { children: /* @__PURE__ */ y(T, { children: "Product Info" }) }), /* @__PURE__ */ b(C, {
313
+ children: /* @__PURE__ */ _(y, { children: [/* @__PURE__ */ g(x, { children: /* @__PURE__ */ g(S, { children: "Product Info" }) }), /* @__PURE__ */ _(b, {
195
314
  className: "space-y-3 text-sm",
196
315
  children: [
197
- /* @__PURE__ */ b("div", {
316
+ /* @__PURE__ */ _("div", {
198
317
  className: "flex items-center gap-2",
199
- children: [/* @__PURE__ */ y(f, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ y("span", {
318
+ children: [/* @__PURE__ */ g(d, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ g("span", {
200
319
  className: "font-medium",
201
- children: U.name
320
+ children: R.name
202
321
  })]
203
322
  }),
204
- /* @__PURE__ */ b("div", {
323
+ /* @__PURE__ */ _("div", {
205
324
  className: "flex justify-between",
206
- children: [/* @__PURE__ */ y("span", {
325
+ children: [/* @__PURE__ */ g("span", {
207
326
  className: "text-muted-foreground",
208
- children: "Items"
209
- }), /* @__PURE__ */ y("span", {
210
- className: "font-medium",
211
- children: U.items?.length ?? 0
327
+ children: "Lifecycle stage"
328
+ }), /* @__PURE__ */ g("span", {
329
+ className: "font-medium capitalize",
330
+ children: i(R.lifecycleStage)
212
331
  })]
213
332
  }),
214
- /* @__PURE__ */ b("div", {
333
+ /* @__PURE__ */ _("div", {
215
334
  className: "flex justify-between",
216
- children: [/* @__PURE__ */ y("span", {
335
+ children: [/* @__PURE__ */ g("span", {
217
336
  className: "text-muted-foreground",
218
- children: "Planning focus"
219
- }), /* @__PURE__ */ y(o, { focus: U.planningFocus })]
220
- }),
221
- /* @__PURE__ */ b("div", {
222
- className: "flex justify-between",
223
- children: [/* @__PURE__ */ y("span", {
224
- className: "text-muted-foreground",
225
- children: "Visibility"
226
- }), /* @__PURE__ */ y("span", {
337
+ children: "Status"
338
+ }), /* @__PURE__ */ g("span", {
227
339
  className: "font-medium",
228
- children: U.isPublic ? "Public" : "Private"
340
+ children: R.archivedAt ? "Archived" : "Active"
229
341
  })]
230
342
  }),
231
- /* @__PURE__ */ b("div", {
343
+ /* @__PURE__ */ _("div", {
232
344
  className: "flex justify-between",
233
- children: [/* @__PURE__ */ y("span", {
345
+ children: [/* @__PURE__ */ g("span", {
234
346
  className: "text-muted-foreground",
235
347
  children: "Owner"
236
- }), /* @__PURE__ */ y("span", {
348
+ }), /* @__PURE__ */ g("span", {
237
349
  className: "font-medium",
238
- children: /* @__PURE__ */ y(n, { id: U.ownerId })
350
+ children: /* @__PURE__ */ g(t, { id: R.ownerId })
239
351
  })]
240
352
  }),
241
- /* @__PURE__ */ b("div", {
353
+ /* @__PURE__ */ _("div", {
242
354
  className: "flex justify-between",
243
- children: [/* @__PURE__ */ y("span", {
355
+ children: [/* @__PURE__ */ g("span", {
244
356
  className: "text-muted-foreground",
245
357
  children: "Created"
246
- }), /* @__PURE__ */ y("span", { children: new Date(U.createdAt).toLocaleDateString() })]
358
+ }), /* @__PURE__ */ g("span", { children: new Date(R.createdAt).toLocaleDateString() })]
247
359
  }),
248
- /* @__PURE__ */ b("div", {
360
+ /* @__PURE__ */ _("div", {
249
361
  className: "flex justify-between",
250
- children: [/* @__PURE__ */ y("span", {
362
+ children: [/* @__PURE__ */ g("span", {
251
363
  className: "text-muted-foreground",
252
364
  children: "Updated"
253
- }), /* @__PURE__ */ y("span", { children: new Date(U.updatedAt).toLocaleDateString() })]
365
+ }), /* @__PURE__ */ g("span", { children: new Date(R.updatedAt).toLocaleDateString() })]
254
366
  })
255
367
  ]
256
- })] }), /* @__PURE__ */ b(S, { children: [/* @__PURE__ */ y(w, { children: /* @__PURE__ */ y(T, { children: "Danger Zone" }) }), /* @__PURE__ */ y(C, { children: /* @__PURE__ */ y(a, {
257
- label: R ? "Deleting…" : "Delete product",
258
- variant: "outline",
259
- icon: /* @__PURE__ */ y(m, { className: "mr-1 h-4 w-4" }),
260
- title: `Delete ${U.name}?`,
261
- description: "The product's roadmap and its items are deleted. This cannot be undone here.",
262
- confirmLabel: "Delete product",
263
- destructive: !0,
264
- disabled: R,
265
- onConfirm: () => void X()
266
- }) })] })]
368
+ })] })
267
369
  })]
268
370
  })
269
371
  ]
270
- }) : /* @__PURE__ */ y("div", {
372
+ }) : /* @__PURE__ */ g("div", {
271
373
  className: "p-6 text-muted-foreground",
272
374
  children: "No product found."
273
375
  });
274
376
  }
275
377
  //#endregion
276
- export { A as ProductsEditProductPagePage };
378
+ export { O as ProductsEditProductPagePage };
277
379
 
278
380
  //# sourceMappingURL=ProductsEditProductPagePage.js.map