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