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