@burdenoff/microfe-support 2026.624.2 → 2026.625.2
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/analytics/CategoryBreakdown.js +27 -25
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/MetricCard.js +20 -15
- package/dist/support/components/analytics/MetricCard.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +28 -26
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +44 -42
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +56 -54
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +31 -29
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +24 -22
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +1 -1
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/ui.js +2 -2
- package/dist/support/pages/AnalyticsPage.js +129 -126
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +105 -114
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +59 -59
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +49 -63
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +6 -6
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +1 -1
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +7 -7
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +51 -65
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +4 -4
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +80 -78
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +78 -78
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +54 -54
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +173 -170
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -3,353 +3,356 @@ import { isAdminRole as t } from "../utils/index.js";
|
|
|
3
3
|
import { Badge as n, Button as r, Input as i } from "../components/ui.js";
|
|
4
4
|
import { useSupportStore as a } from "../store/supportStore.js";
|
|
5
5
|
import { useTicketListOperations as o } from "../hooks/useTicketListOperations.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { cn as s } from "../utils/cn.js";
|
|
7
|
+
import { EmptyState as c, LoadingState as l, PageLayout as u } from "../components/PageLayout.js";
|
|
8
|
+
import { tWithFallback as d } from "../utils/i18n.js";
|
|
9
|
+
import { slaBreachBadgeClasses as f, ticketPriorityDotClasses as p, ticketStatusBadgeClasses as m } from "../utils/uiTokens.js";
|
|
10
|
+
import { getCategoryBadgeClass as h } from "../utils/categoryColors.js";
|
|
11
|
+
import { useState as g } from "react";
|
|
12
|
+
import { AlertCircle as _, Filter as v, Grid as y, List as b, Loader2 as x, Plus as S, Search as C, Ticket as w } from "lucide-react";
|
|
13
|
+
import { useNavigate as T } from "react-router-dom";
|
|
14
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
15
|
+
import { useI18n as k } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
16
|
//#region src/support/pages/TicketListPage.tsx
|
|
16
|
-
function
|
|
17
|
+
function A(e) {
|
|
17
18
|
return e ? e.replace(/_/g, " ").toLowerCase().replace(/\b\w/g, (e) => e.toUpperCase()) : null;
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
-
return e.ticketCategory?.name ??
|
|
20
|
+
function j(e, t) {
|
|
21
|
+
return e.ticketCategory?.name ?? A(e.category) ?? t;
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
+
var M = {
|
|
23
24
|
NEW: "New",
|
|
24
25
|
IN_PROGRESS: "In Progress",
|
|
25
26
|
WAITING_CUSTOMER: "Waiting on Customer",
|
|
26
27
|
RESOLVED: "Resolved",
|
|
27
28
|
CLOSED: "Closed",
|
|
28
29
|
REOPENED: "Reopened"
|
|
29
|
-
},
|
|
30
|
+
}, N = {
|
|
30
31
|
CRITICAL: "Critical",
|
|
31
32
|
HIGH: "High",
|
|
32
33
|
NORMAL: "Normal",
|
|
33
34
|
LOW: "Low"
|
|
34
35
|
};
|
|
35
|
-
function
|
|
36
|
-
let
|
|
37
|
-
return
|
|
38
|
-
title:
|
|
39
|
-
subtitle:
|
|
40
|
-
icon: /* @__PURE__ */
|
|
41
|
-
children: /* @__PURE__ */
|
|
42
|
-
}) :
|
|
43
|
-
title:
|
|
44
|
-
subtitle:
|
|
45
|
-
icon: /* @__PURE__ */
|
|
46
|
-
children: /* @__PURE__ */
|
|
36
|
+
function P({ adminView: A = !1 }) {
|
|
37
|
+
let P = T(), { t: F } = k(), { currentUser: I, showAllProductTickets: L } = e(), { tickets: R, ticketsLoading: z, ticketsError: B, hasMoreTickets: V, loadMoreTickets: H, totalTickets: U, isScopedLocalSearch: W, isMissingProductScope: G } = o(A), K = a((e) => e.viewMode), q = a((e) => e.setViewMode), J = a((e) => e.ticketFilter), Y = a((e) => e.updateTicketFilter), [X, Z] = g(!1), Q = A && t(I?.role), $ = Q || L;
|
|
38
|
+
return z && R.length === 0 ? /* @__PURE__ */ D(u, {
|
|
39
|
+
title: d(F, "support.ticketList.title", "Support Tickets"),
|
|
40
|
+
subtitle: d(F, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
|
|
41
|
+
icon: /* @__PURE__ */ D(w, { size: 24 }),
|
|
42
|
+
children: /* @__PURE__ */ D(l, { message: d(F, "support.ticketList.loading", "Loading tickets...") })
|
|
43
|
+
}) : B ? /* @__PURE__ */ D(u, {
|
|
44
|
+
title: d(F, "support.ticketList.title", "Support Tickets"),
|
|
45
|
+
subtitle: d(F, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
|
|
46
|
+
icon: /* @__PURE__ */ D(w, { size: 24 }),
|
|
47
|
+
children: /* @__PURE__ */ O("div", {
|
|
47
48
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
48
49
|
children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ D("div", {
|
|
50
51
|
className: "p-4 rounded-2xl bg-status-error-bg/10 text-status-error-text mb-4",
|
|
51
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ D(_, { size: 48 })
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ D("h3", {
|
|
54
55
|
className: "text-lg font-semibold mb-2",
|
|
55
|
-
children:
|
|
56
|
+
children: d(F, "support.ticketList.error.title", "Failed to load tickets")
|
|
56
57
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ D("p", {
|
|
58
59
|
className: "text-sm text-text-secondary max-w-md",
|
|
59
|
-
children:
|
|
60
|
+
children: B.message || d(F, "support.ticketList.error.description", "An error occurred while loading tickets. Please try again.")
|
|
60
61
|
})
|
|
61
62
|
]
|
|
62
63
|
})
|
|
63
|
-
}) : /* @__PURE__ */
|
|
64
|
-
title:
|
|
65
|
-
subtitle:
|
|
66
|
-
icon: /* @__PURE__ */
|
|
67
|
-
|
|
64
|
+
}) : /* @__PURE__ */ O(u, {
|
|
65
|
+
title: d(F, "support.ticketList.title", "Support Tickets"),
|
|
66
|
+
subtitle: d(F, "support.ticketList.subtitle", "Manage and respond to customer support requests"),
|
|
67
|
+
icon: /* @__PURE__ */ D(w, { size: 24 }),
|
|
68
|
+
aurora: !0,
|
|
69
|
+
titleAccent: d(F, "support.ticketList.titleAccent", "Tickets"),
|
|
70
|
+
headerActions: /* @__PURE__ */ O(r, {
|
|
68
71
|
"data-tour": "support-new-ticket-button",
|
|
69
|
-
onClick: () =>
|
|
70
|
-
children: [/* @__PURE__ */
|
|
72
|
+
onClick: () => P("new"),
|
|
73
|
+
children: [/* @__PURE__ */ D(S, { size: 18 }), d(F, "support.ticketList.actions.newTicket", "New Ticket")]
|
|
71
74
|
}),
|
|
72
|
-
headerContent: /* @__PURE__ */
|
|
75
|
+
headerContent: /* @__PURE__ */ D("div", {
|
|
73
76
|
className: "flex items-center gap-2",
|
|
74
|
-
children: /* @__PURE__ */
|
|
77
|
+
children: /* @__PURE__ */ D(n, {
|
|
75
78
|
variant: "secondary",
|
|
76
79
|
className: "font-medium",
|
|
77
|
-
children:
|
|
78
|
-
count:
|
|
79
|
-
label:
|
|
80
|
+
children: d(F, "support.ticketList.count", "{{count}} {{label}}", {
|
|
81
|
+
count: U,
|
|
82
|
+
label: U === 1 ? d(F, "support.ticketList.count.single", "ticket") : d(F, "support.ticketList.count.plural", "tickets")
|
|
80
83
|
})
|
|
81
84
|
})
|
|
82
85
|
}),
|
|
83
86
|
children: [
|
|
84
|
-
/* @__PURE__ */
|
|
87
|
+
/* @__PURE__ */ O("div", {
|
|
85
88
|
"data-tour": "support-ticket-list-toolbar",
|
|
86
|
-
className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border bg-bg-surface",
|
|
89
|
+
className: "flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface",
|
|
87
90
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ O("div", {
|
|
89
92
|
className: "flex-1 relative",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
93
|
+
children: [/* @__PURE__ */ D(C, {
|
|
91
94
|
size: 18,
|
|
92
95
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
93
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ D(i, {
|
|
94
97
|
"data-tour": "support-ticket-search",
|
|
95
98
|
type: "text",
|
|
96
|
-
placeholder:
|
|
97
|
-
value:
|
|
98
|
-
onChange: (e) =>
|
|
99
|
+
placeholder: d(F, "support.ticketList.search.placeholder", "Search tickets..."),
|
|
100
|
+
value: J.search,
|
|
101
|
+
onChange: (e) => Y({ search: e.target.value }),
|
|
99
102
|
className: "pl-[3.25rem]"
|
|
100
103
|
})]
|
|
101
104
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
105
|
+
/* @__PURE__ */ O("div", {
|
|
103
106
|
"data-tour": "support-ticket-view-toggle",
|
|
104
107
|
className: "flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
106
|
-
variant:
|
|
108
|
+
children: [/* @__PURE__ */ D(r, {
|
|
109
|
+
variant: K === "list" ? "secondary" : "ghost",
|
|
107
110
|
size: "sm",
|
|
108
|
-
onClick: () =>
|
|
111
|
+
onClick: () => q("list"),
|
|
109
112
|
className: "px-3",
|
|
110
113
|
"aria-label": "Show tickets as a list",
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
variant:
|
|
114
|
+
children: /* @__PURE__ */ D(b, { size: 18 })
|
|
115
|
+
}), /* @__PURE__ */ D(r, {
|
|
116
|
+
variant: K === "grid" ? "secondary" : "ghost",
|
|
114
117
|
size: "sm",
|
|
115
|
-
onClick: () =>
|
|
118
|
+
onClick: () => q("grid"),
|
|
116
119
|
className: "px-3",
|
|
117
120
|
"aria-label": "Show tickets as a grid",
|
|
118
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ D(y, { size: 18 })
|
|
119
122
|
})]
|
|
120
123
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ O(r, {
|
|
122
125
|
"data-tour": "support-ticket-filters-button",
|
|
123
|
-
variant:
|
|
124
|
-
onClick: () =>
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
+
variant: X ? "secondary" : "outline",
|
|
127
|
+
onClick: () => Z(!X),
|
|
128
|
+
children: [/* @__PURE__ */ D(v, { size: 18 }), d(F, "support.ticketList.filters.toggle", "Filters")]
|
|
126
129
|
})
|
|
127
130
|
]
|
|
128
131
|
}),
|
|
129
|
-
|
|
130
|
-
className: "flex items-start gap-2 rounded-lg border bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
+
W && /* @__PURE__ */ O("div", {
|
|
133
|
+
className: "flex items-start gap-2 rounded-lg border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
134
|
+
children: [/* @__PURE__ */ D(_, {
|
|
132
135
|
size: 16,
|
|
133
136
|
className: "mt-0.5 shrink-0"
|
|
134
|
-
}), /* @__PURE__ */
|
|
137
|
+
}), /* @__PURE__ */ D("span", { children: d(F, "support.ticketList.scopedSearch.hint", "Search results are limited to tickets already loaded for this product. Load more tickets to expand the searchable set.") })]
|
|
135
138
|
}),
|
|
136
|
-
|
|
137
|
-
className: "p-4 rounded-xl border bg-bg-sunken/30",
|
|
138
|
-
children: /* @__PURE__ */
|
|
139
|
+
X && /* @__PURE__ */ D("div", {
|
|
140
|
+
className: "p-4 rounded-xl border border-border-seam bg-bg-sunken/30",
|
|
141
|
+
children: /* @__PURE__ */ O("div", {
|
|
139
142
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
|
|
140
143
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
142
145
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
143
146
|
htmlFor: "ticketlistpage-twithfallback-t-support-ticketlist-filte-0",
|
|
144
|
-
children:
|
|
145
|
-
}), /* @__PURE__ */
|
|
147
|
+
children: d(F, "support.ticketList.filters.status.label", "Status")
|
|
148
|
+
}), /* @__PURE__ */ O("select", {
|
|
146
149
|
id: "ticketlistpage-twithfallback-t-support-ticketlist-filte-0",
|
|
147
|
-
value:
|
|
148
|
-
onChange: (e) =>
|
|
150
|
+
value: J.status,
|
|
151
|
+
onChange: (e) => Y({ status: e.target.value }),
|
|
149
152
|
className: "w-full px-3 py-2 rounded-lg border bg-bg-surface text-text-primary",
|
|
150
153
|
children: [
|
|
151
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ D("option", {
|
|
152
155
|
value: "all",
|
|
153
|
-
children:
|
|
156
|
+
children: d(F, "support.ticketList.filters.status.all", "All Statuses")
|
|
154
157
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ D("option", {
|
|
156
159
|
value: "NEW",
|
|
157
|
-
children:
|
|
160
|
+
children: d(F, "support.shared.status.new", "New")
|
|
158
161
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ D("option", {
|
|
160
163
|
value: "IN_PROGRESS",
|
|
161
|
-
children:
|
|
164
|
+
children: d(F, "support.shared.status.inProgress", "In Progress")
|
|
162
165
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ D("option", {
|
|
164
167
|
value: "WAITING_CUSTOMER",
|
|
165
|
-
children:
|
|
168
|
+
children: d(F, "support.shared.status.waitingCustomer", "Waiting on Customer")
|
|
166
169
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ D("option", {
|
|
168
171
|
value: "RESOLVED",
|
|
169
|
-
children:
|
|
172
|
+
children: d(F, "support.shared.status.resolved", "Resolved")
|
|
170
173
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ D("option", {
|
|
172
175
|
value: "CLOSED",
|
|
173
|
-
children:
|
|
176
|
+
children: d(F, "support.shared.status.closed", "Closed")
|
|
174
177
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ D("option", {
|
|
176
179
|
value: "REOPENED",
|
|
177
|
-
children:
|
|
180
|
+
children: d(F, "support.shared.status.reopened", "Reopened")
|
|
178
181
|
})
|
|
179
182
|
]
|
|
180
183
|
})] }),
|
|
181
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
182
185
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
183
186
|
htmlFor: "ticketlistpage-twithfallback-t-support-ticketlist-filte-2",
|
|
184
|
-
children:
|
|
185
|
-
}), /* @__PURE__ */
|
|
187
|
+
children: d(F, "support.ticketList.filters.priority.label", "Priority")
|
|
188
|
+
}), /* @__PURE__ */ O("select", {
|
|
186
189
|
id: "ticketlistpage-twithfallback-t-support-ticketlist-filte-2",
|
|
187
|
-
value:
|
|
188
|
-
onChange: (e) =>
|
|
190
|
+
value: J.priority,
|
|
191
|
+
onChange: (e) => Y({ priority: e.target.value }),
|
|
189
192
|
className: "w-full px-3 py-2 rounded-lg border bg-bg-surface text-text-primary",
|
|
190
193
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ D("option", {
|
|
192
195
|
value: "all",
|
|
193
|
-
children:
|
|
196
|
+
children: d(F, "support.ticketList.filters.priority.all", "All Priorities")
|
|
194
197
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ D("option", {
|
|
196
199
|
value: "CRITICAL",
|
|
197
|
-
children:
|
|
200
|
+
children: d(F, "support.shared.priority.critical", "Critical")
|
|
198
201
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ D("option", {
|
|
200
203
|
value: "HIGH",
|
|
201
|
-
children:
|
|
204
|
+
children: d(F, "support.shared.priority.high", "High")
|
|
202
205
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ D("option", {
|
|
204
207
|
value: "NORMAL",
|
|
205
|
-
children:
|
|
208
|
+
children: d(F, "support.shared.priority.normal", "Normal")
|
|
206
209
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ D("option", {
|
|
208
211
|
value: "LOW",
|
|
209
|
-
children:
|
|
212
|
+
children: d(F, "support.shared.priority.low", "Low")
|
|
210
213
|
})
|
|
211
214
|
]
|
|
212
215
|
})] }),
|
|
213
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
214
217
|
htmlFor: "ticket-filter-date-from",
|
|
215
218
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
216
219
|
children: "Date From"
|
|
217
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ D(i, {
|
|
218
221
|
id: "ticket-filter-date-from",
|
|
219
222
|
type: "date",
|
|
220
|
-
value:
|
|
221
|
-
onChange: (e) =>
|
|
222
|
-
...
|
|
223
|
+
value: J.dateRange.start ? J.dateRange.start.toISOString().slice(0, 10) : "",
|
|
224
|
+
onChange: (e) => Y({ dateRange: {
|
|
225
|
+
...J.dateRange,
|
|
223
226
|
start: e.target.value ? /* @__PURE__ */ new Date(`${e.target.value}T00:00:00`) : null
|
|
224
227
|
} })
|
|
225
228
|
})] }),
|
|
226
|
-
/* @__PURE__ */
|
|
229
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
227
230
|
htmlFor: "ticket-filter-date-to",
|
|
228
231
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
229
232
|
children: "Date To"
|
|
230
|
-
}), /* @__PURE__ */
|
|
233
|
+
}), /* @__PURE__ */ D(i, {
|
|
231
234
|
id: "ticket-filter-date-to",
|
|
232
235
|
type: "date",
|
|
233
|
-
value:
|
|
234
|
-
onChange: (e) =>
|
|
235
|
-
...
|
|
236
|
+
value: J.dateRange.end ? J.dateRange.end.toISOString().slice(0, 10) : "",
|
|
237
|
+
onChange: (e) => Y({ dateRange: {
|
|
238
|
+
...J.dateRange,
|
|
236
239
|
end: e.target.value ? /* @__PURE__ */ new Date(`${e.target.value}T23:59:59`) : null
|
|
237
240
|
} })
|
|
238
241
|
})] }),
|
|
239
|
-
|
|
242
|
+
Q && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
240
243
|
htmlFor: "ticket-filter-product",
|
|
241
244
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
242
245
|
children: "Product"
|
|
243
|
-
}), /* @__PURE__ */
|
|
246
|
+
}), /* @__PURE__ */ D(i, {
|
|
244
247
|
id: "ticket-filter-product",
|
|
245
248
|
type: "text",
|
|
246
|
-
value:
|
|
247
|
-
onChange: (e) =>
|
|
249
|
+
value: J.productId || "",
|
|
250
|
+
onChange: (e) => Y({ productId: e.target.value || null }),
|
|
248
251
|
placeholder: "vibecontrols"
|
|
249
|
-
})] }), /* @__PURE__ */
|
|
252
|
+
})] }), /* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
250
253
|
htmlFor: "ticket-filter-assignee",
|
|
251
254
|
className: "block text-sm font-medium mb-2 text-text-secondary",
|
|
252
255
|
children: "Assignee"
|
|
253
|
-
}), /* @__PURE__ */
|
|
256
|
+
}), /* @__PURE__ */ D(i, {
|
|
254
257
|
id: "ticket-filter-assignee",
|
|
255
258
|
type: "text",
|
|
256
|
-
value:
|
|
257
|
-
onChange: (e) =>
|
|
259
|
+
value: J.assignedToId || "",
|
|
260
|
+
onChange: (e) => Y({ assignedToId: e.target.value || null }),
|
|
258
261
|
placeholder: "User ID"
|
|
259
262
|
})] })] })
|
|
260
263
|
]
|
|
261
264
|
})
|
|
262
265
|
}),
|
|
263
|
-
|
|
264
|
-
icon: /* @__PURE__ */
|
|
265
|
-
title:
|
|
266
|
-
description:
|
|
267
|
-
}) :
|
|
268
|
-
|
|
269
|
-
title:
|
|
270
|
-
description:
|
|
271
|
-
action: /* @__PURE__ */
|
|
272
|
-
onClick: () =>
|
|
273
|
-
children: [/* @__PURE__ */
|
|
266
|
+
G ? /* @__PURE__ */ D(c, {
|
|
267
|
+
icon: /* @__PURE__ */ D(_, { size: 48 }),
|
|
268
|
+
title: d(F, "support.ticketList.missingProduct.title", "Unable to load tickets for this product"),
|
|
269
|
+
description: d(F, "support.ticketList.missingProduct.description", "This support view needs a product configuration before tickets can be loaded.")
|
|
270
|
+
}) : R.length === 0 ? /* @__PURE__ */ D(c, {
|
|
271
|
+
illustration: "empty-data",
|
|
272
|
+
title: d(F, "support.ticketList.empty.title", "No tickets found"),
|
|
273
|
+
description: d(F, "support.ticketList.empty.description", "Create your first support ticket to get started, or adjust your filters."),
|
|
274
|
+
action: /* @__PURE__ */ O(r, {
|
|
275
|
+
onClick: () => P("new"),
|
|
276
|
+
children: [/* @__PURE__ */ D(S, { size: 18 }), d(F, "support.ticketList.empty.action", "Create Ticket")]
|
|
274
277
|
})
|
|
275
|
-
}) : /* @__PURE__ */
|
|
276
|
-
className:
|
|
277
|
-
children:
|
|
278
|
+
}) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("div", {
|
|
279
|
+
className: K === "grid" ? "grid grid-cols-1 md:grid-cols-2 gap-4" : "space-y-3",
|
|
280
|
+
children: R.map((e) => /* @__PURE__ */ D("button", {
|
|
278
281
|
type: "button",
|
|
279
282
|
"data-tour": "support-ticket-card",
|
|
280
|
-
onClick: () =>
|
|
281
|
-
className: "w-full text-left group p-4 rounded-xl border border-
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
+
onClick: () => P(e.id),
|
|
284
|
+
className: "w-full text-left group p-4 rounded-xl border border-border-seam bg-bg-surface shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] cursor-pointer transition-[box-shadow,border-color] duration-200",
|
|
285
|
+
children: /* @__PURE__ */ O("div", {
|
|
283
286
|
className: "flex items-start justify-between gap-4",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ O("div", {
|
|
285
288
|
className: "flex-1 min-w-0",
|
|
286
289
|
children: [
|
|
287
|
-
/* @__PURE__ */
|
|
290
|
+
/* @__PURE__ */ O("div", {
|
|
288
291
|
className: "flex items-center gap-2 mb-2 flex-wrap",
|
|
289
292
|
children: [
|
|
290
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ D("span", {
|
|
291
294
|
className: "text-xs font-mono text-text-secondary",
|
|
292
295
|
children: e.ticketNumber
|
|
293
296
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
className:
|
|
296
|
-
children:
|
|
297
|
+
/* @__PURE__ */ D(n, {
|
|
298
|
+
className: m[e.status],
|
|
299
|
+
children: M[e.status]
|
|
297
300
|
}),
|
|
298
|
-
e.ticketCategory && /* @__PURE__ */
|
|
301
|
+
e.ticketCategory && /* @__PURE__ */ D(n, {
|
|
299
302
|
variant: "outline",
|
|
300
|
-
className:
|
|
303
|
+
className: h(e.ticketCategory.color),
|
|
301
304
|
children: e.ticketCategory.name
|
|
302
305
|
}),
|
|
303
|
-
e.slaBreachStatus && e.slaBreachStatus !== "NONE" && /* @__PURE__ */
|
|
304
|
-
className:
|
|
305
|
-
children: e.slaBreachStatus === "BREACHED" ?
|
|
306
|
+
e.slaBreachStatus && e.slaBreachStatus !== "NONE" && /* @__PURE__ */ D(n, {
|
|
307
|
+
className: s(f[e.slaBreachStatus], "motion-safe:animate-vc-glow-pulse"),
|
|
308
|
+
children: e.slaBreachStatus === "BREACHED" ? d(F, "support.ticketList.sla.breached", "SLA Breached") : d(F, "support.ticketList.sla.atRisk", "SLA At Risk")
|
|
306
309
|
})
|
|
307
310
|
]
|
|
308
311
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ D("h3", {
|
|
310
313
|
className: "font-semibold text-text-primary mb-1 group-hover:text-primary transition-colors truncate",
|
|
311
314
|
children: e.subject
|
|
312
315
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ O("div", {
|
|
314
317
|
className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-text-secondary",
|
|
315
318
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */
|
|
318
|
-
/* @__PURE__ */
|
|
319
|
-
|
|
319
|
+
/* @__PURE__ */ D("span", { children: j(e, d(F, "support.ticketList.category.general", "General")) }),
|
|
320
|
+
/* @__PURE__ */ D("span", { children: "•" }),
|
|
321
|
+
/* @__PURE__ */ D("span", { children: new Date(e.createdAt).toLocaleDateString() }),
|
|
322
|
+
$ && e.context?.productId && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", { children: "•" }), /* @__PURE__ */ D(n, {
|
|
320
323
|
variant: "outline",
|
|
321
324
|
children: e.context.productId
|
|
322
325
|
})] }),
|
|
323
|
-
e.assignedTo && /* @__PURE__ */
|
|
326
|
+
e.assignedTo && /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", { children: "•" }), /* @__PURE__ */ D("span", { children: d(F, "support.ticketList.meta.assigned", "Assigned") })] })
|
|
324
327
|
]
|
|
325
328
|
})
|
|
326
329
|
]
|
|
327
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ D("div", {
|
|
328
331
|
className: "text-2xl flex-shrink-0",
|
|
329
|
-
title:
|
|
330
|
-
children: /* @__PURE__ */
|
|
331
|
-
className: `block h-3 w-3 rounded-full ${
|
|
332
|
+
title: N[e.priority],
|
|
333
|
+
children: /* @__PURE__ */ D("span", {
|
|
334
|
+
className: `block h-3 w-3 rounded-full ${p[e.priority]}`,
|
|
332
335
|
"aria-hidden": "true"
|
|
333
336
|
})
|
|
334
337
|
})]
|
|
335
338
|
})
|
|
336
339
|
}, e.id))
|
|
337
|
-
}),
|
|
340
|
+
}), V && /* @__PURE__ */ D("div", {
|
|
338
341
|
className: "flex justify-center pt-4",
|
|
339
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ D(r, {
|
|
340
343
|
variant: "outline",
|
|
341
|
-
onClick:
|
|
342
|
-
disabled:
|
|
343
|
-
children:
|
|
344
|
+
onClick: H,
|
|
345
|
+
disabled: z,
|
|
346
|
+
children: z ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(x, {
|
|
344
347
|
size: 18,
|
|
345
348
|
className: "animate-spin"
|
|
346
|
-
}),
|
|
349
|
+
}), d(F, "support.ticketList.actions.loadingMore", "Loading...")] }) : d(F, "support.ticketList.actions.loadMore", "Load More")
|
|
347
350
|
})
|
|
348
351
|
})] })
|
|
349
352
|
]
|
|
350
353
|
});
|
|
351
354
|
}
|
|
352
355
|
//#endregion
|
|
353
|
-
export {
|
|
356
|
+
export { P as TicketListPage };
|
|
354
357
|
|
|
355
358
|
//# sourceMappingURL=TicketListPage.js.map
|