@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,186 +1,216 @@
|
|
|
1
1
|
import { useSupport as e } from "../providers/SupportProvider.js";
|
|
2
2
|
import { isAdminRole as t } from "../utils/index.js";
|
|
3
|
-
import { Button as n } from "../components/ui.js";
|
|
4
|
-
import { useGetCannedResponsesQuery as
|
|
5
|
-
import { MessageType as
|
|
6
|
-
import { EmptyState as
|
|
7
|
-
import { useTicketOperations as
|
|
8
|
-
import { useNotification as
|
|
9
|
-
import { NotificationToast as
|
|
10
|
-
import { extractErrorMessage as
|
|
11
|
-
import { uploadSupportAttachmentFiles as
|
|
12
|
-
import { useAttachmentsFailedToast as
|
|
13
|
-
import { TicketHeader as
|
|
14
|
-
import { TicketSidebar as
|
|
15
|
-
import { AttachmentList as
|
|
16
|
-
import { MarkdownContent as
|
|
17
|
-
import { MessageThread as
|
|
18
|
-
import { MessageComposer as
|
|
19
|
-
import { useEffect as
|
|
20
|
-
import { AlertCircle as
|
|
21
|
-
import { useNavigate as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { useShellUi as
|
|
3
|
+
import { Button as n, EmphasisPanel as r, NextSteps as i } from "../components/ui.js";
|
|
4
|
+
import { useGetCannedResponsesQuery as a } from "../../generated/global-operations.js";
|
|
5
|
+
import { MessageType as o, SupportTicketStatus as s } from "../../generated/global-types.js";
|
|
6
|
+
import { EmptyState as c, LoadingState as l, PageLayout as u } from "../components/PageLayout.js";
|
|
7
|
+
import { useTicketOperations as d } from "../hooks/useTicketOperations.js";
|
|
8
|
+
import { useNotification as f } from "../hooks/useNotification.js";
|
|
9
|
+
import { NotificationToast as p } from "../components/NotificationToast.js";
|
|
10
|
+
import { extractErrorMessage as m } from "../utils/errors.js";
|
|
11
|
+
import { uploadSupportAttachmentFiles as h } from "../utils/supportFiles.js";
|
|
12
|
+
import { useAttachmentsFailedToast as g } from "../hooks/useAttachmentsFailedToast.js";
|
|
13
|
+
import { TicketHeader as _ } from "../components/tickets/TicketHeader.js";
|
|
14
|
+
import { TicketSidebar as v } from "../components/tickets/TicketSidebar.js";
|
|
15
|
+
import { AttachmentList as y } from "../components/tickets/AttachmentList.js";
|
|
16
|
+
import { MarkdownContent as b } from "../components/tickets/MarkdownContent.js";
|
|
17
|
+
import { MessageThread as x } from "../components/tickets/MessageThread.js";
|
|
18
|
+
import { MessageComposer as S } from "../components/tickets/MessageComposer.js";
|
|
19
|
+
import { useEffect as C, useRef as w } from "react";
|
|
20
|
+
import { AlertCircle as T, ArrowLeft as E } from "lucide-react";
|
|
21
|
+
import { useNavigate as D, useParams as O } from "react-router-dom";
|
|
22
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
23
|
+
import { useShellUi as j } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
|
|
24
24
|
//#region src/support/pages/TicketDetailAdminPage.tsx
|
|
25
|
-
function
|
|
26
|
-
let { ticketId:
|
|
25
|
+
function M() {
|
|
26
|
+
let { ticketId: M } = O(), N = D(), { currentUser: P } = e(), { footerVisible: F, setFooterVisible: I } = j(), L = w(F), { ticketDetail: R, ticketDetailLoading: z, ticketDetailError: B, changeTicketStatus: V, addTicketMessage: H, addMessageLoading: U, setSelectedTicket: W } = d(), G = t(P?.role), { data: K, loading: q } = a({
|
|
27
27
|
variables: {
|
|
28
28
|
filter: { isActive: !0 },
|
|
29
29
|
limit: 100
|
|
30
30
|
},
|
|
31
|
-
skip: !
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}), [
|
|
36
|
-
|
|
37
|
-
}), [
|
|
38
|
-
let
|
|
39
|
-
|
|
31
|
+
skip: !G
|
|
32
|
+
}), J = K?.cannedResponses.nodes ?? [], { notification: Y, notify: X } = f();
|
|
33
|
+
g(X), C(() => (M && W({ id: M }), () => {
|
|
34
|
+
W(null);
|
|
35
|
+
}), [M, W]), C(() => (I(!1), () => {
|
|
36
|
+
I(L.current);
|
|
37
|
+
}), [I]);
|
|
38
|
+
let Z = () => {
|
|
39
|
+
W(null), N("..");
|
|
40
|
+
}, Q = async (e) => {
|
|
41
|
+
if (M) try {
|
|
42
|
+
await V(M, e);
|
|
43
|
+
} catch (e) {
|
|
44
|
+
console.error("Failed to change status:", e), X("error", m(e, "Failed to change ticket status."), 6e3);
|
|
45
|
+
}
|
|
46
|
+
}, $ = async (e, t, n) => {
|
|
47
|
+
if (!M) return;
|
|
48
|
+
if (!e.trim() && n.length === 0) {
|
|
49
|
+
X("error", "Nothing to send.", 6e3);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let r, i = null;
|
|
53
|
+
if (n.length > 0) try {
|
|
54
|
+
r = (await h({
|
|
55
|
+
ticketId: M,
|
|
56
|
+
files: n
|
|
57
|
+
})).files.map((e) => e.id);
|
|
58
|
+
} catch (e) {
|
|
59
|
+
i = m(e, "Failed to upload attachments.");
|
|
60
|
+
}
|
|
61
|
+
if (!e.trim() && !r?.length) return X("error", i ? `Attachment upload failed: ${i}` : "Nothing to send.", 6e3), n.length > 0 ? { preserveAttachedFiles: !0 } : void 0;
|
|
62
|
+
try {
|
|
63
|
+
if (await H({
|
|
64
|
+
ticketId: M,
|
|
65
|
+
message: e,
|
|
66
|
+
type: t ? o.InternalNote : o.AgentReply,
|
|
67
|
+
isInternal: t,
|
|
68
|
+
attachments: r
|
|
69
|
+
}), i) return X("error", `Message sent, but attachments failed: ${i}`, 6e3), { preserveAttachedFiles: n.length > 0 };
|
|
70
|
+
} catch (e) {
|
|
71
|
+
return console.error("[support] addTicketMessage failed", e), X("error", m(e, "Failed to send message."), 6e3), {
|
|
72
|
+
preserveMessage: !0,
|
|
73
|
+
preserveAttachedFiles: n.length > 0
|
|
74
|
+
};
|
|
75
|
+
}
|
|
40
76
|
};
|
|
41
|
-
return
|
|
77
|
+
return z && !R ? /* @__PURE__ */ k(u, {
|
|
42
78
|
showHeader: !1,
|
|
43
|
-
children: /* @__PURE__ */
|
|
44
|
-
}) :
|
|
79
|
+
children: /* @__PURE__ */ k(l, { message: "Loading ticket details..." })
|
|
80
|
+
}) : B ? /* @__PURE__ */ k(u, {
|
|
45
81
|
showHeader: !1,
|
|
46
|
-
children: /* @__PURE__ */
|
|
82
|
+
children: /* @__PURE__ */ A("div", {
|
|
47
83
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
48
84
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ k("div", {
|
|
50
86
|
className: "p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4",
|
|
51
|
-
children: /* @__PURE__ */
|
|
87
|
+
children: /* @__PURE__ */ k(T, { size: 48 })
|
|
52
88
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ k("h3", {
|
|
54
90
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
55
91
|
children: "Failed to load ticket"
|
|
56
92
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ k("p", {
|
|
58
94
|
className: "text-sm text-text-secondary max-w-md mb-4",
|
|
59
|
-
children:
|
|
95
|
+
children: B.message || "An error occurred while loading the ticket. Please try again."
|
|
60
96
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
onClick:
|
|
63
|
-
children: [/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ A(n, {
|
|
98
|
+
onClick: Z,
|
|
99
|
+
children: [/* @__PURE__ */ k(E, { size: 18 }), "Back to Tickets"]
|
|
64
100
|
})
|
|
65
101
|
]
|
|
66
102
|
})
|
|
67
|
-
}) :
|
|
103
|
+
}) : R ? /* @__PURE__ */ A("div", {
|
|
68
104
|
className: "flex h-full min-h-0 flex-col bg-bg-surface",
|
|
69
105
|
children: [
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
ticket:
|
|
73
|
-
onBack:
|
|
74
|
-
onStatusChange:
|
|
75
|
-
if (A) try {
|
|
76
|
-
await z(A, e);
|
|
77
|
-
} catch (e) {
|
|
78
|
-
console.error("Failed to change status:", e), J("error", d(e, "Failed to change ticket status."), 6e3);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
106
|
+
/* @__PURE__ */ k(p, { notification: Y }),
|
|
107
|
+
/* @__PURE__ */ k(_, {
|
|
108
|
+
ticket: R,
|
|
109
|
+
onBack: Z,
|
|
110
|
+
onStatusChange: Q
|
|
81
111
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ A("div", {
|
|
83
113
|
className: "flex min-h-0 flex-1 overflow-hidden",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
114
|
+
children: [/* @__PURE__ */ A("div", {
|
|
85
115
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
86
116
|
children: [
|
|
87
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ k("div", {
|
|
88
118
|
className: "shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
89
|
-
children:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
119
|
+
children: /* @__PURE__ */ A(r, {
|
|
120
|
+
className: "p-4",
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ k("h2", {
|
|
123
|
+
className: "text-lg font-semibold mb-2 text-text-primary",
|
|
124
|
+
children: "Customer request — Description"
|
|
125
|
+
}),
|
|
126
|
+
/* @__PURE__ */ k(b, {
|
|
127
|
+
content: R.description,
|
|
128
|
+
className: "text-sm"
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ k(y, {
|
|
131
|
+
ticketId: R.id,
|
|
132
|
+
fileIds: R.metadata?.initialAttachmentIds ?? []
|
|
133
|
+
})
|
|
134
|
+
]
|
|
135
|
+
})
|
|
103
136
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ A("div", {
|
|
138
|
+
"data-tour": "support-admin-ticket-conversation",
|
|
105
139
|
className: "min-h-0 flex-1 overflow-y-auto p-4 sm:p-6",
|
|
106
140
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ k(i, {
|
|
142
|
+
storageKey: "support-ticket-detail-admin",
|
|
143
|
+
title: "Agent quick actions",
|
|
144
|
+
className: "mb-6",
|
|
145
|
+
steps: [{
|
|
146
|
+
id: "reply",
|
|
147
|
+
label: "Reply to the customer",
|
|
148
|
+
description: "Draft a response in the composer below.",
|
|
149
|
+
onClick: () => document.querySelector("[data-tour=\"support-admin-ticket-conversation\"]")?.scrollTo({
|
|
150
|
+
top: 999999,
|
|
151
|
+
behavior: "smooth"
|
|
152
|
+
})
|
|
153
|
+
}, ...G ? [{
|
|
154
|
+
id: "in-progress",
|
|
155
|
+
label: "Mark as In Progress",
|
|
156
|
+
description: "Let the customer know you are working on it.",
|
|
157
|
+
onClick: () => void Q(s.InProgress),
|
|
158
|
+
done: R.status === s.InProgress
|
|
159
|
+
}, {
|
|
160
|
+
id: "resolve",
|
|
161
|
+
label: "Resolve the ticket",
|
|
162
|
+
description: "Close out the request once the issue is fixed.",
|
|
163
|
+
onClick: () => void Q(s.Resolved),
|
|
164
|
+
done: R.status === s.Resolved
|
|
165
|
+
}] : []]
|
|
166
|
+
}),
|
|
167
|
+
/* @__PURE__ */ k("h2", {
|
|
108
168
|
className: "text-lg font-semibold mb-4 text-text-primary",
|
|
109
169
|
children: "Conversation"
|
|
110
170
|
}),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
ticketId:
|
|
113
|
-
messages:
|
|
114
|
-
currentUserId:
|
|
171
|
+
/* @__PURE__ */ k(x, {
|
|
172
|
+
ticketId: R.id,
|
|
173
|
+
messages: R.messages || [],
|
|
174
|
+
currentUserId: P?.id,
|
|
115
175
|
viewerRole: "agent",
|
|
116
|
-
showInternalMessages:
|
|
117
|
-
showRealAgentIdentity:
|
|
176
|
+
showInternalMessages: G,
|
|
177
|
+
showRealAgentIdentity: G
|
|
118
178
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ k("div", {
|
|
120
180
|
className: "mt-6 rounded-xl border border-border-seam bg-bg-surface p-4 xl:hidden",
|
|
121
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ k(v, { ticket: R })
|
|
122
182
|
})
|
|
123
183
|
]
|
|
124
184
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
ticketId:
|
|
127
|
-
onSendMessage:
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
let r, a = null;
|
|
134
|
-
if (n.length > 0) try {
|
|
135
|
-
r = (await f({
|
|
136
|
-
ticketId: A,
|
|
137
|
-
files: n
|
|
138
|
-
})).files.map((e) => e.id);
|
|
139
|
-
} catch (e) {
|
|
140
|
-
a = d(e, "Failed to upload attachments.");
|
|
141
|
-
}
|
|
142
|
-
if (!e.trim() && !r?.length) return J("error", a ? `Attachment upload failed: ${a}` : "Nothing to send.", 6e3), n.length > 0 ? { preserveAttachedFiles: !0 } : void 0;
|
|
143
|
-
try {
|
|
144
|
-
if (await B({
|
|
145
|
-
ticketId: A,
|
|
146
|
-
message: e,
|
|
147
|
-
type: t ? i.InternalNote : i.AgentReply,
|
|
148
|
-
isInternal: t,
|
|
149
|
-
attachments: r
|
|
150
|
-
}), a) return J("error", `Message sent, but attachments failed: ${a}`, 6e3), { preserveAttachedFiles: n.length > 0 };
|
|
151
|
-
} catch (e) {
|
|
152
|
-
return console.error("[support] addTicketMessage failed", e), J("error", d(e, "Failed to send message."), 6e3), {
|
|
153
|
-
preserveMessage: !0,
|
|
154
|
-
preserveAttachedFiles: n.length > 0
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
disabled: V,
|
|
159
|
-
allowInternalNotes: U,
|
|
160
|
-
cannedResponses: K,
|
|
161
|
-
cannedResponsesLoading: G
|
|
185
|
+
/* @__PURE__ */ k(S, {
|
|
186
|
+
ticketId: R.id,
|
|
187
|
+
onSendMessage: $,
|
|
188
|
+
disabled: U,
|
|
189
|
+
allowInternalNotes: G,
|
|
190
|
+
cannedResponses: J,
|
|
191
|
+
cannedResponsesLoading: q
|
|
162
192
|
})
|
|
163
193
|
]
|
|
164
|
-
}), /* @__PURE__ */
|
|
194
|
+
}), /* @__PURE__ */ k("div", {
|
|
165
195
|
className: "hidden min-h-0 xl:block",
|
|
166
|
-
children: /* @__PURE__ */
|
|
196
|
+
children: /* @__PURE__ */ k(v, { ticket: R })
|
|
167
197
|
})]
|
|
168
198
|
})
|
|
169
199
|
]
|
|
170
|
-
}) : /* @__PURE__ */
|
|
200
|
+
}) : /* @__PURE__ */ k(u, {
|
|
171
201
|
showHeader: !1,
|
|
172
|
-
children: /* @__PURE__ */
|
|
173
|
-
|
|
202
|
+
children: /* @__PURE__ */ k(c, {
|
|
203
|
+
illustration: "empty-search",
|
|
174
204
|
title: "Ticket not found",
|
|
175
205
|
description: "The ticket you're looking for doesn't exist or has been deleted.",
|
|
176
|
-
action: /* @__PURE__ */
|
|
177
|
-
onClick:
|
|
178
|
-
children: [/* @__PURE__ */
|
|
206
|
+
action: /* @__PURE__ */ A(n, {
|
|
207
|
+
onClick: Z,
|
|
208
|
+
children: [/* @__PURE__ */ k(E, { size: 18 }), "Back to Tickets"]
|
|
179
209
|
})
|
|
180
210
|
})
|
|
181
211
|
});
|
|
182
212
|
}
|
|
183
213
|
//#endregion
|
|
184
|
-
export {
|
|
214
|
+
export { M as TicketDetailAdminPage };
|
|
185
215
|
|
|
186
216
|
//# sourceMappingURL=TicketDetailAdminPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TicketDetailAdminPage.js","names":[],"sources":["../../../src/support/pages/TicketDetailAdminPage.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\nimport { AlertCircle, Ticket, ArrowLeft } from 'lucide-react';\nimport { Button } from '../components/ui';\nimport { useShellUi } from '@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider';\nimport { useTicketOperations } from '../hooks/useTicketOperations';\nimport { useGetCannedResponsesQuery } from '../../generated/global-operations';\nimport { useNotification } from '../hooks/useNotification';\nimport { useAttachmentsFailedToast } from '../hooks/useAttachmentsFailedToast';\nimport { TicketHeader } from '../components/tickets/TicketHeader';\nimport { TicketSidebar } from '../components/tickets/TicketSidebar';\nimport { MessageThread } from '../components/tickets/MessageThread';\nimport {\n MessageComposer,\n type MessageComposerSendResult,\n} from '../components/tickets/MessageComposer';\nimport { AttachmentList } from '../components/tickets/AttachmentList';\nimport { MarkdownContent } from '../components/tickets/MarkdownContent';\nimport { NotificationToast } from '../components/NotificationToast';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport {\n MessageType,\n type SupportTicketStatus,\n type SupportTicket,\n} from '../../generated/global-types';\nimport { useSupport } from '../providers/SupportProvider';\nimport { extractErrorMessage } from '../utils/errors';\nimport { isAdminRole } from '../utils';\nimport { uploadSupportAttachmentFiles } from '../utils/supportFiles';\n\n/**\n * Admin-facing ticket detail page.\n *\n * Admins/agents get full controls: status changes, ticket assignment,\n * internal notes, and all reply types in addition to the standard\n * ticket view and conversation.\n */\nexport function TicketDetailAdminPage() {\n const { ticketId } = useParams<{ ticketId: string }>();\n const navigate = useNavigate();\n const { currentUser } = useSupport();\n const { footerVisible, setFooterVisible } = useShellUi();\n const initialFooterVisible = useRef(footerVisible);\n const {\n ticketDetail,\n ticketDetailLoading,\n ticketDetailError,\n changeTicketStatus,\n addTicketMessage,\n addMessageLoading,\n setSelectedTicket,\n } = useTicketOperations();\n const canLeaveInternalNotes = isAdminRole(currentUser?.role);\n const { data: cannedResponsesData, loading: cannedResponsesLoading } = useGetCannedResponsesQuery(\n {\n variables: {\n filter: { isActive: true },\n limit: 100,\n },\n skip: !canLeaveInternalNotes,\n }\n );\n const cannedResponses = cannedResponsesData?.cannedResponses.nodes ?? [];\n\n const { notification, notify } = useNotification();\n useAttachmentsFailedToast(notify);\n\n useEffect(() => {\n if (ticketId) {\n setSelectedTicket({ id: ticketId } as SupportTicket);\n }\n return () => {\n setSelectedTicket(null);\n };\n }, [ticketId, setSelectedTicket]);\n\n useEffect(() => {\n setFooterVisible(false);\n\n return () => {\n setFooterVisible(initialFooterVisible.current);\n };\n }, [setFooterVisible]);\n\n const handleBack = () => {\n setSelectedTicket(null);\n navigate('..');\n };\n\n const handleStatusChange = async (status: SupportTicketStatus) => {\n if (!ticketId) return;\n try {\n await changeTicketStatus(ticketId, status);\n } catch (error) {\n console.error('Failed to change status:', error);\n notify('error', extractErrorMessage(error, 'Failed to change ticket status.'), 6000);\n }\n };\n\n const handleSendMessage = async (\n messageText: string,\n isInternal: boolean,\n files: File[]\n ): Promise<MessageComposerSendResult | void> => {\n if (!ticketId) return;\n\n // Synchronous guard: if there is nothing to send AND nothing to upload, bail\n // before touching the network.\n if (!messageText.trim() && files.length === 0) {\n notify('error', 'Nothing to send.', 6000);\n return;\n }\n\n let attachmentIds: string[] | undefined;\n let attachmentError: string | null = null;\n\n if (files.length > 0) {\n try {\n const uploadResult = await uploadSupportAttachmentFiles({\n ticketId,\n files,\n });\n attachmentIds = uploadResult.files.map((file) => file.id);\n } catch (uploadError) {\n attachmentError = extractErrorMessage(uploadError, 'Failed to upload attachments.');\n }\n }\n\n if (!messageText.trim() && !attachmentIds?.length) {\n const errorMessage = attachmentError\n ? `Attachment upload failed: ${attachmentError}`\n : 'Nothing to send.';\n notify('error', errorMessage, 6000);\n return files.length > 0 ? { preserveAttachedFiles: true } : undefined;\n }\n\n try {\n await addTicketMessage({\n ticketId,\n message: messageText,\n type: isInternal ? MessageType.InternalNote : MessageType.AgentReply,\n isInternal,\n attachments: attachmentIds,\n });\n\n if (attachmentError) {\n notify('error', `Message sent, but attachments failed: ${attachmentError}`, 6000);\n return { preserveAttachedFiles: files.length > 0 };\n }\n } catch (sendError) {\n console.error('[support] addTicketMessage failed', sendError);\n notify('error', extractErrorMessage(sendError, 'Failed to send message.'), 6000);\n return {\n preserveMessage: true,\n preserveAttachedFiles: files.length > 0,\n };\n }\n };\n\n if (ticketDetailLoading && !ticketDetail) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message=\"Loading ticket details...\" />\n </PageLayout>\n );\n }\n\n if (ticketDetailError) {\n return (\n <PageLayout showHeader={false}>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load ticket</h3>\n <p className=\"text-sm text-text-secondary max-w-md mb-4\">\n {ticketDetailError.message ||\n 'An error occurred while loading the ticket. Please try again.'}\n </p>\n <Button onClick={handleBack}>\n <ArrowLeft size={18} />\n Back to Tickets\n </Button>\n </div>\n </PageLayout>\n );\n }\n\n if (!ticketDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n icon={<Ticket size={48} />}\n title=\"Ticket not found\"\n description=\"The ticket you're looking for doesn't exist or has been deleted.\"\n action={\n <Button onClick={handleBack}>\n <ArrowLeft size={18} />\n Back to Tickets\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col bg-bg-surface\">\n <NotificationToast notification={notification} />\n\n <TicketHeader ticket={ticketDetail} onBack={handleBack} onStatusChange={handleStatusChange} />\n\n <div className=\"flex min-h-0 flex-1 overflow-hidden\">\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden\">\n <div className=\"shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <h2 className=\"text-lg font-semibold mb-2 text-text-primary\">Description</h2>\n <MarkdownContent content={ticketDetail.description} className=\"text-sm\" />\n <AttachmentList\n ticketId={ticketDetail.id}\n fileIds={\n ((ticketDetail.metadata as Record<string, unknown> | null)?.initialAttachmentIds as\n | string[]\n | undefined) ?? []\n }\n />\n </div>\n\n <div className=\"min-h-0 flex-1 overflow-y-auto p-4 sm:p-6\">\n <h2 className=\"text-lg font-semibold mb-4 text-text-primary\">Conversation</h2>\n <MessageThread\n ticketId={ticketDetail.id}\n messages={ticketDetail.messages || []}\n currentUserId={currentUser?.id}\n viewerRole=\"agent\"\n showInternalMessages={canLeaveInternalNotes}\n showRealAgentIdentity={canLeaveInternalNotes}\n />\n\n <div className=\"mt-6 rounded-xl border border-border-seam bg-bg-surface p-4 xl:hidden\">\n <TicketSidebar ticket={ticketDetail} />\n </div>\n </div>\n\n <MessageComposer\n ticketId={ticketDetail.id}\n onSendMessage={handleSendMessage}\n disabled={addMessageLoading}\n allowInternalNotes={canLeaveInternalNotes}\n cannedResponses={cannedResponses}\n cannedResponsesLoading={cannedResponsesLoading}\n />\n </div>\n\n <div className=\"hidden min-h-0 xl:block\">\n <TicketSidebar ticket={ticketDetail} />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,IAAwB;CACtC,IAAM,EAAE,gBAAa,GAAiC,EAChD,IAAW,GAAa,EACxB,EAAE,mBAAgB,GAAY,EAC9B,EAAE,kBAAe,wBAAqB,GAAY,EAClD,IAAuB,EAAO,EAAc,EAC5C,EACJ,iBACA,wBACA,sBACA,uBACA,qBACA,sBACA,yBACE,GAAqB,EACnB,IAAwB,EAAY,GAAa,KAAK,EACtD,EAAE,MAAM,GAAqB,SAAS,MAA2B,EACrE;EACE,WAAW;GACT,QAAQ,EAAE,UAAU,IAAM;GAC1B,OAAO;GACR;EACD,MAAM,CAAC;EACR,CACF,EACK,IAAkB,GAAqB,gBAAgB,SAAS,EAAE,EAElE,EAAE,iBA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EAAO,SAAS,yCAAyC,KAAmB,IAAK,EAC1E,EAAE,uBAAuB,EAAM,SAAS,GAAG;iBAE7C,GAAW;AAGlB,gBAFA,QAAQ,MAAM,qCAAqC,EAAU,EAC7D,EAAO,SAAS,EAAoB,GAAW,0BAA0B,EAAE,IAAK,EACzE;UACL,iBAAiB;UACjB,uBAAuB,EAAM,SAAS;UACvC;;;OA2FK,UAAU;OACV,oBAAoB;OACH;OACO;OACxB,CAAA;MACE;QAEN,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAe,QAAQ,GAAgB,CAAA;KACnC,CAAA,CACF;;GACF;MAnEJ,kBAAC,GAAD;EAAY,YAAY;YACtB,kBAAC,GAAD;GACE,MAAM,kBAAC,GAAD,EAAQ,MAAM,IAAM,CAAA;GAC1B,OAAM;GACN,aAAY;GACZ,QACE,kBAAC,GAAD;IAAQ,SAAS;cAAjB,CACE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EAAA,kBAEhB;;GAEX,CAAA;EACS,CAAA"}
|
|
1
|
+
{"version":3,"file":"TicketDetailAdminPage.js","names":[],"sources":["../../../src/support/pages/TicketDetailAdminPage.tsx"],"sourcesContent":["import { useEffect, useRef } from 'react';\nimport { useParams, useNavigate } from 'react-router-dom';\nimport { AlertCircle, ArrowLeft } from 'lucide-react';\nimport { Button, EmphasisPanel, NextSteps } from '../components/ui';\nimport { useShellUi } from '@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider';\nimport { useTicketOperations } from '../hooks/useTicketOperations';\nimport { useGetCannedResponsesQuery } from '../../generated/global-operations';\nimport { useNotification } from '../hooks/useNotification';\nimport { useAttachmentsFailedToast } from '../hooks/useAttachmentsFailedToast';\nimport { TicketHeader } from '../components/tickets/TicketHeader';\nimport { TicketSidebar } from '../components/tickets/TicketSidebar';\nimport { MessageThread } from '../components/tickets/MessageThread';\nimport {\n MessageComposer,\n type MessageComposerSendResult,\n} from '../components/tickets/MessageComposer';\nimport { AttachmentList } from '../components/tickets/AttachmentList';\nimport { MarkdownContent } from '../components/tickets/MarkdownContent';\nimport { NotificationToast } from '../components/NotificationToast';\nimport { PageLayout, LoadingState, EmptyState } from '../components/PageLayout';\nimport {\n MessageType,\n SupportTicketStatus,\n type SupportTicket,\n} from '../../generated/global-types';\nimport { useSupport } from '../providers/SupportProvider';\nimport { extractErrorMessage } from '../utils/errors';\nimport { isAdminRole } from '../utils';\nimport { uploadSupportAttachmentFiles } from '../utils/supportFiles';\n\n/**\n * Admin-facing ticket detail page.\n *\n * Admins/agents get full controls: status changes, ticket assignment,\n * internal notes, and all reply types in addition to the standard\n * ticket view and conversation.\n */\nexport function TicketDetailAdminPage() {\n const { ticketId } = useParams<{ ticketId: string }>();\n const navigate = useNavigate();\n const { currentUser } = useSupport();\n const { footerVisible, setFooterVisible } = useShellUi();\n const initialFooterVisible = useRef(footerVisible);\n const {\n ticketDetail,\n ticketDetailLoading,\n ticketDetailError,\n changeTicketStatus,\n addTicketMessage,\n addMessageLoading,\n setSelectedTicket,\n } = useTicketOperations();\n const canLeaveInternalNotes = isAdminRole(currentUser?.role);\n const { data: cannedResponsesData, loading: cannedResponsesLoading } = useGetCannedResponsesQuery(\n {\n variables: {\n filter: { isActive: true },\n limit: 100,\n },\n skip: !canLeaveInternalNotes,\n }\n );\n const cannedResponses = cannedResponsesData?.cannedResponses.nodes ?? [];\n\n const { notification, notify } = useNotification();\n useAttachmentsFailedToast(notify);\n\n useEffect(() => {\n if (ticketId) {\n setSelectedTicket({ id: ticketId } as SupportTicket);\n }\n return () => {\n setSelectedTicket(null);\n };\n }, [ticketId, setSelectedTicket]);\n\n useEffect(() => {\n setFooterVisible(false);\n\n return () => {\n setFooterVisible(initialFooterVisible.current);\n };\n }, [setFooterVisible]);\n\n const handleBack = () => {\n setSelectedTicket(null);\n navigate('..');\n };\n\n const handleStatusChange = async (status: SupportTicketStatus) => {\n if (!ticketId) return;\n try {\n await changeTicketStatus(ticketId, status);\n } catch (error) {\n console.error('Failed to change status:', error);\n notify('error', extractErrorMessage(error, 'Failed to change ticket status.'), 6000);\n }\n };\n\n const handleSendMessage = async (\n messageText: string,\n isInternal: boolean,\n files: File[]\n ): Promise<MessageComposerSendResult | void> => {\n if (!ticketId) return;\n\n // Synchronous guard: if there is nothing to send AND nothing to upload, bail\n // before touching the network.\n if (!messageText.trim() && files.length === 0) {\n notify('error', 'Nothing to send.', 6000);\n return;\n }\n\n let attachmentIds: string[] | undefined;\n let attachmentError: string | null = null;\n\n if (files.length > 0) {\n try {\n const uploadResult = await uploadSupportAttachmentFiles({\n ticketId,\n files,\n });\n attachmentIds = uploadResult.files.map((file) => file.id);\n } catch (uploadError) {\n attachmentError = extractErrorMessage(uploadError, 'Failed to upload attachments.');\n }\n }\n\n if (!messageText.trim() && !attachmentIds?.length) {\n const errorMessage = attachmentError\n ? `Attachment upload failed: ${attachmentError}`\n : 'Nothing to send.';\n notify('error', errorMessage, 6000);\n return files.length > 0 ? { preserveAttachedFiles: true } : undefined;\n }\n\n try {\n await addTicketMessage({\n ticketId,\n message: messageText,\n type: isInternal ? MessageType.InternalNote : MessageType.AgentReply,\n isInternal,\n attachments: attachmentIds,\n });\n\n if (attachmentError) {\n notify('error', `Message sent, but attachments failed: ${attachmentError}`, 6000);\n return { preserveAttachedFiles: files.length > 0 };\n }\n } catch (sendError) {\n console.error('[support] addTicketMessage failed', sendError);\n notify('error', extractErrorMessage(sendError, 'Failed to send message.'), 6000);\n return {\n preserveMessage: true,\n preserveAttachedFiles: files.length > 0,\n };\n }\n };\n\n if (ticketDetailLoading && !ticketDetail) {\n return (\n <PageLayout showHeader={false}>\n <LoadingState message=\"Loading ticket details...\" />\n </PageLayout>\n );\n }\n\n if (ticketDetailError) {\n return (\n <PageLayout showHeader={false}>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load ticket</h3>\n <p className=\"text-sm text-text-secondary max-w-md mb-4\">\n {ticketDetailError.message ||\n 'An error occurred while loading the ticket. Please try again.'}\n </p>\n <Button onClick={handleBack}>\n <ArrowLeft size={18} />\n Back to Tickets\n </Button>\n </div>\n </PageLayout>\n );\n }\n\n if (!ticketDetail) {\n return (\n <PageLayout showHeader={false}>\n <EmptyState\n illustration=\"empty-search\"\n title=\"Ticket not found\"\n description=\"The ticket you're looking for doesn't exist or has been deleted.\"\n action={\n <Button onClick={handleBack}>\n <ArrowLeft size={18} />\n Back to Tickets\n </Button>\n }\n />\n </PageLayout>\n );\n }\n\n return (\n <div className=\"flex h-full min-h-0 flex-col bg-bg-surface\">\n <NotificationToast notification={notification} />\n\n <TicketHeader ticket={ticketDetail} onBack={handleBack} onStatusChange={handleStatusChange} />\n\n <div className=\"flex min-h-0 flex-1 overflow-hidden\">\n <div className=\"flex min-h-0 flex-1 flex-col overflow-hidden\">\n <div className=\"shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6\">\n <EmphasisPanel className=\"p-4\">\n <h2 className=\"text-lg font-semibold mb-2 text-text-primary\">\n Customer request — Description\n </h2>\n <MarkdownContent content={ticketDetail.description} className=\"text-sm\" />\n <AttachmentList\n ticketId={ticketDetail.id}\n fileIds={\n ((ticketDetail.metadata as Record<string, unknown> | null)\n ?.initialAttachmentIds as string[] | undefined) ?? []\n }\n />\n </EmphasisPanel>\n </div>\n\n <div\n data-tour=\"support-admin-ticket-conversation\"\n className=\"min-h-0 flex-1 overflow-y-auto p-4 sm:p-6\"\n >\n <NextSteps\n storageKey=\"support-ticket-detail-admin\"\n title=\"Agent quick actions\"\n className=\"mb-6\"\n steps={[\n {\n id: 'reply',\n label: 'Reply to the customer',\n description: 'Draft a response in the composer below.',\n onClick: () =>\n document\n .querySelector('[data-tour=\"support-admin-ticket-conversation\"]')\n ?.scrollTo({ top: 999999, behavior: 'smooth' }),\n },\n ...(canLeaveInternalNotes\n ? [\n {\n id: 'in-progress',\n label: 'Mark as In Progress',\n description: 'Let the customer know you are working on it.',\n onClick: () => void handleStatusChange(SupportTicketStatus.InProgress),\n done: ticketDetail.status === SupportTicketStatus.InProgress,\n },\n {\n id: 'resolve',\n label: 'Resolve the ticket',\n description: 'Close out the request once the issue is fixed.',\n onClick: () => void handleStatusChange(SupportTicketStatus.Resolved),\n done: ticketDetail.status === SupportTicketStatus.Resolved,\n },\n ]\n : []),\n ]}\n />\n <h2 className=\"text-lg font-semibold mb-4 text-text-primary\">Conversation</h2>\n <MessageThread\n ticketId={ticketDetail.id}\n messages={ticketDetail.messages || []}\n currentUserId={currentUser?.id}\n viewerRole=\"agent\"\n showInternalMessages={canLeaveInternalNotes}\n showRealAgentIdentity={canLeaveInternalNotes}\n />\n\n <div className=\"mt-6 rounded-xl border border-border-seam bg-bg-surface p-4 xl:hidden\">\n <TicketSidebar ticket={ticketDetail} />\n </div>\n </div>\n\n <MessageComposer\n ticketId={ticketDetail.id}\n onSendMessage={handleSendMessage}\n disabled={addMessageLoading}\n allowInternalNotes={canLeaveInternalNotes}\n cannedResponses={cannedResponses}\n cannedResponsesLoading={cannedResponsesLoading}\n />\n </div>\n\n <div className=\"hidden min-h-0 xl:block\">\n <TicketSidebar ticket={ticketDetail} />\n </div>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAqCA,SAAgB,IAAwB;CACtC,IAAM,EAAE,gBAAa,GAAiC,EAChD,IAAW,GAAa,EACxB,EAAE,mBAAgB,GAAY,EAC9B,EAAE,kBAAe,wBAAqB,GAAY,EAClD,IAAuB,EAAO,EAAc,EAC5C,EACJ,iBACA,wBACA,sBACA,uBACA,qBACA,sBACA,yBACE,GAAqB,EACnB,IAAwB,EAAY,GAAa,KAAK,EACtD,EAAE,MAAM,GAAqB,SAAS,MAA2B,EACrE;EACE,WAAW;GACT,QAAQ,EAAE,UAAU,IAAM;GAC1B,OAAO;GACR;EACD,MAAM,CAAC;EACR,CACF,EACK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