@burdenoff/microfe-support 2026.527.1 → 2026.527.3
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 +2 -2
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/RouteHelpers.js +1 -1
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +5 -5
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +97 -94
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +14 -2
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +19 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +27 -6
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +1 -1
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +59 -56
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +15 -23
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +1 -0
- package/dist/support/components/tickets/TicketHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketSidebar.js +4 -4
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
- package/dist/support/hooks/useSupportAttachments.js +20 -12
- package/dist/support/hooks/useSupportAttachments.js.map +1 -1
- package/dist/support/hooks/useTicketListOperations.js +1 -1
- package/dist/support/hooks/useTicketListOperations.js.map +1 -1
- package/dist/support/hooks/useTicketOperations.js +1 -1
- package/dist/support/hooks/useTicketOperations.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +5 -5
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +118 -108
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +21 -12
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +0 -1
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +6 -3
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +0 -1
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +26 -17
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +121 -113
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +3 -0
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +3 -0
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +1 -0
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +4 -0
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +140 -142
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +15 -2
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +1 -1
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/utils/supportFiles.js +14 -15
- package/dist/support/utils/supportFiles.js.map +1 -1
- package/dist/support/utils/uiTokens.js.map +1 -1
- package/package.json +1 -1
- package/dist/support/components/kb/index.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { humanizeCategory as e } from "../utils/index.js";
|
|
2
2
|
import { useGetContactInquiriesQuery as t } from "../../generated/global-operations.js";
|
|
3
|
-
import { useEffect as n,
|
|
4
|
-
import { AlertCircle as
|
|
5
|
-
import { useLocation as
|
|
6
|
-
import { graphqlFetch as
|
|
7
|
-
import { Fragment as
|
|
3
|
+
import { useEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import { AlertCircle as a, ChevronDown as o, Filter as s, Loader2 as c, Mail as l, Search as u } from "lucide-react";
|
|
5
|
+
import { useLocation as d, useNavigate as f } from "react-router-dom";
|
|
6
|
+
import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
7
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
8
|
//#region src/support/pages/ContactInquiriesPage.tsx
|
|
9
|
-
var
|
|
9
|
+
var _ = {
|
|
10
10
|
NEW: "bg-status-info-bg-subtle text-status-info-text",
|
|
11
11
|
REVIEWED: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
12
12
|
CONVERTED: "bg-status-success-bg-subtle text-status-success-text",
|
|
13
13
|
SPAM: "bg-status-error-bg-subtle text-status-error-text",
|
|
14
14
|
ARCHIVED: "bg-bg-sunken text-text-secondary"
|
|
15
|
-
},
|
|
15
|
+
}, v = {
|
|
16
16
|
NEW: "New",
|
|
17
17
|
REVIEWED: "Reviewed",
|
|
18
18
|
CONVERTED: "Converted",
|
|
19
19
|
SPAM: "Spam",
|
|
20
20
|
ARCHIVED: "Archived"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function y(e) {
|
|
23
23
|
return new Date(e).toLocaleDateString("en-US", {
|
|
24
24
|
month: "short",
|
|
25
25
|
day: "numeric",
|
|
@@ -28,283 +28,293 @@ function v(e) {
|
|
|
28
28
|
minute: "2-digit"
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
let
|
|
31
|
+
function b() {
|
|
32
|
+
let b = f(), x = d().search, [S, C] = i(""), [w, T] = i(""), [E, D] = i(""), [O, k] = i(!1), [A, j] = i({}), M = r(A);
|
|
33
|
+
M.current = A;
|
|
34
|
+
let N = {};
|
|
35
|
+
S && (N.search = S), w && (N.status = w), E && (N.productId = E);
|
|
36
|
+
let { data: P, loading: F, error: I, fetchMore: L } = t({
|
|
35
37
|
variables: {
|
|
36
|
-
filter:
|
|
38
|
+
filter: N,
|
|
37
39
|
limit: 50,
|
|
38
40
|
offset: 0
|
|
39
41
|
},
|
|
40
42
|
fetchPolicy: "cache-and-network"
|
|
41
|
-
}),
|
|
43
|
+
}), R = P?.contactInquiries?.items ?? [], z = P?.contactInquiries?.total ?? 0, B = P?.contactInquiries?.hasMore ?? !1, V = Array.from(new Set(R.flatMap((e) => e.productId ? [e.productId] : []))).sort(), H = V.join(",");
|
|
42
44
|
return n(() => {
|
|
43
|
-
let e =
|
|
45
|
+
let e = H ? H.split(",").filter((e) => !M.current[e]) : [];
|
|
44
46
|
e.length !== 0 && e.forEach((e) => {
|
|
45
|
-
|
|
47
|
+
p({
|
|
46
48
|
gateway: "global",
|
|
47
49
|
query: "query($id: ID!) { platformProduct(id: $id) { name } }",
|
|
48
50
|
variables: { id: e }
|
|
49
51
|
}).then((t) => {
|
|
50
52
|
let n = t.data?.platformProduct?.name;
|
|
51
|
-
n &&
|
|
53
|
+
n && j((t) => ({
|
|
52
54
|
...t,
|
|
53
55
|
[e]: n
|
|
54
56
|
}));
|
|
55
57
|
}).catch(() => {});
|
|
56
58
|
});
|
|
57
|
-
}, [
|
|
59
|
+
}, [H]), F && R.length === 0 ? /* @__PURE__ */ g("div", {
|
|
58
60
|
className: "p-3 sm:p-6",
|
|
59
|
-
children: [/* @__PURE__ */
|
|
61
|
+
children: [/* @__PURE__ */ g("div", {
|
|
60
62
|
className: "flex items-center gap-3 mb-6",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ h(l, {
|
|
62
64
|
size: 24,
|
|
63
65
|
className: "text-text-primary"
|
|
64
|
-
}), /* @__PURE__ */
|
|
66
|
+
}), /* @__PURE__ */ h("h1", {
|
|
65
67
|
className: "text-2xl font-bold text-text-primary",
|
|
66
68
|
children: "Contact Inquiries"
|
|
67
69
|
})]
|
|
68
|
-
}), /* @__PURE__ */
|
|
70
|
+
}), /* @__PURE__ */ g("div", {
|
|
69
71
|
className: "flex flex-col items-center justify-center py-16",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
72
|
+
children: [/* @__PURE__ */ h(c, {
|
|
71
73
|
size: 32,
|
|
72
74
|
className: "animate-spin text-text-secondary mb-4"
|
|
73
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ h("p", {
|
|
74
76
|
className: "text-sm text-text-secondary",
|
|
75
|
-
children: "Loading inquiries
|
|
77
|
+
children: "Loading inquiries…"
|
|
76
78
|
})]
|
|
77
79
|
})]
|
|
78
|
-
}) :
|
|
80
|
+
}) : I ? /* @__PURE__ */ g("div", {
|
|
79
81
|
className: "p-3 sm:p-6",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ g("div", {
|
|
81
83
|
className: "flex items-center gap-3 mb-6",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ h(l, {
|
|
83
85
|
size: 24,
|
|
84
86
|
className: "text-text-primary"
|
|
85
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ h("h1", {
|
|
86
88
|
className: "text-2xl font-bold text-text-primary",
|
|
87
89
|
children: "Contact Inquiries"
|
|
88
90
|
})]
|
|
89
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ g("div", {
|
|
90
92
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
91
93
|
children: [
|
|
92
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ h("div", {
|
|
93
95
|
className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
|
|
94
|
-
children: /* @__PURE__ */
|
|
96
|
+
children: /* @__PURE__ */ h(a, { size: 48 })
|
|
95
97
|
}),
|
|
96
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ h("h3", {
|
|
97
99
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
98
100
|
children: "Failed to load inquiries"
|
|
99
101
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ h("p", {
|
|
101
103
|
className: "text-sm text-text-secondary",
|
|
102
|
-
children:
|
|
104
|
+
children: I.message
|
|
103
105
|
})
|
|
104
106
|
]
|
|
105
107
|
})]
|
|
106
|
-
}) : /* @__PURE__ */
|
|
108
|
+
}) : /* @__PURE__ */ g("div", {
|
|
107
109
|
className: "p-3 sm:p-6",
|
|
108
110
|
children: [
|
|
109
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ h("div", {
|
|
110
112
|
className: "flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between",
|
|
111
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ g("div", {
|
|
112
114
|
className: "flex items-center gap-3",
|
|
113
115
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ h(l, {
|
|
115
117
|
size: 24,
|
|
116
118
|
className: "text-text-primary"
|
|
117
119
|
}),
|
|
118
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
119
121
|
className: "text-2xl font-bold text-text-primary",
|
|
120
122
|
children: "Contact Inquiries"
|
|
121
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ h("p", {
|
|
122
124
|
className: "text-sm text-text-secondary",
|
|
123
125
|
children: "Website contact form submissions"
|
|
124
126
|
})] }),
|
|
125
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ h("span", {
|
|
126
128
|
className: "ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary",
|
|
127
|
-
children:
|
|
129
|
+
children: z
|
|
128
130
|
})
|
|
129
131
|
]
|
|
130
132
|
})
|
|
131
133
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ g("div", {
|
|
133
135
|
className: "flex flex-col sm:flex-row gap-3 mb-6",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ g("div", {
|
|
135
137
|
className: "relative flex-1",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
138
|
+
children: [/* @__PURE__ */ h(u, {
|
|
137
139
|
size: 16,
|
|
138
140
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
139
|
-
}), /* @__PURE__ */
|
|
141
|
+
}), /* @__PURE__ */ h("input", {
|
|
140
142
|
type: "text",
|
|
143
|
+
"aria-label": "Search inquiries",
|
|
141
144
|
placeholder: "Search by name, email, or subject...",
|
|
142
|
-
value:
|
|
143
|
-
onChange: (e) =>
|
|
145
|
+
value: S,
|
|
146
|
+
onChange: (e) => C(e.target.value),
|
|
144
147
|
className: "w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50"
|
|
145
148
|
})]
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
-
|
|
149
|
+
}), /* @__PURE__ */ g("button", {
|
|
150
|
+
type: "button",
|
|
151
|
+
onClick: () => k(!O),
|
|
148
152
|
className: "min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors",
|
|
149
153
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ h(s, { size: 16 }),
|
|
151
155
|
"Filters",
|
|
152
|
-
/* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ h(o, {
|
|
153
157
|
size: 14,
|
|
154
|
-
className:
|
|
158
|
+
className: O ? "rotate-180 transition-transform" : "transition-transform"
|
|
155
159
|
})
|
|
156
160
|
]
|
|
157
161
|
})]
|
|
158
162
|
}),
|
|
159
|
-
|
|
163
|
+
O && /* @__PURE__ */ h("div", {
|
|
160
164
|
className: "mb-6 p-4 bg-surface border border-default rounded-lg",
|
|
161
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ g("div", {
|
|
162
166
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
167
|
+
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
164
168
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
169
|
+
htmlFor: "contactinquiriespage-status-0",
|
|
165
170
|
children: "Status"
|
|
166
|
-
}), /* @__PURE__ */
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
}), /* @__PURE__ */ g("select", {
|
|
172
|
+
id: "contactinquiriespage-status-0",
|
|
173
|
+
value: w,
|
|
174
|
+
onChange: (e) => T(e.target.value),
|
|
169
175
|
className: "min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
|
|
170
176
|
children: [
|
|
171
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ h("option", {
|
|
172
178
|
value: "",
|
|
173
179
|
children: "All statuses"
|
|
174
180
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ h("option", {
|
|
176
182
|
value: "NEW",
|
|
177
183
|
children: "New"
|
|
178
184
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ h("option", {
|
|
180
186
|
value: "REVIEWED",
|
|
181
187
|
children: "Reviewed"
|
|
182
188
|
}),
|
|
183
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ h("option", {
|
|
184
190
|
value: "CONVERTED",
|
|
185
191
|
children: "Converted"
|
|
186
192
|
}),
|
|
187
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ h("option", {
|
|
188
194
|
value: "SPAM",
|
|
189
195
|
children: "Spam"
|
|
190
196
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ h("option", {
|
|
192
198
|
value: "ARCHIVED",
|
|
193
199
|
children: "Archived"
|
|
194
200
|
})
|
|
195
201
|
]
|
|
196
|
-
})] }), /* @__PURE__ */
|
|
202
|
+
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
197
203
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
204
|
+
htmlFor: "contactinquiriespage-product-2",
|
|
198
205
|
children: "Product"
|
|
199
|
-
}), /* @__PURE__ */
|
|
200
|
-
|
|
201
|
-
|
|
206
|
+
}), /* @__PURE__ */ g("select", {
|
|
207
|
+
id: "contactinquiriespage-product-2",
|
|
208
|
+
value: E,
|
|
209
|
+
onChange: (e) => D(e.target.value),
|
|
202
210
|
className: "min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
211
|
+
children: [/* @__PURE__ */ h("option", {
|
|
204
212
|
value: "",
|
|
205
213
|
children: "All products"
|
|
206
|
-
}),
|
|
214
|
+
}), V.map((e) => /* @__PURE__ */ h("option", {
|
|
207
215
|
value: e,
|
|
208
|
-
children:
|
|
216
|
+
children: A[e] || e
|
|
209
217
|
}, e))]
|
|
210
218
|
})] })]
|
|
211
219
|
})
|
|
212
220
|
}),
|
|
213
|
-
|
|
221
|
+
R.length === 0 ? /* @__PURE__ */ g("div", {
|
|
214
222
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
215
223
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ h("div", {
|
|
217
225
|
className: "p-4 rounded-2xl bg-muted mb-4",
|
|
218
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ h(l, {
|
|
219
227
|
size: 48,
|
|
220
228
|
className: "text-text-secondary opacity-50"
|
|
221
229
|
})
|
|
222
230
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ h("h3", {
|
|
224
232
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
225
233
|
children: "No inquiries yet"
|
|
226
234
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ h("p", {
|
|
228
236
|
className: "text-sm text-text-secondary",
|
|
229
237
|
children: "Contact form submissions from your product websites will appear here."
|
|
230
238
|
})
|
|
231
239
|
]
|
|
232
|
-
}) : /* @__PURE__ */
|
|
240
|
+
}) : /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
|
|
233
241
|
className: "space-y-3",
|
|
234
|
-
children:
|
|
235
|
-
|
|
242
|
+
children: R.map((t) => /* @__PURE__ */ h("button", {
|
|
243
|
+
type: "button",
|
|
244
|
+
onClick: () => b(`/support/inquiries/${t.id}${x}`),
|
|
236
245
|
className: "w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group",
|
|
237
|
-
children: /* @__PURE__ */
|
|
246
|
+
children: /* @__PURE__ */ g("div", {
|
|
238
247
|
className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
|
|
239
|
-
children: [/* @__PURE__ */
|
|
248
|
+
children: [/* @__PURE__ */ g("div", {
|
|
240
249
|
className: "flex-1 min-w-0",
|
|
241
250
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ g("div", {
|
|
243
252
|
className: "flex items-center gap-2 mb-1",
|
|
244
253
|
children: [
|
|
245
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ h("h3", {
|
|
246
255
|
className: "text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors",
|
|
247
256
|
children: t.subject
|
|
248
257
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
-
className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${
|
|
251
|
-
children:
|
|
258
|
+
/* @__PURE__ */ h("span", {
|
|
259
|
+
className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${_[t.status] || _.NEW}`,
|
|
260
|
+
children: v[t.status] || t.status
|
|
252
261
|
}),
|
|
253
|
-
t.productId &&
|
|
262
|
+
t.productId && A[t.productId] && /* @__PURE__ */ h("span", {
|
|
254
263
|
className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple",
|
|
255
|
-
title: `Product: ${
|
|
256
|
-
children:
|
|
264
|
+
title: `Product: ${A[t.productId]}`,
|
|
265
|
+
children: A[t.productId]
|
|
257
266
|
}),
|
|
258
|
-
t.category && /* @__PURE__ */
|
|
267
|
+
t.category && /* @__PURE__ */ h("span", {
|
|
259
268
|
className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue",
|
|
260
269
|
children: e(t.category)
|
|
261
270
|
})
|
|
262
271
|
]
|
|
263
272
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
273
|
+
/* @__PURE__ */ g("p", {
|
|
265
274
|
className: "text-sm text-text-secondary mb-1",
|
|
266
275
|
children: [
|
|
267
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ h("span", {
|
|
268
277
|
className: "font-medium",
|
|
269
278
|
children: t.name
|
|
270
279
|
}),
|
|
271
|
-
/* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ h("span", {
|
|
272
281
|
className: "mx-1.5 text-text-secondary/50",
|
|
273
282
|
children: "·"
|
|
274
283
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
t.company && /* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ h("span", { children: t.email }),
|
|
285
|
+
t.company && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("span", {
|
|
277
286
|
className: "mx-1.5 text-text-secondary/50",
|
|
278
287
|
children: "·"
|
|
279
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ h("span", { children: t.company })] })
|
|
280
289
|
]
|
|
281
290
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ h("p", {
|
|
283
292
|
className: "text-xs text-text-secondary truncate",
|
|
284
293
|
children: t.message
|
|
285
294
|
})
|
|
286
295
|
]
|
|
287
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ h("div", {
|
|
288
297
|
className: "text-xs text-text-secondary sm:whitespace-nowrap",
|
|
289
|
-
children:
|
|
298
|
+
children: y(t.createdAt)
|
|
290
299
|
})]
|
|
291
300
|
})
|
|
292
301
|
}, t.id))
|
|
293
|
-
}),
|
|
302
|
+
}), B && /* @__PURE__ */ h("div", {
|
|
294
303
|
className: "flex justify-center mt-6",
|
|
295
|
-
children: /* @__PURE__ */
|
|
304
|
+
children: /* @__PURE__ */ g("button", {
|
|
305
|
+
type: "button",
|
|
296
306
|
onClick: () => {
|
|
297
|
-
|
|
298
|
-
variables: { offset:
|
|
307
|
+
B && L({
|
|
308
|
+
variables: { offset: R.length },
|
|
299
309
|
updateQuery: (e, { fetchMoreResult: t }) => t ? { contactInquiries: {
|
|
300
310
|
...t.contactInquiries,
|
|
301
311
|
items: [...e.contactInquiries?.items ?? [], ...t.contactInquiries?.items ?? []]
|
|
302
312
|
} } : e
|
|
303
313
|
});
|
|
304
314
|
},
|
|
305
|
-
disabled:
|
|
315
|
+
disabled: F,
|
|
306
316
|
className: "min-h-11 inline-flex items-center justify-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50",
|
|
307
|
-
children: [
|
|
317
|
+
children: [F ? /* @__PURE__ */ h(c, {
|
|
308
318
|
size: 14,
|
|
309
319
|
className: "animate-spin"
|
|
310
320
|
}) : null, "Load more"]
|
|
@@ -314,6 +324,6 @@ function y() {
|
|
|
314
324
|
});
|
|
315
325
|
}
|
|
316
326
|
//#endregion
|
|
317
|
-
export {
|
|
327
|
+
export { b as ContactInquiriesPage };
|
|
318
328
|
|
|
319
329
|
//# sourceMappingURL=ContactInquiriesPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactInquiriesPage.js","names":[],"sources":["../../../src/support/pages/ContactInquiriesPage.tsx"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetContactInquiriesQuery,\n type GetContactInquiriesQuery,\n} from '../../generated/global-operations';\nimport type { ContactInquiryStatus, ContactInquiryFilterInput } from '../../generated/global-types';\nimport { humanizeCategory } from '../utils';\n\ntype ContactInquiry = GetContactInquiriesQuery['contactInquiries']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n REVIEWED: 'bg-status-warning-bg-subtle text-status-warning-text',\n CONVERTED: 'bg-status-success-bg-subtle text-status-success-text',\n SPAM: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n REVIEWED: 'Reviewed',\n CONVERTED: 'Converted',\n SPAM: 'Spam',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function ContactInquiriesPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<ContactInquiryStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n\n const filter: ContactInquiryFilterInput = {};\n if (search) filter.search = search;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetContactInquiriesQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const inquiries = data?.contactInquiries?.items ?? [];\n const total = data?.contactInquiries?.total ?? 0;\n const hasMore = data?.contactInquiries?.hasMore ?? false;\n\n // Fetch product names for the filter dropdown\n const productIds = Array.from(\n new Set(inquiries.map((i: ContactInquiry) => i.productId).filter(Boolean))\n ) as string[];\n useEffect(() => {\n const unknownIds = productIds.filter((pid) => !productNames[pid]);\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIds.join(',')]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: inquiries.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n contactInquiries: {\n ...fetchMoreResult.contactInquiries,\n items: [\n ...(prev.contactInquiries?.items ?? []),\n ...(fetchMoreResult.contactInquiries?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && inquiries.length === 0) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading inquiries...</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load inquiries</h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-3 sm:p-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-3\">\n <Mail size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n <p className=\"text-sm text-text-secondary\">Website contact form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n placeholder=\"Search by name, email, or subject...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button\n onClick={() => setShowFilters(!showFilters)}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-surface border border-default rounded-lg\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Status</label>\n <select\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as ContactInquiryStatus | '')}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"REVIEWED\">Reviewed</option>\n <option value=\"CONVERTED\">Converted</option>\n <option value=\"SPAM\">Spam</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\">Product</label>\n <select\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {inquiries.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-muted mb-4\">\n <Mail size={48} className=\"text-text-secondary opacity-50\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">No inquiries yet</h3>\n <p className=\"text-sm text-text-secondary\">\n Contact form submissions from your product websites will appear here.\n </p>\n </div>\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {inquiry.subject}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[inquiry.status] || statusColors.NEW}`}\n >\n {statusLabels[inquiry.status] || inquiry.status}\n </span>\n {inquiry.productId && productNames[inquiry.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[inquiry.productId]}`}\n >\n {productNames[inquiry.productId]}\n </span>\n )}\n {inquiry.category && (\n <span className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue\">\n {humanizeCategory(inquiry.category)}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{inquiry.name}</span>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{inquiry.email}</span>\n {inquiry.company && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{inquiry.company}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{inquiry.message}</p>\n </div>\n <div className=\"text-xs text-text-secondary sm:whitespace-nowrap\">\n {formatDate(inquiry.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button\n onClick={loadMore}\n disabled={loading}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX,EAEK,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX;AAED,SAAS,EAAW,GAA4B;AAC9C,QAAO,IAAI,KAAK,EAAW,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAuB;CACrC,IAAM,IAAW,GAAa,EAExB,IADW,GAAa,CACD,QACvB,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAc,KAAmB,EAAoC,GAAG,EACzE,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAc,KAAmB,EAAiC,EAAE,CAAC,EAEtE,IAAoC,EAAE;AAG5C,CAFI,MAAQ,EAAO,SAAS,IACxB,MAAc,EAAO,SAAS,IAC9B,MAAe,EAAO,YAAY;CAEtC,IAAM,EAAE,SAAM,YAAS,UAAO,iBAAc,EAA4B;EACtE,WAAW;GAAE;GAAQ,OAAO;GAAI,QAAQ;GAAG;EAC3C,aAAa;EACd,CAAC,EAEI,IAAY,GAAM,kBAAkB,SAAS,EAAE,EAC/C,IAAQ,GAAM,kBAAkB,SAAS,GACzC,IAAU,GAAM,kBAAkB,WAAW,IAG7C,IAAa,MAAM,KACvB,IAAI,IAAI,EAAU,KAAK,MAAsB,EAAE,UAAU,CAAC,O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+
{"version":3,"file":"ContactInquiriesPage.js","names":[],"sources":["../../../src/support/pages/ContactInquiriesPage.tsx"],"sourcesContent":["import { useState, useEffect, useRef } from 'react';\nimport { useNavigate, useLocation } from 'react-router-dom';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetContactInquiriesQuery,\n type GetContactInquiriesQuery,\n} from '../../generated/global-operations';\nimport type { ContactInquiryStatus, ContactInquiryFilterInput } from '../../generated/global-types';\nimport { humanizeCategory } from '../utils';\n\ntype ContactInquiry = GetContactInquiriesQuery['contactInquiries']['items'][number];\n\nconst statusColors: Record<string, string> = {\n NEW: 'bg-status-info-bg-subtle text-status-info-text',\n REVIEWED: 'bg-status-warning-bg-subtle text-status-warning-text',\n CONVERTED: 'bg-status-success-bg-subtle text-status-success-text',\n SPAM: 'bg-status-error-bg-subtle text-status-error-text',\n ARCHIVED: 'bg-bg-sunken text-text-secondary',\n};\n\nconst statusLabels: Record<string, string> = {\n NEW: 'New',\n REVIEWED: 'Reviewed',\n CONVERTED: 'Converted',\n SPAM: 'Spam',\n ARCHIVED: 'Archived',\n};\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nexport function ContactInquiriesPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const queryParams = location.search;\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<ContactInquiryStatus | ''>('');\n const [productFilter, setProductFilter] = useState('');\n const [showFilters, setShowFilters] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n // Mirror the latest map into a ref so the resolver effect can read it\n // without re-running every time we cache a freshly-resolved name.\n const productNamesRef = useRef(productNames);\n productNamesRef.current = productNames;\n\n const filter: ContactInquiryFilterInput = {};\n if (search) filter.search = search;\n if (statusFilter) filter.status = statusFilter;\n if (productFilter) filter.productId = productFilter;\n\n const { data, loading, error, fetchMore } = useGetContactInquiriesQuery({\n variables: { filter, limit: 50, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n\n const inquiries = data?.contactInquiries?.items ?? [];\n const total = data?.contactInquiries?.total ?? 0;\n const hasMore = data?.contactInquiries?.hasMore ?? false;\n\n // Fetch product names for the filter dropdown. We key the effect off a\n // stable string so a new array reference per render doesn't retrigger.\n const productIds = Array.from(\n new Set(\n inquiries.flatMap((i: ContactInquiry): string[] =>\n i.productId ? [i.productId] : []\n )\n )\n ).sort() as string[];\n const productIdsKey = productIds.join(',');\n useEffect(() => {\n const unknownIds = productIdsKey\n ? productIdsKey.split(',').filter((pid) => !productNamesRef.current[pid])\n : [];\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIdsKey]);\n\n const loadMore = () => {\n if (!hasMore) return;\n fetchMore({\n variables: { offset: inquiries.length },\n updateQuery: (prev, { fetchMoreResult }) => {\n if (!fetchMoreResult) return prev;\n return {\n contactInquiries: {\n ...fetchMoreResult.contactInquiries,\n items: [\n ...(prev.contactInquiries?.items ?? []),\n ...(fetchMoreResult.contactInquiries?.items ?? []),\n ],\n },\n };\n },\n });\n };\n\n // Loading state\n if (loading && inquiries.length === 0) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading inquiries…</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-3 sm:p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Mail size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">Failed to load inquiries</h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-3 sm:p-6\">\n {/* Header */}\n <div className=\"flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex items-center gap-3\">\n <Mail size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Contact Inquiries</h1>\n <p className=\"text-sm text-text-secondary\">Website contact form submissions</p>\n </div>\n <span className=\"ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-muted text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row gap-3 mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={16}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <input\n type=\"text\"\n aria-label=\"Search inquiries\"\n placeholder=\"Search by name, email, or subject...\"\n value={search}\n onChange={(e) => setSearch(e.target.value)}\n className=\"w-full pl-9 pr-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n\n {/* Filter toggle */}\n <button type=\"button\"\n onClick={() => setShowFilters(!showFilters)}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-4 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors\"\n >\n <Filter size={16} />\n Filters\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </button>\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-surface border border-default rounded-lg\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\" htmlFor=\"contactinquiriespage-status-0\">Status</label>\n <select id=\"contactinquiriespage-status-0\"\n value={statusFilter}\n onChange={(e) => setStatusFilter(e.target.value as ContactInquiryStatus | '')}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All statuses</option>\n <option value=\"NEW\">New</option>\n <option value=\"REVIEWED\">Reviewed</option>\n <option value=\"CONVERTED\">Converted</option>\n <option value=\"SPAM\">Spam</option>\n <option value=\"ARCHIVED\">Archived</option>\n </select>\n </div>\n <div>\n <label className=\"block text-xs font-medium text-text-secondary mb-1\" htmlFor=\"contactinquiriespage-product-2\">Product</label>\n <select id=\"contactinquiriespage-product-2\"\n value={productFilter}\n onChange={(e) => setProductFilter(e.target.value)}\n className=\"min-h-11 w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n </div>\n </div>\n )}\n\n {/* Empty state */}\n {inquiries.length === 0 ? (\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-muted mb-4\">\n <Mail size={48} className=\"text-text-secondary opacity-50\" />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">No inquiries yet</h3>\n <p className=\"text-sm text-text-secondary\">\n Contact form submissions from your product websites will appear here.\n </p>\n </div>\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button type=\"button\"\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-surface border border-default rounded-lg hover:bg-muted/50 hover:border-accent/30 transition-all duration-200 group\"\n >\n <div className=\"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 mb-1\">\n <h3 className=\"text-sm font-semibold text-text-primary truncate group-hover:text-accent transition-colors\">\n {inquiry.subject}\n </h3>\n <span\n className={`inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${statusColors[inquiry.status] || statusColors.NEW}`}\n >\n {statusLabels[inquiry.status] || inquiry.status}\n </span>\n {inquiry.productId && productNames[inquiry.productId] && (\n <span\n className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[inquiry.productId]}`}\n >\n {productNames[inquiry.productId]}\n </span>\n )}\n {inquiry.category && (\n <span className=\"inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue\">\n {humanizeCategory(inquiry.category)}\n </span>\n )}\n </div>\n <p className=\"text-sm text-text-secondary mb-1\">\n <span className=\"font-medium\">{inquiry.name}</span>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{inquiry.email}</span>\n {inquiry.company && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{inquiry.company}</span>\n </>\n )}\n </p>\n <p className=\"text-xs text-text-secondary truncate\">{inquiry.message}</p>\n </div>\n <div className=\"text-xs text-text-secondary sm:whitespace-nowrap\">\n {formatDate(inquiry.createdAt)}\n </div>\n </div>\n </button>\n ))}\n </div>\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <button type=\"button\"\n onClick={loadMore}\n disabled={loading}\n className=\"min-h-11 inline-flex items-center justify-center gap-2 px-6 py-2 bg-surface border border-default rounded-lg text-sm text-text-secondary hover:text-text-primary hover:bg-muted transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </button>\n </div>\n )}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAaA,IAAM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX,EAEK,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;CACX;AAED,SAAS,EAAW,GAA4B;AAC9C,QAAO,IAAI,KAAK,EAAW,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;EACT,CAAC;;AAGJ,SAAgB,IAAuB;CACrC,IAAM,IAAW,GAAa,EAExB,IADW,GAAa,CACD,QACvB,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,CAAC,GAAc,KAAmB,EAAoC,GAAG,EACzE,CAAC,GAAe,KAAoB,EAAS,GAAG,EAChD,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAc,KAAmB,EAAiC,EAAE,CAAC,EAGtE,IAAkB,EAAO,EAAa;AAC5C,GAAgB,UAAU;CAE1B,IAAM,IAAoC,EAAE;AAG5C,CAFI,MAAQ,EAAO,SAAS,IACxB,MAAc,EAAO,SAAS,IAC9B,MAAe,EAAO,YAAY;CAEtC,IAAM,EAAE,SAAM,YAAS,UAAO,iBAAc,EAA4B;EACtE,WAAW;GAAE;GAAQ,OAAO;GAAI,QAAQ;GAAG;EAC3C,aAAa;EACd,CAAC,EAEI,IAAY,GAAM,kBAAkB,SAAS,EAAE,EAC/C,IAAQ,GAAM,kBAAkB,SAAS,GACzC,IAAU,GAAM,kBAAkB,WAAW,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