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