@burdenoff/microfe-support 2026.625.1 → 2026.626.1
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/support/components/PageLayout.js +64 -51
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/pages/AnalyticsPage.js +145 -114
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +180 -143
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +56 -49
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +51 -61
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +225 -205
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +50 -46
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +122 -116
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +76 -80
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +292 -269
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +53 -63
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +84 -81
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +79 -76
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +215 -182
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +159 -129
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +175 -142
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +173 -169
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,274 +1,280 @@
|
|
|
1
1
|
import { useSupport as e } from "../providers/SupportProvider.js";
|
|
2
2
|
import { joinPath as t } from "../utils/index.js";
|
|
3
|
-
import { Button as n,
|
|
4
|
-
import { useGetTicketCategoriesQuery as
|
|
5
|
-
import { SupportTicketPriority as
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { useTicketOperations as
|
|
8
|
-
import { useNotification as
|
|
9
|
-
import { NotificationToast as
|
|
10
|
-
import { extractErrorMessage as
|
|
11
|
-
import { SUPPORT_ATTACHMENT_ACCEPT as
|
|
12
|
-
import { uploadSupportAttachmentFiles as
|
|
13
|
-
import { ATTACHMENTS_FAILED_PARAM as
|
|
14
|
-
import { useEffect as
|
|
15
|
-
import { ArrowLeft as
|
|
16
|
-
import { useNavigate as
|
|
17
|
-
import { Fragment as
|
|
3
|
+
import { Button as n, GlassCard as r, Input as i, PagePurpose as a } from "../components/ui.js";
|
|
4
|
+
import { useGetTicketCategoriesQuery as o } from "../../generated/global-operations.js";
|
|
5
|
+
import { SupportTicketPriority as s } from "../../generated/global-types.js";
|
|
6
|
+
import { PageLayout as c } from "../components/PageLayout.js";
|
|
7
|
+
import { useTicketOperations as l } from "../hooks/useTicketOperations.js";
|
|
8
|
+
import { useNotification as u } from "../hooks/useNotification.js";
|
|
9
|
+
import { NotificationToast as d } from "../components/NotificationToast.js";
|
|
10
|
+
import { extractErrorMessage as f } from "../utils/errors.js";
|
|
11
|
+
import { SUPPORT_ATTACHMENT_ACCEPT as p, partitionAttachments as m, rejectedAttachmentsMessage as h } from "../utils/attachments.js";
|
|
12
|
+
import { uploadSupportAttachmentFiles as g } from "../utils/supportFiles.js";
|
|
13
|
+
import { ATTACHMENTS_FAILED_PARAM as _ } from "../constants.js";
|
|
14
|
+
import { useEffect as v, useRef as y, useState as b } from "react";
|
|
15
|
+
import { ArrowLeft as x, Loader2 as S, Paperclip as C, Plus as w } from "lucide-react";
|
|
16
|
+
import { useNavigate as T } from "react-router-dom";
|
|
17
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
18
18
|
//#region src/support/pages/CreateTicketPage.tsx
|
|
19
|
-
var
|
|
20
|
-
function
|
|
21
|
-
let
|
|
19
|
+
var k = 5, A = 10;
|
|
20
|
+
function j() {
|
|
21
|
+
let j = T(), { basePath: M = "" } = e(), { createTicket: N, createTicketLoading: P, updateTicket: F } = l(), { data: I, loading: L } = o({ variables: {
|
|
22
22
|
filter: { isActive: !0 },
|
|
23
23
|
limit: 100,
|
|
24
24
|
offset: 0
|
|
25
|
-
} }),
|
|
25
|
+
} }), R = [...I?.ticketCategories?.nodes ?? []].sort((e, t) => e.displayOrder - t.displayOrder), [z, B] = b({
|
|
26
26
|
subject: "",
|
|
27
27
|
description: "",
|
|
28
|
-
priority:
|
|
28
|
+
priority: s.Normal,
|
|
29
29
|
categoryId: void 0
|
|
30
|
-
}), [
|
|
31
|
-
|
|
30
|
+
}), [V, H] = b([]), [U, W] = b(null), { notification: G, notify: K } = u(), q = y(null), J = () => {
|
|
31
|
+
q.current &&= (clearTimeout(q.current), null);
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
if (e.preventDefault(),
|
|
36
|
-
|
|
33
|
+
v(() => J, []);
|
|
34
|
+
let Y = async (e) => {
|
|
35
|
+
if (e.preventDefault(), z.subject.trim().length < k) {
|
|
36
|
+
K("error", `Subject must be at least ${k} characters long.`);
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
if ((
|
|
40
|
-
|
|
39
|
+
if ((z.description ?? "").trim().length < A) {
|
|
40
|
+
K("error", `Description must be at least ${A} characters long.`);
|
|
41
41
|
return;
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
let e = await
|
|
45
|
-
...
|
|
46
|
-
priority:
|
|
47
|
-
categoryId:
|
|
44
|
+
let e = await N({
|
|
45
|
+
...z,
|
|
46
|
+
priority: z.priority ?? void 0,
|
|
47
|
+
categoryId: z.categoryId ?? void 0
|
|
48
48
|
});
|
|
49
49
|
if (!e) return;
|
|
50
|
-
if (
|
|
51
|
-
let t = await
|
|
50
|
+
if (V.length > 0) try {
|
|
51
|
+
let t = await g({
|
|
52
52
|
ticketId: e.id,
|
|
53
|
-
files:
|
|
53
|
+
files: V,
|
|
54
54
|
onFileProgress: (e, t) => {
|
|
55
|
-
t < 100 &&
|
|
55
|
+
t < 100 && W(e);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
-
await
|
|
58
|
+
await F(e.id, { metadata: { initialAttachmentIds: t.files.map((e) => e.id) } }), W(null), H([]);
|
|
59
59
|
} catch (n) {
|
|
60
|
-
|
|
61
|
-
let r = new URLSearchParams({ [
|
|
62
|
-
|
|
60
|
+
W(null), console.error("[support] create ticket: attachments failed", n);
|
|
61
|
+
let r = new URLSearchParams({ [_]: "1" });
|
|
62
|
+
j(t(M, `tickets/${e.id}?${r.toString()}`));
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
K("success", "Ticket created successfully!"), J(), q.current = setTimeout(() => {
|
|
66
|
+
j(t(M, `tickets/${e.id}`)), q.current = null;
|
|
67
67
|
}, 1e3);
|
|
68
68
|
} catch (e) {
|
|
69
|
-
|
|
69
|
+
K("error", f(e, "Failed to create ticket. Please try again."), 5e3);
|
|
70
70
|
}
|
|
71
|
-
},
|
|
72
|
-
let { accepted: t, rejected: n } =
|
|
73
|
-
t.length > 0 &&
|
|
74
|
-
},
|
|
75
|
-
|
|
71
|
+
}, X = (e) => {
|
|
72
|
+
let { accepted: t, rejected: n } = m(Array.from(e.target.files || []));
|
|
73
|
+
t.length > 0 && H((e) => [...e, ...t]), n.length > 0 && K("error", h(n), 6e3), e.target.value = "";
|
|
74
|
+
}, Z = (e) => {
|
|
75
|
+
H((t) => t.filter((t, n) => n !== e));
|
|
76
76
|
};
|
|
77
|
-
return /* @__PURE__ */
|
|
77
|
+
return /* @__PURE__ */ O(c, {
|
|
78
78
|
showHeader: !1,
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ D(d, { notification: G }),
|
|
81
|
+
/* @__PURE__ */ O("div", {
|
|
82
82
|
className: "flex items-center gap-4 mb-6",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ D(n, {
|
|
84
84
|
variant: "ghost",
|
|
85
85
|
size: "sm",
|
|
86
|
-
onClick: () =>
|
|
86
|
+
onClick: () => j(".."),
|
|
87
87
|
className: "p-2",
|
|
88
|
-
children: /* @__PURE__ */
|
|
89
|
-
}), /* @__PURE__ */
|
|
88
|
+
children: /* @__PURE__ */ D(x, { size: 20 })
|
|
89
|
+
}), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("h1", {
|
|
90
90
|
className: "text-2xl font-bold text-text-primary",
|
|
91
91
|
children: "Create New Ticket"
|
|
92
|
-
}), /* @__PURE__ */
|
|
92
|
+
}), /* @__PURE__ */ D("p", {
|
|
93
93
|
className: "text-sm text-text-secondary",
|
|
94
94
|
children: "Submit a new support request"
|
|
95
95
|
})] })]
|
|
96
96
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ D(a, {
|
|
98
|
+
className: "mb-6 max-w-2xl",
|
|
99
|
+
children: "Tell us what is going wrong and our support team will pick it up. The clearer your subject, description and priority, the faster we can help — attach screenshots, logs or files if they explain the problem. You will be able to follow the reply right here once it is submitted."
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ D("div", {
|
|
98
102
|
className: "max-w-2xl",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
-
onSubmit:
|
|
103
|
+
children: /* @__PURE__ */ O("form", {
|
|
104
|
+
onSubmit: Y,
|
|
101
105
|
className: "space-y-6",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
103
|
-
|
|
106
|
+
children: [/* @__PURE__ */ O(r, {
|
|
107
|
+
treatment: "glass",
|
|
108
|
+
glow: !0,
|
|
109
|
+
className: "p-6 space-y-6",
|
|
104
110
|
children: [
|
|
105
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ O("label", {
|
|
106
112
|
htmlFor: "support-ticket-subject",
|
|
107
113
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
108
|
-
children: ["Subject ", /* @__PURE__ */
|
|
114
|
+
children: ["Subject ", /* @__PURE__ */ D("span", {
|
|
109
115
|
className: "text-status-error-text",
|
|
110
116
|
children: "*"
|
|
111
117
|
})]
|
|
112
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ D(i, {
|
|
113
119
|
id: "support-ticket-subject",
|
|
114
120
|
"data-tour": "support-ticket-subject",
|
|
115
121
|
type: "text",
|
|
116
122
|
required: !0,
|
|
117
|
-
value:
|
|
118
|
-
onChange: (e) =>
|
|
119
|
-
...
|
|
123
|
+
value: z.subject,
|
|
124
|
+
onChange: (e) => B({
|
|
125
|
+
...z,
|
|
120
126
|
subject: e.target.value
|
|
121
127
|
}),
|
|
122
128
|
placeholder: "Brief description of your issue"
|
|
123
129
|
})] }),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ O("div", { children: [
|
|
131
|
+
/* @__PURE__ */ O("label", {
|
|
126
132
|
htmlFor: "support-ticket-description",
|
|
127
133
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
128
|
-
children: ["Description ", /* @__PURE__ */
|
|
134
|
+
children: ["Description ", /* @__PURE__ */ D("span", {
|
|
129
135
|
className: "text-status-error-text",
|
|
130
136
|
children: "*"
|
|
131
137
|
})]
|
|
132
138
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
139
|
+
/* @__PURE__ */ D("textarea", {
|
|
134
140
|
id: "support-ticket-description",
|
|
135
141
|
"data-tour": "support-ticket-description",
|
|
136
142
|
"aria-label": "Description",
|
|
137
143
|
required: !0,
|
|
138
144
|
rows: 6,
|
|
139
|
-
value:
|
|
140
|
-
onChange: (e) =>
|
|
141
|
-
...
|
|
145
|
+
value: z.description || "",
|
|
146
|
+
onChange: (e) => B({
|
|
147
|
+
...z,
|
|
142
148
|
description: e.target.value
|
|
143
149
|
}),
|
|
144
150
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
145
151
|
placeholder: "Provide detailed information about your issue"
|
|
146
152
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ D("p", {
|
|
148
154
|
className: "mt-2 text-xs text-text-secondary",
|
|
149
155
|
children: "Markdown is supported, including fenced code blocks."
|
|
150
156
|
})
|
|
151
157
|
] }),
|
|
152
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
153
159
|
htmlFor: "support-ticket-priority",
|
|
154
160
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
155
161
|
children: "Priority"
|
|
156
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ O("select", {
|
|
157
163
|
id: "support-ticket-priority",
|
|
158
164
|
"data-tour": "support-ticket-priority",
|
|
159
|
-
value:
|
|
160
|
-
onChange: (e) =>
|
|
161
|
-
...
|
|
165
|
+
value: z.priority || "NORMAL",
|
|
166
|
+
onChange: (e) => B({
|
|
167
|
+
...z,
|
|
162
168
|
priority: e.target.value
|
|
163
169
|
}),
|
|
164
170
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
165
171
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ D("option", {
|
|
167
173
|
value: "LOW",
|
|
168
174
|
children: "Low - General question or minor issue"
|
|
169
175
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
176
|
+
/* @__PURE__ */ D("option", {
|
|
171
177
|
value: "NORMAL",
|
|
172
178
|
children: "Normal - Standard support request"
|
|
173
179
|
}),
|
|
174
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ D("option", {
|
|
175
181
|
value: "HIGH",
|
|
176
182
|
children: "High - Significant impact on work"
|
|
177
183
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ D("option", {
|
|
179
185
|
value: "CRITICAL",
|
|
180
186
|
children: "Critical - Complete blocker, urgent"
|
|
181
187
|
})
|
|
182
188
|
]
|
|
183
189
|
})] }),
|
|
184
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
185
191
|
htmlFor: "support-ticket-category",
|
|
186
192
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
187
193
|
children: "Category"
|
|
188
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ O("select", {
|
|
189
195
|
id: "support-ticket-category",
|
|
190
196
|
"data-tour": "support-ticket-category",
|
|
191
|
-
value:
|
|
192
|
-
onChange: (e) =>
|
|
193
|
-
...
|
|
197
|
+
value: z.categoryId || "",
|
|
198
|
+
onChange: (e) => B({
|
|
199
|
+
...z,
|
|
194
200
|
categoryId: e.target.value || void 0
|
|
195
201
|
}),
|
|
196
202
|
className: "w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors",
|
|
197
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ D("option", {
|
|
198
204
|
value: "",
|
|
199
|
-
children:
|
|
200
|
-
}),
|
|
205
|
+
children: L ? "Loading categories..." : "Select a category"
|
|
206
|
+
}), R.map((e) => /* @__PURE__ */ D("option", {
|
|
201
207
|
value: e.id,
|
|
202
208
|
children: e.name
|
|
203
209
|
}, e.id))]
|
|
204
210
|
})] }),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ O("div", { children: [
|
|
212
|
+
/* @__PURE__ */ D("span", {
|
|
207
213
|
id: "create-ticket-attachments-heading",
|
|
208
214
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
209
215
|
children: "Attachments"
|
|
210
216
|
}),
|
|
211
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ O("label", {
|
|
212
218
|
"data-tour": "support-ticket-attachments",
|
|
213
219
|
className: "flex cursor-pointer items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken/20 p-4 text-sm text-text-secondary transition-colors hover:bg-bg-sunken/40",
|
|
214
220
|
children: [
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ D(C, { size: 16 }),
|
|
222
|
+
/* @__PURE__ */ D("span", { children: "Attach files, screenshots, logs, or documents" }),
|
|
223
|
+
/* @__PURE__ */ D("input", {
|
|
218
224
|
type: "file",
|
|
219
225
|
multiple: !0,
|
|
220
226
|
"aria-labelledby": "create-ticket-attachments-heading",
|
|
221
227
|
className: "hidden",
|
|
222
|
-
accept:
|
|
223
|
-
onChange:
|
|
228
|
+
accept: p,
|
|
229
|
+
onChange: X
|
|
224
230
|
})
|
|
225
231
|
]
|
|
226
232
|
}),
|
|
227
|
-
|
|
233
|
+
V.length > 0 && /* @__PURE__ */ D("div", {
|
|
228
234
|
className: "mt-3 flex flex-wrap gap-2",
|
|
229
|
-
children:
|
|
235
|
+
children: V.map((e, t) => /* @__PURE__ */ O("div", {
|
|
230
236
|
className: "flex items-center gap-2 rounded-lg border bg-bg-surface px-3 py-2 text-sm",
|
|
231
237
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ D(C, { size: 14 }),
|
|
239
|
+
/* @__PURE__ */ D("span", {
|
|
234
240
|
className: "max-w-[240px] truncate",
|
|
235
241
|
children: e.name
|
|
236
242
|
}),
|
|
237
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ D("button", {
|
|
238
244
|
type: "button",
|
|
239
245
|
className: "flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary hover:text-text-primary",
|
|
240
|
-
onClick: () =>
|
|
246
|
+
onClick: () => Z(t),
|
|
241
247
|
"aria-label": `Remove attachment ${e.name}`,
|
|
242
248
|
children: "×"
|
|
243
249
|
})
|
|
244
250
|
]
|
|
245
251
|
}, `${e.name}-${t}`))
|
|
246
252
|
}),
|
|
247
|
-
|
|
253
|
+
U && /* @__PURE__ */ O("p", {
|
|
248
254
|
className: "mt-2 text-xs text-text-secondary",
|
|
249
255
|
children: [
|
|
250
256
|
"Uploading ",
|
|
251
|
-
|
|
257
|
+
U,
|
|
252
258
|
"..."
|
|
253
259
|
]
|
|
254
260
|
})
|
|
255
261
|
] })
|
|
256
262
|
]
|
|
257
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ O("div", {
|
|
258
264
|
className: "flex flex-col gap-3 sm:flex-row",
|
|
259
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ D(n, {
|
|
260
266
|
type: "submit",
|
|
261
267
|
"data-tour": "support-ticket-submit",
|
|
262
|
-
disabled:
|
|
268
|
+
disabled: P || !z.subject || !z.description,
|
|
263
269
|
className: "flex-1",
|
|
264
|
-
children:
|
|
270
|
+
children: P ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(S, {
|
|
265
271
|
size: 18,
|
|
266
272
|
className: "animate-spin"
|
|
267
|
-
}), "Creating…"] }) : /* @__PURE__ */ E
|
|
268
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), "Creating…"] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(w, { size: 18 }), "Create Ticket"] })
|
|
274
|
+
}), /* @__PURE__ */ D(n, {
|
|
269
275
|
type: "button",
|
|
270
276
|
variant: "outline",
|
|
271
|
-
onClick: () =>
|
|
277
|
+
onClick: () => j(".."),
|
|
272
278
|
children: "Cancel"
|
|
273
279
|
})]
|
|
274
280
|
})]
|
|
@@ -278,6 +284,6 @@ function k() {
|
|
|
278
284
|
});
|
|
279
285
|
}
|
|
280
286
|
//#endregion
|
|
281
|
-
export {
|
|
287
|
+
export { j as CreateTicketPage };
|
|
282
288
|
|
|
283
289
|
//# sourceMappingURL=CreateTicketPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTicketPage.js","names":[],"sources":["../../../src/support/pages/CreateTicketPage.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { ArrowLeft, Loader2, Plus, Paperclip } from 'lucide-react';\nimport { Button, Input } from '../components/ui';\nimport { useTicketOperations } from '../hooks/useTicketOperations';\nimport { useGetTicketCategoriesQuery } from '../../generated/global-operations';\nimport { useNotification } from '../hooks/useNotification';\nimport { PageLayout } from '../components/PageLayout';\nimport { NotificationToast } from '../components/NotificationToast';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\nimport { extractErrorMessage } from '../utils/errors';\nimport {\n SUPPORT_ATTACHMENT_ACCEPT,\n partitionAttachments,\n rejectedAttachmentsMessage,\n} from '../utils/attachments';\nimport { uploadSupportAttachmentFiles } from '../utils/supportFiles';\nimport { ATTACHMENTS_FAILED_PARAM } from '../constants';\nimport { SupportTicketPriority, type CreateSupportTicketInput } from '../../generated/global-types';\n\n/**\n * Client-side minimum lengths. Keep these in lockstep with the server-side\n * validators in global-support-svc/src/modules/support/utils/validation.ts —\n * when the server tightens or loosens these, update them here too. These are\n * best-effort UX hints only; the server's validation error is authoritative\n * and surfaces through `extractErrorMessage` on the catch path.\n */\nconst MIN_SUBJECT_LENGTH = 5;\nconst MIN_DESCRIPTION_LENGTH = 10;\n\nexport function CreateTicketPage() {\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const { createTicket, createTicketLoading, updateTicket } = useTicketOperations();\n const { data: categoriesData, loading: categoriesLoading } = useGetTicketCategoriesQuery({\n variables: {\n filter: { isActive: true },\n limit: 100,\n offset: 0,\n },\n });\n const activeCategories = [...(categoriesData?.ticketCategories?.nodes ?? [])].sort(\n (first, second) => first.displayOrder - second.displayOrder\n );\n const [formData, setFormData] = useState<CreateSupportTicketInput>({\n subject: '',\n description: '',\n priority: SupportTicketPriority.Normal,\n categoryId: undefined,\n });\n const [attachedFiles, setAttachedFiles] = useState<File[]>([]);\n const [uploadingFileName, setUploadingFileName] = useState<string | null>(null);\n const { notification, notify: showNotification } = useNotification();\n\n // Track the post-success navigate timer so unmounting mid-flight (Cancel\n // / back button / fast subsequent create) doesn't fire a delayed navigate.\n const navigateTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const clearNavigateTimeout = (): void => {\n if (navigateTimeoutRef.current) {\n clearTimeout(navigateTimeoutRef.current);\n navigateTimeoutRef.current = null;\n }\n };\n\n useEffect(() => clearNavigateTimeout, []);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (formData.subject.trim().length < MIN_SUBJECT_LENGTH) {\n showNotification('error', `Subject must be at least ${MIN_SUBJECT_LENGTH} characters long.`);\n return;\n }\n if ((formData.description ?? '').trim().length < MIN_DESCRIPTION_LENGTH) {\n showNotification(\n 'error',\n `Description must be at least ${MIN_DESCRIPTION_LENGTH} characters long.`\n );\n return;\n }\n\n try {\n const ticket = await createTicket({\n ...formData,\n priority: formData.priority ?? undefined,\n categoryId: formData.categoryId ?? undefined,\n });\n if (!ticket) {\n return;\n }\n\n if (attachedFiles.length > 0) {\n try {\n const uploadResult = await uploadSupportAttachmentFiles({\n ticketId: ticket.id,\n files: attachedFiles,\n onFileProgress: (fileName, progress) => {\n if (progress < 100) {\n setUploadingFileName(fileName);\n }\n },\n });\n\n await updateTicket(ticket.id, {\n metadata: {\n initialAttachmentIds: uploadResult.files.map((file) => file.id),\n },\n });\n setUploadingFileName(null);\n setAttachedFiles([]);\n } catch (uploadError) {\n setUploadingFileName(null);\n // Carry only a code-level flag in the URL — never the raw backend\n // error. Query strings persist in browser history, referer, proxy\n // logs, and analytics; a verbose server error (e.g. an S3 key, a\n // tenant id, a stack line) landing there is an information leak.\n // The destination page composes the user-facing message entirely\n // client-side via useAttachmentsFailedToast.\n console.error('[support] create ticket: attachments failed', uploadError);\n const nextParams = new URLSearchParams({\n [ATTACHMENTS_FAILED_PARAM]: '1',\n });\n navigate(joinPath(basePath, `tickets/${ticket.id}?${nextParams.toString()}`));\n return;\n }\n }\n\n showNotification('success', 'Ticket created successfully!');\n clearNavigateTimeout();\n navigateTimeoutRef.current = setTimeout(() => {\n navigate(joinPath(basePath, `tickets/${ticket.id}`));\n navigateTimeoutRef.current = null;\n }, 1000);\n } catch (error) {\n // Prefer the server error message when available — client-side\n // validation (`MIN_SUBJECT_LENGTH` etc.) is best-effort; the server\n // is authoritative and its message is what should reach the user\n // if we reached the `createTicket` call and it rejected.\n const message = extractErrorMessage(error, 'Failed to create ticket. Please try again.');\n showNotification('error', message, 5000);\n }\n };\n\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files || []);\n const { accepted, rejected } = partitionAttachments(files);\n if (accepted.length > 0) {\n setAttachedFiles((current) => [...current, ...accepted]);\n }\n if (rejected.length > 0) {\n showNotification('error', rejectedAttachmentsMessage(rejected), 6000);\n }\n event.target.value = '';\n };\n\n const removeAttachedFile = (fileIndex: number) => {\n setAttachedFiles((current) => current.filter((_, index) => index !== fileIndex));\n };\n\n return (\n <PageLayout showHeader={false}>\n <NotificationToast notification={notification} />\n\n {/* Header */}\n <div className=\"flex items-center gap-4 mb-6\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate('..')} className=\"p-2\">\n <ArrowLeft size={20} />\n </Button>\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Create New Ticket</h1>\n <p className=\"text-sm text-text-secondary\">Submit a new support request</p>\n </div>\n </div>\n\n {/* Form */}\n <div className=\"max-w-2xl\">\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"p-6 rounded-xl border border-border-seam bg-bg-surface space-y-6\">\n <div>\n <label\n htmlFor=\"support-ticket-subject\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Subject <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n id=\"support-ticket-subject\"\n data-tour=\"support-ticket-subject\"\n type=\"text\"\n required\n value={formData.subject}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setFormData({ ...formData, subject: e.target.value })\n }\n placeholder=\"Brief description of your issue\"\n />\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-description\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Description <span className=\"text-status-error-text\">*</span>\n </label>\n <textarea\n id=\"support-ticket-description\"\n data-tour=\"support-ticket-description\"\n aria-label=\"Description\"\n required\n rows={6}\n value={formData.description || ''}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n placeholder=\"Provide detailed information about your issue\"\n />\n <p className=\"mt-2 text-xs text-text-secondary\">\n Markdown is supported, including fenced code blocks.\n </p>\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-priority\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Priority\n </label>\n <select\n id=\"support-ticket-priority\"\n data-tour=\"support-ticket-priority\"\n value={formData.priority || 'NORMAL'}\n onChange={(e) =>\n setFormData({ ...formData, priority: e.target.value as SupportTicketPriority })\n }\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n >\n <option value=\"LOW\">Low - General question or minor issue</option>\n <option value=\"NORMAL\">Normal - Standard support request</option>\n <option value=\"HIGH\">High - Significant impact on work</option>\n <option value=\"CRITICAL\">Critical - Complete blocker, urgent</option>\n </select>\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-category\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Category\n </label>\n <select\n id=\"support-ticket-category\"\n data-tour=\"support-ticket-category\"\n value={formData.categoryId || ''}\n onChange={(e) =>\n setFormData({\n ...formData,\n categoryId: e.target.value || undefined,\n })\n }\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n >\n <option value=\"\">\n {categoriesLoading ? 'Loading categories...' : 'Select a category'}\n </option>\n {activeCategories.map((category) => (\n <option key={category.id} value={category.id}>\n {category.name}\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <span\n id=\"create-ticket-attachments-heading\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Attachments\n </span>\n <label\n data-tour=\"support-ticket-attachments\"\n className=\"flex cursor-pointer items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken/20 p-4 text-sm text-text-secondary transition-colors hover:bg-bg-sunken/40\"\n >\n <Paperclip size={16} />\n <span>Attach files, screenshots, logs, or documents</span>\n <input\n type=\"file\"\n multiple\n aria-labelledby=\"create-ticket-attachments-heading\"\n className=\"hidden\"\n accept={SUPPORT_ATTACHMENT_ACCEPT}\n onChange={handleFileChange}\n />\n </label>\n\n {attachedFiles.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {attachedFiles.map((file, index) => (\n <div\n key={`${file.name}-${index}`}\n className=\"flex items-center gap-2 rounded-lg border bg-bg-surface px-3 py-2 text-sm\"\n >\n <Paperclip size={14} />\n <span className=\"max-w-[240px] truncate\">{file.name}</span>\n <button\n type=\"button\"\n className=\"flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary hover:text-text-primary\"\n onClick={() => removeAttachedFile(index)}\n aria-label={`Remove attachment ${file.name}`}\n >\n ×\n </button>\n </div>\n ))}\n </div>\n )}\n\n {uploadingFileName && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n Uploading {uploadingFileName}...\n </p>\n )}\n </div>\n </div>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <Button\n type=\"submit\"\n data-tour=\"support-ticket-submit\"\n disabled={createTicketLoading || !formData.subject || !formData.description}\n className=\"flex-1\"\n >\n {createTicketLoading ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n Creating…\n </>\n ) : (\n <>\n <Plus size={18} />\n Create Ticket\n </>\n )}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={() => navigate('..')}>\n Cancel\n </Button>\n </div>\n </form>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,IAAM,IAAqB,GACrB,IAAyB;AAE/B,SAAgB,IAAmB;CACjC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,OAAO,GAAY,EAChC,EAAE,iBAAc,wBAAqB,oBAAiB,GAAqB,EAC3E,EAAE,MAAM,GAAgB,SAAS,MAAsB,EAA4B,EACvF,WAAW;EACT,QAAQ,EAAE,UAAU,IAAM;EAC1B,OAAO;EACP,QAAQ;EACT,EACF,CAAC,EACI,IAAmB,CAAC,GAAI,GAAgB,kBAAkB,SAAS,EAAE,CAAE,CAAC,MAC3E,GAAO,MAAW,EAAM,eAAe,EAAO,aAChD,EACK,CAAC,GAAU,KAAe,EAAmC;EACjE,SAAS;EACT,aAAa;EACb,UAAU,EAAsB;EAChC,YAAY,KAAA;EACb,CAAC,EACI,CAAC,GAAe,KAAoB,EAAiB,EAAE,CAAC,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GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;QAAS,MAAM;QAAI,WAAU;QAAiB,CAAA,EAAA,YAE7C,EAAA,CAAA,GAEH,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA,EAAA,gBAEjB,EAAA,CAAA;OAEE,CAAA,EACT,kBAAC,GAAD;OAAQ,MAAK;OAAS,SAAQ;OAAU,eAAe,EAAS,KAAK;iBAAE;OAE9D,CAAA,CACL;QACD;;IACH,CAAA;GACK"}
|
|
1
|
+
{"version":3,"file":"CreateTicketPage.js","names":[],"sources":["../../../src/support/pages/CreateTicketPage.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { ArrowLeft, Loader2, Plus, Paperclip } from 'lucide-react';\nimport { Button, Input, GlassCard, PagePurpose } from '../components/ui';\nimport { useTicketOperations } from '../hooks/useTicketOperations';\nimport { useGetTicketCategoriesQuery } from '../../generated/global-operations';\nimport { useNotification } from '../hooks/useNotification';\nimport { PageLayout } from '../components/PageLayout';\nimport { NotificationToast } from '../components/NotificationToast';\nimport { useSupport } from '../providers/SupportProvider';\nimport { joinPath } from '../utils';\nimport { extractErrorMessage } from '../utils/errors';\nimport {\n SUPPORT_ATTACHMENT_ACCEPT,\n partitionAttachments,\n rejectedAttachmentsMessage,\n} from '../utils/attachments';\nimport { uploadSupportAttachmentFiles } from '../utils/supportFiles';\nimport { ATTACHMENTS_FAILED_PARAM } from '../constants';\nimport { SupportTicketPriority, type CreateSupportTicketInput } from '../../generated/global-types';\n\n/**\n * Client-side minimum lengths. Keep these in lockstep with the server-side\n * validators in global-support-svc/src/modules/support/utils/validation.ts —\n * when the server tightens or loosens these, update them here too. These are\n * best-effort UX hints only; the server's validation error is authoritative\n * and surfaces through `extractErrorMessage` on the catch path.\n */\nconst MIN_SUBJECT_LENGTH = 5;\nconst MIN_DESCRIPTION_LENGTH = 10;\n\nexport function CreateTicketPage() {\n const navigate = useNavigate();\n const { basePath = '' } = useSupport();\n const { createTicket, createTicketLoading, updateTicket } = useTicketOperations();\n const { data: categoriesData, loading: categoriesLoading } = useGetTicketCategoriesQuery({\n variables: {\n filter: { isActive: true },\n limit: 100,\n offset: 0,\n },\n });\n const activeCategories = [...(categoriesData?.ticketCategories?.nodes ?? [])].sort(\n (first, second) => first.displayOrder - second.displayOrder\n );\n const [formData, setFormData] = useState<CreateSupportTicketInput>({\n subject: '',\n description: '',\n priority: SupportTicketPriority.Normal,\n categoryId: undefined,\n });\n const [attachedFiles, setAttachedFiles] = useState<File[]>([]);\n const [uploadingFileName, setUploadingFileName] = useState<string | null>(null);\n const { notification, notify: showNotification } = useNotification();\n\n // Track the post-success navigate timer so unmounting mid-flight (Cancel\n // / back button / fast subsequent create) doesn't fire a delayed navigate.\n const navigateTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const clearNavigateTimeout = (): void => {\n if (navigateTimeoutRef.current) {\n clearTimeout(navigateTimeoutRef.current);\n navigateTimeoutRef.current = null;\n }\n };\n\n useEffect(() => clearNavigateTimeout, []);\n\n const handleSubmit = async (e: React.FormEvent) => {\n e.preventDefault();\n\n if (formData.subject.trim().length < MIN_SUBJECT_LENGTH) {\n showNotification('error', `Subject must be at least ${MIN_SUBJECT_LENGTH} characters long.`);\n return;\n }\n if ((formData.description ?? '').trim().length < MIN_DESCRIPTION_LENGTH) {\n showNotification(\n 'error',\n `Description must be at least ${MIN_DESCRIPTION_LENGTH} characters long.`\n );\n return;\n }\n\n try {\n const ticket = await createTicket({\n ...formData,\n priority: formData.priority ?? undefined,\n categoryId: formData.categoryId ?? undefined,\n });\n if (!ticket) {\n return;\n }\n\n if (attachedFiles.length > 0) {\n try {\n const uploadResult = await uploadSupportAttachmentFiles({\n ticketId: ticket.id,\n files: attachedFiles,\n onFileProgress: (fileName, progress) => {\n if (progress < 100) {\n setUploadingFileName(fileName);\n }\n },\n });\n\n await updateTicket(ticket.id, {\n metadata: {\n initialAttachmentIds: uploadResult.files.map((file) => file.id),\n },\n });\n setUploadingFileName(null);\n setAttachedFiles([]);\n } catch (uploadError) {\n setUploadingFileName(null);\n // Carry only a code-level flag in the URL — never the raw backend\n // error. Query strings persist in browser history, referer, proxy\n // logs, and analytics; a verbose server error (e.g. an S3 key, a\n // tenant id, a stack line) landing there is an information leak.\n // The destination page composes the user-facing message entirely\n // client-side via useAttachmentsFailedToast.\n console.error('[support] create ticket: attachments failed', uploadError);\n const nextParams = new URLSearchParams({\n [ATTACHMENTS_FAILED_PARAM]: '1',\n });\n navigate(joinPath(basePath, `tickets/${ticket.id}?${nextParams.toString()}`));\n return;\n }\n }\n\n showNotification('success', 'Ticket created successfully!');\n clearNavigateTimeout();\n navigateTimeoutRef.current = setTimeout(() => {\n navigate(joinPath(basePath, `tickets/${ticket.id}`));\n navigateTimeoutRef.current = null;\n }, 1000);\n } catch (error) {\n // Prefer the server error message when available — client-side\n // validation (`MIN_SUBJECT_LENGTH` etc.) is best-effort; the server\n // is authoritative and its message is what should reach the user\n // if we reached the `createTicket` call and it rejected.\n const message = extractErrorMessage(error, 'Failed to create ticket. Please try again.');\n showNotification('error', message, 5000);\n }\n };\n\n const handleFileChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n const files = Array.from(event.target.files || []);\n const { accepted, rejected } = partitionAttachments(files);\n if (accepted.length > 0) {\n setAttachedFiles((current) => [...current, ...accepted]);\n }\n if (rejected.length > 0) {\n showNotification('error', rejectedAttachmentsMessage(rejected), 6000);\n }\n event.target.value = '';\n };\n\n const removeAttachedFile = (fileIndex: number) => {\n setAttachedFiles((current) => current.filter((_, index) => index !== fileIndex));\n };\n\n return (\n <PageLayout showHeader={false}>\n <NotificationToast notification={notification} />\n\n {/* Header */}\n <div className=\"flex items-center gap-4 mb-6\">\n <Button variant=\"ghost\" size=\"sm\" onClick={() => navigate('..')} className=\"p-2\">\n <ArrowLeft size={20} />\n </Button>\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Create New Ticket</h1>\n <p className=\"text-sm text-text-secondary\">Submit a new support request</p>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6 max-w-2xl\">\n Tell us what is going wrong and our support team will pick it up. The clearer your subject,\n description and priority, the faster we can help — attach screenshots, logs or files if they\n explain the problem. You will be able to follow the reply right here once it is submitted.\n </PagePurpose>\n\n {/* Form */}\n <div className=\"max-w-2xl\">\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <GlassCard treatment=\"glass\" glow className=\"p-6 space-y-6\">\n <div>\n <label\n htmlFor=\"support-ticket-subject\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Subject <span className=\"text-status-error-text\">*</span>\n </label>\n <Input\n id=\"support-ticket-subject\"\n data-tour=\"support-ticket-subject\"\n type=\"text\"\n required\n value={formData.subject}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setFormData({ ...formData, subject: e.target.value })\n }\n placeholder=\"Brief description of your issue\"\n />\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-description\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Description <span className=\"text-status-error-text\">*</span>\n </label>\n <textarea\n id=\"support-ticket-description\"\n data-tour=\"support-ticket-description\"\n aria-label=\"Description\"\n required\n rows={6}\n value={formData.description || ''}\n onChange={(e) => setFormData({ ...formData, description: e.target.value })}\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n placeholder=\"Provide detailed information about your issue\"\n />\n <p className=\"mt-2 text-xs text-text-secondary\">\n Markdown is supported, including fenced code blocks.\n </p>\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-priority\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Priority\n </label>\n <select\n id=\"support-ticket-priority\"\n data-tour=\"support-ticket-priority\"\n value={formData.priority || 'NORMAL'}\n onChange={(e) =>\n setFormData({ ...formData, priority: e.target.value as SupportTicketPriority })\n }\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n >\n <option value=\"LOW\">Low - General question or minor issue</option>\n <option value=\"NORMAL\">Normal - Standard support request</option>\n <option value=\"HIGH\">High - Significant impact on work</option>\n <option value=\"CRITICAL\">Critical - Complete blocker, urgent</option>\n </select>\n </div>\n\n <div>\n <label\n htmlFor=\"support-ticket-category\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Category\n </label>\n <select\n id=\"support-ticket-category\"\n data-tour=\"support-ticket-category\"\n value={formData.categoryId || ''}\n onChange={(e) =>\n setFormData({\n ...formData,\n categoryId: e.target.value || undefined,\n })\n }\n className=\"w-full px-4 py-3 rounded-lg border bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-colors\"\n >\n <option value=\"\">\n {categoriesLoading ? 'Loading categories...' : 'Select a category'}\n </option>\n {activeCategories.map((category) => (\n <option key={category.id} value={category.id}>\n {category.name}\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <span\n id=\"create-ticket-attachments-heading\"\n className=\"mb-2 block text-sm font-medium text-text-primary\"\n >\n Attachments\n </span>\n <label\n data-tour=\"support-ticket-attachments\"\n className=\"flex cursor-pointer items-center justify-center gap-2 rounded-lg border border-dashed border-border-subtle bg-bg-sunken/20 p-4 text-sm text-text-secondary transition-colors hover:bg-bg-sunken/40\"\n >\n <Paperclip size={16} />\n <span>Attach files, screenshots, logs, or documents</span>\n <input\n type=\"file\"\n multiple\n aria-labelledby=\"create-ticket-attachments-heading\"\n className=\"hidden\"\n accept={SUPPORT_ATTACHMENT_ACCEPT}\n onChange={handleFileChange}\n />\n </label>\n\n {attachedFiles.length > 0 && (\n <div className=\"mt-3 flex flex-wrap gap-2\">\n {attachedFiles.map((file, index) => (\n <div\n key={`${file.name}-${index}`}\n className=\"flex items-center gap-2 rounded-lg border bg-bg-surface px-3 py-2 text-sm\"\n >\n <Paperclip size={14} />\n <span className=\"max-w-[240px] truncate\">{file.name}</span>\n <button\n type=\"button\"\n className=\"flex min-h-11 min-w-11 items-center justify-center rounded text-text-secondary hover:text-text-primary\"\n onClick={() => removeAttachedFile(index)}\n aria-label={`Remove attachment ${file.name}`}\n >\n ×\n </button>\n </div>\n ))}\n </div>\n )}\n\n {uploadingFileName && (\n <p className=\"mt-2 text-xs text-text-secondary\">\n Uploading {uploadingFileName}...\n </p>\n )}\n </div>\n </GlassCard>\n\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <Button\n type=\"submit\"\n data-tour=\"support-ticket-submit\"\n disabled={createTicketLoading || !formData.subject || !formData.description}\n className=\"flex-1\"\n >\n {createTicketLoading ? (\n <>\n <Loader2 size={18} className=\"animate-spin\" />\n Creating…\n </>\n ) : (\n <>\n <Plus size={18} />\n Create Ticket\n </>\n )}\n </Button>\n <Button type=\"button\" variant=\"outline\" onClick={() => navigate('..')}>\n Cancel\n </Button>\n </div>\n </form>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AA4BA,IAAM,IAAqB,GACrB,IAAyB;AAE/B,SAAgB,IAAmB;CACjC,IAAM,IAAW,GAAa,EACxB,EAAE,cAAW,OAAO,GAAY,EAChC,EAAE,iBAAc,wBAAqB,oBAAiB,GAAqB,EAC3E,EAAE,MAAM,GAAgB,SAAS,MAAsB,EAA4B,EACvF,WAAW;EACT,QAAQ,EAAE,UAAU,IAAM;EAC1B,OAAO;EACP,QAAQ;EACT,EACF,CAAC,EACI,IAAmB,CAAC,GAAI,GAAgB,kBAAkB,SAAS,EAAE,CAAE,CAAC,MAC3E,GAAO,MAAW,EAAM,eAAe,EAAO,aAChD,EACK,CAAC,GAAU,KAAe,EAAmC;EACjE,SAAS;EACT,aAAa;EACb,UAAU,EAAsB;EAChC,YAAY,KAAA;EACb,CAAC,EACI,CAAC,GAAe,KAAoB,EAAiB,EAAE,CAAC,EACxD,CAAC,G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