@burdenoff/microfe-planmagnet 2026.923.3 → 2026.923.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsCreateReportPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ReportsCreateReportPagePage.tsx"],"names":[],"mappings":"AAgCA,wBAAgB,2BAA2B,4CA8I1C"}
1
+ {"version":3,"file":"ReportsCreateReportPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ReportsCreateReportPagePage.tsx"],"names":[],"mappings":"AAgCA,wBAAgB,2BAA2B,4CAqJ1C"}
@@ -52,119 +52,128 @@ function _() {
52
52
  children: ["Error: ", b.message]
53
53
  }) : /* @__PURE__ */ l("div", {
54
54
  className: "space-y-6 p-6 max-w-4xl",
55
- children: [/* @__PURE__ */ l("div", {
56
- className: "flex items-center justify-between",
57
- children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
58
- className: "text-2xl font-semibold",
59
- children: "Create Report"
60
- }), /* @__PURE__ */ c("p", {
61
- className: "text-sm text-muted-foreground",
62
- children: "Configure a new automated report."
63
- })] }), /* @__PURE__ */ l("div", {
64
- className: "flex gap-2",
65
- children: [/* @__PURE__ */ l(u, {
66
- variant: "outline",
67
- size: "sm",
68
- onClick: () => _("/reports"),
69
- children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
70
- }), /* @__PURE__ */ l(u, {
71
- size: "sm",
72
- onClick: () => {
73
- x.name.trim() && _("/reports");
74
- },
75
- children: [/* @__PURE__ */ c(i, { className: "mr-1 h-4 w-4" }), "Create Report"]
55
+ children: [
56
+ /* @__PURE__ */ l("div", {
57
+ className: "flex items-center justify-between",
58
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
59
+ className: "text-2xl font-semibold",
60
+ children: "Create Report"
61
+ }), /* @__PURE__ */ c("p", {
62
+ className: "text-sm text-muted-foreground",
63
+ children: "Configure a new automated report."
64
+ })] }), /* @__PURE__ */ l("div", {
65
+ className: "flex gap-2",
66
+ children: [/* @__PURE__ */ l(u, {
67
+ variant: "outline",
68
+ size: "sm",
69
+ onClick: () => _("/reports"),
70
+ children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
71
+ }), /* @__PURE__ */ l(u, {
72
+ size: "sm",
73
+ disabled: !0,
74
+ title: "Not available yet — see the notice below",
75
+ children: [/* @__PURE__ */ c(i, { className: "mr-1 h-4 w-4" }), "Create Report"]
76
+ })]
76
77
  })]
77
- })]
78
- }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
79
- className: "flex items-center gap-2",
80
- children: [/* @__PURE__ */ c(r, { className: "h-4 w-4" }), "Report Configuration"]
81
- }) }), /* @__PURE__ */ l(f, {
82
- className: "space-y-4",
83
- children: [
84
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
85
- className: "text-sm font-medium",
86
- children: "Report Name"
87
- }), /* @__PURE__ */ c(h, {
88
- value: x.name,
89
- onChange: (e) => S({
90
- ...x,
91
- name: e.target.value
92
- }),
93
- className: "mt-1",
94
- placeholder: "e.g. Sprint Velocity Report"
95
- })] }),
96
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
97
- className: "text-sm font-medium",
98
- children: "Description"
99
- }), /* @__PURE__ */ c("textarea", {
100
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
101
- value: x.description,
102
- onChange: (e) => S({
103
- ...x,
104
- description: e.target.value
105
- }),
106
- placeholder: "What does this report track?"
107
- })] }),
108
- /* @__PURE__ */ l("div", {
109
- className: "grid grid-cols-3 gap-4",
110
- children: [
111
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
112
- className: "text-sm font-medium",
113
- children: "Type"
114
- }), /* @__PURE__ */ c("select", {
115
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
116
- value: x.type,
117
- onChange: (e) => S({
118
- ...x,
119
- type: e.target.value
120
- }),
121
- children: C.map((e) => /* @__PURE__ */ c("option", {
122
- value: e,
123
- children: e.replace("_", " ")
124
- }, e))
125
- })] }),
126
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
127
- className: "text-sm font-medium",
128
- children: "Project (optional)"
129
- }), /* @__PURE__ */ l("select", {
130
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
131
- value: x.projectId,
132
- onChange: (e) => S({
133
- ...x,
134
- projectId: e.target.value
135
- }),
136
- children: [/* @__PURE__ */ c("option", {
137
- value: "",
138
- children: "All projects"
139
- }), T.map((e) => /* @__PURE__ */ l("option", {
140
- value: e.id,
141
- children: [
142
- e.name,
143
- " (",
144
- e.key,
145
- ")"
146
- ]
147
- }, e.id))]
148
- })] }),
149
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
150
- className: "text-sm font-medium",
151
- children: "Schedule"
152
- }), /* @__PURE__ */ c("select", {
153
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
154
- value: x.schedule,
155
- onChange: (e) => S({
156
- ...x,
157
- schedule: e.target.value
158
- }),
159
- children: w.map((e) => /* @__PURE__ */ c("option", {
160
- value: e,
161
- children: e
162
- }, e))
163
- })] })
164
- ]
165
- })
166
- ]
167
- })] })]
78
+ }),
79
+ /* @__PURE__ */ l("div", {
80
+ className: "rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground",
81
+ children: [/* @__PURE__ */ c("strong", {
82
+ className: "text-foreground",
83
+ children: "Not available yet."
84
+ }), " Reports cannot be saved — there is no report model behind this form. It is shown so the fields and options are visible, but nothing entered here is stored. This page previously returned you to the list on submit, which looked like it had saved."]
85
+ }),
86
+ /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
87
+ className: "flex items-center gap-2",
88
+ children: [/* @__PURE__ */ c(r, { className: "h-4 w-4" }), "Report Configuration"]
89
+ }) }), /* @__PURE__ */ l(f, {
90
+ className: "space-y-4",
91
+ children: [
92
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
93
+ className: "text-sm font-medium",
94
+ children: "Report Name"
95
+ }), /* @__PURE__ */ c(h, {
96
+ value: x.name,
97
+ onChange: (e) => S({
98
+ ...x,
99
+ name: e.target.value
100
+ }),
101
+ className: "mt-1",
102
+ placeholder: "e.g. Sprint Velocity Report"
103
+ })] }),
104
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
105
+ className: "text-sm font-medium",
106
+ children: "Description"
107
+ }), /* @__PURE__ */ c("textarea", {
108
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
109
+ value: x.description,
110
+ onChange: (e) => S({
111
+ ...x,
112
+ description: e.target.value
113
+ }),
114
+ placeholder: "What does this report track?"
115
+ })] }),
116
+ /* @__PURE__ */ l("div", {
117
+ className: "grid grid-cols-3 gap-4",
118
+ children: [
119
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
120
+ className: "text-sm font-medium",
121
+ children: "Type"
122
+ }), /* @__PURE__ */ c("select", {
123
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
124
+ value: x.type,
125
+ onChange: (e) => S({
126
+ ...x,
127
+ type: e.target.value
128
+ }),
129
+ children: C.map((e) => /* @__PURE__ */ c("option", {
130
+ value: e,
131
+ children: e.replace("_", " ")
132
+ }, e))
133
+ })] }),
134
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
135
+ className: "text-sm font-medium",
136
+ children: "Project (optional)"
137
+ }), /* @__PURE__ */ l("select", {
138
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
139
+ value: x.projectId,
140
+ onChange: (e) => S({
141
+ ...x,
142
+ projectId: e.target.value
143
+ }),
144
+ children: [/* @__PURE__ */ c("option", {
145
+ value: "",
146
+ children: "All projects"
147
+ }), T.map((e) => /* @__PURE__ */ l("option", {
148
+ value: e.id,
149
+ children: [
150
+ e.name,
151
+ " (",
152
+ e.key,
153
+ ")"
154
+ ]
155
+ }, e.id))]
156
+ })] }),
157
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
158
+ className: "text-sm font-medium",
159
+ children: "Schedule"
160
+ }), /* @__PURE__ */ c("select", {
161
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
162
+ value: x.schedule,
163
+ onChange: (e) => S({
164
+ ...x,
165
+ schedule: e.target.value
166
+ }),
167
+ children: w.map((e) => /* @__PURE__ */ c("option", {
168
+ value: e,
169
+ children: e
170
+ }, e))
171
+ })] })
172
+ ]
173
+ })
174
+ ]
175
+ })] })
176
+ ]
168
177
  });
169
178
  }
170
179
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"ReportsCreateReportPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ReportsCreateReportPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, BarChart3 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_REPORT = gql`\n query GetProjectsForReport($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function ReportsCreateReportPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_REPORT, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const [form, setForm] = useState({\n name: '',\n description: '',\n type: 'velocity',\n projectId: '',\n schedule: 'weekly',\n });\n const types = [\n 'velocity',\n 'burndown',\n 'burnup',\n 'cumulative_flow',\n 'cycle_time',\n 'lead_time',\n 'custom',\n ] as const;\n const schedules = ['daily', 'weekly', 'monthly'] as const;\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n const handleCreate = () => {\n if (!form.name.trim()) return;\n navigate('/reports');\n };\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Create Report</h1>\n <p className=\"text-sm text-muted-foreground\">Configure a new automated report.</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/reports')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" onClick={handleCreate}>\n <Save className=\"mr-1 h-4 w-4\" />\n Create Report\n </Button>\n </div>\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <BarChart3 className=\"h-4 w-4\" />\n Report Configuration\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Report Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. Sprint Velocity Report\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Description</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]\"\n value={form.description}\n onChange={(e) => setForm({ ...form, description: e.target.value })}\n placeholder=\"What does this report track?\"\n />\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Type</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.type}\n onChange={(e) => setForm({ ...form, type: e.target.value })}\n >\n {types.map((t) => (\n <option key={t} value={t}>\n {t.replace('_', ' ')}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Project (optional)</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">All projects</option>\n {projects.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.key})\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Schedule</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.schedule}\n onChange={(e) => setForm({ ...form, schedule: e.target.value })}\n >\n {schedules.map((s) => (\n <option key={s} value={s}>\n {s}\n </option>\n ))}\n </select>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAA0B,CAAG;;;;;;;;;;;;AAuBnC,SAAgB,IAA8B;CAC5C,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAyB;EAC/E,WAAW;GACT;GACA,YAAY,EAAE,OAAO,KAAK;GAC3B;EACD,MAAM,CAAC;EACR,CAAC,EAEI,CAAC,GAAM,KAAW,EAAS;EAC/B,MAAM;EACN,aAAa;EACb,MAAM;EACN,WAAW;EACX,UAAU;EACX,CAAC,EACI,IAAQ;EACZ;EACA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AAG;QAAM,UAAU,EAAE,OAAO;QAAO,CAAC;iBAE9D,EAAU,KAAK,MACd,kBAAC,UAAD;QAAgB,OAAO;kBACpB;QACM,EAFI,EAEJ,CACT;OACK,CAAA,CACL,EAAA,CAAA;MACF;;IACM;KACT,EAAA,CAAA,CACH"}
1
+ {"version":3,"file":"ReportsCreateReportPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/ReportsCreateReportPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, BarChart3 } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_REPORT = gql`\n query GetProjectsForReport($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function ReportsCreateReportPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_REPORT, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const [form, setForm] = useState({\n name: '',\n description: '',\n type: 'velocity',\n projectId: '',\n schedule: 'weekly',\n });\n const types = [\n 'velocity',\n 'burndown',\n 'burnup',\n 'cumulative_flow',\n 'cycle_time',\n 'lead_time',\n 'custom',\n ] as const;\n const schedules = ['daily', 'weekly', 'monthly'] as const;\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n // NOTE: there is no Report model in wspace-planmagnet-svc, so this form has nothing\n // to save to. It previously had a handler that navigated to '/reports' on submit,\n // which read as a successful save — the user filled the form, was redirected, and\n // nothing was persisted. The submit control is disabled until the model exists\n // (BOFF-7822); the notice above the form says so.\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Create Report</h1>\n <p className=\"text-sm text-muted-foreground\">Configure a new automated report.</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/reports')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" disabled title=\"Not available yet — see the notice below\">\n <Save className=\"mr-1 h-4 w-4\" />\n Create Report\n </Button>\n </div>\n </div>\n <div className=\"rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground\">\n <strong className=\"text-foreground\">Not available yet.</strong> Reports cannot be saved —\n there is no report model behind this form. It is shown so the fields and options are\n visible, but nothing entered here is stored. This page previously returned you to the list\n on submit, which looked like it had saved.\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <BarChart3 className=\"h-4 w-4\" />\n Report Configuration\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Report Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. Sprint Velocity Report\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Description</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]\"\n value={form.description}\n onChange={(e) => setForm({ ...form, description: e.target.value })}\n placeholder=\"What does this report track?\"\n />\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Type</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.type}\n onChange={(e) => setForm({ ...form, type: e.target.value })}\n >\n {types.map((t) => (\n <option key={t} value={t}>\n {t.replace('_', ' ')}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Project (optional)</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">All projects</option>\n {projects.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.key})\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Schedule</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.schedule}\n onChange={(e) => setForm({ ...form, schedule: e.target.value })}\n >\n {schedules.map((s) => (\n <option key={s} value={s}>\n {s}\n </option>\n ))}\n </select>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAA0B,CAAG;;;;;;;;;;;;AAuBnC,SAAgB,IAA8B;CAC5C,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAyB;EAC/E,WAAW;GACT;GACA,YAAY,EAAE,OAAO,KAAK;GAC3B;EACD,MAAM,CAAC;EACR,CAAC,EAEI,CAAC,GAAM,KAAW,EAAS;EAC/B,MAAM;EACN,aAAa;EACb,MAAM;EACN,WAAW;EACX,UAAU;EACX,CAAC,EACI,IAAQ;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACD,EACK,IAAY;EAAC;EAAS;EAAU;EAAU,EAE1C,IAAW,GAAM,oBAAoB,SAAS,EAAE;AAo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AO,CAAC;kBAE9D,EAAU,KAAK,MACd,kBAAC,UAAD;SAAgB,OAAO;mBACpB;SACM,EAFI,EAEJ,CACT;QACK,CAAA,CACL,EAAA,CAAA;OACF;;KACM;MACT,EAAA,CAAA;GACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"TeamCreateTeamPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TeamCreateTeamPagePage.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,sBAAsB,4CA0GrC"}
1
+ {"version":3,"file":"TeamCreateTeamPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TeamCreateTeamPagePage.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,sBAAsB,4CAiHrC"}
@@ -40,96 +40,105 @@ function _() {
40
40
  children: ["Error: ", S.message]
41
41
  }) : /* @__PURE__ */ l("div", {
42
42
  className: "space-y-6 p-6 max-w-4xl",
43
- children: [/* @__PURE__ */ l("div", {
44
- className: "flex items-center justify-between",
45
- children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
46
- className: "text-2xl font-semibold",
47
- children: "Create Team"
48
- }), /* @__PURE__ */ c("p", {
49
- className: "text-sm text-muted-foreground",
50
- children: "Set up a new team with members and a lead."
51
- })] }), /* @__PURE__ */ l("div", {
52
- className: "flex gap-2",
53
- children: [/* @__PURE__ */ l(u, {
54
- variant: "outline",
55
- size: "sm",
56
- onClick: () => _("/team"),
57
- children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
58
- }), /* @__PURE__ */ l(u, {
59
- size: "sm",
60
- onClick: () => {
61
- v.name.trim() && _("/team");
62
- },
63
- children: [/* @__PURE__ */ c(r, { className: "mr-1 h-4 w-4" }), "Create Team"]
43
+ children: [
44
+ /* @__PURE__ */ l("div", {
45
+ className: "flex items-center justify-between",
46
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
47
+ className: "text-2xl font-semibold",
48
+ children: "Create Team"
49
+ }), /* @__PURE__ */ c("p", {
50
+ className: "text-sm text-muted-foreground",
51
+ children: "Set up a new team with members and a lead."
52
+ })] }), /* @__PURE__ */ l("div", {
53
+ className: "flex gap-2",
54
+ children: [/* @__PURE__ */ l(u, {
55
+ variant: "outline",
56
+ size: "sm",
57
+ onClick: () => _("/team"),
58
+ children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
59
+ }), /* @__PURE__ */ l(u, {
60
+ size: "sm",
61
+ disabled: !0,
62
+ title: "Not available yet — see the notice below",
63
+ children: [/* @__PURE__ */ c(r, { className: "mr-1 h-4 w-4" }), "Create Team"]
64
+ })]
64
65
  })]
65
- })]
66
- }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
67
- className: "flex items-center gap-2",
68
- children: [/* @__PURE__ */ c(i, { className: "h-4 w-4" }), "Team Details"]
69
- }) }), /* @__PURE__ */ l(f, {
70
- className: "space-y-4",
71
- children: [
72
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
73
- className: "text-sm font-medium",
74
- children: "Team Name"
75
- }), /* @__PURE__ */ c(h, {
76
- value: v.name,
77
- onChange: (e) => y({
78
- ...v,
79
- name: e.target.value
80
- }),
81
- className: "mt-1",
82
- placeholder: "e.g. Platform Engineering"
83
- })] }),
84
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
85
- className: "text-sm font-medium",
86
- children: "Description"
87
- }), /* @__PURE__ */ c("textarea", {
88
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
89
- value: v.description,
90
- onChange: (e) => y({
91
- ...v,
92
- description: e.target.value
93
- }),
94
- placeholder: "Describe the team's mission and responsibilities..."
95
- })] }),
96
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
97
- className: "text-sm font-medium",
98
- children: "Team Lead"
99
- }), /* @__PURE__ */ c(h, {
100
- value: v.lead,
101
- onChange: (e) => y({
102
- ...v,
103
- lead: e.target.value
104
- }),
105
- className: "mt-1",
106
- placeholder: "Team lead name or email"
107
- })] }),
108
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
109
- className: "text-sm font-medium",
110
- children: "Associated Project (optional)"
111
- }), /* @__PURE__ */ l("select", {
112
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
113
- value: v.projectId,
114
- onChange: (e) => y({
115
- ...v,
116
- projectId: e.target.value
117
- }),
118
- children: [/* @__PURE__ */ c("option", {
119
- value: "",
120
- children: "No project"
121
- }), C.map((e) => /* @__PURE__ */ l("option", {
122
- value: e.id,
123
- children: [
124
- e.name,
125
- " (",
126
- e.key,
127
- ")"
128
- ]
129
- }, e.id))]
130
- })] })
131
- ]
132
- })] })]
66
+ }),
67
+ /* @__PURE__ */ l("div", {
68
+ className: "rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground",
69
+ children: [/* @__PURE__ */ c("strong", {
70
+ className: "text-foreground",
71
+ children: "Not available yet."
72
+ }), " Teams cannot be saved — there is no team model behind this form. It is shown so the fields and options are visible, but nothing entered here is stored. This page previously returned you to the list on submit, which looked like it had saved."]
73
+ }),
74
+ /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
75
+ className: "flex items-center gap-2",
76
+ children: [/* @__PURE__ */ c(i, { className: "h-4 w-4" }), "Team Details"]
77
+ }) }), /* @__PURE__ */ l(f, {
78
+ className: "space-y-4",
79
+ children: [
80
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
81
+ className: "text-sm font-medium",
82
+ children: "Team Name"
83
+ }), /* @__PURE__ */ c(h, {
84
+ value: v.name,
85
+ onChange: (e) => y({
86
+ ...v,
87
+ name: e.target.value
88
+ }),
89
+ className: "mt-1",
90
+ placeholder: "e.g. Platform Engineering"
91
+ })] }),
92
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
93
+ className: "text-sm font-medium",
94
+ children: "Description"
95
+ }), /* @__PURE__ */ c("textarea", {
96
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]",
97
+ value: v.description,
98
+ onChange: (e) => y({
99
+ ...v,
100
+ description: e.target.value
101
+ }),
102
+ placeholder: "Describe the team's mission and responsibilities..."
103
+ })] }),
104
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
105
+ className: "text-sm font-medium",
106
+ children: "Team Lead"
107
+ }), /* @__PURE__ */ c(h, {
108
+ value: v.lead,
109
+ onChange: (e) => y({
110
+ ...v,
111
+ lead: e.target.value
112
+ }),
113
+ className: "mt-1",
114
+ placeholder: "Team lead name or email"
115
+ })] }),
116
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
117
+ className: "text-sm font-medium",
118
+ children: "Associated Project (optional)"
119
+ }), /* @__PURE__ */ l("select", {
120
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
121
+ value: v.projectId,
122
+ onChange: (e) => y({
123
+ ...v,
124
+ projectId: e.target.value
125
+ }),
126
+ children: [/* @__PURE__ */ c("option", {
127
+ value: "",
128
+ children: "No project"
129
+ }), C.map((e) => /* @__PURE__ */ l("option", {
130
+ value: e.id,
131
+ children: [
132
+ e.name,
133
+ " (",
134
+ e.key,
135
+ ")"
136
+ ]
137
+ }, e.id))]
138
+ })] })
139
+ ]
140
+ })] })
141
+ ]
133
142
  });
134
143
  }
135
144
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"TeamCreateTeamPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TeamCreateTeamPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, Users } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_TEAM = gql`\n query GetProjectsForTeamCreation($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n ownerId\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n ownerId: string | null;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function TeamCreateTeamPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [form, setForm] = useState({ name: '', description: '', lead: '', projectId: '' });\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_TEAM, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n const handleCreate = () => {\n if (!form.name.trim()) return;\n navigate('/team');\n };\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Create Team</h1>\n <p className=\"text-sm text-muted-foreground\">\n Set up a new team with members and a lead.\n </p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/team')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" onClick={handleCreate}>\n <Save className=\"mr-1 h-4 w-4\" />\n Create Team\n </Button>\n </div>\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4\" />\n Team Details\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Team Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. Platform Engineering\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Description</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]\"\n value={form.description}\n onChange={(e) => setForm({ ...form, description: e.target.value })}\n placeholder=\"Describe the team's mission and responsibilities...\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Team Lead</label>\n <Input\n value={form.lead}\n onChange={(e) => setForm({ ...form, lead: e.target.value })}\n className=\"mt-1\"\n placeholder=\"Team lead name or email\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Associated Project (optional)</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">No project</option>\n {projects.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.key})\n </option>\n ))}\n </select>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAAwB,CAAG;;;;;;;;;;;;;AAyBjC,SAAgB,IAAyB;CACvC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAM,KAAW,EAAS;EAAE,MAAM;EAAI,aAAa;EAAI,MAAM;EAAI,WAAW;EAAI,CAAC,EAElF,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAuB;EAC7E,WAAW;GACT;GACA,YAAY,EAAE,OAAO,KAAK;GAC3B;EACD,MAAM,CAAC;EACR,CAAC,EAEI,IAAW,GAAM,oBAAoB,SAAS,EAAE;AAmBtD,QAZI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OA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K;KACZ,WAAW,MAAM,EAAQ;MAAE,GAAG;MAAM,aAAa,EAAE,OAAO;MAAO,CAAC;KAClE,aAAY;KACZ,CAAA,CACE,EAAA,CAAA;IACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;KAAO,WAAU;eAAsB;KAAiB,CAAA,EACxD,kBAAC,GAAD;KACE,OAAO,EAAK;KACZ,WAAW,MAAM,EAAQ;MAAE,GAAG;MAAM,MAAM,EAAE,OAAO;MAAO,CAAC;KAC3D,WAAU;KACV,aAAY;KACZ,CAAA,CACE,EAAA,CAAA;IACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;KAAO,WAAU;eAAsB;KAAqC,CAAA,EAC5E,kBAAC,UAAD;KACE,WAAU;KACV,OAAO,EAAK;KACZ,WAAW,MAAM,EAAQ;MAAE,GAAG;MAAM,WAAW,EAAE,OAAO;MAAO,CAAC;eAHlE,CAKE,kBAAC,UAAD;MAAQ,OAAM;gBAAG;MAAmB,CAAA,EACnC,EAAS,KAAK,MACb,kBAAC,UAAD;MAAmB,OAAO,EAAE;gBAA5B;OACG,EAAE;OAAK;OAAG,EAAE;OAAI;OACV;QAFI,EAAE,GAEN,CACT,CACK;OACL,EAAA,CAAA;IACM;KACT,EAAA,CAAA,CACH"}
1
+ {"version":3,"file":"TeamCreateTeamPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TeamCreateTeamPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, Users } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_TEAM = gql`\n query GetProjectsForTeamCreation($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n ownerId\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n ownerId: string | null;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function TeamCreateTeamPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n const [form, setForm] = useState({ name: '', description: '', lead: '', projectId: '' });\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_TEAM, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n // NOTE: there is no Team model in wspace-planmagnet-svc, so this form has nothing\n // to save to. It previously had a handler that navigated to '/team' on submit,\n // which read as a successful save — the user filled the form, was redirected, and\n // nothing was persisted. The submit control is disabled until the model exists\n // (BOFF-7822); the notice above the form says so.\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Create Team</h1>\n <p className=\"text-sm text-muted-foreground\">\n Set up a new team with members and a lead.\n </p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/team')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" disabled title=\"Not available yet — see the notice below\">\n <Save className=\"mr-1 h-4 w-4\" />\n Create Team\n </Button>\n </div>\n </div>\n <div className=\"rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground\">\n <strong className=\"text-foreground\">Not available yet.</strong> Teams cannot be saved —\n there is no team model behind this form. It is shown so the fields and options are visible,\n but nothing entered here is stored. This page previously returned you to the list on submit,\n which looked like it had saved.\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4\" />\n Team Details\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Team Name</label>\n <Input\n value={form.name}\n onChange={(e) => setForm({ ...form, name: e.target.value })}\n className=\"mt-1\"\n placeholder=\"e.g. Platform Engineering\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Description</label>\n <textarea\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[80px]\"\n value={form.description}\n onChange={(e) => setForm({ ...form, description: e.target.value })}\n placeholder=\"Describe the team's mission and responsibilities...\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Team Lead</label>\n <Input\n value={form.lead}\n onChange={(e) => setForm({ ...form, lead: e.target.value })}\n className=\"mt-1\"\n placeholder=\"Team lead name or email\"\n />\n </div>\n <div>\n <label className=\"text-sm font-medium\">Associated Project (optional)</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">No project</option>\n {projects.map((p) => (\n <option key={p.id} value={p.id}>\n {p.name} ({p.key})\n </option>\n ))}\n </select>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAAwB,CAAG;;;;;;;;;;;;;AAyBjC,SAAgB,IAAyB;CACvC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAClC,CAAC,GAAM,KAAW,EAAS;EAAE,MAAM;EAAI,aAAa;EAAI,MAAM;EAAI,WAAW;EAAI,CAAC,EAElF,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAuB;EAC7E,WAAW;GACT;GACA,YAAY,EAAE,OAAO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OAAM,MAAM,EAAE,OAAO;OAAO,CAAC;MAC3D,WAAU;MACV,aAAY;MACZ,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAAsB;MAAmB,CAAA,EAC1D,kBAAC,YAAD;MACE,WAAU;MACV,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,aAAa,EAAE,OAAO;OAAO,CAAC;MAClE,aAAY;MACZ,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAAsB;MAAiB,CAAA,EACxD,kBAAC,GAAD;MACE,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,MAAM,EAAE,OAAO;OAAO,CAAC;MAC3D,WAAU;MACV,aAAY;MACZ,CAAA,CACE,EAAA,CAAA;KACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;MAAO,WAAU;gBAAsB;MAAqC,CAAA,EAC5E,kBAAC,UAAD;MACE,WAAU;MACV,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,WAAW,EAAE,OAAO;OAAO,CAAC;gBAHlE,CAKE,kBAAC,UAAD;OAAQ,OAAM;iBAAG;OAAmB,CAAA,EACnC,EAAS,KAAK,MACb,kBAAC,UAAD;OAAmB,OAAO,EAAE;iBAA5B;QACG,EAAE;QAAK;QAAG,EAAE;QAAI;QACV;SAFI,EAAE,GAEN,CACT,CACK;QACL,EAAA,CAAA;KACM;MACT,EAAA,CAAA;GACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"TeamInviteMemberPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TeamInviteMemberPagePage.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,wBAAwB,4CAkJvC"}
1
+ {"version":3,"file":"TeamInviteMemberPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/TeamInviteMemberPagePage.tsx"],"names":[],"mappings":"AAkCA,wBAAgB,wBAAwB,4CA0JvC"}
@@ -59,100 +59,109 @@ function _() {
59
59
  children: ["Error: ", b.message]
60
60
  }) : /* @__PURE__ */ l("div", {
61
61
  className: "space-y-6 p-6 max-w-4xl",
62
- children: [/* @__PURE__ */ l("div", {
63
- className: "flex items-center justify-between",
64
- children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
65
- className: "text-2xl font-semibold",
66
- children: "Invite Team Member"
67
- }), /* @__PURE__ */ c("p", {
68
- className: "text-sm text-muted-foreground",
69
- children: "Add a new member to your workspace."
70
- })] }), /* @__PURE__ */ l("div", {
71
- className: "flex gap-2",
72
- children: [/* @__PURE__ */ l(u, {
73
- variant: "outline",
74
- size: "sm",
75
- onClick: () => _("/team"),
76
- children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
77
- }), /* @__PURE__ */ l(u, {
78
- size: "sm",
79
- onClick: () => {
80
- x.email.trim() && _("/team");
81
- },
82
- children: [/* @__PURE__ */ c(r, { className: "mr-1 h-4 w-4" }), "Send Invite"]
62
+ children: [
63
+ /* @__PURE__ */ l("div", {
64
+ className: "flex items-center justify-between",
65
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("h1", {
66
+ className: "text-2xl font-semibold",
67
+ children: "Invite Team Member"
68
+ }), /* @__PURE__ */ c("p", {
69
+ className: "text-sm text-muted-foreground",
70
+ children: "Add a new member to your workspace."
71
+ })] }), /* @__PURE__ */ l("div", {
72
+ className: "flex gap-2",
73
+ children: [/* @__PURE__ */ l(u, {
74
+ variant: "outline",
75
+ size: "sm",
76
+ onClick: () => _("/team"),
77
+ children: [/* @__PURE__ */ c(a, { className: "mr-1 h-4 w-4" }), "Cancel"]
78
+ }), /* @__PURE__ */ l(u, {
79
+ size: "sm",
80
+ disabled: !0,
81
+ title: "Not available yet — see the notice below",
82
+ children: [/* @__PURE__ */ c(r, { className: "mr-1 h-4 w-4" }), "Send Invite"]
83
+ })]
83
84
  })]
84
- })]
85
- }), /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
86
- className: "flex items-center gap-2",
87
- children: [/* @__PURE__ */ c(i, { className: "h-4 w-4" }), "Invitation Details"]
88
- }) }), /* @__PURE__ */ l(f, {
89
- className: "space-y-4",
90
- children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
91
- className: "text-sm font-medium",
92
- children: "Email Address"
93
- }), /* @__PURE__ */ c(h, {
94
- type: "email",
95
- value: x.email,
96
- onChange: (e) => S({
97
- ...x,
98
- email: e.target.value
99
- }),
100
- className: "mt-1",
101
- placeholder: "colleague@company.com"
102
- })] }), /* @__PURE__ */ l("div", {
103
- className: "grid grid-cols-3 gap-4",
104
- children: [
105
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
106
- className: "text-sm font-medium",
107
- children: "Role"
108
- }), /* @__PURE__ */ c("select", {
109
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm capitalize",
110
- value: x.role,
111
- onChange: (e) => S({
112
- ...x,
113
- role: e.target.value
114
- }),
115
- children: C.map((e) => /* @__PURE__ */ c("option", {
116
- value: e,
117
- children: e
118
- }, e))
119
- })] }),
120
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
121
- className: "text-sm font-medium",
122
- children: "Department"
123
- }), /* @__PURE__ */ c("select", {
124
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
125
- value: x.department,
126
- onChange: (e) => S({
127
- ...x,
128
- department: e.target.value
129
- }),
130
- children: w.map((e) => /* @__PURE__ */ c("option", {
131
- value: e,
132
- children: e
133
- }, e))
134
- })] }),
135
- /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
136
- className: "text-sm font-medium",
137
- children: "Team"
138
- }), /* @__PURE__ */ l("select", {
139
- className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
140
- value: x.projectId,
141
- onChange: (e) => S({
142
- ...x,
143
- projectId: e.target.value
144
- }),
145
- children: [/* @__PURE__ */ c("option", {
146
- value: "",
147
- children: "No team"
148
- }), T.map((e) => /* @__PURE__ */ c("option", {
149
- value: e.id,
150
- children: e.name
151
- }, e.id))]
152
- })] })
153
- ]
154
- })]
155
- })] })]
85
+ }),
86
+ /* @__PURE__ */ l("div", {
87
+ className: "rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground",
88
+ children: [/* @__PURE__ */ c("strong", {
89
+ className: "text-foreground",
90
+ children: "Not available yet."
91
+ }), " Invitations cannot be sent — there is no team or membership model behind this form, so nothing entered here is stored and no email is sent. The form is shown so the fields and options are visible."]
92
+ }),
93
+ /* @__PURE__ */ l(d, { children: [/* @__PURE__ */ c(p, { children: /* @__PURE__ */ l(m, {
94
+ className: "flex items-center gap-2",
95
+ children: [/* @__PURE__ */ c(i, { className: "h-4 w-4" }), "Invitation Details"]
96
+ }) }), /* @__PURE__ */ l(f, {
97
+ className: "space-y-4",
98
+ children: [/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
99
+ className: "text-sm font-medium",
100
+ children: "Email Address"
101
+ }), /* @__PURE__ */ c(h, {
102
+ type: "email",
103
+ value: x.email,
104
+ onChange: (e) => S({
105
+ ...x,
106
+ email: e.target.value
107
+ }),
108
+ className: "mt-1",
109
+ placeholder: "colleague@company.com"
110
+ })] }), /* @__PURE__ */ l("div", {
111
+ className: "grid grid-cols-3 gap-4",
112
+ children: [
113
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
114
+ className: "text-sm font-medium",
115
+ children: "Role"
116
+ }), /* @__PURE__ */ c("select", {
117
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm capitalize",
118
+ value: x.role,
119
+ onChange: (e) => S({
120
+ ...x,
121
+ role: e.target.value
122
+ }),
123
+ children: C.map((e) => /* @__PURE__ */ c("option", {
124
+ value: e,
125
+ children: e
126
+ }, e))
127
+ })] }),
128
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
129
+ className: "text-sm font-medium",
130
+ children: "Department"
131
+ }), /* @__PURE__ */ c("select", {
132
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
133
+ value: x.department,
134
+ onChange: (e) => S({
135
+ ...x,
136
+ department: e.target.value
137
+ }),
138
+ children: w.map((e) => /* @__PURE__ */ c("option", {
139
+ value: e,
140
+ children: e
141
+ }, e))
142
+ })] }),
143
+ /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("label", {
144
+ className: "text-sm font-medium",
145
+ children: "Team"
146
+ }), /* @__PURE__ */ l("select", {
147
+ className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm",
148
+ value: x.projectId,
149
+ onChange: (e) => S({
150
+ ...x,
151
+ projectId: e.target.value
152
+ }),
153
+ children: [/* @__PURE__ */ c("option", {
154
+ value: "",
155
+ children: "No team"
156
+ }), T.map((e) => /* @__PURE__ */ c("option", {
157
+ value: e.id,
158
+ children: e.name
159
+ }, e.id))]
160
+ })] })
161
+ ]
162
+ })]
163
+ })] })
164
+ ]
156
165
  });
157
166
  }
158
167
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"TeamInviteMemberPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TeamInviteMemberPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, UserPlus } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_INVITE = gql`\n query GetProjectsForInvite($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n methodology\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n methodology: string | null;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function TeamInviteMemberPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_INVITE, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const [form, setForm] = useState({\n email: '',\n role: 'developer',\n projectId: '',\n department: 'Engineering',\n });\n const roles = [\n 'developer',\n 'designer',\n 'product manager',\n 'qa engineer',\n 'engineering manager',\n 'data engineer',\n ] as const;\n const departments = ['Engineering', 'Product', 'Design', 'Quality', 'Data'] as const;\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n const teams = projects.reduce(\n (acc, p) => {\n const method = p.methodology ?? 'general';\n if (!acc.some((t) => t.id === method)) {\n acc.push({\n id: method,\n name: `${method.charAt(0).toUpperCase()}${method.slice(1)} Team`,\n });\n }\n return acc;\n },\n [] as Array<{ id: string; name: string }>\n );\n\n const handleInvite = () => {\n if (!form.email.trim()) return;\n navigate('/team');\n };\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Invite Team Member</h1>\n <p className=\"text-sm text-muted-foreground\">Add a new member to your workspace.</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/team')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" onClick={handleInvite}>\n <Save className=\"mr-1 h-4 w-4\" />\n Send Invite\n </Button>\n </div>\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <UserPlus className=\"h-4 w-4\" />\n Invitation Details\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Email Address</label>\n <Input\n type=\"email\"\n value={form.email}\n onChange={(e) => setForm({ ...form, email: e.target.value })}\n className=\"mt-1\"\n placeholder=\"colleague@company.com\"\n />\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Role</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm capitalize\"\n value={form.role}\n onChange={(e) => setForm({ ...form, role: e.target.value })}\n >\n {roles.map((r) => (\n <option key={r} value={r}>\n {r}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Department</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.department}\n onChange={(e) => setForm({ ...form, department: e.target.value })}\n >\n {departments.map((d) => (\n <option key={d} value={d}>\n {d}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Team</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">No team</option>\n {teams.map((t) => (\n <option key={t.id} value={t.id}>\n {t.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAA0B,CAAG;;;;;;;;;;;;;AAyBnC,SAAgB,IAA2B;CACzC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAy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AAA,EACnD,kBAAC,UAAD;MACE,WAAU;MACV,OAAO,EAAK;MACZ,WAAW,MAAM,EAAQ;OAAE,GAAG;OAAM,WAAW,EAAE,OAAO;OAAO,CAAC;gBAHlE,CAKE,kBAAC,UAAD;OAAQ,OAAM;iBAAG;OAAgB,CAAA,EAChC,EAAM,KAAK,MACV,kBAAC,UAAD;OAAmB,OAAO,EAAE;iBACzB,EAAE;OACI,EAFI,EAAE,GAEN,CACT,CACK;QACL,EAAA,CAAA;KACF;MACM;KACT,EAAA,CAAA,CACH"}
1
+ {"version":3,"file":"TeamInviteMemberPagePage.js","names":[],"sources":["../../../src/planmagnet/pages/TeamInviteMemberPagePage.tsx"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useState } from 'react';\nimport { gql } from '@apollo/client';\nimport { useQuery } from '@apollo/client/react';\nimport { Card, CardContent, CardHeader, CardTitle, Button, Input } from '@burdenoff/fe-libs/ui';\nimport { Save, X, UserPlus } from 'lucide-react';\nimport { usePlanMagnet, usePlanMagnetNavigate } from '../providers/PlanMagnetProvider';\n\nconst GET_PROJECTS_FOR_INVITE = gql`\n query GetProjectsForInvite($workspaceId: ID!, $pagination: PlanmagnetPaginationInput) {\n planmagnetProjects(workspaceId: $workspaceId, pagination: $pagination) {\n items {\n id\n name\n key\n methodology\n }\n totalCount\n }\n }\n`;\n\ninterface ProjectNode {\n id: string;\n name: string;\n key: string;\n methodology: string | null;\n}\n\ninterface ProjectsData {\n projects: { items: ProjectNode[]; totalCount: number };\n}\n\nexport function TeamInviteMemberPagePage() {\n const { workspaceId } = usePlanMagnet();\n const navigate = usePlanMagnetNavigate();\n\n const { data, loading, error } = useQuery<ProjectsData>(GET_PROJECTS_FOR_INVITE, {\n variables: {\n workspaceId,\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const [form, setForm] = useState({\n email: '',\n role: 'developer',\n projectId: '',\n department: 'Engineering',\n });\n const roles = [\n 'developer',\n 'designer',\n 'product manager',\n 'qa engineer',\n 'engineering manager',\n 'data engineer',\n ] as const;\n const departments = ['Engineering', 'Product', 'Design', 'Quality', 'Data'] as const;\n\n const projects = data?.planmagnetProjects?.items ?? [];\n\n const teams = projects.reduce(\n (acc, p) => {\n const method = p.methodology ?? 'general';\n if (!acc.some((t) => t.id === method)) {\n acc.push({\n id: method,\n name: `${method.charAt(0).toUpperCase()}${method.slice(1)} Team`,\n });\n }\n return acc;\n },\n [] as Array<{ id: string; name: string }>\n );\n\n // NOTE: nothing here can send an invitation. wspace-planmagnet-svc has no Team or\n // membership model, and this MFE only talks to the workspaces gateway, which exposes\n // no invite mutation — the \"teams\" on the Team page are derived from project\n // methodologies, not real teams. The previous handler only called navigate('/team'),\n // so a user filled in an email, clicked Send Invite, was redirected, and no invitation\n // existed — indistinguishable from success. The submit control is disabled until there\n // is something to invite into (BOFF-7822); the notice above the form says so.\n\n if (loading) {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <div className=\"animate-spin h-8 w-8 border-2 border-primary border-t-transparent rounded-full\" />\n </div>\n );\n }\n\n if (error) {\n return <div className=\"p-6 text-red-500\">Error: {error.message}</div>;\n }\n\n return (\n <div className=\"space-y-6 p-6 max-w-4xl\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">Invite Team Member</h1>\n <p className=\"text-sm text-muted-foreground\">Add a new member to your workspace.</p>\n </div>\n <div className=\"flex gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={() => navigate('/team')}>\n <X className=\"mr-1 h-4 w-4\" />\n Cancel\n </Button>\n <Button size=\"sm\" disabled title=\"Not available yet — see the notice below\">\n <Save className=\"mr-1 h-4 w-4\" />\n Send Invite\n </Button>\n </div>\n </div>\n <div className=\"rounded-md border border-border bg-muted p-4 text-sm text-muted-foreground\">\n <strong className=\"text-foreground\">Not available yet.</strong> Invitations cannot be sent —\n there is no team or membership model behind this form, so nothing entered here is stored and\n no email is sent. The form is shown so the fields and options are visible.\n </div>\n <Card>\n <CardHeader>\n <CardTitle className=\"flex items-center gap-2\">\n <UserPlus className=\"h-4 w-4\" />\n Invitation Details\n </CardTitle>\n </CardHeader>\n <CardContent className=\"space-y-4\">\n <div>\n <label className=\"text-sm font-medium\">Email Address</label>\n <Input\n type=\"email\"\n value={form.email}\n onChange={(e) => setForm({ ...form, email: e.target.value })}\n className=\"mt-1\"\n placeholder=\"colleague@company.com\"\n />\n </div>\n <div className=\"grid grid-cols-3 gap-4\">\n <div>\n <label className=\"text-sm font-medium\">Role</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm capitalize\"\n value={form.role}\n onChange={(e) => setForm({ ...form, role: e.target.value })}\n >\n {roles.map((r) => (\n <option key={r} value={r}>\n {r}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Department</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.department}\n onChange={(e) => setForm({ ...form, department: e.target.value })}\n >\n {departments.map((d) => (\n <option key={d} value={d}>\n {d}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label className=\"text-sm font-medium\">Team</label>\n <select\n className=\"mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm\"\n value={form.projectId}\n onChange={(e) => setForm({ ...form, projectId: e.target.value })}\n >\n <option value=\"\">No team</option>\n {teams.map((t) => (\n <option key={t.id} value={t.id}>\n {t.name}\n </option>\n ))}\n </select>\n </div>\n </div>\n </CardContent>\n </Card>\n </div>\n );\n}\n"],"mappings":";;;;;;;;AASA,IAAM,IAA0B,CAAG;;;;;;;;;;;;;AAyBnC,SAAgB,IAA2B;CACzC,IAAM,EAAE,mBAAgB,GAAe,EACjC,IAAW,GAAuB,EAElC,EAAE,SAAM,YAAS,aAAU,EAAuB,GAAyB;EAC/E,WAAW;GACT;GACA,YAAY,EAAE,OAAO,KAAK;GAC3B;EACD,MAAM,CAAC;EACR,CAAC,EAEI,CAAC,G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OACE,WAAU;OACV,OAAO,EAAK;OACZ,WAAW,MAAM,EAAQ;QAAE,GAAG;QAAM,WAAW,EAAE,OAAO;QAAO,CAAC;iBAHlE,CAKE,kBAAC,UAAD;QAAQ,OAAM;kBAAG;QAAgB,CAAA,EAChC,EAAM,KAAK,MACV,kBAAC,UAAD;QAAmB,OAAO,EAAE;kBACzB,EAAE;QACI,EAFI,EAAE,GAEN,CACT,CACK;SACL,EAAA,CAAA;MACF;OACM;MACT,EAAA,CAAA;GACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-planmagnet",
3
- "version": "2026.923.3",
3
+ "version": "2026.923.5",
4
4
  "description": "Burdenoff PlanMagnet Microfrontend",
5
5
  "type": "module",
6
6
  "files": [