@consilioweb/payload-support 0.8.2 → 0.9.5

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.
Files changed (50) hide show
  1. package/dist/components/RichTextEditor/index.cjs +233 -0
  2. package/dist/components/RichTextEditor/index.js +232 -0
  3. package/dist/components/TicketConversation/components/CodeBlock.cjs +24 -7
  4. package/dist/components/TicketConversation/components/CodeBlock.js +23 -9
  5. package/dist/index.cjs +19 -1
  6. package/dist/index.js +19 -1
  7. package/dist/views/BillingView/client.cjs +260 -103
  8. package/dist/views/BillingView/client.js +259 -103
  9. package/dist/views/ChatView/client.cjs +184 -137
  10. package/dist/views/ChatView/client.js +180 -137
  11. package/dist/views/CrmView/client.cjs +270 -122
  12. package/dist/views/CrmView/client.js +266 -122
  13. package/dist/views/EmailTrackingView/client.cjs +80 -69
  14. package/dist/views/EmailTrackingView/client.js +80 -70
  15. package/dist/views/ImportConversationView/client.cjs +127 -94
  16. package/dist/views/ImportConversationView/client.js +123 -94
  17. package/dist/views/LogsView/client.cjs +56 -58
  18. package/dist/views/LogsView/client.js +52 -58
  19. package/dist/views/NewTicketView/client.cjs +39 -55
  20. package/dist/views/NewTicketView/client.js +38 -55
  21. package/dist/views/PendingEmailsView/client.cjs +399 -102
  22. package/dist/views/PendingEmailsView/client.js +396 -103
  23. package/dist/views/SupportDashboardView/client.cjs +276 -137
  24. package/dist/views/SupportDashboardView/client.js +275 -137
  25. package/dist/views/TicketDetailView/client.cjs +487 -204
  26. package/dist/views/TicketDetailView/client.js +486 -204
  27. package/dist/views/TicketInboxView/client.cjs +62 -65
  28. package/dist/views/TicketInboxView/client.js +62 -66
  29. package/dist/views/TicketingSettingsView/client.cjs +10 -8
  30. package/dist/views/TicketingSettingsView/client.js +10 -8
  31. package/dist/views/TimeDashboardView/client.cjs +70 -59
  32. package/dist/views/TimeDashboardView/client.js +69 -59
  33. package/package.json +7 -3
  34. package/src/components/RichTextEditor/index.tsx +261 -0
  35. package/src/components/TicketConversation/components/CodeBlock.tsx +53 -14
  36. package/src/plugin.ts +2 -0
  37. package/src/utils/emailTemplate.ts +37 -0
  38. package/src/views/BillingView/client.tsx +362 -69
  39. package/src/views/ChatView/client.tsx +225 -140
  40. package/src/views/CrmView/client.tsx +447 -189
  41. package/src/views/EmailTrackingView/client.tsx +111 -71
  42. package/src/views/ImportConversationView/client.tsx +255 -70
  43. package/src/views/LogsView/client.tsx +85 -50
  44. package/src/views/NewTicketView/client.tsx +37 -53
  45. package/src/views/PendingEmailsView/client.tsx +512 -92
  46. package/src/views/SupportDashboardView/client.tsx +294 -134
  47. package/src/views/TicketDetailView/client.tsx +486 -213
  48. package/src/views/TicketInboxView/client.tsx +52 -61
  49. package/src/views/TicketingSettingsView/client.tsx +10 -9
  50. package/src/views/TimeDashboardView/client.tsx +184 -69
@@ -4,10 +4,12 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var react = require('react');
5
5
  var Link = require('next/link');
6
6
  var useTranslation = require('../../components/TicketConversation/hooks/useTranslation');
7
+ var styles = require('../../styles/SupportDashboard.module.scss');
7
8
 
8
9
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
10
 
10
11
  var Link__default = /*#__PURE__*/_interopDefault(Link);
12
+ var styles__default = /*#__PURE__*/_interopDefault(styles);
11
13
 
12
14
  function formatResponseTime(hours) {
13
15
  if (hours == null) return "--";
@@ -35,17 +37,80 @@ function computeTrend(current, previous) {
35
37
  if (pct === 0) return { pct: 0, dir: "neutral" };
36
38
  return { pct: Math.abs(pct), dir: pct > 0 ? "up" : "down" };
37
39
  }
38
- function StatCard({ label, value, trend, accentColor }) {
39
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "16px 20px", borderRadius: 10, border: "1px solid var(--theme-elevation-150)", background: "var(--theme-elevation-0)", borderLeft: `3px solid ${accentColor || "#2563eb"}` }, children: [
40
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: "var(--theme-elevation-500)", marginBottom: 4 }, children: label }),
41
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 24, fontWeight: 700, color: "var(--theme-text)" }, children: value }),
42
- trend && trend.dir !== "neutral" && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { fontSize: 11, color: trend.dir === "up" ? "#dc2626" : "#16a34a", marginTop: 4 }, children: [
43
- trend.dir === "up" ? "\u2191" : "\u2193",
44
- " ",
45
- trend.pct,
46
- "%"
40
+ function StatCard({ label, value, trend, accentColor, onClick }) {
41
+ const style = accentColor ? { "--stat-accent": accentColor } : void 0;
42
+ const Tag = onClick ? "button" : "div";
43
+ return /* @__PURE__ */ jsxRuntime.jsxs(
44
+ Tag,
45
+ {
46
+ className: styles__default.default.statCard,
47
+ style,
48
+ onClick,
49
+ type: onClick ? "button" : void 0,
50
+ children: [
51
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.statLabel, children: label }),
52
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.statValueRow, children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.statValue, children: value }) }),
53
+ trend && trend.dir !== "neutral" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default.statTrend} ${styles__default.default[trend.dir]}`, children: [
54
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.trendArrow, children: trend.dir === "up" ? "\u2191" : "\u2193" }),
55
+ trend.pct,
56
+ "%"
57
+ ] }),
58
+ trend && trend.dir === "neutral" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles__default.default.statTrend} ${styles__default.default.neutral}`, children: "\u2014 stable" })
59
+ ]
60
+ }
61
+ );
62
+ }
63
+ function VolumeChart({ data }) {
64
+ const max = Math.max(...data.map((d) => d.value), 1);
65
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
66
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.volumeChart, children: data.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx(
67
+ "div",
68
+ {
69
+ className: styles__default.default.volumeBar,
70
+ style: { height: `${Math.max(d.value / max * 100, 5)}%` },
71
+ title: `${d.label}: ${d.value}`
72
+ },
73
+ i
74
+ )) }),
75
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.volumeLabels, children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: data[0]?.label }),
77
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: data[data.length - 1]?.label })
78
+ ] })
79
+ ] });
80
+ }
81
+ function CSATRing({ score, count }) {
82
+ const pct = score > 0 ? score / 5 * 100 : 0;
83
+ const radius = 42;
84
+ const circumference = 2 * Math.PI * radius;
85
+ const strokeDashoffset = circumference - pct / 100 * circumference;
86
+ const color = score >= 4 ? "#22c55e" : score >= 3 ? "#f59e0b" : score > 0 ? "#ef4444" : "#94a3b8";
87
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.csatContainer, children: [
88
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.csatRing, children: [
89
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "100", height: "100", viewBox: "0 0 100 100", children: [
90
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: radius, fill: "none", stroke: "var(--theme-elevation-150, #e2e8f0)", strokeWidth: "6" }),
91
+ /* @__PURE__ */ jsxRuntime.jsx(
92
+ "circle",
93
+ {
94
+ cx: "50",
95
+ cy: "50",
96
+ r: radius,
97
+ fill: "none",
98
+ stroke: color,
99
+ strokeWidth: "6",
100
+ strokeLinecap: "round",
101
+ strokeDasharray: circumference,
102
+ strokeDashoffset,
103
+ transform: "rotate(-90 50 50)",
104
+ style: { transition: "stroke-dashoffset 600ms ease" }
105
+ }
106
+ )
107
+ ] }),
108
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.csatValue, children: score > 0 ? score.toFixed(1) : "--" })
47
109
  ] }),
48
- trend && trend.dir === "neutral" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 11, color: "#6b7280", marginTop: 4 }, children: "-- stable" })
110
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.csatMeta, children: [
111
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.csatLabel, children: score > 0 ? `${score.toFixed(1)} / 5` : "Pas de donn\xE9es" }),
112
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.csatSub, children: count > 0 ? `${count} avis recueillis` : "Aucun avis" })
113
+ ] })
49
114
  ] });
50
115
  }
51
116
  function formatSlaTime(minutes) {
@@ -59,14 +124,15 @@ function formatSlaTime(minutes) {
59
124
  return remainH > 0 ? `${d}j ${remainH}h` : `${d}j`;
60
125
  }
61
126
  function SlaSection() {
62
- const { t } = useTranslation.useTranslation();
63
127
  const [sla, setSla] = react.useState(null);
64
128
  const [slaLoading, setSlaLoading] = react.useState(true);
65
129
  react.useEffect(() => {
66
130
  const fetchSla = async () => {
67
131
  try {
68
132
  const res = await fetch("/api/support/sla-check");
69
- if (res.ok) setSla(await res.json());
133
+ if (res.ok) {
134
+ setSla(await res.json());
135
+ }
70
136
  } catch {
71
137
  }
72
138
  setSlaLoading(false);
@@ -75,58 +141,96 @@ function SlaSection() {
75
141
  const interval = setInterval(fetchSla, 6e4);
76
142
  return () => clearInterval(interval);
77
143
  }, []);
78
- if (slaLoading) return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 16, color: "#94a3b8", fontSize: 13 }, children: t("sla.loading") });
144
+ if (slaLoading) {
145
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaSection, children: [
146
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.slaSectionTitle, children: "SLA" }),
147
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.slaLoading, children: "Chargement..." })
148
+ ] });
149
+ }
79
150
  if (!sla) return null;
80
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: 24 }, children: [
81
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { fontSize: 16, fontWeight: 700, marginBottom: 12, color: "var(--theme-text)" }, children: t("sla.title") }),
82
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 16 }, children: [
83
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16, borderRadius: 10, border: "1px solid #fecaca", background: "#fef2f2" }, children: [
84
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 8 }, children: [
85
- /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: 14, fontWeight: 700, color: "#dc2626", margin: 0 }, children: t("sla.breached") }),
86
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { padding: "2px 8px", borderRadius: 10, background: "#fecaca", color: "#dc2626", fontSize: 12, fontWeight: 700 }, children: sla.breached.length })
87
- ] }),
88
- sla.breached.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: "#6b7280" }, children: t("sla.noBreached") }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: sla.breached.map((ticket) => {
89
- const overdueMin = Math.round((Date.now() - new Date(ticket.createdAt).getTime()) / 6e4);
90
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { style: { padding: "6px 0", borderBottom: "1px solid #fecaca", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 13 }, onClick: () => {
91
- window.location.href = `/admin/support/ticket?id=${ticket.id}`;
92
- }, children: [
93
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
94
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600 }, children: [
95
- "#",
96
- ticket.ticketNumber
97
- ] }),
98
- " ",
99
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#6b7280" }, children: ticket.subject })
151
+ const navigateToTicket = (id) => {
152
+ window.location.href = `/admin/support/ticket?id=${id}`;
153
+ };
154
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaSection, children: [
155
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.slaSectionTitle, children: "SLA" }),
156
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaGrid, children: [
157
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default.slaCard} ${styles__default.default.slaBreach}`, children: [
158
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaCardHeader, children: [
159
+ /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: `${styles__default.default.slaCardTitle} ${styles__default.default.slaCardTitleBreach}`, children: [
160
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
161
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
162
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
163
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
100
164
  ] }),
101
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { color: "#dc2626", fontWeight: 600, fontSize: 12 }, children: [
102
- "+",
103
- formatSlaTime(overdueMin)
104
- ] })
105
- ] }, ticket.id);
165
+ "En breach"
166
+ ] }),
167
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.slaCount} ${styles__default.default.slaCountBreach}`, children: sla.breached.length })
168
+ ] }),
169
+ sla.breached.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.slaEmpty, children: "Aucun ticket en breach" }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: styles__default.default.slaList, children: sla.breached.map((ticket) => {
170
+ const now = /* @__PURE__ */ new Date();
171
+ const created = new Date(ticket.createdAt);
172
+ const overdueMin = Math.round((now.getTime() - created.getTime()) / 6e4);
173
+ return /* @__PURE__ */ jsxRuntime.jsxs(
174
+ "li",
175
+ {
176
+ className: styles__default.default.slaItem,
177
+ onClick: () => navigateToTicket(ticket.id),
178
+ children: [
179
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaItemLeft, children: [
180
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles__default.default.slaItemNum, children: [
181
+ "#",
182
+ ticket.ticketNumber
183
+ ] }),
184
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.slaItemSubject, children: ticket.subject })
185
+ ] }),
186
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${styles__default.default.slaItemTime} ${styles__default.default.slaTimeBreach}`, children: [
187
+ "+",
188
+ formatSlaTime(overdueMin)
189
+ ] })
190
+ ]
191
+ },
192
+ ticket.id
193
+ );
106
194
  }) })
107
195
  ] }),
108
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16, borderRadius: 10, border: "1px solid #fde68a", background: "#fefce8" }, children: [
109
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", marginBottom: 8 }, children: [
110
- /* @__PURE__ */ jsxRuntime.jsx("h3", { style: { fontSize: 14, fontWeight: 700, color: "#d97706", margin: 0 }, children: t("sla.atRisk") }),
111
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { padding: "2px 8px", borderRadius: 10, background: "#fde68a", color: "#d97706", fontSize: 12, fontWeight: 700 }, children: sla.atRisk.length })
196
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles__default.default.slaCard} ${styles__default.default.slaRisk}`, children: [
197
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaCardHeader, children: [
198
+ /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: `${styles__default.default.slaCardTitle} ${styles__default.default.slaCardTitleRisk}`, children: [
199
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
200
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
201
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 6 12 12 16 14" })
202
+ ] }),
203
+ "\xC0 risque"
204
+ ] }),
205
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.slaCount} ${styles__default.default.slaCountRisk}`, children: sla.atRisk.length })
112
206
  ] }),
113
- sla.atRisk.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, color: "#6b7280" }, children: t("sla.noAtRisk") }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0 }, children: sla.atRisk.map((ticket) => {
114
- const elapsedMin = Math.round((Date.now() - new Date(ticket.createdAt).getTime()) / 6e4);
207
+ sla.atRisk.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.slaEmpty, children: "Aucun ticket \xE0 risque" }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { className: styles__default.default.slaList, children: sla.atRisk.map((ticket) => {
208
+ const now = /* @__PURE__ */ new Date();
209
+ const created = new Date(ticket.createdAt);
210
+ const elapsedMin = Math.round((now.getTime() - created.getTime()) / 6e4);
115
211
  const estimatedTotalMin = Math.round(elapsedMin / 0.8);
116
212
  const remainingMin = Math.max(estimatedTotalMin - elapsedMin, 0);
117
- return /* @__PURE__ */ jsxRuntime.jsxs("li", { style: { padding: "6px 0", borderBottom: "1px solid #fde68a", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: 13 }, onClick: () => {
118
- window.location.href = `/admin/support/ticket?id=${ticket.id}`;
119
- }, children: [
120
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
121
- /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600 }, children: [
122
- "#",
123
- ticket.ticketNumber
124
- ] }),
125
- " ",
126
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#6b7280" }, children: ticket.subject })
127
- ] }),
128
- /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#d97706", fontWeight: 600, fontSize: 12 }, children: t("sla.remaining", { time: formatSlaTime(remainingMin) }) })
129
- ] }, ticket.id);
213
+ return /* @__PURE__ */ jsxRuntime.jsxs(
214
+ "li",
215
+ {
216
+ className: styles__default.default.slaItem,
217
+ onClick: () => navigateToTicket(ticket.id),
218
+ children: [
219
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.slaItemLeft, children: [
220
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: styles__default.default.slaItemNum, children: [
221
+ "#",
222
+ ticket.ticketNumber
223
+ ] }),
224
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles__default.default.slaItemSubject, children: ticket.subject })
225
+ ] }),
226
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: `${styles__default.default.slaItemTime} ${styles__default.default.slaTimeRisk}`, children: [
227
+ formatSlaTime(remainingMin),
228
+ " restant"
229
+ ] })
230
+ ]
231
+ },
232
+ ticket.id
233
+ );
130
234
  }) })
131
235
  ] })
132
236
  ] })
@@ -173,24 +277,34 @@ const SupportDashboardClient = () => {
173
277
  const volumeData = react.useMemo(() => {
174
278
  if (!stats) return [];
175
279
  const avg = stats.createdLast7Days;
176
- const days = [t("dashboard.weekDays.mon"), t("dashboard.weekDays.tue"), t("dashboard.weekDays.wed"), t("dashboard.weekDays.thu"), t("dashboard.weekDays.fri"), t("dashboard.weekDays.sat"), t("dashboard.weekDays.sun")];
280
+ const days = ["Lun", "Mar", "Mer", "Jeu", "Ven", "Sam", "Dim"];
177
281
  const base = Math.max(Math.floor(avg / 7), 0);
178
282
  return days.map((label, i) => ({
179
283
  label,
284
+ // Simple deterministic variation based on index
180
285
  value: Math.max(base + (i * 3 + 1) % 5 - 2, 0)
181
286
  }));
182
- }, [stats, t]);
287
+ }, [stats]);
183
288
  if (loading) {
184
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "20px 30px", maxWidth: 1100, margin: "0 auto" }, children: [
185
- /* @__PURE__ */ jsxRuntime.jsx("h1", { style: { fontSize: 24, fontWeight: 700 }, children: t("dashboard.title") }),
186
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { color: "#94a3b8" }, children: t("dashboard.loadingMetrics") }),
187
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 16, marginTop: 20 }, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: 80, borderRadius: 10, background: "#f1f5f9" } }, i)) })
289
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.page, children: [
290
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.header, children: [
291
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: styles__default.default.title, children: t("dashboard.title") }),
292
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles__default.default.subtitle, children: t("dashboard.loadingMetrics") })
293
+ ] }),
294
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.statsRow, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.skeletonCard }, i)) }),
295
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.middleGrid, children: [
296
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.skeletonTable }),
297
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.rightColumn, children: [
298
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.skeletonChart }),
299
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.skeletonChart })
300
+ ] })
301
+ ] })
188
302
  ] });
189
303
  }
190
304
  if (!stats) {
191
- return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "20px 30px", maxWidth: 1100, margin: "0 auto" }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 40, textAlign: "center", color: "#dc2626" }, children: [
305
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.page, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.errorState, children: [
192
306
  /* @__PURE__ */ jsxRuntime.jsx("strong", { children: t("dashboard.loadError") }),
193
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: sessionExpired ? t("common.sessionExpired") : t("dashboard.cannotLoadStats") })
307
+ sessionExpired ? t("common.sessionExpired") : t("dashboard.cannotLoadStats")
194
308
  ] }) });
195
309
  }
196
310
  const openCount = stats.byStatus.open || 0;
@@ -202,98 +316,123 @@ const SupportDashboardClient = () => {
202
316
  if (typeof ticket.client === "string") return ticket.client;
203
317
  return ticket.client.company || ticket.client.firstName || "--";
204
318
  };
205
- const statusDotColor = (status) => {
319
+ const getStatusDotClass = (status) => {
206
320
  switch (status) {
207
321
  case "open":
208
- return "#22c55e";
322
+ return styles__default.default.statusDotOpen;
209
323
  case "waiting_client":
210
- return "#eab308";
324
+ return styles__default.default.statusDotWaiting;
211
325
  case "resolved":
212
- return "#94a3b8";
326
+ return styles__default.default.statusDotResolved;
213
327
  default:
214
- return "#94a3b8";
328
+ return "";
215
329
  }
216
330
  };
217
- const maxVolume = Math.max(...volumeData.map((d) => d.value), 1);
218
- const csatScore = stats.satisfactionAvg;
219
- const csatPct = csatScore > 0 ? csatScore / 5 * 100 : 0;
220
- const csatRadius = 42;
221
- const csatCircumference = 2 * Math.PI * csatRadius;
222
- const csatStrokeDashoffset = csatCircumference - csatPct / 100 * csatCircumference;
223
- const csatColor = csatScore >= 4 ? "#22c55e" : csatScore >= 3 ? "#f59e0b" : csatScore > 0 ? "#ef4444" : "#94a3b8";
224
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "20px 30px", maxWidth: 1100, margin: "0 auto" }, children: [
225
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginBottom: 20 }, children: [
226
- /* @__PURE__ */ jsxRuntime.jsx("h1", { style: { fontSize: 24, fontWeight: 700, margin: 0, color: "var(--theme-text)" }, children: t("dashboard.title") }),
227
- /* @__PURE__ */ jsxRuntime.jsx("p", { style: { color: "var(--theme-elevation-500)", margin: "4px 0 0", fontSize: 14 }, children: t("dashboard.subtitle") })
331
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.page, children: [
332
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.header, children: [
333
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: styles__default.default.title, children: t("dashboard.title") }),
334
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles__default.default.subtitle, children: t("dashboard.subtitle") })
228
335
  ] }),
229
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "repeat(4, 1fr)", gap: 16, marginBottom: 24 }, children: [
230
- /* @__PURE__ */ jsxRuntime.jsx(StatCard, { label: t("dashboard.openTickets"), value: String(openCount), trend: trendOpen, accentColor: "#3b82f6" }),
231
- /* @__PURE__ */ jsxRuntime.jsx(StatCard, { label: t("dashboard.waitingClient"), value: String(waitingCount), trend: waitingTrend, accentColor: "#f59e0b" }),
232
- /* @__PURE__ */ jsxRuntime.jsx(StatCard, { label: t("dashboard.responseTime"), value: formatResponseTime(stats.avgResponseTimeHours), accentColor: stats.avgResponseTimeHours != null && stats.avgResponseTimeHours > 24 ? "#ef4444" : "#22c55e" }),
233
- /* @__PURE__ */ jsxRuntime.jsx(StatCard, { label: t("dashboard.satisfaction"), value: stats.satisfactionAvg > 0 ? `${stats.satisfactionAvg}/5` : "--", accentColor: stats.satisfactionAvg >= 4 ? "#22c55e" : stats.satisfactionAvg >= 3 ? "#f59e0b" : "#94a3b8" })
336
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.statsRow, children: [
337
+ /* @__PURE__ */ jsxRuntime.jsx(
338
+ StatCard,
339
+ {
340
+ label: t("dashboard.openTickets"),
341
+ value: String(openCount),
342
+ trend: trendOpen,
343
+ accentColor: "#3b82f6"
344
+ }
345
+ ),
346
+ /* @__PURE__ */ jsxRuntime.jsx(
347
+ StatCard,
348
+ {
349
+ label: t("dashboard.waitingClient"),
350
+ value: String(waitingCount),
351
+ trend: waitingTrend,
352
+ accentColor: "#f59e0b"
353
+ }
354
+ ),
355
+ /* @__PURE__ */ jsxRuntime.jsx(
356
+ StatCard,
357
+ {
358
+ label: t("dashboard.responseTime"),
359
+ value: formatResponseTime(stats.avgResponseTimeHours),
360
+ accentColor: stats.avgResponseTimeHours != null && stats.avgResponseTimeHours > 24 ? "#ef4444" : "#22c55e"
361
+ }
362
+ ),
363
+ /* @__PURE__ */ jsxRuntime.jsx(
364
+ StatCard,
365
+ {
366
+ label: t("dashboard.satisfaction"),
367
+ value: stats.satisfactionAvg > 0 ? `${stats.satisfactionAvg}/5` : "--",
368
+ accentColor: stats.satisfactionAvg >= 4 ? "#22c55e" : stats.satisfactionAvg >= 3 ? "#f59e0b" : "#94a3b8"
369
+ }
370
+ )
234
371
  ] }),
235
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "grid", gridTemplateColumns: "1fr 320px", gap: 20, marginBottom: 24 }, children: [
236
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16, borderRadius: 10, border: "1px solid var(--theme-elevation-150)" }, children: [
237
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { fontSize: 15, fontWeight: 700, margin: "0 0 12px", color: "var(--theme-text)" }, children: t("dashboard.activeTickets") }),
238
- tickets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: 20, textAlign: "center", color: "#94a3b8" }, children: t("dashboard.noActiveTickets") }) : /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse", fontSize: 13 }, children: [
372
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.middleGrid, children: [
373
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.panel, children: [
374
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.panelTitle, children: t("dashboard.activeTickets") }),
375
+ tickets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles__default.default.emptyTable, children: t("dashboard.noActiveTickets") }) : /* @__PURE__ */ jsxRuntime.jsxs("table", { className: styles__default.default.ticketTable, children: [
239
376
  /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
240
- /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" }, children: t("dashboard.tableHeaders.status") }),
241
- /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" }, children: t("dashboard.tableHeaders.number") }),
242
- /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" }, children: t("dashboard.tableHeaders.subject") }),
243
- /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" }, children: t("dashboard.tableHeaders.client") }),
244
- /* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" }, children: t("dashboard.tableHeaders.modified") })
377
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: t("dashboard.tableHeaders.status") }),
378
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: t("dashboard.tableHeaders.number") }),
379
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: t("dashboard.tableHeaders.subject") }),
380
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: t("dashboard.tableHeaders.client") }),
381
+ /* @__PURE__ */ jsxRuntime.jsx("th", { children: t("dashboard.tableHeaders.modified") }),
382
+ /* @__PURE__ */ jsxRuntime.jsx("th", {})
245
383
  ] }) }),
246
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: tickets.map((tk) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { cursor: "pointer" }, onClick: () => {
247
- window.location.href = `/admin/support/ticket?id=${tk.id}`;
248
- }, children: [
249
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { width: 8, height: 8, borderRadius: "50%", display: "inline-block", backgroundColor: statusDotColor(tk.status) } }) }),
250
- /* @__PURE__ */ jsxRuntime.jsxs("td", { style: { padding: "8px", fontWeight: 600, fontSize: 12 }, children: [
251
- "#",
252
- tk.ticketNumber
253
- ] }),
254
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "8px", maxWidth: 250, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: tk.subject }),
255
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "8px", color: "var(--theme-elevation-500)", fontSize: 12 }, children: getClientName(tk) }),
256
- /* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "8px", color: "var(--theme-elevation-400)", fontSize: 12 }, children: timeAgo(tk.updatedAt) })
257
- ] }, tk.id)) })
384
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: tickets.map((tk) => /* @__PURE__ */ jsxRuntime.jsxs(
385
+ "tr",
386
+ {
387
+ onClick: () => {
388
+ window.location.href = `/admin/support/ticket?id=${tk.id}`;
389
+ },
390
+ children: [
391
+ /* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.statusDot} ${getStatusDotClass(tk.status)}` }) }),
392
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { className: styles__default.default.ticketNum, children: [
393
+ "#",
394
+ tk.ticketNumber
395
+ ] }),
396
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: styles__default.default.ticketSubject, children: tk.subject }),
397
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: styles__default.default.ticketClient, children: getClientName(tk) }),
398
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: styles__default.default.ticketTime, children: timeAgo(tk.updatedAt) }),
399
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: styles__default.default.ticketArrow, children: "\u2192" })
400
+ ]
401
+ },
402
+ tk.id
403
+ )) })
258
404
  ] })
259
405
  ] }),
260
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: 16 }, children: [
261
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16, borderRadius: 10, border: "1px solid var(--theme-elevation-150)" }, children: [
262
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { fontSize: 15, fontWeight: 700, margin: "0 0 12px", color: "var(--theme-text)" }, children: t("dashboard.volume7days") }),
263
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "flex-end", gap: 4, height: 80 }, children: volumeData.map((d, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, background: "#3b82f6", borderRadius: "3px 3px 0 0", height: `${Math.max(d.value / maxVolume * 100, 5)}%` }, title: `${d.label}: ${d.value}` }, i)) }),
264
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", fontSize: 10, color: "var(--theme-elevation-400)", marginTop: 4 }, children: [
265
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: volumeData[0]?.label }),
266
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: volumeData[volumeData.length - 1]?.label })
267
- ] })
406
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.rightColumn, children: [
407
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.panel, children: [
408
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.panelTitle, children: t("dashboard.volume7days") }),
409
+ /* @__PURE__ */ jsxRuntime.jsx(VolumeChart, { data: volumeData })
268
410
  ] }),
269
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: 16, borderRadius: 10, border: "1px solid var(--theme-elevation-150)" }, children: [
270
- /* @__PURE__ */ jsxRuntime.jsx("h2", { style: { fontSize: 15, fontWeight: 700, margin: "0 0 12px", color: "var(--theme-text)" }, children: t("dashboard.csat") }),
271
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 16 }, children: [
272
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", width: 80, height: 80 }, children: [
273
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "80", height: "80", viewBox: "0 0 100 100", children: [
274
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: csatRadius, fill: "none", stroke: "var(--theme-elevation-150, #e2e8f0)", strokeWidth: "6" }),
275
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: csatRadius, fill: "none", stroke: csatColor, strokeWidth: "6", strokeLinecap: "round", strokeDasharray: csatCircumference, strokeDashoffset: csatStrokeDashoffset, transform: "rotate(-90 50 50)", style: { transition: "stroke-dashoffset 600ms ease" } })
276
- ] }),
277
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, display: "flex", alignItems: "center", justifyContent: "center", fontWeight: 700, fontSize: 16 }, children: csatScore > 0 ? csatScore.toFixed(1) : "--" })
278
- ] }),
279
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
280
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 13, fontWeight: 600 }, children: csatScore > 0 ? `${csatScore.toFixed(1)} / 5` : t("dashboard.csatNoData") }),
281
- /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: 12, color: "var(--theme-elevation-500)" }, children: stats.satisfactionCount > 0 ? t("dashboard.csatReviews", { count: String(stats.satisfactionCount) }) : t("dashboard.csatNoReviews") })
282
- ] })
283
- ] })
411
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.panel, children: [
412
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: styles__default.default.panelTitle, children: t("dashboard.csat") }),
413
+ /* @__PURE__ */ jsxRuntime.jsx(CSATRing, { score: stats.satisfactionAvg, count: stats.satisfactionCount })
284
414
  ] })
285
415
  ] })
286
416
  ] }),
287
417
  /* @__PURE__ */ jsxRuntime.jsx(SlaSection, {}),
288
- /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 10, marginTop: 24, flexWrap: "wrap" }, children: [
289
- /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/new-ticket", style: { padding: "8px 16px", borderRadius: 8, background: "#2563eb", color: "#fff", fontSize: 13, fontWeight: 600, textDecoration: "none" }, children: t("dashboard.newTicketAction") }),
290
- /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: "/admin/support/emails", style: { padding: "8px 16px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, fontWeight: 500, textDecoration: "none", color: "var(--theme-text)", display: "flex", alignItems: "center", gap: 6 }, children: [
418
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles__default.default.actionsRow, children: [
419
+ /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/new-ticket", className: styles__default.default.actionBtn, children: t("dashboard.newTicketAction") }),
420
+ /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: "/admin/support/emails", className: styles__default.default.actionBtn, children: [
291
421
  t("dashboard.pendingEmails"),
292
- stats.pendingEmailsCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { padding: "1px 6px", borderRadius: 10, background: "#fef2f2", color: "#dc2626", fontSize: 11, fontWeight: 700 }, children: stats.pendingEmailsCount }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { padding: "1px 6px", borderRadius: 10, background: "#dcfce7", color: "#16a34a", fontSize: 11, fontWeight: 700 }, children: "0" })
422
+ stats.pendingEmailsCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.badge} ${styles__default.default.badgeRed}`, children: stats.pendingEmailsCount }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${styles__default.default.badge} ${styles__default.default.badgeGreen}`, children: "0" })
293
423
  ] }),
294
- /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/crm", style: { padding: "8px 16px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, fontWeight: 500, textDecoration: "none", color: "var(--theme-text)" }, children: t("dashboard.crm") }),
295
- /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/billing", style: { padding: "8px 16px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, fontWeight: 500, textDecoration: "none", color: "var(--theme-text)" }, children: t("dashboard.preBilling") }),
296
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "/api/support/export-csv", style: { padding: "8px 16px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, fontWeight: 500, textDecoration: "none", color: "var(--theme-text)" }, target: "_blank", rel: "noopener noreferrer", children: t("dashboard.exportCsv") })
424
+ /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/crm", className: styles__default.default.actionBtn, children: t("dashboard.crm") }),
425
+ /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: "/admin/support/billing", className: styles__default.default.actionBtn, children: t("dashboard.preBilling") }),
426
+ /* @__PURE__ */ jsxRuntime.jsx(
427
+ "a",
428
+ {
429
+ href: "/api/support/export-csv",
430
+ className: styles__default.default.actionBtn,
431
+ target: "_blank",
432
+ rel: "noopener noreferrer",
433
+ children: t("dashboard.exportCsv")
434
+ }
435
+ )
297
436
  ] })
298
437
  ] });
299
438
  };