@burdenoff/microfe-support 2026.1114.1 → 2026.1115.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/generated/global-operations.d.ts +62 -0
- package/dist/generated/global-operations.js +104 -69
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +17 -15
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/SupportUserRoot.js +32 -28
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/SupportUserRoutes.d.ts +1 -0
- package/dist/support/SupportUserRoutes.js +31 -28
- package/dist/support/SupportUserRoutes.js.map +1 -1
- package/dist/support/components/PageLayout.js +35 -35
- package/dist/support/components/RouteHelpers.d.ts +2 -1
- package/dist/support/components/RouteHelpers.js +3 -3
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/help/RelatedArticles.d.ts +12 -0
- package/dist/support/components/help/RelatedArticles.js +55 -0
- package/dist/support/components/help/RelatedArticles.js.map +1 -0
- package/dist/support/components/help/RequestDetailHeader.d.ts +18 -0
- package/dist/support/components/help/RequestDetailHeader.js +129 -0
- package/dist/support/components/help/RequestDetailHeader.js.map +1 -0
- package/dist/support/components/help/SatisfactionReview.d.ts +18 -0
- package/dist/support/components/help/SatisfactionReview.js +103 -0
- package/dist/support/components/help/SatisfactionReview.js.map +1 -0
- package/dist/support/components/help/StarRating.d.ts +16 -0
- package/dist/support/components/help/StarRating.js +63 -0
- package/dist/support/components/help/StarRating.js.map +1 -0
- package/dist/support/components/help/StatusGroupPill.d.ts +11 -0
- package/dist/support/components/help/StatusGroupPill.js +19 -0
- package/dist/support/components/help/StatusGroupPill.js.map +1 -0
- package/dist/support/components/settings/TicketCategoriesSettings.js +69 -69
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +7 -7
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +54 -60
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/ui.js +1 -1
- package/dist/support/constants.d.ts +23 -0
- package/dist/support/constants.js +2 -2
- package/dist/support/constants.js.map +1 -1
- package/dist/support/hooks/useDebouncedValue.d.ts +6 -0
- package/dist/support/hooks/useDebouncedValue.js +12 -0
- package/dist/support/hooks/useDebouncedValue.js.map +1 -0
- package/dist/support/hooks/useKnowledgeBaseOperations.d.ts +8 -1
- package/dist/support/hooks/useKnowledgeBaseOperations.js +86 -81
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useSupportVariant.d.ts +11 -0
- package/dist/support/hooks/useSupportVariant.js +11 -0
- package/dist/support/hooks/useSupportVariant.js.map +1 -0
- package/dist/support/hooks/useTicketCreatedToast.d.ts +16 -0
- package/dist/support/hooks/useTicketCreatedToast.js +25 -0
- package/dist/support/hooks/useTicketCreatedToast.js.map +1 -0
- package/dist/support/hooks/useTicketLabels.d.ts +22 -0
- package/dist/support/hooks/useTicketLabels.js +40 -0
- package/dist/support/hooks/useTicketLabels.js.map +1 -0
- package/dist/support/index.d.ts +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +84 -84
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.d.ts +5 -0
- package/dist/support/pages/ArticleDetailUserPage.js +133 -69
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/AskForHelpPage.d.ts +11 -0
- package/dist/support/pages/AskForHelpPage.js +396 -0
- package/dist/support/pages/AskForHelpPage.js.map +1 -0
- package/dist/support/pages/ContactInquiriesPage.js +73 -73
- package/dist/support/pages/ContactInquiryDetailPage.js +47 -47
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.d.ts +4 -0
- package/dist/support/pages/CreateTicketPage.js +121 -117
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/HelpHubPage.d.ts +9 -0
- package/dist/support/pages/HelpHubPage.js +272 -0
- package/dist/support/pages/HelpHubPage.js.map +1 -0
- package/dist/support/pages/JobApplicationDetailPage.js +388 -388
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +35 -35
- package/dist/support/pages/JobPostingDetailPage.js +236 -236
- package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.d.ts +6 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +188 -137
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/MyRequestsPage.d.ts +16 -0
- package/dist/support/pages/MyRequestsPage.js +389 -0
- package/dist/support/pages/MyRequestsPage.js.map +1 -0
- package/dist/support/pages/TicketDetailUserPage.d.ts +5 -0
- package/dist/support/pages/TicketDetailUserPage.js +285 -192
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.d.ts +7 -0
- package/dist/support/pages/TicketListPage.js +150 -153
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +8 -7
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/store/supportStore.d.ts +5 -0
- package/dist/support/store/supportStore.js +1 -0
- package/dist/support/store/supportStore.js.map +1 -1
- package/dist/support/translations/en.d.ts +279 -0
- package/dist/support/translations/en.js +270 -1
- package/dist/support/translations/en.js.map +1 -1
- package/dist/support/types/index.d.ts +13 -0
- package/dist/support/utils/cameFrom.d.ts +16 -0
- package/dist/support/utils/cameFrom.js +22 -0
- package/dist/support/utils/cameFrom.js.map +1 -0
- package/dist/support/utils/dates.d.ts +15 -0
- package/dist/support/utils/dates.js +35 -0
- package/dist/support/utils/dates.js.map +1 -0
- package/dist/support/utils/reopen.d.ts +27 -0
- package/dist/support/utils/reopen.js +27 -0
- package/dist/support/utils/reopen.js.map +1 -0
- package/dist/support/utils/requestTechnicalDetails.d.ts +13 -0
- package/dist/support/utils/requestTechnicalDetails.js +38 -0
- package/dist/support/utils/requestTechnicalDetails.js.map +1 -0
- package/dist/support/utils/ticketFilters.d.ts +16 -0
- package/dist/support/utils/ticketFilters.js +24 -12
- package/dist/support/utils/ticketFilters.js.map +1 -1
- package/dist/support/utils/ticketStatusGroups.d.ts +20 -0
- package/dist/support/utils/ticketStatusGroups.js +39 -0
- package/dist/support/utils/ticketStatusGroups.js.map +1 -0
- package/package.json +2 -2
|
@@ -2,339 +2,432 @@ import { Button as e, EmphasisPanel as t, NextSteps as n } from "../components/u
|
|
|
2
2
|
import { useTicketOperations as r } from "../hooks/useTicketOperations.js";
|
|
3
3
|
import { useTr as i } from "../hooks/useTr.js";
|
|
4
4
|
import { useNotification as ee } from "../hooks/useNotification.js";
|
|
5
|
-
import { useAttachmentsFailedToast as
|
|
5
|
+
import { useAttachmentsFailedToast as te } from "../hooks/useAttachmentsFailedToast.js";
|
|
6
|
+
import { useTicketCreatedToast as ne } from "../hooks/useTicketCreatedToast.js";
|
|
7
|
+
import { useIsFluidgridsVariant as re } from "../hooks/useSupportVariant.js";
|
|
8
|
+
import { useTicketLabels as ie } from "../hooks/useTicketLabels.js";
|
|
9
|
+
import { RequestDetailHeader as ae } from "../components/help/RequestDetailHeader.js";
|
|
10
|
+
import { SatisfactionReview as a } from "../components/help/SatisfactionReview.js";
|
|
11
|
+
import { canReopenTicket as oe, isReopenBlockedByLimit as se, isReopenableStatus as ce } from "../utils/reopen.js";
|
|
12
|
+
import { buildRequestTechnicalDetails as le } from "../utils/requestTechnicalDetails.js";
|
|
6
13
|
import { TicketSidebar as o } from "../components/tickets/TicketSidebar.js";
|
|
7
|
-
import { MessageThread as
|
|
8
|
-
import { MessageComposer as
|
|
9
|
-
import { AttachmentList as
|
|
10
|
-
import { MarkdownContent as
|
|
11
|
-
import { NotificationToast as
|
|
12
|
-
import { EmptyState as
|
|
13
|
-
import { FeedbackCategory as f, MessageType as
|
|
14
|
-
import { TicketDetailHeader as
|
|
15
|
-
import { useSupport as
|
|
16
|
-
import { joinPath as
|
|
17
|
-
import { extractErrorCode as
|
|
18
|
-
import { uploadSupportAttachmentFiles as
|
|
19
|
-
import { useCallback as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
14
|
+
import { MessageThread as s } from "../components/tickets/MessageThread.js";
|
|
15
|
+
import { MessageComposer as c } from "../components/tickets/MessageComposer.js";
|
|
16
|
+
import { AttachmentList as ue } from "../components/tickets/AttachmentList.js";
|
|
17
|
+
import { MarkdownContent as de } from "../components/tickets/MarkdownContent.js";
|
|
18
|
+
import { NotificationToast as l } from "../components/NotificationToast.js";
|
|
19
|
+
import { EmptyState as u, LoadingState as fe, PageLayout as d } from "../components/PageLayout.js";
|
|
20
|
+
import { FeedbackCategory as f, MessageType as pe, SupportTicketStatus as p } from "../../generated/global-types.js";
|
|
21
|
+
import { TicketDetailHeader as me } from "../components/tickets/TicketDetailHeader.js";
|
|
22
|
+
import { useSupport as he } from "../providers/SupportProvider.js";
|
|
23
|
+
import { joinPath as m } from "../utils/index.js";
|
|
24
|
+
import { extractErrorCode as ge, extractErrorMessage as h } from "../utils/errors.js";
|
|
25
|
+
import { uploadSupportAttachmentFiles as _e } from "../utils/supportFiles.js";
|
|
26
|
+
import { useCallback as ve, useEffect as g, useRef as ye, useState as _ } from "react";
|
|
27
|
+
import { ShowTechnicalDetails as be } from "@burdenoff/fe-libs/ui";
|
|
28
|
+
import { useI18n as xe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
29
|
+
import { AlertCircle as Se, ArrowLeft as v, BookOpen as Ce, MessageCircleQuestion as we } from "lucide-react";
|
|
30
|
+
import { Link as y, useNavigate as Te, useParams as Ee } from "react-router";
|
|
31
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
32
|
+
import { useShellUi as De } from "@burdenoff/fe-libs/shared/providers/shell/ShellUiProvider";
|
|
24
33
|
// src/support/pages/TicketDetailUserPage.tsx
|
|
25
|
-
function
|
|
26
|
-
let { ticketId:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}), [
|
|
30
|
-
|
|
31
|
-
}), [
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
}, [
|
|
37
|
-
if (!
|
|
34
|
+
function S() {
|
|
35
|
+
let { ticketId: S } = Ee(), C = Te(), { currentUser: w, basePath: T = "" } = he(), { footerVisible: E, setFooterVisible: D } = De(), Oe = ye(E), O = i(), { locale: k } = xe(), A = re(), ke = ie(), { ticketDetail: j, ticketDetailLoading: Ae, ticketDetailError: M, addTicketMessage: je, addMessageLoading: N, changeStatusLoading: P, changeTicketStatus: Me, submitSatisfactionSurvey: F, submitSurveyLoading: I, setSelectedTicket: L } = r({ ticketId: S }), [R, z] = _(""), [B, V] = _(""), [H, U] = _(""), { notification: W, notify: G } = ee();
|
|
36
|
+
te(G), ne(G, O("support.requestDetail.notifications.created", "Your request is sent. We'll reply here.")), g(() => (S && L({ id: S }), () => {
|
|
37
|
+
L(null);
|
|
38
|
+
}), [S, L]), g(() => (D(!1), () => {
|
|
39
|
+
D(Oe.current);
|
|
40
|
+
}), [D]);
|
|
41
|
+
let K = () => {
|
|
42
|
+
L(null), C(A ? m(T, "tickets") : "..");
|
|
43
|
+
}, q = A ? O("support.requestDetail.actions.back", "My support requests") : O("support.ticketDetail.actions.back", "Back to Tickets"), J = ve(() => {
|
|
44
|
+
C(m(T, "tickets/new"));
|
|
45
|
+
}, [T, C]), Y = async (e, t, n) => {
|
|
46
|
+
if (!S) return;
|
|
38
47
|
if (!e.trim() && n.length === 0) {
|
|
39
|
-
|
|
48
|
+
G("error", O("support.ticketDetail.errors.nothingToSend", "Nothing to send."), 6e3);
|
|
40
49
|
return;
|
|
41
50
|
}
|
|
42
51
|
let r, i = null;
|
|
43
|
-
if (n.length > 0 &&
|
|
44
|
-
r = (await
|
|
45
|
-
ticketId:
|
|
52
|
+
if (n.length > 0 && j?.ticketNumber) try {
|
|
53
|
+
r = (await _e({
|
|
54
|
+
ticketId: S,
|
|
46
55
|
files: n
|
|
47
56
|
})).files.map((e) => e.id);
|
|
48
57
|
} catch (e) {
|
|
49
|
-
i =
|
|
58
|
+
i = h(e, O("support.ticketDetail.errors.uploadAttachments", "Failed to upload attachments."));
|
|
50
59
|
}
|
|
51
60
|
if (!e.trim() && !r?.length) {
|
|
52
|
-
let e = i ?
|
|
53
|
-
return
|
|
61
|
+
let e = i ? O("support.ticketDetail.errors.attachmentUploadFailed", "Attachment upload failed: {{message}}", { message: i }) : O("support.ticketDetail.errors.nothingToSend", "Nothing to send.");
|
|
62
|
+
return G("error", e, 6e3), n.length > 0 ? { preserveAttachedFiles: !0 } : void 0;
|
|
54
63
|
}
|
|
55
64
|
try {
|
|
56
|
-
if (await
|
|
57
|
-
ticketId:
|
|
65
|
+
if (await je({
|
|
66
|
+
ticketId: S,
|
|
58
67
|
message: e,
|
|
59
|
-
type:
|
|
68
|
+
type: pe.CustomerReply,
|
|
60
69
|
attachments: r
|
|
61
|
-
}), i) return
|
|
70
|
+
}), i) return G("error", O("support.ticketDetail.errors.messageSentAttachmentsFailed", "Message sent, but attachments failed: {{message}}", { message: i }), 6e3), { preserveAttachedFiles: n.length > 0 };
|
|
62
71
|
} catch (e) {
|
|
63
|
-
return console.error("[support] addTicketMessage failed", e),
|
|
72
|
+
return console.error("[support] addTicketMessage failed", e), G("error", h(e, O("support.ticketDetail.errors.sendMessage", "Failed to send message.")), 6e3), {
|
|
64
73
|
preserveMessage: !0,
|
|
65
74
|
preserveAttachedFiles: n.length > 0
|
|
66
75
|
};
|
|
67
76
|
}
|
|
68
|
-
},
|
|
69
|
-
if (
|
|
70
|
-
await
|
|
77
|
+
}, X = async () => {
|
|
78
|
+
if (S) try {
|
|
79
|
+
await Me(S, p.Reopened), G("success", O("support.ticketDetail.notifications.reopened", "Ticket reopened."));
|
|
71
80
|
} catch (e) {
|
|
72
|
-
let t =
|
|
73
|
-
t === "REOPEN_LIMIT_REACHED" || /REOPEN_LIMIT_REACHED|maximum.*reopen/i.test(n) ?
|
|
81
|
+
let t = ge(e), n = h(e, O("support.ticketDetail.errors.reopenFailed", "Failed to reopen ticket."));
|
|
82
|
+
t === "REOPEN_LIMIT_REACHED" || /REOPEN_LIMIT_REACHED|maximum.*reopen/i.test(n) ? G("error", O("support.ticketDetail.errors.reopenLimit", "You have reached the maximum number of reopens for this ticket. Please create a new ticket to continue."), 8e3) : G("error", n, 6e3);
|
|
74
83
|
}
|
|
75
|
-
},
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
}, Z = j?.surveys?.[0] ?? null, Q = (j ? A ? ce(j.status) : j.status === p.Closed : !1) && Z && !Z.submittedAt, Ne = async (e) => {
|
|
85
|
+
if (!Z) return !1;
|
|
86
|
+
try {
|
|
87
|
+
return await F({
|
|
88
|
+
surveyId: Z.id,
|
|
89
|
+
rating: e.rating,
|
|
90
|
+
feedbackType: e.feedbackType,
|
|
91
|
+
comment: e.comment
|
|
92
|
+
}), G("success", O("support.ticketDetail.notifications.reviewSubmitted", "Thanks for your feedback!")), !0;
|
|
93
|
+
} catch (e) {
|
|
94
|
+
return G("error", h(e, O("support.ticketDetail.errors.reviewSubmitFailed", "Failed to submit review.")), 6e3), !1;
|
|
95
|
+
}
|
|
96
|
+
}, Pe = async () => {
|
|
97
|
+
if (Z && R) try {
|
|
98
|
+
await F({
|
|
99
|
+
surveyId: Z.id,
|
|
100
|
+
rating: Number(R),
|
|
101
|
+
feedbackType: B || void 0,
|
|
102
|
+
comment: H || void 0
|
|
103
|
+
}), z(""), V(""), U(""), G("success", O("support.ticketDetail.notifications.reviewSubmitted", "Thanks for your feedback!"));
|
|
83
104
|
} catch (e) {
|
|
84
|
-
|
|
105
|
+
G("error", h(e, O("support.ticketDetail.errors.reviewSubmitFailed", "Failed to submit review.")), 6e3);
|
|
85
106
|
}
|
|
86
107
|
};
|
|
87
|
-
|
|
108
|
+
if (Ae && !j) return /* @__PURE__ */ b(d, {
|
|
88
109
|
showHeader: !1,
|
|
89
|
-
children: /* @__PURE__ */
|
|
90
|
-
})
|
|
110
|
+
children: /* @__PURE__ */ b(fe, { message: O("support.ticketDetail.loading", "Loading ticket details...") })
|
|
111
|
+
});
|
|
112
|
+
if (M) return /* @__PURE__ */ b(d, {
|
|
91
113
|
showHeader: !1,
|
|
92
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ x("div", {
|
|
93
115
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
94
116
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ b("div", {
|
|
96
118
|
className: "p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4",
|
|
97
|
-
children: /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ b(Se, { size: 48 })
|
|
98
120
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ b("h3", {
|
|
100
122
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
101
|
-
children:
|
|
123
|
+
children: O("support.ticketDetail.error.title", "Failed to load ticket")
|
|
102
124
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ b("p", {
|
|
104
126
|
className: "text-sm text-text-secondary max-w-md mb-4",
|
|
105
|
-
children:
|
|
127
|
+
children: M.message || O("support.ticketDetail.error.description", "An error occurred while loading the ticket. Please try again.")
|
|
106
128
|
}),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
onClick:
|
|
109
|
-
children: [/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ x(e, {
|
|
130
|
+
onClick: K,
|
|
131
|
+
children: [/* @__PURE__ */ b(v, { size: 18 }), q]
|
|
110
132
|
})
|
|
111
133
|
]
|
|
112
134
|
})
|
|
113
|
-
})
|
|
135
|
+
});
|
|
136
|
+
if (!j) return /* @__PURE__ */ b(d, {
|
|
137
|
+
showHeader: !1,
|
|
138
|
+
children: /* @__PURE__ */ b(u, {
|
|
139
|
+
illustration: "empty-search",
|
|
140
|
+
title: O("support.ticketDetail.notFound.title", "Ticket not found"),
|
|
141
|
+
description: O("support.ticketDetail.notFound.description", "The ticket you're looking for doesn't exist or has been deleted."),
|
|
142
|
+
action: /* @__PURE__ */ x(e, {
|
|
143
|
+
onClick: K,
|
|
144
|
+
children: [/* @__PURE__ */ b(v, { size: 18 }), q]
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
});
|
|
148
|
+
let $ = /* @__PURE__ */ x("div", {
|
|
149
|
+
"data-tour": "support-ticket-description-panel",
|
|
150
|
+
className: "shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ b("h2", {
|
|
153
|
+
className: "text-lg font-semibold mb-2 text-text-primary",
|
|
154
|
+
children: O("support.ticketDetail.descriptionHeading", "Description")
|
|
155
|
+
}),
|
|
156
|
+
/* @__PURE__ */ b(de, {
|
|
157
|
+
content: j.description,
|
|
158
|
+
className: "text-sm"
|
|
159
|
+
}),
|
|
160
|
+
/* @__PURE__ */ b(ue, {
|
|
161
|
+
ticketId: j.id,
|
|
162
|
+
fileIds: j.metadata?.initialAttachmentIds ?? []
|
|
163
|
+
})
|
|
164
|
+
]
|
|
165
|
+
});
|
|
166
|
+
return A ? /* @__PURE__ */ x("div", {
|
|
114
167
|
className: "flex h-full min-h-0 flex-col bg-bg-surface",
|
|
115
168
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
ticket:
|
|
119
|
-
onBack:
|
|
120
|
-
onReopenTicket:
|
|
121
|
-
|
|
122
|
-
actionsDisabled:
|
|
169
|
+
/* @__PURE__ */ b(l, { notification: W }),
|
|
170
|
+
/* @__PURE__ */ b(ae, {
|
|
171
|
+
ticket: j,
|
|
172
|
+
onBack: K,
|
|
173
|
+
onReopenTicket: X,
|
|
174
|
+
onAskForHelp: J,
|
|
175
|
+
actionsDisabled: P
|
|
123
176
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ x("div", {
|
|
178
|
+
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
179
|
+
children: [
|
|
180
|
+
$,
|
|
181
|
+
/* @__PURE__ */ x("div", {
|
|
182
|
+
"data-tour": "support-ticket-conversation",
|
|
183
|
+
className: "min-h-0 flex-1 overflow-y-auto p-4 sm:p-6",
|
|
184
|
+
children: [
|
|
185
|
+
/* @__PURE__ */ b("h2", {
|
|
186
|
+
className: "text-lg font-semibold mb-4 text-text-primary",
|
|
187
|
+
children: O("support.ticketDetail.conversationTitle", "Conversation")
|
|
188
|
+
}),
|
|
189
|
+
/* @__PURE__ */ b(s, {
|
|
190
|
+
ticketId: j.id,
|
|
191
|
+
messages: j.messages || [],
|
|
192
|
+
currentUserId: w?.id
|
|
193
|
+
}),
|
|
194
|
+
Q && /* @__PURE__ */ b(a, {
|
|
195
|
+
submitting: I,
|
|
196
|
+
onSubmit: Ne
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ x("div", {
|
|
199
|
+
className: "mt-6 space-y-2 border-t border-border-subtle pt-4",
|
|
200
|
+
children: [/* @__PURE__ */ x("div", {
|
|
201
|
+
className: "flex flex-wrap items-center gap-x-6",
|
|
202
|
+
children: [/* @__PURE__ */ x(y, {
|
|
203
|
+
to: m(T, "kb"),
|
|
204
|
+
className: "inline-flex min-h-11 items-center gap-2 text-sm font-medium text-primary underline-offset-4 hover:underline",
|
|
205
|
+
children: [/* @__PURE__ */ b(Ce, {
|
|
206
|
+
size: 16,
|
|
207
|
+
"aria-hidden": "true"
|
|
208
|
+
}), O("support.requestDetail.browseHelpArticles", "Still stuck? Browse help articles")]
|
|
209
|
+
}), !se(j) && /* @__PURE__ */ x(y, {
|
|
210
|
+
"data-tour": "support-ticket-new-request",
|
|
211
|
+
to: m(T, "tickets/new"),
|
|
212
|
+
className: "inline-flex min-h-11 items-center gap-2 text-sm font-medium text-primary underline-offset-4 hover:underline",
|
|
213
|
+
children: [/* @__PURE__ */ b(we, {
|
|
214
|
+
size: 16,
|
|
215
|
+
"aria-hidden": "true"
|
|
216
|
+
}), O("support.ticketDetail.userNextSteps.newTicket.label", "Open a new ticket")]
|
|
217
|
+
})]
|
|
218
|
+
}), /* @__PURE__ */ b(be, {
|
|
219
|
+
copyable: !0,
|
|
220
|
+
children: le(j, O, ke.priority, k)
|
|
221
|
+
})]
|
|
222
|
+
})
|
|
223
|
+
]
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ b(c, {
|
|
226
|
+
ticketId: j.id,
|
|
227
|
+
onSendMessage: Y,
|
|
228
|
+
disabled: N,
|
|
229
|
+
allowInternalNotes: !1
|
|
230
|
+
})
|
|
231
|
+
]
|
|
232
|
+
})
|
|
233
|
+
]
|
|
234
|
+
}) : /* @__PURE__ */ x("div", {
|
|
235
|
+
className: "flex h-full min-h-0 flex-col bg-bg-surface",
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ b(l, { notification: W }),
|
|
238
|
+
/* @__PURE__ */ b(me, {
|
|
239
|
+
ticket: j,
|
|
240
|
+
onBack: K,
|
|
241
|
+
onReopenTicket: X,
|
|
242
|
+
onCreateNewTicket: J,
|
|
243
|
+
actionsDisabled: P
|
|
244
|
+
}),
|
|
245
|
+
/* @__PURE__ */ x("div", {
|
|
125
246
|
className: "flex min-h-0 flex-1 overflow-hidden",
|
|
126
|
-
children: [/* @__PURE__ */
|
|
247
|
+
children: [/* @__PURE__ */ x("div", {
|
|
127
248
|
className: "flex min-h-0 flex-1 flex-col overflow-hidden",
|
|
128
249
|
children: [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
className: "shrink-0 border-b border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
132
|
-
children: [
|
|
133
|
-
/* @__PURE__ */ C("h2", {
|
|
134
|
-
className: "text-lg font-semibold mb-2 text-text-primary",
|
|
135
|
-
children: M("support.ticketDetail.descriptionHeading", "Description")
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ C(s, {
|
|
138
|
-
content: N.description,
|
|
139
|
-
className: "text-sm"
|
|
140
|
-
}),
|
|
141
|
-
/* @__PURE__ */ C(re, {
|
|
142
|
-
ticketId: N.id,
|
|
143
|
-
fileIds: N.metadata?.initialAttachmentIds ?? []
|
|
144
|
-
})
|
|
145
|
-
]
|
|
146
|
-
}),
|
|
147
|
-
/* @__PURE__ */ w("div", {
|
|
250
|
+
$,
|
|
251
|
+
/* @__PURE__ */ x("div", {
|
|
148
252
|
"data-tour": "support-ticket-conversation",
|
|
149
253
|
className: "min-h-0 flex-1 overflow-y-auto p-4 sm:p-6",
|
|
150
254
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ b(n, {
|
|
152
256
|
storageKey: "support-ticket-detail-user",
|
|
153
|
-
title:
|
|
257
|
+
title: O("support.ticketDetail.userNextSteps.title", "Quick actions"),
|
|
154
258
|
className: "mb-6",
|
|
155
259
|
steps: [
|
|
156
260
|
{
|
|
157
261
|
id: "reply",
|
|
158
|
-
label:
|
|
159
|
-
description:
|
|
262
|
+
label: O("support.ticketDetail.userNextSteps.reply.label", "Reply to the conversation"),
|
|
263
|
+
description: O("support.ticketDetail.userNextSteps.reply.description", "Add details or answer a question from our support team."),
|
|
160
264
|
onClick: () => document.querySelector("[data-tour=\"support-ticket-conversation\"]")?.scrollTo({
|
|
161
265
|
top: 999999,
|
|
162
266
|
behavior: "smooth"
|
|
163
267
|
})
|
|
164
268
|
},
|
|
165
|
-
...
|
|
269
|
+
...oe(j) ? [{
|
|
166
270
|
id: "reopen",
|
|
167
|
-
label:
|
|
168
|
-
description:
|
|
169
|
-
onClick: () => void
|
|
271
|
+
label: O("support.ticketDetail.userNextSteps.reopen.label", "Reopen this ticket"),
|
|
272
|
+
description: O("support.ticketDetail.userNextSteps.reopen.description", "Still stuck? Reopen to continue the conversation."),
|
|
273
|
+
onClick: () => void X()
|
|
170
274
|
}] : [],
|
|
171
275
|
{
|
|
172
276
|
id: "new-ticket",
|
|
173
|
-
label:
|
|
174
|
-
description:
|
|
175
|
-
onClick:
|
|
277
|
+
label: O("support.ticketDetail.userNextSteps.newTicket.label", "Open a new ticket"),
|
|
278
|
+
description: O("support.ticketDetail.userNextSteps.newTicket.description", "Have a different issue? Start a fresh request."),
|
|
279
|
+
onClick: J
|
|
176
280
|
},
|
|
177
281
|
{
|
|
178
282
|
id: "kb",
|
|
179
|
-
label:
|
|
180
|
-
description:
|
|
181
|
-
onClick: () =>
|
|
283
|
+
label: O("support.ticketDetail.userNextSteps.knowledgeBase.label", "Browse the knowledge base"),
|
|
284
|
+
description: O("support.ticketDetail.userNextSteps.knowledgeBase.description", "Find answers to common questions instantly."),
|
|
285
|
+
onClick: () => C(m(T, "knowledge-base"))
|
|
182
286
|
}
|
|
183
287
|
]
|
|
184
288
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ b("h2", {
|
|
186
290
|
className: "text-lg font-semibold mb-4 text-text-primary",
|
|
187
|
-
children:
|
|
291
|
+
children: O("support.ticketDetail.conversationTitle", "Conversation")
|
|
188
292
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
ticketId:
|
|
191
|
-
messages:
|
|
192
|
-
currentUserId:
|
|
293
|
+
/* @__PURE__ */ b(s, {
|
|
294
|
+
ticketId: j.id,
|
|
295
|
+
messages: j.messages || [],
|
|
296
|
+
currentUserId: w?.id
|
|
193
297
|
}),
|
|
194
|
-
|
|
298
|
+
Q && /* @__PURE__ */ x(t, {
|
|
195
299
|
"data-tour": "support-ticket-review",
|
|
196
300
|
className: "mt-6 p-4",
|
|
197
301
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ b("h3", {
|
|
199
303
|
className: "text-base font-semibold text-text-primary",
|
|
200
|
-
children:
|
|
304
|
+
children: O("support.ticketDetail.review.title", "Rate this support experience")
|
|
201
305
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ b("p", {
|
|
203
307
|
className: "mt-1 text-sm text-text-secondary",
|
|
204
|
-
children:
|
|
308
|
+
children: O("support.ticketDetail.review.description", "Share a quick rating once the ticket is closed. Optional notes help improve future responses.")
|
|
205
309
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ x("div", {
|
|
207
311
|
className: "mt-4 grid gap-4 md:grid-cols-2",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
209
313
|
htmlFor: "support-review-rating",
|
|
210
314
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
211
|
-
children:
|
|
212
|
-
}), /* @__PURE__ */
|
|
315
|
+
children: O("support.ticketDetail.review.ratingLabel", "Rating")
|
|
316
|
+
}), /* @__PURE__ */ x("select", {
|
|
213
317
|
id: "support-review-rating",
|
|
214
|
-
value:
|
|
215
|
-
onChange: (e) =>
|
|
318
|
+
value: R,
|
|
319
|
+
onChange: (e) => z(e.target.value),
|
|
216
320
|
className: "min-h-11 w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
217
321
|
children: [
|
|
218
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ b("option", {
|
|
219
323
|
value: "",
|
|
220
|
-
children:
|
|
324
|
+
children: O("support.ticketDetail.review.selectRating", "Select rating")
|
|
221
325
|
}),
|
|
222
|
-
/* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ b("option", {
|
|
223
327
|
value: "5",
|
|
224
|
-
children:
|
|
328
|
+
children: O("support.ticketDetail.review.rating5", "5 - Excellent")
|
|
225
329
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ b("option", {
|
|
227
331
|
value: "4",
|
|
228
|
-
children:
|
|
332
|
+
children: O("support.ticketDetail.review.rating4", "4 - Good")
|
|
229
333
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ b("option", {
|
|
231
335
|
value: "3",
|
|
232
|
-
children:
|
|
336
|
+
children: O("support.ticketDetail.review.rating3", "3 - Okay")
|
|
233
337
|
}),
|
|
234
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ b("option", {
|
|
235
339
|
value: "2",
|
|
236
|
-
children:
|
|
340
|
+
children: O("support.ticketDetail.review.rating2", "2 - Needs improvement")
|
|
237
341
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ b("option", {
|
|
239
343
|
value: "1",
|
|
240
|
-
children:
|
|
344
|
+
children: O("support.ticketDetail.review.rating1", "1 - Poor")
|
|
241
345
|
})
|
|
242
346
|
]
|
|
243
|
-
})] }), /* @__PURE__ */
|
|
347
|
+
})] }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
|
|
244
348
|
htmlFor: "support-review-feedback-type",
|
|
245
349
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
246
|
-
children:
|
|
247
|
-
}), /* @__PURE__ */
|
|
350
|
+
children: O("support.ticketDetail.review.feedbackTypeLabel", "Feedback type")
|
|
351
|
+
}), /* @__PURE__ */ x("select", {
|
|
248
352
|
id: "support-review-feedback-type",
|
|
249
|
-
value:
|
|
250
|
-
onChange: (e) =>
|
|
353
|
+
value: B,
|
|
354
|
+
onChange: (e) => V(e.target.value || ""),
|
|
251
355
|
className: "min-h-11 w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
252
356
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ b("option", {
|
|
254
358
|
value: "",
|
|
255
|
-
children:
|
|
359
|
+
children: O("support.ticketDetail.review.optional", "Optional")
|
|
256
360
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ b("option", {
|
|
258
362
|
value: f.AgentHelpful,
|
|
259
|
-
children:
|
|
363
|
+
children: O("support.ticketDetail.review.feedbackAgentHelpful", "Agent helpful")
|
|
260
364
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ b("option", {
|
|
262
366
|
value: f.IssueResolved,
|
|
263
|
-
children:
|
|
367
|
+
children: O("support.ticketDetail.review.feedbackIssueResolved", "Issue resolved")
|
|
264
368
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ b("option", {
|
|
266
370
|
value: f.ResponseTime,
|
|
267
|
-
children:
|
|
371
|
+
children: O("support.ticketDetail.review.feedbackResponseTime", "Response time")
|
|
268
372
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ b("option", {
|
|
270
374
|
value: f.KnowledgeBase,
|
|
271
|
-
children:
|
|
375
|
+
children: O("support.ticketDetail.review.feedbackKnowledgeBase", "Knowledge base")
|
|
272
376
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
377
|
+
/* @__PURE__ */ b("option", {
|
|
274
378
|
value: f.Other,
|
|
275
|
-
children:
|
|
379
|
+
children: O("support.ticketDetail.review.feedbackOther", "Other")
|
|
276
380
|
})
|
|
277
381
|
]
|
|
278
382
|
})] })]
|
|
279
383
|
}),
|
|
280
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ x("div", {
|
|
281
385
|
className: "mt-4",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
386
|
+
children: [/* @__PURE__ */ b("label", {
|
|
283
387
|
htmlFor: "support-review-notes",
|
|
284
388
|
className: "mb-2 block text-sm font-medium text-text-primary",
|
|
285
|
-
children:
|
|
286
|
-
}), /* @__PURE__ */
|
|
389
|
+
children: O("support.ticketDetail.review.notesLabel", "Notes")
|
|
390
|
+
}), /* @__PURE__ */ b("textarea", {
|
|
287
391
|
id: "support-review-notes",
|
|
288
|
-
"aria-label":
|
|
289
|
-
value:
|
|
290
|
-
onChange: (e) =>
|
|
392
|
+
"aria-label": O("support.ticketDetail.review.notesLabel", "Notes"),
|
|
393
|
+
value: H,
|
|
394
|
+
onChange: (e) => U(e.target.value),
|
|
291
395
|
rows: 4,
|
|
292
396
|
className: "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-text-primary",
|
|
293
|
-
placeholder:
|
|
397
|
+
placeholder: O("support.ticketDetail.review.notesPlaceholder", "Optional notes about the support experience")
|
|
294
398
|
})]
|
|
295
399
|
}),
|
|
296
|
-
/* @__PURE__ */
|
|
400
|
+
/* @__PURE__ */ b("div", {
|
|
297
401
|
className: "mt-4 flex justify-end",
|
|
298
|
-
children: /* @__PURE__ */
|
|
299
|
-
onClick: () => void
|
|
300
|
-
disabled: !
|
|
301
|
-
children:
|
|
402
|
+
children: /* @__PURE__ */ b(e, {
|
|
403
|
+
onClick: () => void Pe(),
|
|
404
|
+
disabled: !R || I,
|
|
405
|
+
children: I ? O("support.ticketDetail.review.submitting", "Submitting...") : O("support.ticketDetail.review.submit", "Submit review")
|
|
302
406
|
})
|
|
303
407
|
})
|
|
304
408
|
]
|
|
305
409
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ b("div", {
|
|
307
411
|
className: "mt-6 rounded-xl border border-border-seam bg-bg-surface p-4 xl:hidden",
|
|
308
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ b(o, { ticket: j })
|
|
309
413
|
})
|
|
310
414
|
]
|
|
311
415
|
}),
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
ticketId:
|
|
314
|
-
onSendMessage:
|
|
315
|
-
disabled:
|
|
416
|
+
/* @__PURE__ */ b(c, {
|
|
417
|
+
ticketId: j.id,
|
|
418
|
+
onSendMessage: Y,
|
|
419
|
+
disabled: N,
|
|
316
420
|
allowInternalNotes: !1
|
|
317
421
|
})
|
|
318
422
|
]
|
|
319
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ b("div", {
|
|
320
424
|
className: "hidden min-h-0 xl:block",
|
|
321
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ b(o, { ticket: j })
|
|
322
426
|
})]
|
|
323
427
|
})
|
|
324
428
|
]
|
|
325
|
-
}) : /* @__PURE__ */ C(d, {
|
|
326
|
-
showHeader: !1,
|
|
327
|
-
children: /* @__PURE__ */ C(l, {
|
|
328
|
-
illustration: "empty-search",
|
|
329
|
-
title: M("support.ticketDetail.notFound.title", "Ticket not found"),
|
|
330
|
-
description: M("support.ticketDetail.notFound.description", "The ticket you're looking for doesn't exist or has been deleted."),
|
|
331
|
-
action: /* @__PURE__ */ w(e, {
|
|
332
|
-
onClick: X,
|
|
333
|
-
children: [/* @__PURE__ */ C(S, { size: 18 }), M("support.ticketDetail.actions.back", "Back to Tickets")]
|
|
334
|
-
})
|
|
335
|
-
})
|
|
336
429
|
});
|
|
337
430
|
}
|
|
338
|
-
export {
|
|
431
|
+
export { S as TicketDetailUserPage };
|
|
339
432
|
|
|
340
433
|
//# sourceMappingURL=TicketDetailUserPage.js.map
|