@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.
- package/dist/components/RichTextEditor/index.cjs +233 -0
- package/dist/components/RichTextEditor/index.js +232 -0
- package/dist/components/TicketConversation/components/CodeBlock.cjs +24 -7
- package/dist/components/TicketConversation/components/CodeBlock.js +23 -9
- package/dist/index.cjs +19 -1
- package/dist/index.js +19 -1
- package/dist/views/BillingView/client.cjs +260 -103
- package/dist/views/BillingView/client.js +259 -103
- package/dist/views/ChatView/client.cjs +184 -137
- package/dist/views/ChatView/client.js +180 -137
- package/dist/views/CrmView/client.cjs +270 -122
- package/dist/views/CrmView/client.js +266 -122
- package/dist/views/EmailTrackingView/client.cjs +80 -69
- package/dist/views/EmailTrackingView/client.js +80 -70
- package/dist/views/ImportConversationView/client.cjs +127 -94
- package/dist/views/ImportConversationView/client.js +123 -94
- package/dist/views/LogsView/client.cjs +56 -58
- package/dist/views/LogsView/client.js +52 -58
- package/dist/views/NewTicketView/client.cjs +39 -55
- package/dist/views/NewTicketView/client.js +38 -55
- package/dist/views/PendingEmailsView/client.cjs +399 -102
- package/dist/views/PendingEmailsView/client.js +396 -103
- package/dist/views/SupportDashboardView/client.cjs +276 -137
- package/dist/views/SupportDashboardView/client.js +275 -137
- package/dist/views/TicketDetailView/client.cjs +487 -204
- package/dist/views/TicketDetailView/client.js +486 -204
- package/dist/views/TicketInboxView/client.cjs +62 -65
- package/dist/views/TicketInboxView/client.js +62 -66
- package/dist/views/TicketingSettingsView/client.cjs +10 -8
- package/dist/views/TicketingSettingsView/client.js +10 -8
- package/dist/views/TimeDashboardView/client.cjs +70 -59
- package/dist/views/TimeDashboardView/client.js +69 -59
- package/package.json +7 -3
- package/src/components/RichTextEditor/index.tsx +261 -0
- package/src/components/TicketConversation/components/CodeBlock.tsx +53 -14
- package/src/plugin.ts +2 -0
- package/src/utils/emailTemplate.ts +37 -0
- package/src/views/BillingView/client.tsx +362 -69
- package/src/views/ChatView/client.tsx +225 -140
- package/src/views/CrmView/client.tsx +447 -189
- package/src/views/EmailTrackingView/client.tsx +111 -71
- package/src/views/ImportConversationView/client.tsx +255 -70
- package/src/views/LogsView/client.tsx +85 -50
- package/src/views/NewTicketView/client.tsx +37 -53
- package/src/views/PendingEmailsView/client.tsx +512 -92
- package/src/views/SupportDashboardView/client.tsx +294 -134
- package/src/views/TicketDetailView/client.tsx +486 -213
- package/src/views/TicketInboxView/client.tsx +52 -61
- package/src/views/TicketingSettingsView/client.tsx +10 -9
- package/src/views/TimeDashboardView/client.tsx +184 -69
|
@@ -4,6 +4,11 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var navigation = require('next/navigation');
|
|
6
6
|
var useTranslation = require('../../components/TicketConversation/hooks/useTranslation');
|
|
7
|
+
var s = require('../../styles/Logs.module.scss');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
var s__default = /*#__PURE__*/_interopDefault(s);
|
|
7
12
|
|
|
8
13
|
function fmtDate(d) {
|
|
9
14
|
return new Date(d).toLocaleDateString("fr-FR", { day: "2-digit", month: "2-digit", year: "2-digit", hour: "2-digit", minute: "2-digit" });
|
|
@@ -43,105 +48,98 @@ const LogsClient = () => {
|
|
|
43
48
|
fetchLogs();
|
|
44
49
|
}, [fetchLogs]);
|
|
45
50
|
const handlePurge = async (days) => {
|
|
46
|
-
const label = days === 0 ? "
|
|
47
|
-
if (!window.confirm(
|
|
51
|
+
const label = days === 0 ? t("logs.purgeAllLabel") : t("logs.purgeDaysLabel", { days: String(days) });
|
|
52
|
+
if (!window.confirm(t("logs.purgeConfirm", { label, collection }))) return;
|
|
48
53
|
try {
|
|
49
54
|
const res = await fetch(`/api/support/purge-logs?collection=${collection}&days=${days}`, { method: "DELETE", credentials: "include" });
|
|
50
55
|
if (res.ok) {
|
|
51
56
|
const d = await res.json();
|
|
52
|
-
setPurgeResult(
|
|
57
|
+
setPurgeResult(t("logs.purgeResult", { count: String(d.purged) }));
|
|
53
58
|
setTimeout(() => setPurgeResult(null), 5e3);
|
|
54
59
|
fetchLogs();
|
|
55
60
|
}
|
|
56
61
|
} catch {
|
|
57
62
|
}
|
|
58
63
|
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
table: { width: "100%", borderCollapse: "collapse", fontSize: 13 },
|
|
68
|
-
th: { textAlign: "left", padding: "8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" },
|
|
69
|
-
td: { padding: "8px", borderBottom: "1px solid var(--theme-elevation-100)" },
|
|
70
|
-
badge: { padding: "2px 8px", borderRadius: 4, fontSize: 11, fontWeight: 600 },
|
|
71
|
-
mono: { fontFamily: "monospace", fontSize: 12 }
|
|
72
|
-
};
|
|
73
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: S.page, children: [
|
|
74
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: S.header, children: [
|
|
75
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", { style: S.title, children: logType === "email" ? t("logs.title") : t("logs.titleAuth") }),
|
|
76
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: 6 }, children: [
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { style: S.purgeBtn, onClick: () => handlePurge(7), children: t("logs.purge7") }),
|
|
78
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { style: S.purgeBtn, onClick: () => handlePurge(30), children: t("logs.purge30") }),
|
|
79
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { style: { ...S.purgeBtn, color: "#dc2626", borderColor: "#dc2626" }, onClick: () => handlePurge(0), children: t("logs.purgeAll") })
|
|
64
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.page, children: [
|
|
65
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.header, children: [
|
|
66
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: s__default.default.title, children: logType === "email" ? t("logs.title") : t("logs.titleAuth") }),
|
|
67
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.headerActions, children: [
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: s__default.default.purgeBtn, onClick: () => handlePurge(7), children: t("logs.purge7") }),
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: s__default.default.purgeBtn, onClick: () => handlePurge(30), children: t("logs.purge30") }),
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: s__default.default.purgeBtn, onClick: () => handlePurge(90), children: "Purger +90j" }),
|
|
71
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: `${s__default.default.purgeBtn} ${s__default.default.purgeBtnDanger}`, onClick: () => handlePurge(0), children: t("logs.purgeAll") })
|
|
80
72
|
] })
|
|
81
73
|
] }),
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
83
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.tabs, children: [
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: `${s__default.default.tab} ${logType === "email" ? s__default.default.tabActive : ""}`, onClick: () => setLogType("email"), children: [
|
|
84
76
|
t("logs.tabs.email"),
|
|
85
77
|
" (",
|
|
86
78
|
logType === "email" ? totalDocs : "...",
|
|
87
79
|
")"
|
|
88
80
|
] }),
|
|
89
|
-
/* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsxs("button", { className: `${s__default.default.tab} ${logType === "auth" ? s__default.default.tabActive : ""}`, onClick: () => setLogType("auth"), children: [
|
|
90
82
|
t("logs.tabs.auth"),
|
|
91
83
|
" (",
|
|
92
84
|
logType === "auth" ? totalDocs : "...",
|
|
93
85
|
")"
|
|
94
86
|
] })
|
|
95
87
|
] }),
|
|
96
|
-
purgeResult && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
97
|
-
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
88
|
+
purgeResult && /* @__PURE__ */ jsxRuntime.jsx("div", { className: s__default.default.purgeResult, children: purgeResult }),
|
|
89
|
+
loading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: s__default.default.loading, children: t("common.loading") }) : logs.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: s__default.default.empty, children: t("logs.noLogs") }) : logType === "email" ? /* @__PURE__ */ jsxRuntime.jsxs("table", { className: s__default.default.table, children: [
|
|
98
90
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
99
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
101
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
102
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
103
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { style: {
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.date") }),
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.status") }),
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.recipient") }),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.subject") }),
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.action") }),
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "right" }, children: t("logs.tableHeaders.time") })
|
|
105
97
|
] }) }),
|
|
106
98
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: logs.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
107
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
108
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.mono, children: fmtDate(log.createdAt) }),
|
|
100
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.badge, style: {
|
|
101
|
+
background: log.status === "success" ? "#dcfce7" : log.status === "error" ? "#fef2f2" : "#f3f4f6",
|
|
102
|
+
color: log.status === "success" ? "#16a34a" : log.status === "error" ? "#dc2626" : "#6b7280"
|
|
103
|
+
}, children: log.status === "success" ? t("logs.statusSuccess") : log.status === "error" ? t("logs.statusError") : t("logs.statusIgnored") }) }),
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.truncate, title: log.recipientEmail, children: log.recipientEmail || "\u2014" }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.truncate, title: log.subject, children: log.subject || "\u2014" }),
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { fontSize: 12, color: "var(--theme-elevation-500)" }, children: log.action || "\u2014" }),
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { textAlign: "right" }, children: log.processingTimeMs != null ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: s__default.default.mono, style: { color: log.processingTimeMs > 2e3 ? "#dc2626" : log.processingTimeMs > 500 ? "#d97706" : "#16a34a" }, children: [
|
|
113
108
|
log.processingTimeMs,
|
|
114
109
|
"ms"
|
|
115
|
-
] }) : "
|
|
110
|
+
] }) : "\u2014" })
|
|
116
111
|
] }, log.id)) })
|
|
117
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("table", {
|
|
112
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("table", { className: s__default.default.table, children: [
|
|
118
113
|
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
119
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
120
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
121
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
122
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
123
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", {
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.date") }),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.status") }),
|
|
116
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.email") }),
|
|
117
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.ip") }),
|
|
118
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { children: t("logs.tableHeaders.userAgent") })
|
|
124
119
|
] }) }),
|
|
125
120
|
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: logs.map((log) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
126
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
127
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.mono, children: fmtDate(log.createdAt) }),
|
|
122
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.badge, style: {
|
|
123
|
+
background: log.success ? "#dcfce7" : "#fef2f2",
|
|
124
|
+
color: log.success ? "#16a34a" : "#dc2626"
|
|
125
|
+
}, children: log.success ? t("logs.statusSuccess") : t("logs.statusFailed") }) }),
|
|
126
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.mono, children: log.email || "\u2014" }),
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.mono, children: log.ip || "\u2014" }),
|
|
128
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: s__default.default.truncate, style: { fontSize: 11 }, children: log.userAgent || "\u2014" })
|
|
131
129
|
] }, log.id)) })
|
|
132
130
|
] }),
|
|
133
|
-
totalDocs > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
134
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
135
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
131
|
+
totalDocs > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.pagination, children: [
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: s__default.default.pageBtn, onClick: () => setPage((p) => Math.max(1, p - 1)), disabled: page <= 1, children: t("common.previous") }),
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: s__default.default.pageInfo, children: [
|
|
136
134
|
t("common.page"),
|
|
137
135
|
" ",
|
|
138
136
|
page,
|
|
139
|
-
"
|
|
137
|
+
" \u2014 ",
|
|
140
138
|
totalDocs,
|
|
141
139
|
" ",
|
|
142
140
|
t("common.results")
|
|
143
141
|
] }),
|
|
144
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
142
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { className: s__default.default.pageBtn, onClick: () => setPage((p) => p + 1), disabled: !hasMore, children: t("common.next") })
|
|
145
143
|
] })
|
|
146
144
|
] });
|
|
147
145
|
};
|
|
@@ -3,6 +3,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useCallback, useEffect } from 'react';
|
|
4
4
|
import { useSearchParams } from 'next/navigation';
|
|
5
5
|
import { useTranslation } from '../../components/TicketConversation/hooks/useTranslation.js';
|
|
6
|
+
import s from '../../styles/Logs.module.scss';
|
|
6
7
|
|
|
7
8
|
function fmtDate(d) {
|
|
8
9
|
return new Date(d).toLocaleDateString("fr-FR", { day: "2-digit", month: "2-digit", year: "2-digit", hour: "2-digit", minute: "2-digit" });
|
|
@@ -42,105 +43,98 @@ const LogsClient = () => {
|
|
|
42
43
|
fetchLogs();
|
|
43
44
|
}, [fetchLogs]);
|
|
44
45
|
const handlePurge = async (days) => {
|
|
45
|
-
const label = days === 0 ? "
|
|
46
|
-
if (!window.confirm(
|
|
46
|
+
const label = days === 0 ? t("logs.purgeAllLabel") : t("logs.purgeDaysLabel", { days: String(days) });
|
|
47
|
+
if (!window.confirm(t("logs.purgeConfirm", { label, collection }))) return;
|
|
47
48
|
try {
|
|
48
49
|
const res = await fetch(`/api/support/purge-logs?collection=${collection}&days=${days}`, { method: "DELETE", credentials: "include" });
|
|
49
50
|
if (res.ok) {
|
|
50
51
|
const d = await res.json();
|
|
51
|
-
setPurgeResult(
|
|
52
|
+
setPurgeResult(t("logs.purgeResult", { count: String(d.purged) }));
|
|
52
53
|
setTimeout(() => setPurgeResult(null), 5e3);
|
|
53
54
|
fetchLogs();
|
|
54
55
|
}
|
|
55
56
|
} catch {
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
table: { width: "100%", borderCollapse: "collapse", fontSize: 13 },
|
|
67
|
-
th: { textAlign: "left", padding: "8px", borderBottom: "1px solid var(--theme-elevation-200)", fontSize: 11, color: "var(--theme-elevation-500)" },
|
|
68
|
-
td: { padding: "8px", borderBottom: "1px solid var(--theme-elevation-100)" },
|
|
69
|
-
badge: { padding: "2px 8px", borderRadius: 4, fontSize: 11, fontWeight: 600 },
|
|
70
|
-
mono: { fontFamily: "monospace", fontSize: 12 }
|
|
71
|
-
};
|
|
72
|
-
return /* @__PURE__ */ jsxs("div", { style: S.page, children: [
|
|
73
|
-
/* @__PURE__ */ jsxs("div", { style: S.header, children: [
|
|
74
|
-
/* @__PURE__ */ jsx("h1", { style: S.title, children: logType === "email" ? t("logs.title") : t("logs.titleAuth") }),
|
|
75
|
-
/* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: 6 }, children: [
|
|
76
|
-
/* @__PURE__ */ jsx("button", { style: S.purgeBtn, onClick: () => handlePurge(7), children: t("logs.purge7") }),
|
|
77
|
-
/* @__PURE__ */ jsx("button", { style: S.purgeBtn, onClick: () => handlePurge(30), children: t("logs.purge30") }),
|
|
78
|
-
/* @__PURE__ */ jsx("button", { style: { ...S.purgeBtn, color: "#dc2626", borderColor: "#dc2626" }, onClick: () => handlePurge(0), children: t("logs.purgeAll") })
|
|
59
|
+
return /* @__PURE__ */ jsxs("div", { className: s.page, children: [
|
|
60
|
+
/* @__PURE__ */ jsxs("div", { className: s.header, children: [
|
|
61
|
+
/* @__PURE__ */ jsx("h1", { className: s.title, children: logType === "email" ? t("logs.title") : t("logs.titleAuth") }),
|
|
62
|
+
/* @__PURE__ */ jsxs("div", { className: s.headerActions, children: [
|
|
63
|
+
/* @__PURE__ */ jsx("button", { className: s.purgeBtn, onClick: () => handlePurge(7), children: t("logs.purge7") }),
|
|
64
|
+
/* @__PURE__ */ jsx("button", { className: s.purgeBtn, onClick: () => handlePurge(30), children: t("logs.purge30") }),
|
|
65
|
+
/* @__PURE__ */ jsx("button", { className: s.purgeBtn, onClick: () => handlePurge(90), children: "Purger +90j" }),
|
|
66
|
+
/* @__PURE__ */ jsx("button", { className: `${s.purgeBtn} ${s.purgeBtnDanger}`, onClick: () => handlePurge(0), children: t("logs.purgeAll") })
|
|
79
67
|
] })
|
|
80
68
|
] }),
|
|
81
|
-
/* @__PURE__ */ jsxs("div", {
|
|
82
|
-
/* @__PURE__ */ jsxs("button", {
|
|
69
|
+
/* @__PURE__ */ jsxs("div", { className: s.tabs, children: [
|
|
70
|
+
/* @__PURE__ */ jsxs("button", { className: `${s.tab} ${logType === "email" ? s.tabActive : ""}`, onClick: () => setLogType("email"), children: [
|
|
83
71
|
t("logs.tabs.email"),
|
|
84
72
|
" (",
|
|
85
73
|
logType === "email" ? totalDocs : "...",
|
|
86
74
|
")"
|
|
87
75
|
] }),
|
|
88
|
-
/* @__PURE__ */ jsxs("button", {
|
|
76
|
+
/* @__PURE__ */ jsxs("button", { className: `${s.tab} ${logType === "auth" ? s.tabActive : ""}`, onClick: () => setLogType("auth"), children: [
|
|
89
77
|
t("logs.tabs.auth"),
|
|
90
78
|
" (",
|
|
91
79
|
logType === "auth" ? totalDocs : "...",
|
|
92
80
|
")"
|
|
93
81
|
] })
|
|
94
82
|
] }),
|
|
95
|
-
purgeResult && /* @__PURE__ */ jsx("div", {
|
|
96
|
-
loading ? /* @__PURE__ */ jsx("div", {
|
|
83
|
+
purgeResult && /* @__PURE__ */ jsx("div", { className: s.purgeResult, children: purgeResult }),
|
|
84
|
+
loading ? /* @__PURE__ */ jsx("div", { className: s.loading, children: t("common.loading") }) : logs.length === 0 ? /* @__PURE__ */ jsx("div", { className: s.empty, children: t("logs.noLogs") }) : logType === "email" ? /* @__PURE__ */ jsxs("table", { className: s.table, children: [
|
|
97
85
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
98
|
-
/* @__PURE__ */ jsx("th", {
|
|
99
|
-
/* @__PURE__ */ jsx("th", {
|
|
100
|
-
/* @__PURE__ */ jsx("th", {
|
|
101
|
-
/* @__PURE__ */ jsx("th", {
|
|
102
|
-
/* @__PURE__ */ jsx("th", {
|
|
103
|
-
/* @__PURE__ */ jsx("th", { style: {
|
|
86
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.date") }),
|
|
87
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.status") }),
|
|
88
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.recipient") }),
|
|
89
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.subject") }),
|
|
90
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.action") }),
|
|
91
|
+
/* @__PURE__ */ jsx("th", { style: { textAlign: "right" }, children: t("logs.tableHeaders.time") })
|
|
104
92
|
] }) }),
|
|
105
93
|
/* @__PURE__ */ jsx("tbody", { children: logs.map((log) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
106
|
-
/* @__PURE__ */ jsx("td", {
|
|
107
|
-
/* @__PURE__ */ jsx("td", {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
/* @__PURE__ */ jsx("td", {
|
|
94
|
+
/* @__PURE__ */ jsx("td", { className: s.mono, children: fmtDate(log.createdAt) }),
|
|
95
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: s.badge, style: {
|
|
96
|
+
background: log.status === "success" ? "#dcfce7" : log.status === "error" ? "#fef2f2" : "#f3f4f6",
|
|
97
|
+
color: log.status === "success" ? "#16a34a" : log.status === "error" ? "#dc2626" : "#6b7280"
|
|
98
|
+
}, children: log.status === "success" ? t("logs.statusSuccess") : log.status === "error" ? t("logs.statusError") : t("logs.statusIgnored") }) }),
|
|
99
|
+
/* @__PURE__ */ jsx("td", { className: s.truncate, title: log.recipientEmail, children: log.recipientEmail || "\u2014" }),
|
|
100
|
+
/* @__PURE__ */ jsx("td", { className: s.truncate, title: log.subject, children: log.subject || "\u2014" }),
|
|
101
|
+
/* @__PURE__ */ jsx("td", { style: { fontSize: 12, color: "var(--theme-elevation-500)" }, children: log.action || "\u2014" }),
|
|
102
|
+
/* @__PURE__ */ jsx("td", { style: { textAlign: "right" }, children: log.processingTimeMs != null ? /* @__PURE__ */ jsxs("span", { className: s.mono, style: { color: log.processingTimeMs > 2e3 ? "#dc2626" : log.processingTimeMs > 500 ? "#d97706" : "#16a34a" }, children: [
|
|
112
103
|
log.processingTimeMs,
|
|
113
104
|
"ms"
|
|
114
|
-
] }) : "
|
|
105
|
+
] }) : "\u2014" })
|
|
115
106
|
] }, log.id)) })
|
|
116
|
-
] }) : /* @__PURE__ */ jsxs("table", {
|
|
107
|
+
] }) : /* @__PURE__ */ jsxs("table", { className: s.table, children: [
|
|
117
108
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
118
|
-
/* @__PURE__ */ jsx("th", {
|
|
119
|
-
/* @__PURE__ */ jsx("th", {
|
|
120
|
-
/* @__PURE__ */ jsx("th", {
|
|
121
|
-
/* @__PURE__ */ jsx("th", {
|
|
122
|
-
/* @__PURE__ */ jsx("th", {
|
|
109
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.date") }),
|
|
110
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.status") }),
|
|
111
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.email") }),
|
|
112
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.ip") }),
|
|
113
|
+
/* @__PURE__ */ jsx("th", { children: t("logs.tableHeaders.userAgent") })
|
|
123
114
|
] }) }),
|
|
124
115
|
/* @__PURE__ */ jsx("tbody", { children: logs.map((log) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
125
|
-
/* @__PURE__ */ jsx("td", {
|
|
126
|
-
/* @__PURE__ */ jsx("td", {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
116
|
+
/* @__PURE__ */ jsx("td", { className: s.mono, children: fmtDate(log.createdAt) }),
|
|
117
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx("span", { className: s.badge, style: {
|
|
118
|
+
background: log.success ? "#dcfce7" : "#fef2f2",
|
|
119
|
+
color: log.success ? "#16a34a" : "#dc2626"
|
|
120
|
+
}, children: log.success ? t("logs.statusSuccess") : t("logs.statusFailed") }) }),
|
|
121
|
+
/* @__PURE__ */ jsx("td", { className: s.mono, children: log.email || "\u2014" }),
|
|
122
|
+
/* @__PURE__ */ jsx("td", { className: s.mono, children: log.ip || "\u2014" }),
|
|
123
|
+
/* @__PURE__ */ jsx("td", { className: s.truncate, style: { fontSize: 11 }, children: log.userAgent || "\u2014" })
|
|
130
124
|
] }, log.id)) })
|
|
131
125
|
] }),
|
|
132
|
-
totalDocs > 0 && /* @__PURE__ */ jsxs("div", {
|
|
133
|
-
/* @__PURE__ */ jsx("button", {
|
|
134
|
-
/* @__PURE__ */ jsxs("span", {
|
|
126
|
+
totalDocs > 0 && /* @__PURE__ */ jsxs("div", { className: s.pagination, children: [
|
|
127
|
+
/* @__PURE__ */ jsx("button", { className: s.pageBtn, onClick: () => setPage((p) => Math.max(1, p - 1)), disabled: page <= 1, children: t("common.previous") }),
|
|
128
|
+
/* @__PURE__ */ jsxs("span", { className: s.pageInfo, children: [
|
|
135
129
|
t("common.page"),
|
|
136
130
|
" ",
|
|
137
131
|
page,
|
|
138
|
-
"
|
|
132
|
+
" \u2014 ",
|
|
139
133
|
totalDocs,
|
|
140
134
|
" ",
|
|
141
135
|
t("common.results")
|
|
142
136
|
] }),
|
|
143
|
-
/* @__PURE__ */ jsx("button", {
|
|
137
|
+
/* @__PURE__ */ jsx("button", { className: s.pageBtn, onClick: () => setPage((p) => p + 1), disabled: !hasMore, children: t("common.next") })
|
|
144
138
|
] })
|
|
145
139
|
] });
|
|
146
140
|
};
|
|
@@ -5,10 +5,12 @@ var react = require('react');
|
|
|
5
5
|
var Link = require('next/link');
|
|
6
6
|
var navigation = require('next/navigation');
|
|
7
7
|
var useTranslation = require('../../components/TicketConversation/hooks/useTranslation');
|
|
8
|
+
var s = require('../../styles/NewTicket.module.scss');
|
|
8
9
|
|
|
9
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
11
|
|
|
11
12
|
var Link__default = /*#__PURE__*/_interopDefault(Link);
|
|
13
|
+
var s__default = /*#__PURE__*/_interopDefault(s);
|
|
12
14
|
|
|
13
15
|
const CATEGORY_KEYS = [
|
|
14
16
|
{ value: "", key: "ticket.category.select" },
|
|
@@ -51,8 +53,7 @@ const NewTicketClient = () => {
|
|
|
51
53
|
const d = await res.json();
|
|
52
54
|
setClientResults(d.docs || []);
|
|
53
55
|
}
|
|
54
|
-
} catch
|
|
55
|
-
console.warn("[support] client search error:", err);
|
|
56
|
+
} catch {
|
|
56
57
|
}
|
|
57
58
|
}, 300);
|
|
58
59
|
return () => clearTimeout(timer);
|
|
@@ -114,47 +115,29 @@ const NewTicketClient = () => {
|
|
|
114
115
|
setSubmitting(false);
|
|
115
116
|
}
|
|
116
117
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
backLink: { fontSize: 13, color: "#2563eb", textDecoration: "none" },
|
|
121
|
-
title: { fontSize: 24, fontWeight: 700, margin: "8px 0 4px", color: "var(--theme-text)" },
|
|
122
|
-
subtitle: { fontSize: 14, color: "var(--theme-elevation-500)" },
|
|
123
|
-
error: { padding: "10px 14px", borderRadius: 8, background: "#fef2f2", color: "#dc2626", fontSize: 13, marginBottom: 16, border: "1px solid #fecaca" },
|
|
124
|
-
fieldGroup: { marginBottom: 16 },
|
|
125
|
-
label: { display: "block", fontSize: 13, fontWeight: 600, marginBottom: 6, color: "var(--theme-text)" },
|
|
126
|
-
required: { color: "#dc2626" },
|
|
127
|
-
input: { width: "100%", padding: "8px 12px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, color: "var(--theme-text)", background: "var(--theme-elevation-0)" },
|
|
128
|
-
select: { width: "100%", padding: "8px 12px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, color: "var(--theme-text)", background: "var(--theme-elevation-0)" },
|
|
129
|
-
textarea: { width: "100%", padding: "8px 12px", borderRadius: 8, border: "1px solid var(--theme-elevation-200)", fontSize: 13, color: "var(--theme-text)", background: "var(--theme-elevation-0)", minHeight: 120, fontFamily: "inherit", resize: "vertical" },
|
|
130
|
-
row3: { display: "grid", gridTemplateColumns: "1fr 1fr 1fr", gap: 12, marginBottom: 16 },
|
|
131
|
-
submitBtn: { padding: "10px 20px", borderRadius: 8, background: "#2563eb", color: "#fff", fontSize: 14, fontWeight: 600, border: "none", cursor: "pointer" },
|
|
132
|
-
searchResults: { position: "absolute", top: "100%", left: 0, right: 0, background: "var(--theme-elevation-0)", border: "1px solid var(--theme-elevation-200)", borderRadius: 8, boxShadow: "0 4px 12px rgba(0,0,0,0.1)", zIndex: 50, maxHeight: 200, overflowY: "auto" },
|
|
133
|
-
searchItem: { padding: "8px 12px", cursor: "pointer", fontSize: 13, borderBottom: "1px solid var(--theme-elevation-100)" }
|
|
134
|
-
};
|
|
135
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: S.page, children: [
|
|
136
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: S.header, children: [
|
|
137
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: "/admin/support/inbox", style: S.backLink, children: [
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.page, children: [
|
|
119
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.header, children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: "/admin/support/inbox", className: s__default.default.backLink, children: [
|
|
138
121
|
"\u2190 ",
|
|
139
122
|
t("newTicket.backToInbox")
|
|
140
123
|
] }),
|
|
141
|
-
/* @__PURE__ */ jsxRuntime.jsx("h1", {
|
|
142
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", {
|
|
124
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: s__default.default.title, children: t("newTicket.title") }),
|
|
125
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: s__default.default.subtitle, children: t("newTicket.subtitle") })
|
|
143
126
|
] }),
|
|
144
|
-
error && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
145
|
-
/* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, children: [
|
|
146
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
147
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
127
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: s__default.default.error, children: error }),
|
|
128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("form", { className: s__default.default.form, onSubmit: handleSubmit, children: [
|
|
129
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: s__default.default.label, children: [
|
|
148
131
|
t("newTicket.clientLabel"),
|
|
149
132
|
" ",
|
|
150
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
133
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.required, children: "*" })
|
|
151
134
|
] }),
|
|
152
135
|
selectedClient ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: 10, padding: "8px 14px", borderRadius: 10, border: "1px solid var(--theme-elevation-200)", background: "var(--theme-elevation-50)" }, children: [
|
|
153
136
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontWeight: 600, fontSize: 13, color: "var(--theme-text)" }, children: [
|
|
154
137
|
selectedClient.firstName,
|
|
155
138
|
" ",
|
|
156
139
|
selectedClient.lastName,
|
|
157
|
-
"
|
|
140
|
+
" \u2014 ",
|
|
158
141
|
selectedClient.company
|
|
159
142
|
] }),
|
|
160
143
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: 12, color: "var(--theme-elevation-500)" }, children: selectedClient.email }),
|
|
@@ -163,18 +146,19 @@ const NewTicketClient = () => {
|
|
|
163
146
|
setClientId(null);
|
|
164
147
|
setClientSearch("");
|
|
165
148
|
}, style: { marginLeft: "auto", background: "none", border: "none", cursor: "pointer", color: "var(--theme-elevation-400)", fontSize: 16 }, children: "\xD7" })
|
|
166
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
149
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.searchWrap, children: [
|
|
167
150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
168
151
|
"input",
|
|
169
152
|
{
|
|
170
153
|
type: "text",
|
|
171
|
-
|
|
154
|
+
className: s__default.default.input,
|
|
172
155
|
placeholder: t("newTicket.clientSearchPlaceholder"),
|
|
173
156
|
value: clientSearch,
|
|
174
|
-
onChange: (e) => setClientSearch(e.target.value)
|
|
157
|
+
onChange: (e) => setClientSearch(e.target.value),
|
|
158
|
+
style: { width: "100%" }
|
|
175
159
|
}
|
|
176
160
|
),
|
|
177
|
-
clientResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
161
|
+
clientResults.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: s__default.default.searchResults, children: clientResults.map((c) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.searchItem, onClick: () => {
|
|
178
162
|
setSelectedClient(c);
|
|
179
163
|
setClientId(c.id);
|
|
180
164
|
setClientSearch("");
|
|
@@ -185,43 +169,43 @@ const NewTicketClient = () => {
|
|
|
185
169
|
" ",
|
|
186
170
|
c.lastName
|
|
187
171
|
] }),
|
|
188
|
-
"
|
|
172
|
+
" \u2014 ",
|
|
189
173
|
c.company,
|
|
190
174
|
" ",
|
|
191
175
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "var(--theme-elevation-400)", fontSize: 12 }, children: c.email })
|
|
192
176
|
] }, c.id)) })
|
|
193
177
|
] })
|
|
194
178
|
] }),
|
|
195
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
196
|
-
/* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
179
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
180
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: s__default.default.label, children: [
|
|
197
181
|
t("newTicket.subjectLabel"),
|
|
198
182
|
" ",
|
|
199
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
183
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: s__default.default.required, children: "*" })
|
|
200
184
|
] }),
|
|
201
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "text",
|
|
185
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "text", className: s__default.default.input, placeholder: t("newTicket.subjectPlaceholder"), value: subject, onChange: (e) => setSubject(e.target.value) })
|
|
202
186
|
] }),
|
|
203
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
204
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
205
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
206
|
-
/* @__PURE__ */ jsxRuntime.jsx("select", {
|
|
187
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.row3, children: [
|
|
188
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
189
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: s__default.default.label, children: t("newTicket.categoryLabel") }),
|
|
190
|
+
/* @__PURE__ */ jsxRuntime.jsx("select", { className: s__default.default.select, value: category, onChange: (e) => setCategory(e.target.value), children: CATEGORY_KEYS.map((c) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: c.value, children: t(c.key) }, c.value)) })
|
|
207
191
|
] }),
|
|
208
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
209
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
210
|
-
/* @__PURE__ */ jsxRuntime.jsx("select", {
|
|
192
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: s__default.default.label, children: t("newTicket.priorityLabel") }),
|
|
194
|
+
/* @__PURE__ */ jsxRuntime.jsx("select", { className: s__default.default.select, value: priority, onChange: (e) => setPriority(e.target.value), children: PRIORITY_KEYS.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.value, children: t(p.key) }, p.value)) })
|
|
211
195
|
] }),
|
|
212
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
213
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
214
|
-
/* @__PURE__ */ jsxRuntime.jsxs("select", {
|
|
215
|
-
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children:
|
|
196
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
197
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: s__default.default.label, children: t("newTicket.projectLabel") }),
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsxs("select", { className: s__default.default.select, value: projectId || "", onChange: (e) => setProjectId(e.target.value ? Number(e.target.value) : null), children: [
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "\u2014 Aucun \u2014" }),
|
|
216
200
|
projects.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.id, children: p.name }, p.id))
|
|
217
201
|
] })
|
|
218
202
|
] })
|
|
219
203
|
] }),
|
|
220
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
221
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
222
|
-
/* @__PURE__ */ jsxRuntime.jsx("textarea", {
|
|
204
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: s__default.default.fieldGroup, children: [
|
|
205
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { className: s__default.default.label, children: t("newTicket.descriptionLabel") }),
|
|
206
|
+
/* @__PURE__ */ jsxRuntime.jsx("textarea", { className: s__default.default.textarea, placeholder: t("newTicket.descriptionPlaceholder"), value: description, onChange: (e) => setDescription(e.target.value) })
|
|
223
207
|
] }),
|
|
224
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "submit",
|
|
208
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "submit", className: s__default.default.submitBtn, disabled: submitting, children: submitting ? t("newTicket.submitting") : t("newTicket.submitButton") })
|
|
225
209
|
] })
|
|
226
210
|
] });
|
|
227
211
|
};
|