@burdenoff/microfe-support 2026.519.1 → 2026.520.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.js +2 -0
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +117 -112
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +229 -176
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/utils/index.js +17 -14
- package/dist/support/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { humanizeCategory as e } from "../utils/index.js";
|
|
2
|
+
import { useGetContactInquiryQuery as t, useReplyToContactInquiryMutation as n, useUpdateContactInquiryStatusMutation as r } from "../../generated/global-operations.js";
|
|
3
|
+
import { nativeCopyText as i, nativeImpact as ee } from "../../utils/nativeBridge.js";
|
|
4
|
+
import { useEffect as te, useState as a } from "react";
|
|
5
|
+
import { AlertCircle as o, Archive as s, ArrowLeft as c, Building2 as ne, Calendar as l, CheckCircle as u, Clock as d, Copy as f, ExternalLink as p, Eye as m, Globe as re, Loader2 as h, Mail as g, MessageSquare as _, Package as v, Send as y, ShieldAlert as b, Tag as x, Ticket as S, User as C } from "lucide-react";
|
|
5
6
|
import { useLocation as w, useNavigate as T, useParams as E } from "react-router-dom";
|
|
6
|
-
import {
|
|
7
|
+
import { graphqlFetch as D } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
8
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
7
9
|
//#region src/support/pages/ContactInquiryDetailPage.tsx
|
|
8
|
-
var
|
|
10
|
+
var A = {
|
|
9
11
|
NEW: {
|
|
10
12
|
label: "New",
|
|
11
13
|
color: "text-accent-blue",
|
|
12
|
-
icon:
|
|
14
|
+
icon: g,
|
|
13
15
|
bg: "bg-status-info-bg-subtle border-border-subtle"
|
|
14
16
|
},
|
|
15
17
|
REVIEWED: {
|
|
16
18
|
label: "Reviewed",
|
|
17
19
|
color: "text-status-warning-text",
|
|
18
|
-
icon:
|
|
20
|
+
icon: m,
|
|
19
21
|
bg: "bg-status-warning-bg-subtle border-border-subtle"
|
|
20
22
|
},
|
|
21
23
|
CONVERTED: {
|
|
@@ -27,7 +29,7 @@ var k = {
|
|
|
27
29
|
SPAM: {
|
|
28
30
|
label: "Spam",
|
|
29
31
|
color: "text-status-error-text",
|
|
30
|
-
icon:
|
|
32
|
+
icon: b,
|
|
31
33
|
bg: "bg-status-error-bg-subtle border-border-subtle"
|
|
32
34
|
},
|
|
33
35
|
ARCHIVED: {
|
|
@@ -37,7 +39,7 @@ var k = {
|
|
|
37
39
|
bg: "bg-bg-canvas border-border-subtle"
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
function
|
|
42
|
+
function j(e) {
|
|
41
43
|
return new Date(e).toLocaleDateString("en-US", {
|
|
42
44
|
weekday: "short",
|
|
43
45
|
month: "short",
|
|
@@ -47,197 +49,216 @@ function A(e) {
|
|
|
47
49
|
minute: "2-digit"
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
|
-
function
|
|
52
|
+
function ie(e) {
|
|
51
53
|
let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
|
|
52
54
|
if (n < 60) return `${n}m ago`;
|
|
53
55
|
let r = Math.floor(n / 60);
|
|
54
56
|
if (r < 24) return `${r}h ago`;
|
|
55
57
|
let i = Math.floor(r / 24);
|
|
56
|
-
return i < 30 ? `${i}d ago` :
|
|
58
|
+
return i < 30 ? `${i}d ago` : j(e);
|
|
57
59
|
}
|
|
58
60
|
function M() {
|
|
59
|
-
let { id:
|
|
60
|
-
variables: { id:
|
|
61
|
-
skip: !
|
|
62
|
-
}),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
let { id: m } = E(), b = T(), M = w().search, [N, P] = a(!1), [F, I] = a(!1), [L, R] = a(""), [z, B] = a(!1), [V, H] = a(null), { data: U, loading: W, error: G } = t({
|
|
62
|
+
variables: { id: m },
|
|
63
|
+
skip: !m
|
|
64
|
+
}), K = U?.contactInquiry?.productId ?? null;
|
|
65
|
+
te(() => {
|
|
66
|
+
if (!K) {
|
|
67
|
+
H(null);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
let e = !1;
|
|
71
|
+
return D({
|
|
72
|
+
gateway: "global",
|
|
73
|
+
query: "query($id: ID!) { platformProduct(id: $id) { name } }",
|
|
74
|
+
variables: { id: K }
|
|
75
|
+
}).then((t) => {
|
|
76
|
+
if (e) return;
|
|
77
|
+
let n = t.data?.platformProduct?.name;
|
|
78
|
+
n && H(n);
|
|
79
|
+
}).catch(() => {}), () => {
|
|
80
|
+
e = !0;
|
|
81
|
+
};
|
|
82
|
+
}, [K]);
|
|
83
|
+
let [q, { loading: J }] = r({ refetchQueries: ["GetContactInquiry", "GetContactInquiries"] }), [ae, { loading: Y }] = n({ refetchQueries: ["GetContactInquiry"] }), oe = async () => {
|
|
84
|
+
if (!(!L.trim() || !m)) try {
|
|
85
|
+
(await ae({ variables: {
|
|
86
|
+
id: m,
|
|
66
87
|
message: L.trim()
|
|
67
88
|
} })).data?.replyToContactInquiry.success && (B(!0), R(""), setTimeout(() => B(!1), 3e3));
|
|
68
89
|
} catch (e) {
|
|
69
90
|
console.error("Failed to send reply:", e);
|
|
70
91
|
}
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
73
|
-
await
|
|
74
|
-
id:
|
|
92
|
+
}, X = U?.contactInquiry, Z = async (e) => {
|
|
93
|
+
if (m) try {
|
|
94
|
+
await q({ variables: {
|
|
95
|
+
id: m,
|
|
75
96
|
input: { status: e }
|
|
76
97
|
} }), P(!0), setTimeout(() => P(!1), 3e3);
|
|
77
98
|
} catch (e) {
|
|
78
99
|
console.error("Failed to update status:", e);
|
|
79
100
|
}
|
|
80
|
-
},
|
|
81
|
-
|
|
101
|
+
}, se = async () => {
|
|
102
|
+
X?.email && (ee("light"), await i(X.email), I(!0), setTimeout(() => I(!1), 2e3));
|
|
82
103
|
};
|
|
83
|
-
if (
|
|
104
|
+
if (W) return /* @__PURE__ */ O("div", {
|
|
84
105
|
className: "min-h-full flex items-center justify-center py-20",
|
|
85
|
-
children: /* @__PURE__ */
|
|
106
|
+
children: /* @__PURE__ */ k("div", {
|
|
86
107
|
className: "text-center",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
108
|
+
children: [/* @__PURE__ */ O(h, {
|
|
88
109
|
size: 36,
|
|
89
110
|
className: "animate-spin text-[var(--color-text-secondary)] mx-auto mb-3"
|
|
90
|
-
}), /* @__PURE__ */
|
|
111
|
+
}), /* @__PURE__ */ O("p", {
|
|
91
112
|
className: "text-sm text-[var(--color-text-secondary)]",
|
|
92
113
|
children: "Loading inquiry details..."
|
|
93
114
|
})]
|
|
94
115
|
})
|
|
95
116
|
});
|
|
96
|
-
if (
|
|
117
|
+
if (G || !X) return /* @__PURE__ */ O("div", {
|
|
97
118
|
className: "min-h-full flex items-center justify-center py-20",
|
|
98
|
-
children: /* @__PURE__ */
|
|
119
|
+
children: /* @__PURE__ */ k("div", {
|
|
99
120
|
className: "text-center max-w-sm",
|
|
100
121
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ O("div", {
|
|
102
123
|
className: "w-16 h-16 mx-auto mb-4 rounded-2xl bg-status-error-bg-subtle flex items-center justify-center",
|
|
103
|
-
children: /* @__PURE__ */
|
|
124
|
+
children: /* @__PURE__ */ O(o, {
|
|
104
125
|
size: 32,
|
|
105
126
|
className: "text-status-error-text"
|
|
106
127
|
})
|
|
107
128
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ O("h3", {
|
|
109
130
|
className: "text-lg font-semibold text-[var(--color-text-primary)] mb-2",
|
|
110
131
|
children: "Inquiry not found"
|
|
111
132
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ O("p", {
|
|
113
134
|
className: "text-sm text-[var(--color-text-secondary)] mb-6",
|
|
114
|
-
children:
|
|
135
|
+
children: G?.message || "This inquiry may have been deleted or you don't have access."
|
|
115
136
|
}),
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
onClick: () =>
|
|
137
|
+
/* @__PURE__ */ k("button", {
|
|
138
|
+
onClick: () => b(`/support/inquiries${M}`),
|
|
118
139
|
className: "inline-flex items-center gap-2 px-5 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
140
|
+
children: [/* @__PURE__ */ O(c, { size: 16 }), "Back to Inquiries"]
|
|
120
141
|
})
|
|
121
142
|
]
|
|
122
143
|
})
|
|
123
144
|
});
|
|
124
|
-
let Q =
|
|
125
|
-
return /* @__PURE__ */
|
|
145
|
+
let Q = A[X.status] || A.NEW, $ = Q.icon;
|
|
146
|
+
return /* @__PURE__ */ k("div", {
|
|
126
147
|
className: "p-6 animate-in fade-in duration-300",
|
|
127
148
|
children: [
|
|
128
|
-
/* @__PURE__ */
|
|
149
|
+
/* @__PURE__ */ k("div", {
|
|
129
150
|
className: "flex items-center justify-between mb-6",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
131
|
-
onClick: () =>
|
|
151
|
+
children: [/* @__PURE__ */ k("button", {
|
|
152
|
+
onClick: () => b(`/support/inquiries${M}`),
|
|
132
153
|
className: "inline-flex items-center gap-2 text-[var(--color-text-secondary)] hover:text-[var(--color-text-primary)] transition-colors",
|
|
133
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ O(c, { size: 18 }), /* @__PURE__ */ O("span", {
|
|
134
155
|
className: "text-sm font-medium",
|
|
135
156
|
children: "Back to Inquiries"
|
|
136
157
|
})]
|
|
137
|
-
}), /* @__PURE__ */
|
|
158
|
+
}), /* @__PURE__ */ k("div", {
|
|
138
159
|
className: "flex items-center gap-2 text-xs text-[var(--color-text-secondary)]",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
160
|
+
children: [/* @__PURE__ */ O(d, { size: 12 }), ie(X.createdAt)]
|
|
140
161
|
})]
|
|
141
162
|
}),
|
|
142
|
-
N && /* @__PURE__ */
|
|
163
|
+
N && /* @__PURE__ */ k("div", {
|
|
143
164
|
className: "mb-5 p-3.5 bg-status-success-bg-subtle border border-border-subtle rounded-xl flex items-center gap-2.5 text-status-success-text text-sm font-medium animate-in slide-in-from-top-2 duration-300",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ O(u, { size: 18 }), "Status updated successfully"]
|
|
145
166
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ O("div", {
|
|
147
168
|
className: `rounded-xl border p-6 mb-6 ${Q.bg}`,
|
|
148
|
-
children: /* @__PURE__ */
|
|
169
|
+
children: /* @__PURE__ */ O("div", {
|
|
149
170
|
className: "flex items-start justify-between",
|
|
150
|
-
children: /* @__PURE__ */
|
|
171
|
+
children: /* @__PURE__ */ k("div", {
|
|
151
172
|
className: "flex items-start gap-4",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ O("div", {
|
|
153
174
|
className: "w-12 h-12 rounded-xl bg-white/80 dark:bg-white/10 flex items-center justify-center shadow-sm",
|
|
154
|
-
children: /* @__PURE__ */
|
|
175
|
+
children: /* @__PURE__ */ O($, {
|
|
155
176
|
size: 24,
|
|
156
177
|
className: Q.color
|
|
157
178
|
})
|
|
158
|
-
}), /* @__PURE__ */
|
|
179
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("div", {
|
|
159
180
|
className: "flex items-center gap-3 mb-1.5",
|
|
160
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ O("h1", {
|
|
161
182
|
className: "text-xl font-bold text-[var(--color-text-primary)]",
|
|
162
|
-
children:
|
|
183
|
+
children: X.subject
|
|
163
184
|
})
|
|
164
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ k("div", {
|
|
165
186
|
className: "flex items-center gap-3 text-sm",
|
|
166
|
-
children: [/* @__PURE__ */
|
|
187
|
+
children: [/* @__PURE__ */ k("span", {
|
|
167
188
|
className: `inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold ${Q.color} bg-white/60 dark:bg-white/10`,
|
|
168
|
-
children: [/* @__PURE__ */
|
|
169
|
-
}), /* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ O($, { size: 12 }), Q.label]
|
|
190
|
+
}), /* @__PURE__ */ k("span", {
|
|
170
191
|
className: "text-[var(--color-text-secondary)]",
|
|
171
|
-
children: ["from ", /* @__PURE__ */
|
|
192
|
+
children: ["from ", /* @__PURE__ */ O("strong", {
|
|
172
193
|
className: "text-[var(--color-text-primary)]",
|
|
173
|
-
children:
|
|
194
|
+
children: X.name
|
|
174
195
|
})]
|
|
175
196
|
})]
|
|
176
197
|
})] })]
|
|
177
198
|
})
|
|
178
199
|
})
|
|
179
200
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ k("div", {
|
|
181
202
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
182
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ k("div", {
|
|
183
204
|
className: "lg:col-span-2 space-y-5",
|
|
184
205
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ k("div", {
|
|
186
207
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ O("div", {
|
|
188
209
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
189
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ k("h2", {
|
|
190
211
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
|
|
191
|
-
children: [/* @__PURE__ */
|
|
212
|
+
children: [/* @__PURE__ */ O(C, { size: 14 }), "Contact Information"]
|
|
192
213
|
})
|
|
193
|
-
}), /* @__PURE__ */
|
|
214
|
+
}), /* @__PURE__ */ O("div", {
|
|
194
215
|
className: "p-5",
|
|
195
|
-
children: /* @__PURE__ */
|
|
216
|
+
children: /* @__PURE__ */ k("div", {
|
|
196
217
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
|
|
197
218
|
children: [
|
|
198
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ k("div", {
|
|
199
220
|
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
221
|
+
children: [/* @__PURE__ */ O("div", {
|
|
201
222
|
className: "w-9 h-9 rounded-lg bg-status-info-bg-subtle flex items-center justify-center",
|
|
202
|
-
children: /* @__PURE__ */
|
|
223
|
+
children: /* @__PURE__ */ O(C, {
|
|
203
224
|
size: 16,
|
|
204
225
|
className: "text-accent-blue"
|
|
205
226
|
})
|
|
206
|
-
}), /* @__PURE__ */
|
|
227
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
207
228
|
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
208
229
|
children: "Name"
|
|
209
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ O("p", {
|
|
210
231
|
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
211
|
-
children:
|
|
232
|
+
children: X.name
|
|
212
233
|
})] })]
|
|
213
234
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ k("div", {
|
|
215
236
|
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
216
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ O("div", {
|
|
217
238
|
className: "w-9 h-9 rounded-lg bg-accent-indigo-subtle flex items-center justify-center",
|
|
218
|
-
children: /* @__PURE__ */
|
|
239
|
+
children: /* @__PURE__ */ O(g, {
|
|
219
240
|
size: 16,
|
|
220
241
|
className: "text-accent-indigo"
|
|
221
242
|
})
|
|
222
|
-
}), /* @__PURE__ */
|
|
243
|
+
}), /* @__PURE__ */ k("div", {
|
|
223
244
|
className: "flex-1 min-w-0",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ O("p", {
|
|
225
246
|
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
226
247
|
children: "Email"
|
|
227
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ k("div", {
|
|
228
249
|
className: "flex items-center gap-1.5",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
230
|
-
href: `mailto:${
|
|
250
|
+
children: [/* @__PURE__ */ O("a", {
|
|
251
|
+
href: `mailto:${X.email}`,
|
|
231
252
|
className: "text-sm font-semibold text-[var(--color-text-link)] hover:underline truncate",
|
|
232
|
-
children:
|
|
233
|
-
}), /* @__PURE__ */
|
|
234
|
-
onClick:
|
|
253
|
+
children: X.email
|
|
254
|
+
}), /* @__PURE__ */ O("button", {
|
|
255
|
+
onClick: se,
|
|
235
256
|
className: "flex-shrink-0 p-0.5 rounded hover:bg-[var(--color-bg-muted)] transition-colors",
|
|
236
257
|
title: "Copy email",
|
|
237
|
-
children: F ? /* @__PURE__ */
|
|
258
|
+
children: F ? /* @__PURE__ */ O(u, {
|
|
238
259
|
size: 12,
|
|
239
260
|
className: "text-status-success-text"
|
|
240
|
-
}) : /* @__PURE__ */
|
|
261
|
+
}) : /* @__PURE__ */ O(f, {
|
|
241
262
|
size: 12,
|
|
242
263
|
className: "text-[var(--color-text-secondary)]"
|
|
243
264
|
})
|
|
@@ -245,76 +266,108 @@ function M() {
|
|
|
245
266
|
})]
|
|
246
267
|
})]
|
|
247
268
|
}),
|
|
248
|
-
|
|
269
|
+
X.company && /* @__PURE__ */ k("div", {
|
|
249
270
|
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
250
|
-
children: [/* @__PURE__ */
|
|
271
|
+
children: [/* @__PURE__ */ O("div", {
|
|
251
272
|
className: "w-9 h-9 rounded-lg bg-accent-purple-subtle flex items-center justify-center",
|
|
252
|
-
children: /* @__PURE__ */
|
|
273
|
+
children: /* @__PURE__ */ O(ne, {
|
|
253
274
|
size: 16,
|
|
254
275
|
className: "text-accent-purple"
|
|
255
276
|
})
|
|
256
|
-
}), /* @__PURE__ */
|
|
277
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
257
278
|
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
258
279
|
children: "Company"
|
|
259
|
-
}), /* @__PURE__ */
|
|
280
|
+
}), /* @__PURE__ */ O("p", {
|
|
260
281
|
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
261
|
-
children:
|
|
282
|
+
children: X.company
|
|
262
283
|
})] })]
|
|
263
284
|
}),
|
|
264
|
-
/* @__PURE__ */
|
|
285
|
+
X.category && /* @__PURE__ */ k("div", {
|
|
265
286
|
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ O("div", {
|
|
288
|
+
className: "w-9 h-9 rounded-lg bg-accent-blue-subtle flex items-center justify-center",
|
|
289
|
+
children: /* @__PURE__ */ O(x, {
|
|
290
|
+
size: 16,
|
|
291
|
+
className: "text-accent-blue"
|
|
292
|
+
})
|
|
293
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
294
|
+
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
295
|
+
children: "Category"
|
|
296
|
+
}), /* @__PURE__ */ O("p", {
|
|
297
|
+
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
298
|
+
children: e(X.category)
|
|
299
|
+
})] })]
|
|
300
|
+
}),
|
|
301
|
+
X.productId && V && /* @__PURE__ */ k("div", {
|
|
302
|
+
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
303
|
+
children: [/* @__PURE__ */ O("div", {
|
|
304
|
+
className: "w-9 h-9 rounded-lg bg-accent-purple-subtle flex items-center justify-center",
|
|
305
|
+
children: /* @__PURE__ */ O(v, {
|
|
306
|
+
size: 16,
|
|
307
|
+
className: "text-accent-purple"
|
|
308
|
+
})
|
|
309
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
310
|
+
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
311
|
+
children: "Product"
|
|
312
|
+
}), /* @__PURE__ */ O("p", {
|
|
313
|
+
className: "text-sm font-semibold text-[var(--color-text-primary)]",
|
|
314
|
+
children: V
|
|
315
|
+
})] })]
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ k("div", {
|
|
318
|
+
className: "flex items-center gap-3 p-3 rounded-lg bg-[var(--color-bg-muted)]/30",
|
|
319
|
+
children: [/* @__PURE__ */ O("div", {
|
|
267
320
|
className: "w-9 h-9 rounded-lg bg-status-success-bg-subtle flex items-center justify-center",
|
|
268
|
-
children: /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ O(re, {
|
|
269
322
|
size: 16,
|
|
270
323
|
className: "text-status-success-text"
|
|
271
324
|
})
|
|
272
|
-
}), /* @__PURE__ */
|
|
325
|
+
}), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
273
326
|
className: "text-[10px] font-medium text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
274
327
|
children: "Source"
|
|
275
|
-
}), /* @__PURE__ */
|
|
328
|
+
}), /* @__PURE__ */ O("p", {
|
|
276
329
|
className: "text-sm font-semibold text-[var(--color-text-primary)] capitalize",
|
|
277
|
-
children:
|
|
330
|
+
children: X.source.toLowerCase()
|
|
278
331
|
})] })]
|
|
279
332
|
})
|
|
280
333
|
]
|
|
281
334
|
})
|
|
282
335
|
})]
|
|
283
336
|
}),
|
|
284
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ k("div", {
|
|
285
338
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
286
|
-
children: [/* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ O("div", {
|
|
287
340
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
288
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ k("h2", {
|
|
289
342
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
343
|
+
children: [/* @__PURE__ */ O(_, { size: 14 }), "Message"]
|
|
291
344
|
})
|
|
292
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ O("div", {
|
|
293
346
|
className: "p-5",
|
|
294
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ O("p", {
|
|
295
348
|
className: "text-sm text-[var(--color-text-primary)] leading-relaxed whitespace-pre-wrap",
|
|
296
|
-
children:
|
|
349
|
+
children: X.message
|
|
297
350
|
})
|
|
298
351
|
})]
|
|
299
352
|
}),
|
|
300
|
-
|
|
353
|
+
X.metadata && Object.keys(X.metadata).length > 0 && /* @__PURE__ */ k("div", {
|
|
301
354
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
355
|
+
children: [/* @__PURE__ */ O("div", {
|
|
303
356
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
304
|
-
children: /* @__PURE__ */
|
|
357
|
+
children: /* @__PURE__ */ k("h2", {
|
|
305
358
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ O(p, { size: 14 }), "Additional Data"]
|
|
307
360
|
})
|
|
308
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ O("div", {
|
|
309
362
|
className: "p-5",
|
|
310
|
-
children: /* @__PURE__ */
|
|
363
|
+
children: /* @__PURE__ */ O("div", {
|
|
311
364
|
className: "space-y-2.5",
|
|
312
|
-
children: Object.entries(
|
|
365
|
+
children: Object.entries(X.metadata).map(([e, t]) => /* @__PURE__ */ k("div", {
|
|
313
366
|
className: "flex items-start gap-3 py-1.5 border-b border-[var(--color-border-default)] last:border-0",
|
|
314
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ O("span", {
|
|
315
368
|
className: "text-xs font-medium text-[var(--color-text-secondary)] min-w-[120px] uppercase tracking-wider",
|
|
316
369
|
children: e
|
|
317
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ O("span", {
|
|
318
371
|
className: "text-xs text-[var(--color-text-primary)] font-mono break-all",
|
|
319
372
|
children: String(t)
|
|
320
373
|
})]
|
|
@@ -323,147 +376,147 @@ function M() {
|
|
|
323
376
|
})]
|
|
324
377
|
})
|
|
325
378
|
]
|
|
326
|
-
}), /* @__PURE__ */
|
|
379
|
+
}), /* @__PURE__ */ k("div", {
|
|
327
380
|
className: "space-y-5",
|
|
328
381
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ k("div", {
|
|
330
383
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
331
|
-
children: [/* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ O("div", {
|
|
332
385
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
333
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ k("h2", {
|
|
334
387
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-2",
|
|
335
|
-
children: [/* @__PURE__ */
|
|
388
|
+
children: [/* @__PURE__ */ O(l, { size: 14 }), "Timeline"]
|
|
336
389
|
})
|
|
337
|
-
}), /* @__PURE__ */
|
|
390
|
+
}), /* @__PURE__ */ k("div", {
|
|
338
391
|
className: "p-5 space-y-4",
|
|
339
392
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ k("div", {
|
|
341
394
|
className: "flex items-start gap-3",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
395
|
+
children: [/* @__PURE__ */ O("div", { className: "w-2 h-2 rounded-full bg-accent-blue mt-1.5 flex-shrink-0" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
343
396
|
className: "text-xs font-medium text-[var(--color-text-primary)]",
|
|
344
397
|
children: "Submitted"
|
|
345
|
-
}), /* @__PURE__ */
|
|
398
|
+
}), /* @__PURE__ */ O("p", {
|
|
346
399
|
className: "text-[11px] text-[var(--color-text-secondary)]",
|
|
347
|
-
children:
|
|
400
|
+
children: j(X.createdAt)
|
|
348
401
|
})] })]
|
|
349
402
|
}),
|
|
350
|
-
|
|
403
|
+
X.updatedAt !== X.createdAt && /* @__PURE__ */ k("div", {
|
|
351
404
|
className: "flex items-start gap-3",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ O("div", { className: "w-2 h-2 rounded-full bg-status-warning-bg mt-1.5 flex-shrink-0" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
353
406
|
className: "text-xs font-medium text-[var(--color-text-primary)]",
|
|
354
407
|
children: "Last Updated"
|
|
355
|
-
}), /* @__PURE__ */
|
|
408
|
+
}), /* @__PURE__ */ O("p", {
|
|
356
409
|
className: "text-[11px] text-[var(--color-text-secondary)]",
|
|
357
|
-
children:
|
|
410
|
+
children: j(X.updatedAt)
|
|
358
411
|
})] })]
|
|
359
412
|
}),
|
|
360
|
-
|
|
413
|
+
X.convertedTicketId && /* @__PURE__ */ k("div", {
|
|
361
414
|
className: "flex items-start gap-3",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ O("div", { className: "w-2 h-2 rounded-full bg-status-success-bg mt-1.5 flex-shrink-0" }), /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("p", {
|
|
363
416
|
className: "text-xs font-medium text-[var(--color-text-primary)]",
|
|
364
417
|
children: "Converted to Ticket"
|
|
365
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ O("p", {
|
|
366
419
|
className: "text-[11px] font-mono text-[var(--color-text-secondary)]",
|
|
367
|
-
children:
|
|
420
|
+
children: X.convertedTicketId
|
|
368
421
|
})] })]
|
|
369
422
|
})
|
|
370
423
|
]
|
|
371
424
|
})]
|
|
372
425
|
}),
|
|
373
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ k("div", {
|
|
374
427
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
375
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ O("div", {
|
|
376
429
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
377
|
-
children: /* @__PURE__ */
|
|
430
|
+
children: /* @__PURE__ */ k("h2", {
|
|
378
431
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider flex items-center gap-1.5",
|
|
379
|
-
children: [/* @__PURE__ */
|
|
432
|
+
children: [/* @__PURE__ */ O(y, { size: 12 }), "Reply"]
|
|
380
433
|
})
|
|
381
|
-
}), /* @__PURE__ */
|
|
434
|
+
}), /* @__PURE__ */ k("div", {
|
|
382
435
|
className: "p-5",
|
|
383
436
|
children: [
|
|
384
|
-
z && /* @__PURE__ */
|
|
437
|
+
z && /* @__PURE__ */ k("div", {
|
|
385
438
|
className: "mb-3 p-2.5 rounded-lg bg-status-success-bg-subtle border border-border-subtle text-sm text-status-success-text flex items-center gap-2",
|
|
386
|
-
children: [/* @__PURE__ */
|
|
439
|
+
children: [/* @__PURE__ */ O(u, { size: 14 }), "Reply sent successfully!"]
|
|
387
440
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ O("textarea", {
|
|
389
442
|
value: L,
|
|
390
443
|
onChange: (e) => R(e.target.value),
|
|
391
444
|
placeholder: "Type your reply... This will be sent as a branded email to the contact.",
|
|
392
445
|
rows: 4,
|
|
393
|
-
disabled:
|
|
446
|
+
disabled: Y,
|
|
394
447
|
className: "w-full px-3 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-lg text-sm text-[var(--color-text-primary)] placeholder:text-[var(--color-text-secondary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-accent)]/50 disabled:opacity-50 resize-none transition-all"
|
|
395
448
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
397
|
-
onClick:
|
|
398
|
-
disabled:
|
|
449
|
+
/* @__PURE__ */ k("button", {
|
|
450
|
+
onClick: oe,
|
|
451
|
+
disabled: Y || !L.trim(),
|
|
399
452
|
className: "mt-2 w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
|
|
400
|
-
children: [
|
|
453
|
+
children: [Y ? /* @__PURE__ */ O(h, {
|
|
401
454
|
size: 15,
|
|
402
455
|
className: "animate-spin"
|
|
403
|
-
}) : /* @__PURE__ */
|
|
456
|
+
}) : /* @__PURE__ */ O(y, { size: 15 }), "Send Reply"]
|
|
404
457
|
})
|
|
405
458
|
]
|
|
406
459
|
})]
|
|
407
460
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
461
|
+
/* @__PURE__ */ k("div", {
|
|
409
462
|
className: "bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-xl overflow-hidden shadow-sm",
|
|
410
|
-
children: [/* @__PURE__ */
|
|
463
|
+
children: [/* @__PURE__ */ O("div", {
|
|
411
464
|
className: "px-5 py-3.5 border-b border-[var(--color-border-default)] bg-[var(--color-bg-muted)]/50",
|
|
412
|
-
children: /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ O("h2", {
|
|
413
466
|
className: "text-xs font-semibold text-[var(--color-text-secondary)] uppercase tracking-wider",
|
|
414
467
|
children: "Actions"
|
|
415
468
|
})
|
|
416
|
-
}), /* @__PURE__ */
|
|
469
|
+
}), /* @__PURE__ */ k("div", {
|
|
417
470
|
className: "p-5 space-y-4",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
471
|
+
children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("label", {
|
|
419
472
|
className: "block text-xs font-medium text-[var(--color-text-secondary)] mb-1.5",
|
|
420
473
|
children: "Status"
|
|
421
|
-
}), /* @__PURE__ */
|
|
422
|
-
value:
|
|
423
|
-
onChange: (e) =>
|
|
424
|
-
disabled:
|
|
474
|
+
}), /* @__PURE__ */ k("select", {
|
|
475
|
+
value: X.status,
|
|
476
|
+
onChange: (e) => Z(e.target.value),
|
|
477
|
+
disabled: J,
|
|
425
478
|
className: "w-full px-3 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] rounded-lg text-sm text-[var(--color-text-primary)] focus:outline-none focus:ring-2 focus:ring-[var(--color-border-accent)]/50 disabled:opacity-50 transition-all",
|
|
426
479
|
children: [
|
|
427
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ O("option", {
|
|
428
481
|
value: "NEW",
|
|
429
482
|
children: "New"
|
|
430
483
|
}),
|
|
431
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ O("option", {
|
|
432
485
|
value: "REVIEWED",
|
|
433
486
|
children: "Reviewed"
|
|
434
487
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ O("option", {
|
|
436
489
|
value: "CONVERTED",
|
|
437
490
|
children: "Converted to Ticket"
|
|
438
491
|
}),
|
|
439
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ O("option", {
|
|
440
493
|
value: "SPAM",
|
|
441
494
|
children: "Spam"
|
|
442
495
|
}),
|
|
443
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ O("option", {
|
|
444
497
|
value: "ARCHIVED",
|
|
445
498
|
children: "Archived"
|
|
446
499
|
})
|
|
447
500
|
]
|
|
448
|
-
})] }), /* @__PURE__ */
|
|
501
|
+
})] }), /* @__PURE__ */ k("div", {
|
|
449
502
|
className: "space-y-2",
|
|
450
503
|
children: [
|
|
451
|
-
|
|
452
|
-
onClick: () =>
|
|
453
|
-
disabled:
|
|
504
|
+
X.status !== "CONVERTED" && /* @__PURE__ */ k("button", {
|
|
505
|
+
onClick: () => Z("CONVERTED"),
|
|
506
|
+
disabled: J,
|
|
454
507
|
className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-accent)] text-on-accent rounded-lg text-sm font-medium hover:opacity-90 transition-all disabled:opacity-50",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
508
|
+
children: [/* @__PURE__ */ O(S, { size: 15 }), "Convert to Ticket"]
|
|
456
509
|
}),
|
|
457
|
-
/* @__PURE__ */
|
|
458
|
-
href: `mailto:${
|
|
510
|
+
/* @__PURE__ */ k("a", {
|
|
511
|
+
href: `mailto:${X.email}?subject=Re: ${encodeURIComponent(X.subject)}`,
|
|
459
512
|
className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-primary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
513
|
+
children: [/* @__PURE__ */ O(g, { size: 15 }), "Reply via Email"]
|
|
461
514
|
}),
|
|
462
|
-
|
|
463
|
-
onClick: () =>
|
|
464
|
-
disabled:
|
|
515
|
+
X.status !== "ARCHIVED" && X.status !== "SPAM" && /* @__PURE__ */ k("button", {
|
|
516
|
+
onClick: () => Z("ARCHIVED"),
|
|
517
|
+
disabled: J,
|
|
465
518
|
className: "w-full inline-flex items-center justify-center gap-2 px-4 py-2.5 bg-[var(--color-bg-surface)] border border-[var(--color-border-default)] text-[var(--color-text-secondary)] rounded-lg text-sm font-medium hover:bg-[var(--color-bg-muted)] transition-all disabled:opacity-50",
|
|
466
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ O(s, { size: 15 }), "Archive"]
|
|
467
520
|
})
|
|
468
521
|
]
|
|
469
522
|
})]
|