@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.
- package/dist/planmagnet/pages/ReportsCreateReportPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/ReportsCreateReportPagePage.js +121 -112
- package/dist/planmagnet/pages/ReportsCreateReportPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TeamCreateTeamPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamCreateTeamPagePage.js +98 -89
- package/dist/planmagnet/pages/TeamCreateTeamPagePage.js.map +1 -1
- package/dist/planmagnet/pages/TeamInviteMemberPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/TeamInviteMemberPagePage.js +102 -93
- package/dist/planmagnet/pages/TeamInviteMemberPagePage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReportsCreateReportPagePage.d.ts","sourceRoot":"","sources":["../../../src/planmagnet/pages/ReportsCreateReportPagePage.tsx"],"names":[],"mappings":"AAgCA,wBAAgB,2BAA2B,
|
|
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: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
"
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
|
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;AAoBtD,QAZI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA,GAIN,IACK,kBAAC,OAAD;EAAK,WAAU;YAAf,CAAkC,WAAQ,EAAM,QAAc;MAIrE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAAkB,CAAA,EACzD,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAAqC,CAAA,CAC9E,EAAA,CAAA,EACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MAAQ,SAAQ;MAAU,MAAK;MAAK,eAAe,EAAS,WAAW;gBAAvE,CACE,kBAAC,GAAD,EAAG,WAAU,gBAAiB,CAAA,EAAA,SAEvB;SACT,kBAA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I;SACb,EAFI,EAEJ,CACT;QACK,CAAA,CACL,EAAA,CAAA;OACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;QAAO,WAAU;kBAAsB;QAA0B,CAAA,EACjE,kBAAC,UAAD;QACE,WAAU;QACV,OAAO,EAAK;QACZ,WAAW,MAAM,EAAQ;SAAE,GAAG;SAAM,WAAW,EAAE,OAAO;SAAO,CAAC;kBAHlE,CAKE,kBAAC,UAAD;SAAQ,OAAM;mBAAG;SAAqB,CAAA,EACrC,EAAS,KAAK,MACb,kBAAC,UAAD;SAAmB,OAAO,EAAE;mBAA5B;UACG,EAAE;UAAK;UAAG,EAAE;UAAI;UACV;WAFI,EAAE,GAEN,CACT,CACK;UACL,EAAA,CAAA;OACN,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,SAAD;QAAO,WAAU;kBAAsB;QAAgB,CAAA,EACvD,kBAAC,UAAD;QACE,WAAU;QACV,OAAO,EAAK;QACZ,WAAW,MAAM,EAAQ;SAAE,GAAG;SAAM,UAAU,EAAE,OAAO;SAAO,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,
|
|
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: [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"
|
|
128
|
-
|
|
129
|
-
|
|
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
|
|
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,KAAK;GAC3B;EACD,MAAM,CAAC;EACR,CAAC,EAEI,IAAW,GAAM,oBAAoB,SAAS,EAAE;AAoBtD,QAZI,IAEA,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,OAAD,EAAK,WAAU,kFAAmF,CAAA;EAC9F,CAAA,GAIN,IACK,kBAAC,OAAD;EAAK,WAAU;YAAf,CAAkC,WAAQ,EAAM,QAAc;MAIrE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAAgB,CAAA,EACvD,kBAAC,KAAD;KAAG,WAAU;eAAgC;KAEzC,CAAA,CACA,EAAA,CAAA,EACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD;MAAQ,SAAQ;MAAU,MAAK;MAAK,eAAe,EAAS,QAAQ;gBAApE,CACE,kBAAC,GAAD,EAAG,WAAU,gBAAiB,CAAA,EAAA,SAEvB;SACT,kBAAC,GAAD;MAAQ,MAAK;MAAK,UAAA;MAAS,OAAM;gBAAjC,CACE,kBAAC,GAAD,EAAM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AAE,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,
|
|
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: [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
|
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,GAAM,KAAW,EAAS;EAC/B,OAAO;EACP,MAAM;EACN,WAAW;EACX,YAAY;EACb,CAAC,EACI,IAAQ;EACZ;EACA;EACA;EACA;EACA;EACA;EACD,EACK,IAAc;EAAC;EAAe;EAAW;EAAU;EAAW;EAAO,EAIrE,KAFW,GAAM,oBAAoB,SAAS,EAAE,EAE/B,QACpB,GAAK,MAAM;EACV,IAAM,IAAS,EAAE,eAAe;AAOhC,SANK,EAAI,MAAM,MAAM,EAAE,O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