@consilioweb/payload-support 2.0.0 → 3.0.0
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/README.md +656 -355
- package/dist/components/RichTextEditor/index.d.ts +19 -0
- package/dist/components/TicketConversation/RewriteDropdown.d.ts +6 -0
- package/dist/components/TicketConversation/SkeletonText.d.ts +4 -0
- package/dist/components/TicketConversation/components/AISummaryPanel.d.ts +14 -0
- package/dist/components/TicketConversation/components/ActionPanels.d.ts +47 -0
- package/dist/components/TicketConversation/components/ActivityLog.d.ts +5 -0
- package/dist/components/TicketConversation/components/ClientBar.d.ts +5 -0
- package/dist/components/TicketConversation/components/ClientHistory.d.ts +24 -0
- package/dist/components/TicketConversation/components/CodeBlock.d.ts +26 -0
- package/dist/components/TicketConversation/components/CodeBlockInserter.d.ts +12 -0
- package/dist/components/TicketConversation/components/QuickActions.d.ts +32 -0
- package/dist/components/TicketConversation/components/TicketHeader.d.ts +19 -0
- package/dist/components/TicketConversation/components/TimeTrackingPanel.d.ts +24 -0
- package/dist/components/TicketConversation/config.d.ts +10 -0
- package/dist/components/TicketConversation/config.js +1 -40
- package/dist/components/TicketConversation/constants.d.ts +56 -0
- package/dist/components/TicketConversation/context.d.ts +53 -0
- package/dist/components/TicketConversation/hooks/useAI.d.ts +21 -0
- package/dist/components/TicketConversation/hooks/useDocumentIdFromUrl.d.ts +3 -0
- package/dist/components/TicketConversation/hooks/useFeatures.d.ts +23 -0
- package/dist/components/TicketConversation/hooks/useFeatures.js +61 -0
- package/dist/components/TicketConversation/hooks/useMessageActions.d.ts +20 -0
- package/dist/components/TicketConversation/hooks/useReply.d.ts +27 -0
- package/dist/components/TicketConversation/hooks/useTicketActions.d.ts +58 -0
- package/dist/components/TicketConversation/hooks/useTimeTracking.d.ts +18 -0
- package/dist/components/TicketConversation/hooks/useTranslation.d.ts +33 -0
- package/dist/components/TicketConversation/hooks/useTranslation.js +22 -3
- package/dist/components/TicketConversation/index.d.ts +4 -0
- package/dist/components/TicketConversation/index.js +2 -2
- package/dist/components/TicketConversation/types.d.ts +56 -0
- package/dist/components/TicketConversation/utils.d.ts +2 -0
- package/dist/index.cjs +392 -320
- package/dist/index.d.cts +100 -3
- package/dist/index.d.ts +100 -3
- package/dist/index.js +388 -321
- package/dist/utils/features.d.ts +123 -0
- package/dist/utils/features.js +147 -0
- package/dist/views/BillingView/client.d.ts +2 -0
- package/dist/views/BillingView/index.d.ts +4 -0
- package/dist/views/ChatView/client.d.ts +2 -0
- package/dist/views/ChatView/client.js +9 -9
- package/dist/views/ChatView/index.d.ts +4 -0
- package/dist/views/CrmView/client.d.ts +2 -0
- package/dist/views/CrmView/client.js +6 -9
- package/dist/views/CrmView/index.d.ts +4 -0
- package/dist/views/EmailTrackingView/client.d.ts +2 -0
- package/dist/views/EmailTrackingView/index.d.ts +4 -0
- package/dist/views/ImportConversationView/client.d.ts +2 -0
- package/dist/views/ImportConversationView/index.d.ts +4 -0
- package/dist/views/LogsView/client.d.ts +2 -0
- package/dist/views/LogsView/index.d.ts +4 -0
- package/dist/views/NewTicketView/client.d.ts +2 -0
- package/dist/views/NewTicketView/index.d.ts +4 -0
- package/dist/views/PendingEmailsView/client.d.ts +2 -0
- package/dist/views/PendingEmailsView/index.d.ts +4 -0
- package/dist/views/SupportDashboardView/client.d.ts +2 -0
- package/dist/views/SupportDashboardView/client.js +1 -1
- package/dist/views/SupportDashboardView/index.d.ts +4 -0
- package/dist/views/TicketDetailView/NextActionItem.d.ts +6 -0
- package/dist/views/TicketDetailView/RewriteDropdown.d.ts +7 -0
- package/dist/views/TicketDetailView/client.d.ts +2 -0
- package/dist/views/TicketDetailView/client.js +2 -2
- package/dist/views/TicketDetailView/constants.d.ts +13 -0
- package/dist/views/TicketDetailView/helpers.d.ts +2 -0
- package/dist/views/TicketDetailView/index.d.ts +4 -0
- package/dist/views/TicketDetailView/types.d.ts +40 -0
- package/dist/views/TicketInboxView/client.d.ts +2 -0
- package/dist/views/TicketInboxView/client.js +5 -5
- package/dist/views/TicketInboxView/index.d.ts +4 -0
- package/dist/views/TicketingSettingsView/client.d.ts +2 -0
- package/dist/views/TicketingSettingsView/client.js +6 -5
- package/dist/views/TicketingSettingsView/index.d.ts +4 -0
- package/dist/views/TimeDashboardView/client.d.ts +2 -0
- package/dist/views/TimeDashboardView/index.d.ts +4 -0
- package/dist/views/shared/AdminViewHeader.d.ts +13 -0
- package/dist/views/shared/ErrorBoundary.d.ts +17 -0
- package/dist/views/shared/Skeleton.d.ts +21 -0
- package/dist/views/shared/StatusPill.d.ts +8 -0
- package/dist/views/shared/adminTokens.d.ts +19 -0
- package/dist/views/shared/config.d.ts +8 -0
- package/dist/views/shared/config.js +1 -40
- package/dist/views/shared/dateLocale.d.ts +5 -0
- package/dist/views/shared/index.d.ts +12 -0
- package/dist/views/shared/index.js +2 -1
- package/dist/views/shared/locales/en.json +708 -0
- package/dist/views/shared/locales/fr.json +708 -0
- package/dist/views/shared/sla.d.ts +14 -0
- package/dist/views.d.ts +13 -13
- package/package.json +26 -41
- package/src/collections/SupportClients.ts +29 -0
- package/src/collections/TicketCollaborators.ts +6 -1
- package/src/collections/TicketMessages.ts +46 -24
- package/src/collections/Tickets.ts +117 -79
- package/src/collections/TimeEntries.ts +57 -32
- package/src/components/TicketConversation/config.ts +16 -80
- package/src/components/TicketConversation/hooks/useFeatures.ts +109 -0
- package/src/components/TicketConversation/hooks/useTranslation.ts +38 -4
- package/src/components/TicketConversation/index.tsx +2 -2
- package/src/endpoints/ai.ts +2 -1
- package/src/endpoints/client-intelligence.ts +2 -1
- package/src/endpoints/process-scheduled.ts +13 -8
- package/src/endpoints/round-robin-config.ts +30 -20
- package/src/endpoints/settings.ts +28 -77
- package/src/index.ts +6 -2
- package/src/portal/LiveChat.tsx +33 -22
- package/src/portal/auth/tickets/detail/TicketPolling.tsx +5 -1
- package/src/types/lucide-react.d.ts +10 -2
- package/src/utils/aiAgent.ts +2 -1
- package/src/utils/aiProvider.ts +21 -0
- package/src/utils/features.ts +297 -0
- package/src/utils/fireWebhooks.ts +6 -0
- package/src/utils/generateTicketSynthesis.ts +2 -1
- package/src/utils/index.ts +4 -2
- package/src/utils/readSettings.ts +82 -9
- package/src/utils/webhookDispatcher.ts +19 -7
- package/src/views/ChatView/client.tsx +13 -9
- package/src/views/CrmView/client.tsx +10 -11
- package/src/views/SupportDashboardView/client.tsx +1 -1
- package/src/views/TicketDetailView/client.tsx +2 -2
- package/src/views/TicketInboxView/client.tsx +10 -5
- package/src/views/TicketingSettingsView/client.tsx +9 -7
- package/src/views/shared/config.ts +14 -80
- package/src/views/shared/index.ts +3 -1
- package/src/views/shared/locales/en.json +2 -2
- package/src/views/shared/locales/fr.json +2 -2
- package/dist/components/RichTextEditor/index.cjs +0 -279
- package/dist/components/TicketConversation/RewriteDropdown.cjs +0 -98
- package/dist/components/TicketConversation/SkeletonText.cjs +0 -21
- package/dist/components/TicketConversation/components/AISummaryPanel.cjs +0 -85
- package/dist/components/TicketConversation/components/ActionPanels.cjs +0 -193
- package/dist/components/TicketConversation/components/ActivityLog.cjs +0 -24
- package/dist/components/TicketConversation/components/ClientBar.cjs +0 -43
- package/dist/components/TicketConversation/components/ClientHistory.cjs +0 -138
- package/dist/components/TicketConversation/components/CodeBlock.cjs +0 -171
- package/dist/components/TicketConversation/components/CodeBlockInserter.cjs +0 -156
- package/dist/components/TicketConversation/components/QuickActions.cjs +0 -87
- package/dist/components/TicketConversation/components/TicketHeader.cjs +0 -93
- package/dist/components/TicketConversation/components/TimeTrackingPanel.cjs +0 -134
- package/dist/components/TicketConversation/config.cjs +0 -44
- package/dist/components/TicketConversation/constants.cjs +0 -127
- package/dist/components/TicketConversation/context.cjs +0 -13
- package/dist/components/TicketConversation/hooks/useAI.cjs +0 -196
- package/dist/components/TicketConversation/hooks/useDocumentIdFromUrl.cjs +0 -20
- package/dist/components/TicketConversation/hooks/useMessageActions.cjs +0 -136
- package/dist/components/TicketConversation/hooks/useReply.cjs +0 -188
- package/dist/components/TicketConversation/hooks/useTicketActions.cjs +0 -290
- package/dist/components/TicketConversation/hooks/useTimeTracking.cjs +0 -123
- package/dist/components/TicketConversation/hooks/useTranslation.cjs +0 -78
- package/dist/components/TicketConversation/index.cjs +0 -1114
- package/dist/components/TicketConversation/types.cjs +0 -2
- package/dist/components/TicketConversation/utils.cjs +0 -27
- package/dist/views/BillingView/client.cjs +0 -469
- package/dist/views/BillingView/index.cjs +0 -34
- package/dist/views/ChatView/client.cjs +0 -301
- package/dist/views/ChatView/index.cjs +0 -34
- package/dist/views/CrmView/client.cjs +0 -458
- package/dist/views/CrmView/index.cjs +0 -34
- package/dist/views/EmailTrackingView/client.cjs +0 -171
- package/dist/views/EmailTrackingView/index.cjs +0 -34
- package/dist/views/ImportConversationView/client.cjs +0 -238
- package/dist/views/ImportConversationView/index.cjs +0 -34
- package/dist/views/LogsView/client.cjs +0 -148
- package/dist/views/LogsView/index.cjs +0 -32
- package/dist/views/NewTicketView/client.cjs +0 -213
- package/dist/views/NewTicketView/index.cjs +0 -32
- package/dist/views/PendingEmailsView/client.cjs +0 -471
- package/dist/views/PendingEmailsView/index.cjs +0 -34
- package/dist/views/SupportDashboardView/client.cjs +0 -437
- package/dist/views/SupportDashboardView/index.cjs +0 -34
- package/dist/views/TicketDetailView/NextActionItem.cjs +0 -40
- package/dist/views/TicketDetailView/RewriteDropdown.cjs +0 -80
- package/dist/views/TicketDetailView/client.cjs +0 -1412
- package/dist/views/TicketDetailView/constants.cjs +0 -20
- package/dist/views/TicketDetailView/helpers.cjs +0 -23
- package/dist/views/TicketDetailView/index.cjs +0 -34
- package/dist/views/TicketDetailView/types.cjs +0 -2
- package/dist/views/TicketInboxView/client.cjs +0 -359
- package/dist/views/TicketInboxView/index.cjs +0 -32
- package/dist/views/TicketingSettingsView/client.cjs +0 -740
- package/dist/views/TicketingSettingsView/index.cjs +0 -34
- package/dist/views/TimeDashboardView/client.cjs +0 -180
- package/dist/views/TimeDashboardView/index.cjs +0 -34
- package/dist/views/shared/AdminViewHeader.cjs +0 -68
- package/dist/views/shared/ErrorBoundary.cjs +0 -55
- package/dist/views/shared/Skeleton.cjs +0 -77
- package/dist/views/shared/StatusPill.cjs +0 -47
- package/dist/views/shared/adminTokens.cjs +0 -34
- package/dist/views/shared/config.cjs +0 -44
- package/dist/views/shared/dateLocale.cjs +0 -5
- package/dist/views/shared/index.cjs +0 -72
- package/dist/views/shared/sla.cjs +0 -37
- package/dist/views.cjs +0 -86
- package/dist/views.d.cts +0 -13
- package/src/__tests__/aiSummaryRendering.test.ts +0 -21
- package/src/__tests__/authResponses.test.ts +0 -69
- package/src/__tests__/capabilities.test.ts +0 -71
- package/src/__tests__/generateTrackingToken.test.ts +0 -67
- package/src/__tests__/integration/ai-agent.test.ts +0 -46
- package/src/__tests__/integration/auth.test.ts +0 -43
- package/src/__tests__/integration/automation-rules.test.ts +0 -68
- package/src/__tests__/integration/buildTestPayload.ts +0 -52
- package/src/__tests__/integration/channels.test.ts +0 -52
- package/src/__tests__/integration/core-behaviors.test.ts +0 -81
- package/src/__tests__/integration/dashboard-volume.test.ts +0 -31
- package/src/__tests__/integration/digest.test.ts +0 -48
- package/src/__tests__/integration/invoice-pdf.test.ts +0 -30
- package/src/__tests__/integration/isolation.test.ts +0 -81
- package/src/__tests__/integration/mentions-invoice.test.ts +0 -50
- package/src/__tests__/integration/nps.test.ts +0 -37
- package/src/__tests__/integration/per-team-sla.test.ts +0 -44
- package/src/__tests__/integration/push.test.ts +0 -75
- package/src/__tests__/integration/sanitization.test.ts +0 -35
- package/src/__tests__/integration/sla-pause.test.ts +0 -39
- package/src/__tests__/integration/smoke.test.ts +0 -26
- package/src/__tests__/integration/snooze.test.ts +0 -68
- package/src/__tests__/integration/teams.test.ts +0 -38
- package/src/__tests__/rateLimiter.test.ts +0 -83
- package/src/__tests__/sanitizeHtml.test.ts +0 -165
- package/src/__tests__/sla.test.ts +0 -258
- package/src/__tests__/trackOpenEndpoint.test.ts +0 -54
- package/src/__tests__/webhookSecurity.test.ts +0 -58
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
|
|
6
|
-
const LANGUAGES = [
|
|
7
|
-
{ value: "javascript", label: "JavaScript" },
|
|
8
|
-
{ value: "typescript", label: "TypeScript" },
|
|
9
|
-
{ value: "php", label: "PHP" },
|
|
10
|
-
{ value: "python", label: "Python" },
|
|
11
|
-
{ value: "html", label: "HTML" },
|
|
12
|
-
{ value: "css", label: "CSS" },
|
|
13
|
-
{ value: "scss", label: "SCSS" },
|
|
14
|
-
{ value: "json", label: "JSON" },
|
|
15
|
-
{ value: "sql", label: "SQL" },
|
|
16
|
-
{ value: "bash", label: "Bash" },
|
|
17
|
-
{ value: "yaml", label: "YAML" },
|
|
18
|
-
{ value: "xml", label: "XML" },
|
|
19
|
-
{ value: "markdown", label: "Markdown" },
|
|
20
|
-
{ value: "diff", label: "Diff" },
|
|
21
|
-
{ value: "go", label: "Go" },
|
|
22
|
-
{ value: "rust", label: "Rust" },
|
|
23
|
-
{ value: "java", label: "Java" },
|
|
24
|
-
{ value: "ruby", label: "Ruby" },
|
|
25
|
-
{ value: "swift", label: "Swift" },
|
|
26
|
-
{ value: "docker", label: "Dockerfile" },
|
|
27
|
-
{ value: "nginx", label: "Nginx" },
|
|
28
|
-
{ value: "env", label: ".env" }
|
|
29
|
-
];
|
|
30
|
-
function CodeBlockInserter({ onInsert, className, style }) {
|
|
31
|
-
const [open, setOpen] = react.useState(false);
|
|
32
|
-
const [filter, setFilter] = react.useState("");
|
|
33
|
-
const dropdownRef = react.useRef(null);
|
|
34
|
-
const inputRef = react.useRef(null);
|
|
35
|
-
react.useEffect(() => {
|
|
36
|
-
if (open && inputRef.current) inputRef.current.focus();
|
|
37
|
-
}, [open]);
|
|
38
|
-
react.useEffect(() => {
|
|
39
|
-
const handleClickOutside = (e) => {
|
|
40
|
-
if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
|
|
41
|
-
setOpen(false);
|
|
42
|
-
setFilter("");
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
if (open) document.addEventListener("mousedown", handleClickOutside);
|
|
46
|
-
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
47
|
-
}, [open]);
|
|
48
|
-
const filtered = filter ? LANGUAGES.filter((l) => l.label.toLowerCase().includes(filter.toLowerCase()) || l.value.includes(filter.toLowerCase())) : LANGUAGES;
|
|
49
|
-
const handleSelect = (lang) => {
|
|
50
|
-
onInsert(`
|
|
51
|
-
\`\`\`${lang}
|
|
52
|
-
|
|
53
|
-
\`\`\`
|
|
54
|
-
`);
|
|
55
|
-
setOpen(false);
|
|
56
|
-
setFilter("");
|
|
57
|
-
};
|
|
58
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: dropdownRef, style: { position: "relative", display: "inline-block" }, children: [
|
|
59
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
-
"button",
|
|
61
|
-
{
|
|
62
|
-
onClick: () => setOpen(!open),
|
|
63
|
-
className,
|
|
64
|
-
style: {
|
|
65
|
-
fontSize: 11,
|
|
66
|
-
fontWeight: 700,
|
|
67
|
-
padding: "4px 10px",
|
|
68
|
-
width: "auto",
|
|
69
|
-
cursor: "pointer",
|
|
70
|
-
...style
|
|
71
|
-
},
|
|
72
|
-
type: "button",
|
|
73
|
-
"aria-label": "Ins\xE9rer un bloc de code",
|
|
74
|
-
"data-tooltip": "Bloc de code",
|
|
75
|
-
children: "</> Code"
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
open && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
79
|
-
position: "absolute",
|
|
80
|
-
bottom: "100%",
|
|
81
|
-
left: 0,
|
|
82
|
-
marginBottom: 4,
|
|
83
|
-
width: 200,
|
|
84
|
-
maxHeight: 280,
|
|
85
|
-
backgroundColor: "#1e293b",
|
|
86
|
-
border: "1px solid #334155",
|
|
87
|
-
borderRadius: 8,
|
|
88
|
-
boxShadow: "0 8px 24px rgba(0,0,0,0.4)",
|
|
89
|
-
zIndex: 1e3,
|
|
90
|
-
overflow: "hidden",
|
|
91
|
-
display: "flex",
|
|
92
|
-
flexDirection: "column"
|
|
93
|
-
}, children: [
|
|
94
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "8px 8px 4px" }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
-
"input",
|
|
96
|
-
{
|
|
97
|
-
ref: inputRef,
|
|
98
|
-
type: "text",
|
|
99
|
-
value: filter,
|
|
100
|
-
onChange: (e) => setFilter(e.target.value),
|
|
101
|
-
onKeyDown: (e) => {
|
|
102
|
-
if (e.key === "Escape") {
|
|
103
|
-
setOpen(false);
|
|
104
|
-
setFilter("");
|
|
105
|
-
}
|
|
106
|
-
if (e.key === "Enter" && filtered.length > 0) handleSelect(filtered[0].value);
|
|
107
|
-
},
|
|
108
|
-
placeholder: "Rechercher...",
|
|
109
|
-
style: {
|
|
110
|
-
width: "100%",
|
|
111
|
-
padding: "6px 10px",
|
|
112
|
-
fontSize: 12,
|
|
113
|
-
backgroundColor: "#0f172a",
|
|
114
|
-
border: "1px solid #334155",
|
|
115
|
-
borderRadius: 6,
|
|
116
|
-
color: "#e2e8f0",
|
|
117
|
-
outline: "none",
|
|
118
|
-
boxSizing: "border-box"
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
) }),
|
|
122
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { overflowY: "auto", maxHeight: 230, padding: "4px 0" }, children: [
|
|
123
|
-
filtered.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
124
|
-
"button",
|
|
125
|
-
{
|
|
126
|
-
onClick: () => handleSelect(lang.value),
|
|
127
|
-
style: {
|
|
128
|
-
display: "block",
|
|
129
|
-
width: "100%",
|
|
130
|
-
padding: "6px 12px",
|
|
131
|
-
fontSize: 12,
|
|
132
|
-
fontWeight: 500,
|
|
133
|
-
color: "#e2e8f0",
|
|
134
|
-
backgroundColor: "transparent",
|
|
135
|
-
border: "none",
|
|
136
|
-
cursor: "pointer",
|
|
137
|
-
textAlign: "left"
|
|
138
|
-
},
|
|
139
|
-
onMouseEnter: (e) => {
|
|
140
|
-
e.target.style.backgroundColor = "#334155";
|
|
141
|
-
},
|
|
142
|
-
onMouseLeave: (e) => {
|
|
143
|
-
e.target.style.backgroundColor = "transparent";
|
|
144
|
-
},
|
|
145
|
-
type: "button",
|
|
146
|
-
children: lang.label
|
|
147
|
-
},
|
|
148
|
-
lang.value
|
|
149
|
-
)),
|
|
150
|
-
filtered.length === 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { padding: "12px", fontSize: 12, color: "#64748b", textAlign: "center" }, children: "Aucun langage trouv\xE9" })
|
|
151
|
-
] })
|
|
152
|
-
] })
|
|
153
|
-
] });
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
exports.CodeBlockInserter = CodeBlockInserter;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var constants = require('../constants');
|
|
5
|
-
|
|
6
|
-
function QuickActions({
|
|
7
|
-
statusTransitions,
|
|
8
|
-
statusUpdating,
|
|
9
|
-
onStatusChange,
|
|
10
|
-
snoozeUntil,
|
|
11
|
-
snoozeSaving,
|
|
12
|
-
onCancelSnooze,
|
|
13
|
-
showMerge: _showMerge,
|
|
14
|
-
showExtMsg: _showExtMsg,
|
|
15
|
-
showSnooze: _showSnooze,
|
|
16
|
-
onToggleMerge,
|
|
17
|
-
onToggleExtMsg,
|
|
18
|
-
onToggleSnooze,
|
|
19
|
-
onNextTicket,
|
|
20
|
-
showReminderButton,
|
|
21
|
-
onToggleReminder,
|
|
22
|
-
autoCloseScheduledAt,
|
|
23
|
-
onCancelScheduledClose,
|
|
24
|
-
cancelingClose,
|
|
25
|
-
reminderSuccess,
|
|
26
|
-
showNextTicket,
|
|
27
|
-
nextTicketId,
|
|
28
|
-
nextTicketInfo,
|
|
29
|
-
onCloseNextTicket
|
|
30
|
-
}) {
|
|
31
|
-
const scheduledClose = autoCloseScheduledAt && new Date(autoCloseScheduledAt) > /* @__PURE__ */ new Date() ? new Date(autoCloseScheduledAt).toLocaleString("fr-FR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" }) : null;
|
|
32
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px", flexWrap: "wrap", marginBottom: "16px", alignItems: "center" }, children: [
|
|
34
|
-
statusTransitions.map((a) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
35
|
-
"button",
|
|
36
|
-
{
|
|
37
|
-
onClick: () => onStatusChange(a.status),
|
|
38
|
-
disabled: statusUpdating,
|
|
39
|
-
style: constants.s.outlineBtn(a.color, statusUpdating),
|
|
40
|
-
children: a.label
|
|
41
|
-
},
|
|
42
|
-
a.status
|
|
43
|
-
)),
|
|
44
|
-
snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCancelSnooze, disabled: snoozeSaving, style: { ...constants.s.ghostBtn("#17807c", snoozeSaving), fontSize: "12px", padding: "5px 10px" }, children: "Annuler snooze" }),
|
|
45
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { borderLeft: `1px solid ${constants.C.border}`, height: "20px", margin: "0 4px" } }),
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleMerge, style: constants.s.ghostBtn("#be185d"), children: "Fusionner" }),
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleExtMsg, style: constants.s.ghostBtn("#4f46e5"), children: "+ Message re\xE7u" }),
|
|
48
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onToggleSnooze, style: constants.s.ghostBtn("#17807c"), children: "Snooze" }),
|
|
49
|
-
showReminderButton && /* @__PURE__ */ jsxRuntime.jsxs("button", { onClick: onToggleReminder, style: constants.s.ghostBtn("#ea580c"), children: [
|
|
50
|
-
"\u23F0",
|
|
51
|
-
" Relancer"
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onNextTicket, style: constants.s.ghostBtn("#16a34a"), children: "Ticket suivant" }),
|
|
54
|
-
scheduledClose && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { display: "inline-flex", alignItems: "center", gap: "8px", padding: "5px 10px", borderRadius: "6px", backgroundColor: "#fff7ed", border: "1px solid #fed7aa", fontSize: "12px", color: "#9a3412", fontWeight: 600 }, children: [
|
|
55
|
-
"\u23F0",
|
|
56
|
-
" Fermeture auto le ",
|
|
57
|
-
scheduledClose,
|
|
58
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCancelScheduledClose, disabled: cancelingClose, style: { border: "none", background: "none", color: "#b91c1c", cursor: cancelingClose ? "not-allowed" : "pointer", fontWeight: 700, fontSize: "12px", textDecoration: "underline", padding: 0, opacity: cancelingClose ? 0.5 : 1 }, children: cancelingClose ? "..." : "Annuler" })
|
|
59
|
-
] }),
|
|
60
|
-
reminderSuccess && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { ...constants.s.badge("#f0fdf4", "#16a34a"), fontSize: "12px", padding: "5px 10px" }, children: [
|
|
61
|
-
"Relance envoy\xE9e ",
|
|
62
|
-
"\u2713"
|
|
63
|
-
] })
|
|
64
|
-
] }),
|
|
65
|
-
showNextTicket && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "10px 14px", borderRadius: "8px", backgroundColor: "#f0fdf4", border: `1px solid ${constants.C.border}`, marginBottom: "14px", display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
66
|
-
nextTicketId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
67
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "13px", color: "#166534", fontWeight: 600 }, children: [
|
|
68
|
-
"Ticket suivant : ",
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: nextTicketInfo })
|
|
70
|
-
] }),
|
|
71
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
-
"button",
|
|
73
|
-
{
|
|
74
|
-
onClick: () => {
|
|
75
|
-
window.location.href = `/admin/support/ticket?id=${nextTicketId}`;
|
|
76
|
-
},
|
|
77
|
-
style: { ...constants.s.btn(constants.C.statusResolved), color: constants.C.white, fontSize: "12px", padding: "5px 14px" },
|
|
78
|
-
children: "Ouvrir"
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "13px", color: "#166534", fontWeight: 700 }, children: nextTicketInfo }),
|
|
82
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: onCloseNextTicket, style: { border: "none", background: "none", color: constants.C.textMuted, cursor: "pointer", fontSize: "16px", fontWeight: 700, marginLeft: "8px" }, children: "\xD7" })
|
|
83
|
-
] })
|
|
84
|
-
] });
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
exports.QuickActions = QuickActions;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var constants = require('../constants');
|
|
5
|
-
|
|
6
|
-
const sourceLabels = {
|
|
7
|
-
email: "Email",
|
|
8
|
-
"live-chat": "Live Chat",
|
|
9
|
-
portal: "Portail",
|
|
10
|
-
admin: "Admin"
|
|
11
|
-
};
|
|
12
|
-
function TicketHeader({
|
|
13
|
-
ticketNumber,
|
|
14
|
-
currentStatus,
|
|
15
|
-
clientSentiment,
|
|
16
|
-
ticketSource,
|
|
17
|
-
chatSession,
|
|
18
|
-
snoozeUntil,
|
|
19
|
-
satisfaction,
|
|
20
|
-
copiedLink,
|
|
21
|
-
onCopyLink
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
24
|
-
display: "flex",
|
|
25
|
-
alignItems: "center",
|
|
26
|
-
gap: "10px",
|
|
27
|
-
padding: "10px 14px",
|
|
28
|
-
borderRadius: "8px",
|
|
29
|
-
backgroundColor: "var(--theme-elevation-100)",
|
|
30
|
-
marginBottom: "12px",
|
|
31
|
-
flexWrap: "wrap"
|
|
32
|
-
}, children: [
|
|
33
|
-
ticketNumber && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', monospace", fontWeight: 700, fontSize: "14px", color: constants.C.textPrimary }, children: ticketNumber }),
|
|
34
|
-
currentStatus && (() => {
|
|
35
|
-
const st = constants.statusLabels[currentStatus] || constants.statusLabels.open;
|
|
36
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: constants.s.badge(st.bg, st.color), children: st.label });
|
|
37
|
-
})(),
|
|
38
|
-
clientSentiment && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
39
|
-
"span",
|
|
40
|
-
{
|
|
41
|
-
style: { ...constants.s.badge(`${clientSentiment.color}15`, clientSentiment.color), fontSize: "11px" },
|
|
42
|
-
title: `Sentiment : ${clientSentiment.label}`,
|
|
43
|
-
children: [
|
|
44
|
-
clientSentiment.emoji,
|
|
45
|
-
" ",
|
|
46
|
-
clientSentiment.label
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
ticketSource && ticketSource !== "portal" && /* @__PURE__ */ jsxRuntime.jsx("span", { style: constants.s.badge("#f1f5f9", "#475569"), children: sourceLabels[ticketSource] || ticketSource }),
|
|
51
|
-
chatSession && ticketSource === "live-chat" && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: { fontSize: "11px", color: constants.C.textMuted }, children: [
|
|
52
|
-
"Session : ",
|
|
53
|
-
chatSession.slice(0, 16),
|
|
54
|
-
"..."
|
|
55
|
-
] }),
|
|
56
|
-
snoozeUntil && new Date(snoozeUntil) > /* @__PURE__ */ new Date() && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#eef8f7", "#17807c"), children: [
|
|
57
|
-
"Snooz\xE9 ",
|
|
58
|
-
new Date(snoozeUntil).toLocaleDateString("fr-FR", { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" })
|
|
59
|
-
] }),
|
|
60
|
-
satisfaction && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge(
|
|
61
|
-
satisfaction.rating >= 4 ? "#dcfce7" : satisfaction.rating >= 3 ? "#fef9c3" : "#fee2e2",
|
|
62
|
-
satisfaction.rating >= 4 ? "#166534" : satisfaction.rating >= 3 ? "#854d0e" : "#991b1b"
|
|
63
|
-
), children: [
|
|
64
|
-
Array.from({ length: 5 }, (_, i) => i < satisfaction.rating ? "\u2605" : "\u2606").join(""),
|
|
65
|
-
" ",
|
|
66
|
-
satisfaction.rating,
|
|
67
|
-
"/5"
|
|
68
|
-
] }),
|
|
69
|
-
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: { marginLeft: "auto", display: "inline-flex", alignItems: "center", gap: "4px" }, children: [
|
|
70
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
-
"button",
|
|
72
|
-
{
|
|
73
|
-
onClick: () => onCopyLink("admin"),
|
|
74
|
-
title: "Copier le lien admin",
|
|
75
|
-
style: { background: "none", border: "none", cursor: "pointer", fontSize: "13px", opacity: copiedLink === "admin" ? 1 : 0.5, padding: "2px 4px" },
|
|
76
|
-
children: copiedLink === "admin" ? "\u2705" : "\u{1F4CB}"
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
-
"button",
|
|
81
|
-
{
|
|
82
|
-
onClick: () => onCopyLink("client"),
|
|
83
|
-
title: "Copier le lien client",
|
|
84
|
-
style: { background: "none", border: "none", cursor: "pointer", fontSize: "13px", opacity: copiedLink === "client" ? 1 : 0.5, padding: "2px 4px" },
|
|
85
|
-
children: copiedLink === "client" ? "\u2705" : "\u{1F517}"
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
copiedLink && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "11px", color: "#16a34a", fontWeight: 600 }, children: "Copi\xE9" })
|
|
89
|
-
] })
|
|
90
|
-
] });
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
exports.TicketHeader = TicketHeader;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var constants = require('../constants');
|
|
5
|
-
|
|
6
|
-
function TimeTrackingPanel({
|
|
7
|
-
timeEntries,
|
|
8
|
-
totalMinutes,
|
|
9
|
-
timerRunning,
|
|
10
|
-
timerSeconds,
|
|
11
|
-
setTimerSeconds,
|
|
12
|
-
timerDescription,
|
|
13
|
-
setTimerDescription,
|
|
14
|
-
handleTimerStart,
|
|
15
|
-
handleTimerStop,
|
|
16
|
-
handleTimerSave,
|
|
17
|
-
handleTimerDiscard,
|
|
18
|
-
duration,
|
|
19
|
-
setDuration,
|
|
20
|
-
timeDescription,
|
|
21
|
-
setTimeDescription,
|
|
22
|
-
handleAddTime,
|
|
23
|
-
addingTime,
|
|
24
|
-
timeSuccess
|
|
25
|
-
}) {
|
|
26
|
-
const totalH = Math.floor(totalMinutes / 60);
|
|
27
|
-
const totalM = totalMinutes % 60;
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: constants.s.section, children: [
|
|
29
|
-
/* @__PURE__ */ jsxRuntime.jsxs("h4", { style: constants.s.sectionTitle, children: [
|
|
30
|
-
"Temps",
|
|
31
|
-
totalMinutes > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { style: constants.s.badge("#fef3c7", "#92400e"), children: [
|
|
32
|
-
totalH,
|
|
33
|
-
"h",
|
|
34
|
-
String(totalM).padStart(2, "0"),
|
|
35
|
-
" total"
|
|
36
|
-
] })
|
|
37
|
-
] }),
|
|
38
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
39
|
-
display: "flex",
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
gap: "10px",
|
|
42
|
-
flexWrap: "wrap",
|
|
43
|
-
padding: "12px 16px",
|
|
44
|
-
borderRadius: "10px",
|
|
45
|
-
marginBottom: "14px",
|
|
46
|
-
backgroundColor: timerRunning ? "#fef2f2" : "var(--theme-elevation-100)",
|
|
47
|
-
border: timerRunning ? "1px solid #fca5a5" : "1px solid var(--theme-elevation-300)"
|
|
48
|
-
}, children: [
|
|
49
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: {
|
|
50
|
-
fontFamily: "monospace",
|
|
51
|
-
fontSize: "24px",
|
|
52
|
-
fontWeight: 700,
|
|
53
|
-
color: timerRunning ? "#dc2626" : "var(--theme-text)",
|
|
54
|
-
minWidth: "90px"
|
|
55
|
-
}, children: [
|
|
56
|
-
String(Math.floor(timerSeconds / 3600)).padStart(2, "0"),
|
|
57
|
-
":",
|
|
58
|
-
String(Math.floor(timerSeconds % 3600 / 60)).padStart(2, "0"),
|
|
59
|
-
":",
|
|
60
|
-
String(timerSeconds % 60).padStart(2, "0")
|
|
61
|
-
] }),
|
|
62
|
-
!timerRunning && timerSeconds > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [-5, -1, 1, 5, 15, 30].map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
"button",
|
|
64
|
-
{
|
|
65
|
-
onClick: () => setTimerSeconds((p) => Math.max(0, p + m * 60)),
|
|
66
|
-
style: { width: Math.abs(m) >= 15 ? "32px" : "28px", height: "28px", borderRadius: "6px", border: "1px solid #e2e8f0", background: "white", cursor: "pointer", fontSize: Math.abs(m) >= 15 ? "12px" : "14px", fontWeight: 700, color: "#64748b" },
|
|
67
|
-
title: `${m > 0 ? "+" : ""}${m} min`,
|
|
68
|
-
children: m > 0 ? `+${m}` : String(m)
|
|
69
|
-
},
|
|
70
|
-
m
|
|
71
|
-
)) }),
|
|
72
|
-
!timerRunning && timerSeconds === 0 && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleTimerStart(true), style: { ...constants.s.btn("#dc2626", false), fontSize: "12px", padding: "6px 16px", display: "flex", alignItems: "center", gap: "6px" }, children: "\u25B6 D\xE9marrer" }),
|
|
73
|
-
timerRunning && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleTimerStop, style: { ...constants.s.btn("#374151", false), fontSize: "12px", padding: "6px 16px", display: "flex", alignItems: "center", gap: "6px" }, children: "\u23F8 Pause" }),
|
|
74
|
-
!timerRunning && timerSeconds > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
75
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: () => handleTimerStart(false), style: { ...constants.s.btn("#dc2626", false), fontSize: "12px", padding: "6px 14px" }, children: "\u25B6 Reprendre" }),
|
|
76
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
-
"input",
|
|
78
|
-
{
|
|
79
|
-
type: "text",
|
|
80
|
-
value: timerDescription,
|
|
81
|
-
onChange: (e) => setTimerDescription(e.target.value),
|
|
82
|
-
placeholder: "Description...",
|
|
83
|
-
style: { ...constants.s.input, fontSize: "12px", flex: 1, minWidth: "120px" }
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
87
|
-
"button",
|
|
88
|
-
{
|
|
89
|
-
onClick: handleTimerSave,
|
|
90
|
-
disabled: addingTime || timerSeconds < 60,
|
|
91
|
-
style: { ...constants.s.btn("#16a34a", addingTime || timerSeconds < 60), fontSize: "12px", padding: "6px 14px" },
|
|
92
|
-
title: timerSeconds < 60 ? "Minimum 1 minute" : `Sauvegarder ${Math.round(timerSeconds / 60)} min`,
|
|
93
|
-
children: [
|
|
94
|
-
"\u{1F4BE} ",
|
|
95
|
-
Math.round(timerSeconds / 60),
|
|
96
|
-
" min"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
),
|
|
100
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleTimerDiscard, style: { background: "none", border: "none", cursor: "pointer", fontSize: "14px", color: "#94a3b8", padding: "4px" }, title: "Annuler", children: "\u2715" })
|
|
101
|
-
] }),
|
|
102
|
-
timerRunning && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "11px", color: "#dc2626", fontWeight: 600 }, children: "\u25CF Enregistrement en cours \u2014 session maintenue active" })
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end", flexWrap: "wrap", marginBottom: "14px" }, children: [
|
|
105
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
106
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: { display: "block", fontSize: "11px", color: constants.C.textSecondary, marginBottom: "3px", fontWeight: 600 }, children: "Min" }),
|
|
107
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "number", min: "1", value: duration, onChange: (e) => setDuration(e.target.value), placeholder: "30", style: { ...constants.s.input, width: "80px" } })
|
|
108
|
-
] }),
|
|
109
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { flex: 1 }, children: [
|
|
110
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { style: { display: "block", fontSize: "11px", color: constants.C.textSecondary, marginBottom: "3px", fontWeight: 600 }, children: "Description" }),
|
|
111
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "text", value: timeDescription, onChange: (e) => setTimeDescription(e.target.value), placeholder: "Travail effectu\xE9...", style: { ...constants.s.input, width: "100%" } })
|
|
112
|
-
] }),
|
|
113
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { onClick: handleAddTime, disabled: addingTime || !duration, style: constants.s.btn(constants.C.amber, addingTime || !duration), children: addingTime ? "..." : "+ Temps" }),
|
|
114
|
-
timeSuccess && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", color: "#16a34a", fontWeight: 600 }, children: timeSuccess })
|
|
115
|
-
] }),
|
|
116
|
-
timeEntries.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { fontSize: "12px" }, children: /* @__PURE__ */ jsxRuntime.jsxs("table", { style: { width: "100%", borderCollapse: "collapse" }, children: [
|
|
117
|
-
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderBottom: `1px solid ${constants.C.border}` }, children: [
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", fontWeight: 600, fontSize: "11px", color: constants.C.textSecondary }, children: "Date" }),
|
|
119
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", fontWeight: 600, fontSize: "11px", color: constants.C.textSecondary }, children: "Dur\xE9e" }),
|
|
120
|
-
/* @__PURE__ */ jsxRuntime.jsx("th", { style: { textAlign: "left", padding: "6px 8px", fontWeight: 600, fontSize: "11px", color: constants.C.textSecondary }, children: "Description" })
|
|
121
|
-
] }) }),
|
|
122
|
-
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: timeEntries.map((entry) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { style: { borderBottom: "1px solid #f1f5f9" }, children: [
|
|
123
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 8px", color: "#374151" }, children: new Date(entry.date).toLocaleDateString("fr-FR", { day: "numeric", month: "short" }) }),
|
|
124
|
-
/* @__PURE__ */ jsxRuntime.jsxs("td", { style: { padding: "6px 8px", fontWeight: 600, color: "#374151" }, children: [
|
|
125
|
-
entry.duration,
|
|
126
|
-
" min"
|
|
127
|
-
] }),
|
|
128
|
-
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { padding: "6px 8px", color: constants.C.textSecondary }, children: entry.description || "\u2014" })
|
|
129
|
-
] }, entry.id)) })
|
|
130
|
-
] }) })
|
|
131
|
-
] });
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
exports.TimeTrackingPanel = TimeTrackingPanel;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const DEFAULT_FEATURES = {
|
|
4
|
-
timeTracking: true,
|
|
5
|
-
ai: true,
|
|
6
|
-
satisfaction: true,
|
|
7
|
-
chat: true,
|
|
8
|
-
emailTracking: true,
|
|
9
|
-
canned: true,
|
|
10
|
-
merge: true,
|
|
11
|
-
snooze: true,
|
|
12
|
-
externalMessages: true,
|
|
13
|
-
clientHistory: true,
|
|
14
|
-
activityLog: true,
|
|
15
|
-
splitTicket: true,
|
|
16
|
-
scheduledReplies: true,
|
|
17
|
-
autoClose: true,
|
|
18
|
-
autoCloseDays: 7,
|
|
19
|
-
roundRobin: false
|
|
20
|
-
};
|
|
21
|
-
const STORAGE_KEY = "ticketing_features";
|
|
22
|
-
function getFeatures() {
|
|
23
|
-
if (typeof window === "undefined") return DEFAULT_FEATURES;
|
|
24
|
-
try {
|
|
25
|
-
const stored = localStorage.getItem(STORAGE_KEY);
|
|
26
|
-
if (stored) {
|
|
27
|
-
const parsed = JSON.parse(stored);
|
|
28
|
-
return { ...DEFAULT_FEATURES, ...parsed };
|
|
29
|
-
}
|
|
30
|
-
} catch {
|
|
31
|
-
}
|
|
32
|
-
return DEFAULT_FEATURES;
|
|
33
|
-
}
|
|
34
|
-
function saveFeatures(features) {
|
|
35
|
-
if (typeof window === "undefined") return;
|
|
36
|
-
try {
|
|
37
|
-
localStorage.setItem(STORAGE_KEY, JSON.stringify(features));
|
|
38
|
-
} catch {
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
exports.DEFAULT_FEATURES = DEFAULT_FEATURES;
|
|
43
|
-
exports.getFeatures = getFeatures;
|
|
44
|
-
exports.saveFeatures = saveFeatures;
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const REWRITE_STYLES = [
|
|
4
|
-
{ id: "auto", label: "\u270F\uFE0F Auto", desc: "Garde le ton actuel" },
|
|
5
|
-
{ id: "tutoyer", label: "\u{1F44B} Tutoyer", desc: "Passe en tu" },
|
|
6
|
-
{ id: "vouvoyer", label: "\u{1F3A9} Vouvoyer", desc: "Passe en vous" },
|
|
7
|
-
{ id: "formel", label: "\u{1F4BC} Formel", desc: "Ton professionnel" },
|
|
8
|
-
{ id: "amical", label: "\u{1F60A} Amical", desc: "Ton chaleureux" },
|
|
9
|
-
{ id: "court", label: "\u26A1 Court", desc: "Version concise" }
|
|
10
|
-
];
|
|
11
|
-
const layoutStyles = {
|
|
12
|
-
root: { padding: "12px 0" },
|
|
13
|
-
twoColumns: {
|
|
14
|
-
display: "grid",
|
|
15
|
-
gridTemplateColumns: "1fr 320px",
|
|
16
|
-
gap: "16px",
|
|
17
|
-
alignItems: "start"
|
|
18
|
-
},
|
|
19
|
-
mainColumn: { minWidth: 0 },
|
|
20
|
-
sideColumn: {
|
|
21
|
-
display: "flex",
|
|
22
|
-
flexDirection: "column",
|
|
23
|
-
gap: "12px",
|
|
24
|
-
position: "sticky",
|
|
25
|
-
top: "80px"
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const statusLabels = {
|
|
29
|
-
open: { label: "Ouvert", bg: "#dbeafe", color: "#1e40af" },
|
|
30
|
-
waiting_client: { label: "Attente", bg: "#fef3c7", color: "#92400e" },
|
|
31
|
-
resolved: { label: "R\xE9solu", bg: "#dcfce7", color: "#166534" }
|
|
32
|
-
};
|
|
33
|
-
const projectStatusLabels = {
|
|
34
|
-
active: { label: "Actif", bg: "#dcfce7", color: "#166534" },
|
|
35
|
-
paused: { label: "En pause", bg: "#fef3c7", color: "#92400e" },
|
|
36
|
-
completed: { label: "Termin\xE9", bg: "#e5e7eb", color: "#374151" }
|
|
37
|
-
};
|
|
38
|
-
const C = {
|
|
39
|
-
blue: "#2563eb",
|
|
40
|
-
amber: "#d97706",
|
|
41
|
-
orange: "#ea580c",
|
|
42
|
-
black: "var(--theme-text)",
|
|
43
|
-
white: "#fff",
|
|
44
|
-
bg: "#fafafa",
|
|
45
|
-
textPrimary: "var(--theme-text)",
|
|
46
|
-
textSecondary: "#6b7280",
|
|
47
|
-
textMuted: "#9ca3af",
|
|
48
|
-
border: "#e2e8f0",
|
|
49
|
-
statusOpen: "#2563eb",
|
|
50
|
-
statusProgress: "#ea580c",
|
|
51
|
-
statusWaiting: "#d97706",
|
|
52
|
-
statusResolved: "#16a34a",
|
|
53
|
-
statusClosed: "#6b7280",
|
|
54
|
-
adminBg: "#f8fafc",
|
|
55
|
-
adminBorder: "#2563eb",
|
|
56
|
-
clientBg: "#fafafa",
|
|
57
|
-
clientBorder: "#e2e8f0",
|
|
58
|
-
emailBg: "#fffbeb",
|
|
59
|
-
emailBorder: "#ea580c",
|
|
60
|
-
internalBg: "#fefce8",
|
|
61
|
-
internalBorder: "#d97706"
|
|
62
|
-
};
|
|
63
|
-
const s = {
|
|
64
|
-
section: { borderTop: `1px solid ${C.border}`, paddingTop: "18px", marginTop: "20px" },
|
|
65
|
-
sectionTitle: { fontSize: "14px", fontWeight: 600, marginBottom: "12px", display: "flex", alignItems: "center", gap: "8px" },
|
|
66
|
-
btn: (bg, disabled) => {
|
|
67
|
-
const hex = bg.replace("#", "");
|
|
68
|
-
const r = parseInt(hex.substring(0, 2), 16) || 0;
|
|
69
|
-
const g = parseInt(hex.substring(2, 4), 16) || 0;
|
|
70
|
-
const b = parseInt(hex.substring(4, 6), 16) || 0;
|
|
71
|
-
const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255;
|
|
72
|
-
const textColor = luminance > 0.6 ? "#374151" : C.white;
|
|
73
|
-
return {
|
|
74
|
-
padding: "7px 14px",
|
|
75
|
-
borderRadius: "6px",
|
|
76
|
-
border: `1px solid ${C.border}`,
|
|
77
|
-
backgroundColor: bg,
|
|
78
|
-
color: textColor,
|
|
79
|
-
fontWeight: 600,
|
|
80
|
-
fontSize: "13px",
|
|
81
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
82
|
-
opacity: disabled ? 0.5 : 1,
|
|
83
|
-
whiteSpace: "nowrap"
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
ghostBtn: (color, disabled) => ({
|
|
87
|
-
padding: "7px 14px",
|
|
88
|
-
borderRadius: "6px",
|
|
89
|
-
border: `1px solid ${C.border}`,
|
|
90
|
-
backgroundColor: "transparent",
|
|
91
|
-
color,
|
|
92
|
-
fontWeight: 600,
|
|
93
|
-
fontSize: "13px",
|
|
94
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
95
|
-
opacity: disabled ? 0.5 : 1,
|
|
96
|
-
whiteSpace: "nowrap"
|
|
97
|
-
}),
|
|
98
|
-
outlineBtn: (color, disabled) => ({
|
|
99
|
-
padding: "7px 14px",
|
|
100
|
-
borderRadius: "6px",
|
|
101
|
-
border: `1px solid ${color}`,
|
|
102
|
-
backgroundColor: "transparent",
|
|
103
|
-
color,
|
|
104
|
-
fontWeight: 600,
|
|
105
|
-
fontSize: "13px",
|
|
106
|
-
cursor: disabled ? "not-allowed" : "pointer",
|
|
107
|
-
opacity: disabled ? 0.5 : 1,
|
|
108
|
-
whiteSpace: "nowrap"
|
|
109
|
-
}),
|
|
110
|
-
input: { padding: "8px 12px", borderRadius: "6px", border: `1px solid ${C.border}`, fontSize: "14px", color: "#374151", backgroundColor: C.white },
|
|
111
|
-
badge: (bg, color) => ({
|
|
112
|
-
display: "inline-block",
|
|
113
|
-
padding: "2px 8px",
|
|
114
|
-
borderRadius: "4px",
|
|
115
|
-
fontSize: "11px",
|
|
116
|
-
fontWeight: 600,
|
|
117
|
-
backgroundColor: bg,
|
|
118
|
-
color
|
|
119
|
-
})
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
exports.C = C;
|
|
123
|
-
exports.REWRITE_STYLES = REWRITE_STYLES;
|
|
124
|
-
exports.layoutStyles = layoutStyles;
|
|
125
|
-
exports.projectStatusLabels = projectStatusLabels;
|
|
126
|
-
exports.s = s;
|
|
127
|
-
exports.statusLabels = statusLabels;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var react = require('react');
|
|
4
|
-
|
|
5
|
-
const TicketContext = react.createContext(null);
|
|
6
|
-
function useTicketContext() {
|
|
7
|
-
const ctx = react.useContext(TicketContext);
|
|
8
|
-
if (!ctx) throw new Error("useTicketContext must be used within TicketContext.Provider");
|
|
9
|
-
return ctx;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
exports.TicketContext = TicketContext;
|
|
13
|
-
exports.useTicketContext = useTicketContext;
|