@burdenoff/microfe-support 2026.830.1 → 2026.830.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/index.js +2 -1
- package/dist/support/SupportAdminRoot.js +31 -34
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/SupportUserRoot.js +19 -22
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/components/PageLayout.d.ts +1 -1
- package/dist/support/components/PageLayout.js +46 -44
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +24 -23
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +27 -26
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +48 -54
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +56 -59
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +27 -26
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +23 -21
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +145 -132
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +104 -103
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +120 -123
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +175 -180
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +21 -20
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +35 -35
- package/dist/support/components/tickets/MessageThread.js +55 -54
- package/dist/support/components/tickets/MessageThread.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +62 -57
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +47 -47
- package/dist/support/components/tickets/TicketSidebar.js +122 -121
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/hooks/index.d.ts +1 -0
- package/dist/support/hooks/index.js +1 -0
- package/dist/support/hooks/useTr.d.ts +16 -0
- package/dist/support/hooks/useTr.js +12 -0
- package/dist/support/hooks/useTr.js.map +1 -0
- package/dist/support/index.d.ts +1 -0
- package/dist/support/index.js +2 -1
- package/dist/support/pages/AnalyticsPage.js +151 -145
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +134 -147
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +70 -79
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +140 -139
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +259 -232
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +57 -56
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +151 -146
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +80 -79
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +92 -99
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +85 -92
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +88 -87
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +91 -90
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +120 -118
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +139 -139
- package/dist/support/translations/en.d.ts +814 -0
- package/dist/support/translations/en.js +779 -0
- package/dist/support/translations/en.js.map +1 -0
- package/dist/support/translations/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { humanizeCategory as t } from "../utils/index.js";
|
|
3
|
+
import { useGetContactInquiriesQuery as n } from "../../generated/global-operations.js";
|
|
4
|
+
import { useEffect as r, useRef as i, useState as a } from "react";
|
|
5
|
+
import { AlertCircle as o, ChevronDown as s, Filter as c, Loader2 as l, Mail as u, Search as d } from "lucide-react";
|
|
6
|
+
import { useLocation as f, useNavigate as p } from "react-router";
|
|
7
|
+
import { graphqlFetch as m } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
8
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
9
|
+
import { IllustratedEmptyState as v, PagePurpose as y } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/support/pages/ContactInquiriesPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var b = {
|
|
11
12
|
NEW: "bg-status-info-bg-subtle text-status-info-text",
|
|
12
13
|
REVIEWED: "bg-status-warning-bg-subtle text-status-warning-text",
|
|
13
14
|
CONVERTED: "bg-status-success-bg-subtle text-status-success-text",
|
|
14
15
|
SPAM: "bg-status-error-bg-subtle text-status-error-text",
|
|
15
16
|
ARCHIVED: "bg-bg-sunken text-text-secondary"
|
|
16
|
-
}, b = {
|
|
17
|
-
NEW: "New",
|
|
18
|
-
REVIEWED: "Reviewed",
|
|
19
|
-
CONVERTED: "Converted",
|
|
20
|
-
SPAM: "Spam",
|
|
21
|
-
ARCHIVED: "Archived"
|
|
22
17
|
};
|
|
23
18
|
function x(e) {
|
|
24
19
|
return new Date(e).toLocaleDateString("en-US", {
|
|
@@ -30,284 +25,290 @@ function x(e) {
|
|
|
30
25
|
});
|
|
31
26
|
}
|
|
32
27
|
function S() {
|
|
33
|
-
let S =
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
let S = p(), C = f().search, w = e(), [T, E] = a(""), [D, O] = a(""), [k, A] = a(""), [j, M] = a(!1), [N, P] = a({}), F = i(N);
|
|
29
|
+
F.current = N;
|
|
30
|
+
let I = {
|
|
31
|
+
NEW: w("support.contactInquiries.status.new", "New"),
|
|
32
|
+
REVIEWED: w("support.contactInquiries.status.reviewed", "Reviewed"),
|
|
33
|
+
CONVERTED: w("support.contactInquiries.status.converted", "Converted"),
|
|
34
|
+
SPAM: w("support.contactInquiries.status.spam", "Spam"),
|
|
35
|
+
ARCHIVED: w("support.contactInquiries.status.archived", "Archived")
|
|
36
|
+
}, L = {};
|
|
37
|
+
T && (L.search = T), D && (L.status = D), k && (L.productId = k);
|
|
38
|
+
let { data: R, loading: z, error: B, fetchMore: V } = n({
|
|
38
39
|
variables: {
|
|
39
|
-
filter:
|
|
40
|
+
filter: L,
|
|
40
41
|
limit: 50,
|
|
41
42
|
offset: 0
|
|
42
43
|
},
|
|
43
44
|
fetchPolicy: "cache-and-network"
|
|
44
|
-
}),
|
|
45
|
-
return
|
|
46
|
-
let e =
|
|
45
|
+
}), H = R?.contactInquiries?.items ?? [], U = R?.contactInquiries?.total ?? 0, W = R?.contactInquiries?.hasMore ?? !1, G = Array.from(new Set(H.flatMap((e) => e.productId ? [e.productId] : []))).sort(), K = G.join(",");
|
|
46
|
+
return r(() => {
|
|
47
|
+
let e = K ? K.split(",").filter((e) => !F.current[e]) : [];
|
|
47
48
|
e.length !== 0 && e.forEach((e) => {
|
|
48
|
-
|
|
49
|
+
m({
|
|
49
50
|
gateway: "global",
|
|
50
51
|
query: "query($id: ID!) { platformProduct(id: $id) { name } }",
|
|
51
52
|
variables: { id: e }
|
|
52
53
|
}).then((t) => {
|
|
53
54
|
let n = t.data?.platformProduct?.name;
|
|
54
|
-
n &&
|
|
55
|
+
n && P((t) => ({
|
|
55
56
|
...t,
|
|
56
57
|
[e]: n
|
|
57
58
|
}));
|
|
58
59
|
}).catch(() => {});
|
|
59
60
|
});
|
|
60
|
-
}, [
|
|
61
|
+
}, [K]), z && H.length === 0 ? /* @__PURE__ */ _("div", {
|
|
61
62
|
className: "p-3 sm:p-6",
|
|
62
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ _("div", {
|
|
63
64
|
className: "flex items-center gap-3 mb-6",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ g(u, {
|
|
65
66
|
size: 24,
|
|
66
67
|
className: "text-text-primary"
|
|
67
|
-
}), /* @__PURE__ */
|
|
68
|
+
}), /* @__PURE__ */ g("h1", {
|
|
68
69
|
className: "text-2xl font-bold text-text-primary",
|
|
69
|
-
children: "Contact Inquiries"
|
|
70
|
+
children: w("support.contactInquiries.title", "Contact Inquiries")
|
|
70
71
|
})]
|
|
71
|
-
}), /* @__PURE__ */
|
|
72
|
+
}), /* @__PURE__ */ _("div", {
|
|
72
73
|
className: "flex flex-col items-center justify-center py-16",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ g(l, {
|
|
74
75
|
size: 32,
|
|
75
76
|
className: "animate-spin text-text-secondary mb-4"
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ g("p", {
|
|
77
78
|
className: "text-sm text-text-secondary",
|
|
78
|
-
children: "Loading inquiries…"
|
|
79
|
+
children: w("support.contactInquiries.loading", "Loading inquiries…")
|
|
79
80
|
})]
|
|
80
81
|
})]
|
|
81
|
-
}) :
|
|
82
|
+
}) : B ? /* @__PURE__ */ _("div", {
|
|
82
83
|
className: "p-3 sm:p-6",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ _("div", {
|
|
84
85
|
className: "flex items-center gap-3 mb-6",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ g(u, {
|
|
86
87
|
size: 24,
|
|
87
88
|
className: "text-text-primary"
|
|
88
|
-
}), /* @__PURE__ */
|
|
89
|
+
}), /* @__PURE__ */ g("h1", {
|
|
89
90
|
className: "text-2xl font-bold text-text-primary",
|
|
90
|
-
children: "Contact Inquiries"
|
|
91
|
+
children: w("support.contactInquiries.title", "Contact Inquiries")
|
|
91
92
|
})]
|
|
92
|
-
}), /* @__PURE__ */
|
|
93
|
+
}), /* @__PURE__ */ _("div", {
|
|
93
94
|
className: "flex flex-col items-center justify-center py-16 text-center",
|
|
94
95
|
children: [
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ g("div", {
|
|
96
97
|
className: "p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4",
|
|
97
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ g(o, { size: 48 })
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ g("h3", {
|
|
100
101
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
101
|
-
children: "Failed to load inquiries"
|
|
102
|
+
children: w("support.contactInquiries.error.title", "Failed to load inquiries")
|
|
102
103
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ g("p", {
|
|
104
105
|
className: "text-sm text-text-secondary",
|
|
105
|
-
children:
|
|
106
|
+
children: B.message
|
|
106
107
|
})
|
|
107
108
|
]
|
|
108
109
|
})]
|
|
109
|
-
}) : /* @__PURE__ */
|
|
110
|
+
}) : /* @__PURE__ */ _("div", {
|
|
110
111
|
className: "p-3 sm:p-6",
|
|
111
112
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ g("div", {
|
|
113
114
|
className: "flex flex-col gap-3 mb-6 sm:flex-row sm:items-center sm:justify-between",
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
+
children: /* @__PURE__ */ _("div", {
|
|
115
116
|
className: "flex items-center gap-3",
|
|
116
117
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ g(u, {
|
|
118
119
|
size: 24,
|
|
119
120
|
className: "text-text-primary"
|
|
120
121
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
122
123
|
className: "text-2xl font-bold text-text-primary",
|
|
123
|
-
children: "Contact Inquiries"
|
|
124
|
-
}), /* @__PURE__ */
|
|
124
|
+
children: w("support.contactInquiries.title", "Contact Inquiries")
|
|
125
|
+
}), /* @__PURE__ */ g("p", {
|
|
125
126
|
className: "text-sm text-text-secondary",
|
|
126
|
-
children: "Website contact form submissions"
|
|
127
|
+
children: w("support.contactInquiries.subtitle", "Website contact form submissions")
|
|
127
128
|
})] }),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ g("span", {
|
|
129
130
|
className: "ml-2 inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-bg-sunken text-text-secondary",
|
|
130
|
-
children:
|
|
131
|
+
children: U
|
|
131
132
|
})
|
|
132
133
|
]
|
|
133
134
|
})
|
|
134
135
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
136
|
+
/* @__PURE__ */ g(y, {
|
|
136
137
|
className: "mb-6",
|
|
137
|
-
children: "Every message sent through your product websites' contact forms lands here. Triage sales and support leads, mark spam, and convert genuine inquiries into tickets so nothing from a prospective customer slips through the cracks. Open an inquiry to read it in full and take action."
|
|
138
|
+
children: w("support.contactInquiries.purpose", "Every message sent through your product websites' contact forms lands here. Triage sales and support leads, mark spam, and convert genuine inquiries into tickets so nothing from a prospective customer slips through the cracks. Open an inquiry to read it in full and take action.")
|
|
138
139
|
}),
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ _("div", {
|
|
140
141
|
className: "flex flex-col sm:flex-row gap-3 mb-6",
|
|
141
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ _("div", {
|
|
142
143
|
className: "relative flex-1",
|
|
143
|
-
children: [/* @__PURE__ */
|
|
144
|
+
children: [/* @__PURE__ */ g(d, {
|
|
144
145
|
size: 16,
|
|
145
146
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
|
|
146
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ g("input", {
|
|
147
148
|
type: "text",
|
|
148
|
-
"aria-label": "Search inquiries",
|
|
149
|
-
placeholder: "Search by name, email, or subject...",
|
|
150
|
-
value:
|
|
151
|
-
onChange: (e) =>
|
|
149
|
+
"aria-label": w("support.contactInquiries.search.aria", "Search inquiries"),
|
|
150
|
+
placeholder: w("support.contactInquiries.search.placeholder", "Search by name, email, or subject..."),
|
|
151
|
+
value: T,
|
|
152
|
+
onChange: (e) => E(e.target.value),
|
|
152
153
|
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"
|
|
153
154
|
})]
|
|
154
|
-
}), /* @__PURE__ */
|
|
155
|
+
}), /* @__PURE__ */ _("button", {
|
|
155
156
|
type: "button",
|
|
156
|
-
onClick: () =>
|
|
157
|
+
onClick: () => M(!j),
|
|
157
158
|
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-bg-sunken transition-colors",
|
|
158
159
|
children: [
|
|
159
|
-
/* @__PURE__ */
|
|
160
|
-
"Filters",
|
|
161
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ g(c, { size: 16 }),
|
|
161
|
+
w("support.contactInquiries.filters.toggle", "Filters"),
|
|
162
|
+
/* @__PURE__ */ g(s, {
|
|
162
163
|
size: 14,
|
|
163
|
-
className:
|
|
164
|
+
className: j ? "rotate-180 transition-transform" : "transition-transform"
|
|
164
165
|
})
|
|
165
166
|
]
|
|
166
167
|
})]
|
|
167
168
|
}),
|
|
168
|
-
|
|
169
|
+
j && /* @__PURE__ */ g("div", {
|
|
169
170
|
className: "mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg",
|
|
170
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ _("div", {
|
|
171
172
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
173
174
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
174
175
|
htmlFor: "contactinquiriespage-status-0",
|
|
175
|
-
children: "Status"
|
|
176
|
-
}), /* @__PURE__ */
|
|
176
|
+
children: w("support.contactInquiries.filters.statusLabel", "Status")
|
|
177
|
+
}), /* @__PURE__ */ _("select", {
|
|
177
178
|
id: "contactinquiriespage-status-0",
|
|
178
|
-
value:
|
|
179
|
-
onChange: (e) =>
|
|
179
|
+
value: D,
|
|
180
|
+
onChange: (e) => O(e.target.value),
|
|
180
181
|
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",
|
|
181
182
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ g("option", {
|
|
183
184
|
value: "",
|
|
184
|
-
children: "All statuses"
|
|
185
|
+
children: w("support.contactInquiries.filters.allStatuses", "All statuses")
|
|
185
186
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ g("option", {
|
|
187
188
|
value: "NEW",
|
|
188
|
-
children:
|
|
189
|
+
children: I.NEW
|
|
189
190
|
}),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ g("option", {
|
|
191
192
|
value: "REVIEWED",
|
|
192
|
-
children:
|
|
193
|
+
children: I.REVIEWED
|
|
193
194
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
195
|
+
/* @__PURE__ */ g("option", {
|
|
195
196
|
value: "CONVERTED",
|
|
196
|
-
children:
|
|
197
|
+
children: I.CONVERTED
|
|
197
198
|
}),
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ g("option", {
|
|
199
200
|
value: "SPAM",
|
|
200
|
-
children:
|
|
201
|
+
children: I.SPAM
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ g("option", {
|
|
203
204
|
value: "ARCHIVED",
|
|
204
|
-
children:
|
|
205
|
+
children: I.ARCHIVED
|
|
205
206
|
})
|
|
206
207
|
]
|
|
207
|
-
})] }), /* @__PURE__ */
|
|
208
|
+
})] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("label", {
|
|
208
209
|
className: "block text-xs font-medium text-text-secondary mb-1",
|
|
209
210
|
htmlFor: "contactinquiriespage-product-2",
|
|
210
|
-
children: "Product"
|
|
211
|
-
}), /* @__PURE__ */
|
|
211
|
+
children: w("support.contactInquiries.filters.productLabel", "Product")
|
|
212
|
+
}), /* @__PURE__ */ _("select", {
|
|
212
213
|
id: "contactinquiriespage-product-2",
|
|
213
|
-
value:
|
|
214
|
-
onChange: (e) =>
|
|
214
|
+
value: k,
|
|
215
|
+
onChange: (e) => A(e.target.value),
|
|
215
216
|
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",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ g("option", {
|
|
217
218
|
value: "",
|
|
218
|
-
children: "All products"
|
|
219
|
-
}),
|
|
219
|
+
children: w("support.contactInquiries.filters.allProducts", "All products")
|
|
220
|
+
}), G.map((e) => /* @__PURE__ */ g("option", {
|
|
220
221
|
value: e,
|
|
221
|
-
children:
|
|
222
|
+
children: N[e] || e
|
|
222
223
|
}, e))]
|
|
223
224
|
})] })]
|
|
224
225
|
})
|
|
225
226
|
}),
|
|
226
|
-
|
|
227
|
+
H.length === 0 ? /* @__PURE__ */ g(v, {
|
|
227
228
|
illustration: "empty-notifications",
|
|
228
|
-
title: "No inquiries yet",
|
|
229
|
-
description: "Contact form submissions from your product websites will appear here."
|
|
230
|
-
}) : /* @__PURE__ */
|
|
229
|
+
title: w("support.contactInquiries.empty.title", "No inquiries yet"),
|
|
230
|
+
description: w("support.contactInquiries.empty.description", "Contact form submissions from your product websites will appear here.")
|
|
231
|
+
}) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
|
|
231
232
|
className: "space-y-3",
|
|
232
|
-
children:
|
|
233
|
+
children: H.map((e) => /* @__PURE__ */ g("button", {
|
|
233
234
|
type: "button",
|
|
234
|
-
onClick: () => S(`/support/inquiries/${
|
|
235
|
+
onClick: () => S(`/support/inquiries/${e.id}${C}`),
|
|
235
236
|
className: "w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group",
|
|
236
|
-
children: /* @__PURE__ */
|
|
237
|
+
children: /* @__PURE__ */ _("div", {
|
|
237
238
|
className: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ _("div", {
|
|
239
240
|
className: "flex-1 min-w-0",
|
|
240
241
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ _("div", {
|
|
242
243
|
className: "flex items-center gap-2 mb-1",
|
|
243
244
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ g("h3", {
|
|
245
246
|
className: "text-sm font-semibold text-text-primary truncate group-hover:text-primary transition-colors",
|
|
246
|
-
children:
|
|
247
|
+
children: e.subject
|
|
247
248
|
}),
|
|
248
|
-
/* @__PURE__ */
|
|
249
|
-
className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${
|
|
250
|
-
children:
|
|
249
|
+
/* @__PURE__ */ g("span", {
|
|
250
|
+
className: `inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium ${b[e.status] || b.NEW} ${e.status === "NEW" ? "motion-safe:animate-vc-glow-pulse" : ""}`,
|
|
251
|
+
children: I[e.status] || e.status
|
|
251
252
|
}),
|
|
252
|
-
|
|
253
|
+
e.productId && N[e.productId] && /* @__PURE__ */ g("span", {
|
|
253
254
|
className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-purple-subtle text-accent-purple",
|
|
254
|
-
title:
|
|
255
|
-
children:
|
|
255
|
+
title: w("support.contactInquiries.list.productTitle", "Product: {{name}}", { name: N[e.productId] }),
|
|
256
|
+
children: N[e.productId]
|
|
256
257
|
}),
|
|
257
|
-
|
|
258
|
+
e.category && /* @__PURE__ */ g("span", {
|
|
258
259
|
className: "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium bg-accent-blue-subtle text-accent-blue",
|
|
259
|
-
children: e
|
|
260
|
+
children: t(e.category)
|
|
260
261
|
})
|
|
261
262
|
]
|
|
262
263
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ _("p", {
|
|
264
265
|
className: "text-sm text-text-secondary mb-1",
|
|
265
266
|
children: [
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
+
/* @__PURE__ */ g("span", {
|
|
267
268
|
className: "font-medium",
|
|
268
|
-
children:
|
|
269
|
+
children: e.name
|
|
269
270
|
}),
|
|
270
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ g("span", {
|
|
271
272
|
className: "mx-1.5 text-text-secondary/50",
|
|
272
273
|
children: "·"
|
|
273
274
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
|
|
275
|
+
/* @__PURE__ */ g("span", { children: e.email }),
|
|
276
|
+
e.company && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("span", {
|
|
276
277
|
className: "mx-1.5 text-text-secondary/50",
|
|
277
278
|
children: "·"
|
|
278
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ g("span", { children: e.company })] })
|
|
279
280
|
]
|
|
280
281
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ g("p", {
|
|
282
283
|
className: "text-xs text-text-secondary truncate",
|
|
283
|
-
children:
|
|
284
|
+
children: e.message
|
|
284
285
|
})
|
|
285
286
|
]
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
+
}), /* @__PURE__ */ g("div", {
|
|
287
288
|
className: "text-xs text-text-secondary sm:whitespace-nowrap",
|
|
288
|
-
children: x(
|
|
289
|
+
children: x(e.createdAt)
|
|
289
290
|
})]
|
|
290
291
|
})
|
|
291
|
-
},
|
|
292
|
-
}),
|
|
292
|
+
}, e.id))
|
|
293
|
+
}), W && /* @__PURE__ */ g("div", {
|
|
293
294
|
className: "flex justify-center mt-6",
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ _("button", {
|
|
295
296
|
type: "button",
|
|
296
297
|
onClick: () => {
|
|
297
|
-
|
|
298
|
-
variables: { offset:
|
|
298
|
+
W && V({
|
|
299
|
+
variables: { offset: H.length },
|
|
299
300
|
updateQuery: (e, { fetchMoreResult: t }) => t ? { contactInquiries: {
|
|
300
301
|
...t.contactInquiries,
|
|
301
302
|
items: [...e.contactInquiries?.items ?? [], ...t.contactInquiries?.items ?? []]
|
|
302
303
|
} } : e
|
|
303
304
|
});
|
|
304
305
|
},
|
|
305
|
-
disabled:
|
|
306
|
+
disabled: z,
|
|
306
307
|
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-bg-sunken transition-colors disabled:opacity-50",
|
|
307
|
-
children: [
|
|
308
|
+
children: [z ? /* @__PURE__ */ g(l, {
|
|
308
309
|
size: 14,
|
|
309
310
|
className: "animate-spin"
|
|
310
|
-
}) : null, "Load more"]
|
|
311
|
+
}) : null, w("support.contactInquiries.loadMore", "Load more")]
|
|
311
312
|
})
|
|
312
313
|
})] })
|
|
313
314
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\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(inquiries.flatMap((i: ContactInquiry): string[] => (i.productId ? [i.productId] : [])))\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-bg-sunken text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n Every message sent through your product websites' contact forms lands here. Triage\n sales and support leads, mark spam, and convert genuine inquiries into tickets so nothing\n from a prospective customer slips through the cracks. Open an inquiry to read it in full and\n take action.\n </PagePurpose>\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\n 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-bg-sunken 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-bg-surface border border-border-seam rounded-lg\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n htmlFor=\"contactinquiriespage-status-0\"\n >\n Status\n </label>\n <select\n 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\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n htmlFor=\"contactinquiriespage-product-2\"\n >\n Product\n </label>\n <select\n 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 <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title=\"No inquiries yet\"\n description=\"Contact form submissions from your product websites will appear here.\"\n />\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button\n type=\"button\"\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] 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-primary 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} ${inquiry.status === 'NEW' ? 'motion-safe:animate-vc-glow-pulse' : ''}`}\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 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-bg-sunken 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":";;;;;;;;;AAcA,IAAM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;AACZ,GAEM,IAAuC;CAC3C,KAAK;CACL,UAAU;CACV,WAAW;CACX,MAAM;CACN,UAAU;AACZ;AAEA,SAAS,EAAW,GAA4B;CAC9C,OAAO,IAAI,KAAK,CAAU,CAAC,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;CACV,CAAC;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,CAAA;EAED;;AAET"}
|
|
1
|
+
{"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';\nimport { Mail, Search, Filter, Loader2, AlertCircle, ChevronDown } from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\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';\nimport { useTr } from '../hooks/useTr';\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\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 tr = useTr();\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 statusLabels: Record<ContactInquiryStatus, string> = {\n NEW: tr('support.contactInquiries.status.new', 'New'),\n REVIEWED: tr('support.contactInquiries.status.reviewed', 'Reviewed'),\n CONVERTED: tr('support.contactInquiries.status.converted', 'Converted'),\n SPAM: tr('support.contactInquiries.status.spam', 'Spam'),\n ARCHIVED: tr('support.contactInquiries.status.archived', 'Archived'),\n };\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(inquiries.flatMap((i: ContactInquiry): string[] => (i.productId ? [i.productId] : [])))\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\">\n {tr('support.contactInquiries.title', 'Contact Inquiries')}\n </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\">\n {tr('support.contactInquiries.loading', 'Loading inquiries…')}\n </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\">\n {tr('support.contactInquiries.title', 'Contact Inquiries')}\n </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\">\n {tr('support.contactInquiries.error.title', 'Failed to load inquiries')}\n </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\">\n {tr('support.contactInquiries.title', 'Contact Inquiries')}\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {tr('support.contactInquiries.subtitle', 'Website contact form submissions')}\n </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-bg-sunken text-text-secondary\">\n {total}\n </span>\n </div>\n </div>\n\n <PagePurpose className=\"mb-6\">\n {tr(\n 'support.contactInquiries.purpose',\n \"Every message sent through your product websites' contact forms lands here. Triage sales and support leads, mark spam, and convert genuine inquiries into tickets so nothing from a prospective customer slips through the cracks. Open an inquiry to read it in full and take action.\"\n )}\n </PagePurpose>\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={tr('support.contactInquiries.search.aria', 'Search inquiries')}\n placeholder={tr(\n 'support.contactInquiries.search.placeholder',\n 'Search by name, email, or subject...'\n )}\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 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-bg-sunken transition-colors\"\n >\n <Filter size={16} />\n {tr('support.contactInquiries.filters.toggle', '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-bg-surface border border-border-seam rounded-lg\">\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <div>\n <label\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n htmlFor=\"contactinquiriespage-status-0\"\n >\n {tr('support.contactInquiries.filters.statusLabel', 'Status')}\n </label>\n <select\n 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=\"\">\n {tr('support.contactInquiries.filters.allStatuses', 'All statuses')}\n </option>\n <option value=\"NEW\">{statusLabels.NEW}</option>\n <option value=\"REVIEWED\">{statusLabels.REVIEWED}</option>\n <option value=\"CONVERTED\">{statusLabels.CONVERTED}</option>\n <option value=\"SPAM\">{statusLabels.SPAM}</option>\n <option value=\"ARCHIVED\">{statusLabels.ARCHIVED}</option>\n </select>\n </div>\n <div>\n <label\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n htmlFor=\"contactinquiriespage-product-2\"\n >\n {tr('support.contactInquiries.filters.productLabel', 'Product')}\n </label>\n <select\n 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=\"\">\n {tr('support.contactInquiries.filters.allProducts', 'All products')}\n </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 <IllustratedEmptyState\n illustration=\"empty-notifications\"\n title={tr('support.contactInquiries.empty.title', 'No inquiries yet')}\n description={tr(\n 'support.contactInquiries.empty.description',\n 'Contact form submissions from your product websites will appear here.'\n )}\n />\n ) : (\n <>\n {/* Inquiry list */}\n <div className=\"space-y-3\">\n {inquiries.map((inquiry: ContactInquiry) => (\n <button\n type=\"button\"\n key={inquiry.id}\n onClick={() => navigate(`/support/inquiries/${inquiry.id}${queryParams}`)}\n className=\"w-full text-left p-4 bg-bg-surface border border-border-seam rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] 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-primary 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} ${inquiry.status === 'NEW' ? 'motion-safe:animate-vc-glow-pulse' : ''}`}\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={tr(\n 'support.contactInquiries.list.productTitle',\n 'Product: {{name}}',\n { name: productNames[inquiry.productId] }\n )}\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 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-bg-sunken transition-colors disabled:opacity-50\"\n >\n {loading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n {tr('support.contactInquiries.loadMore', 'Load more')}\n </button>\n </div>\n )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