@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.
- package/dist/planmagnet/PlanMagnetRoot.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js +1 -1
- package/dist/planmagnet/PlanMagnetRoot.js.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.d.ts.map +1 -1
- package/dist/planmagnet/PlanMagnetRoutes.js +217 -209
- package/dist/planmagnet/PlanMagnetRoutes.js.map +1 -1
- package/dist/planmagnet/automation/AutomationRuleFields.d.ts.map +1 -1
- package/dist/planmagnet/automation/AutomationRuleFields.js +18 -18
- package/dist/planmagnet/automation/AutomationRuleFields.js.map +1 -1
- package/dist/planmagnet/pages/ProductsCreateProductPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsCreateProductPagePage.js +198 -99
- package/dist/planmagnet/pages/ProductsCreateProductPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js +272 -170
- package/dist/planmagnet/pages/ProductsEditProductPagePage.js.map +1 -1
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.d.ts +2 -0
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.d.ts.map +1 -0
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js +283 -0
- package/dist/planmagnet/pages/ProductsEditRoadmapPagePage.js.map +1 -0
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ProductsProductDetailPagePage.js +166 -246
- 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 +147 -117
- package/dist/planmagnet/pages/ProductsProductsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TasksCreateTaskPagePage.js +159 -124
- 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 +166 -128
- package/dist/planmagnet/pages/TasksEditTaskPagePage.js.map +1 -1
- package/dist/planmagnet/product/ProductControls.d.ts +52 -0
- package/dist/planmagnet/product/ProductControls.d.ts.map +1 -0
- package/dist/planmagnet/product/ProductControls.js +780 -0
- package/dist/planmagnet/product/ProductControls.js.map +1 -0
- package/dist/planmagnet/roadmaps/RoadmapControls.d.ts.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.js +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.js.map +1 -1
- package/dist/planmagnet/utils/formValidation.d.ts +11 -0
- package/dist/planmagnet/utils/formValidation.d.ts.map +1 -1
- package/dist/planmagnet/utils/formValidation.js +13 -1
- package/dist/planmagnet/utils/formValidation.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,278 +1,380 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PersonName as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
22
|
-
|
|
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
|
-
`,
|
|
34
|
-
mutation
|
|
35
|
-
|
|
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
|
-
|
|
40
|
-
|
|
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
|
-
`,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"GetRoadmapDetail",
|
|
61
|
-
"GetRoadmapDetailPage"
|
|
76
|
+
"GetProducts",
|
|
77
|
+
"GetProductForEdit",
|
|
78
|
+
"GetProductDetail"
|
|
62
79
|
],
|
|
63
80
|
awaitRefetchQueries: !0
|
|
64
|
-
}), [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
-
|
|
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
|
|
79
|
-
id:
|
|
101
|
+
await n(M({ variables: {
|
|
102
|
+
id: O,
|
|
80
103
|
input: {
|
|
81
|
-
name:
|
|
82
|
-
description:
|
|
83
|
-
|
|
84
|
-
|
|
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
|
-
} })),
|
|
116
|
+
} })), L(!0);
|
|
87
117
|
} catch (e) {
|
|
88
|
-
|
|
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
|
|
121
|
+
return A && !k ? /* @__PURE__ */ g("div", {
|
|
99
122
|
className: "flex items-center justify-center p-12",
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
}) :
|
|
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: ",
|
|
104
|
-
}) :
|
|
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__ */
|
|
130
|
+
/* @__PURE__ */ _("div", {
|
|
108
131
|
className: "flex items-center justify-between",
|
|
109
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ _("div", {
|
|
110
133
|
className: "flex items-center gap-3",
|
|
111
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ g(v, {
|
|
112
135
|
variant: "ghost",
|
|
113
136
|
size: "sm",
|
|
114
|
-
onClick: () =>
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
142
|
+
}), /* @__PURE__ */ _("p", {
|
|
120
143
|
className: "text-sm text-muted-foreground",
|
|
121
|
-
children: ["Editing ",
|
|
144
|
+
children: ["Editing ", R.name]
|
|
122
145
|
})] })]
|
|
123
|
-
}), /* @__PURE__ */
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
168
|
+
children: P
|
|
139
169
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ _("div", {
|
|
141
171
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ _("div", {
|
|
143
173
|
className: "lg:col-span-2 space-y-6",
|
|
144
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
177
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
148
178
|
className: "text-sm font-medium",
|
|
149
179
|
children: "Product Name"
|
|
150
|
-
}), /* @__PURE__ */
|
|
151
|
-
value:
|
|
152
|
-
onChange: (e) =>
|
|
153
|
-
...
|
|
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__ */
|
|
188
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
159
189
|
className: "text-sm font-medium",
|
|
160
190
|
children: "Description"
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
-
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[
|
|
163
|
-
value:
|
|
164
|
-
onChange: (e) =>
|
|
165
|
-
...
|
|
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__ */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
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__ */
|
|
221
|
+
] }),
|
|
222
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
177
223
|
className: "text-sm font-medium",
|
|
178
|
-
children: "
|
|
179
|
-
}), /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
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
|
-
|
|
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:
|
|
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__ */
|
|
316
|
+
/* @__PURE__ */ _("div", {
|
|
198
317
|
className: "flex items-center gap-2",
|
|
199
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ g(d, { className: "h-4 w-4 text-primary" }), /* @__PURE__ */ g("span", {
|
|
200
319
|
className: "font-medium",
|
|
201
|
-
children:
|
|
320
|
+
children: R.name
|
|
202
321
|
})]
|
|
203
322
|
}),
|
|
204
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ _("div", {
|
|
205
324
|
className: "flex justify-between",
|
|
206
|
-
children: [/* @__PURE__ */
|
|
325
|
+
children: [/* @__PURE__ */ g("span", {
|
|
207
326
|
className: "text-muted-foreground",
|
|
208
|
-
children: "
|
|
209
|
-
}), /* @__PURE__ */
|
|
210
|
-
className: "font-medium",
|
|
211
|
-
children:
|
|
327
|
+
children: "Lifecycle stage"
|
|
328
|
+
}), /* @__PURE__ */ g("span", {
|
|
329
|
+
className: "font-medium capitalize",
|
|
330
|
+
children: i(R.lifecycleStage)
|
|
212
331
|
})]
|
|
213
332
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ _("div", {
|
|
215
334
|
className: "flex justify-between",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ g("span", {
|
|
217
336
|
className: "text-muted-foreground",
|
|
218
|
-
children: "
|
|
219
|
-
}), /* @__PURE__ */
|
|
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:
|
|
340
|
+
children: R.archivedAt ? "Archived" : "Active"
|
|
229
341
|
})]
|
|
230
342
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ _("div", {
|
|
232
344
|
className: "flex justify-between",
|
|
233
|
-
children: [/* @__PURE__ */
|
|
345
|
+
children: [/* @__PURE__ */ g("span", {
|
|
234
346
|
className: "text-muted-foreground",
|
|
235
347
|
children: "Owner"
|
|
236
|
-
}), /* @__PURE__ */
|
|
348
|
+
}), /* @__PURE__ */ g("span", {
|
|
237
349
|
className: "font-medium",
|
|
238
|
-
children: /* @__PURE__ */
|
|
350
|
+
children: /* @__PURE__ */ g(t, { id: R.ownerId })
|
|
239
351
|
})]
|
|
240
352
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ _("div", {
|
|
242
354
|
className: "flex justify-between",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ g("span", {
|
|
244
356
|
className: "text-muted-foreground",
|
|
245
357
|
children: "Created"
|
|
246
|
-
}), /* @__PURE__ */
|
|
358
|
+
}), /* @__PURE__ */ g("span", { children: new Date(R.createdAt).toLocaleDateString() })]
|
|
247
359
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ _("div", {
|
|
249
361
|
className: "flex justify-between",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ g("span", {
|
|
251
363
|
className: "text-muted-foreground",
|
|
252
364
|
children: "Updated"
|
|
253
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ g("span", { children: new Date(R.updatedAt).toLocaleDateString() })]
|
|
254
366
|
})
|
|
255
367
|
]
|
|
256
|
-
})] })
|
|
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__ */
|
|
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 {
|
|
378
|
+
export { O as ProductsEditProductPagePage };
|
|
277
379
|
|
|
278
380
|
//# sourceMappingURL=ProductsEditProductPagePage.js.map
|