@consilioweb/payload-support 0.5.2 → 0.6.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/dist/components/TicketConversation/components/AISummaryPanel.js +76 -0
- package/dist/components/TicketConversation/components/ActionPanels.js +118 -0
- package/dist/components/TicketConversation/components/ActivityLog.js +23 -0
- package/dist/components/TicketConversation/components/ClientBar.js +42 -0
- package/dist/components/TicketConversation/components/ClientHistory.js +137 -0
- package/dist/components/TicketConversation/components/CodeBlock.js +152 -0
- package/dist/components/TicketConversation/components/CodeBlockInserter.js +155 -0
- package/dist/components/TicketConversation/components/QuickActions.js +65 -0
- package/dist/components/TicketConversation/components/TicketHeader.js +92 -0
- package/dist/components/TicketConversation/components/TimeTrackingPanel.js +133 -0
- package/dist/components/TicketConversation/config.js +41 -0
- package/dist/components/TicketConversation/constants.js +96 -0
- package/dist/components/TicketConversation/context.js +11 -0
- package/dist/components/TicketConversation/hooks/useAI.js +176 -0
- package/dist/components/TicketConversation/hooks/useMessageActions.js +135 -0
- package/dist/components/TicketConversation/hooks/useReply.js +187 -0
- package/dist/components/TicketConversation/hooks/useTicketActions.js +230 -0
- package/dist/components/TicketConversation/hooks/useTimeTracking.js +122 -0
- package/dist/components/TicketConversation/hooks/useTranslation.js +70 -0
- package/dist/components/TicketConversation/index.js +1123 -0
- package/dist/components/TicketConversation/locales/en.json +878 -0
- package/dist/components/TicketConversation/locales/fr.json +878 -0
- package/dist/components/TicketConversation/types.js +2 -0
- package/dist/components/TicketConversation/utils.js +25 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/styles/BillingView.module.scss +311 -0
- package/dist/styles/ChatView.module.scss +438 -0
- package/dist/styles/CommandPalette.module.scss +160 -0
- package/dist/styles/CrmView.module.scss +554 -0
- package/dist/styles/EmailTracking.module.scss +238 -0
- package/dist/styles/ImportConversation.module.scss +267 -0
- package/dist/styles/Layout.module.scss +55 -0
- package/dist/styles/Logs.module.scss +164 -0
- package/dist/styles/NewTicket.module.scss +143 -0
- package/dist/styles/PendingEmails.module.scss +629 -0
- package/dist/styles/SupportDashboard.module.scss +649 -0
- package/dist/styles/TicketDetail.module.scss +1050 -0
- package/dist/styles/TicketInbox.module.scss +296 -0
- package/dist/styles/TicketingSettings.module.scss +358 -0
- package/dist/styles/TimeDashboard.module.scss +287 -0
- package/dist/styles/_tokens.scss +78 -0
- package/dist/styles/theme.css +633 -0
- package/dist/views/BillingView/client.js +204 -0
- package/dist/views/BillingView/index.js +29 -0
- package/dist/views/ChatView/client.js +252 -0
- package/dist/views/ChatView/index.js +29 -0
- package/dist/views/CrmView/client.js +232 -0
- package/dist/views/CrmView/index.js +29 -0
- package/dist/views/EmailTrackingView/client.js +154 -0
- package/dist/views/EmailTrackingView/index.js +29 -0
- package/dist/views/ImportConversationView/client.js +204 -0
- package/dist/views/ImportConversationView/index.js +29 -0
- package/dist/views/LogsView/client.js +148 -0
- package/dist/views/LogsView/index.js +27 -0
- package/dist/views/NewTicketView/client.js +224 -0
- package/dist/views/NewTicketView/index.js +27 -0
- package/dist/views/PendingEmailsView/client.js +172 -0
- package/dist/views/PendingEmailsView/index.js +29 -0
- package/dist/views/SupportDashboardView/client.js +296 -0
- package/dist/views/SupportDashboardView/index.js +29 -0
- package/dist/views/TicketDetailView/client.js +844 -0
- package/dist/views/TicketDetailView/index.js +29 -0
- package/dist/views/TicketInboxView/client.js +294 -0
- package/dist/views/TicketInboxView/index.js +27 -0
- package/dist/{views.css → views/TicketingSettingsView/TicketingSettings.module.scss} +138 -66
- package/dist/views/TicketingSettingsView/client.js +728 -0
- package/dist/views/TicketingSettingsView/index.js +29 -0
- package/dist/views/TimeDashboardView/client.js +164 -0
- package/dist/views/TimeDashboardView/index.js +29 -0
- package/dist/views/shared/AdminViewHeader.js +67 -0
- package/dist/views/shared/ErrorBoundary.js +50 -0
- package/dist/views/shared/Skeleton.js +72 -0
- package/dist/views/shared/adminTokens.js +32 -0
- package/dist/views/shared/config.js +41 -0
- package/dist/views/shared/index.js +6 -0
- package/package.json +8 -12
- package/src/collections/Tickets.ts +1 -1
- package/src/components/TicketConversation/index.tsx +21 -2
- package/src/plugin.ts +3 -2
- package/dist/views.cjs +0 -6172
- package/dist/views.d.cts +0 -30
- package/dist/views.d.ts +0 -30
- package/dist/views.js +0 -6153
- package/src/views.ts +0 -16
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function getDateLabel(dateStr) {
|
|
3
|
+
const date = new Date(dateStr);
|
|
4
|
+
const today = /* @__PURE__ */ new Date();
|
|
5
|
+
const yesterday = new Date(today);
|
|
6
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
7
|
+
if (date.toDateString() === today.toDateString()) return "Aujourd'hui";
|
|
8
|
+
if (date.toDateString() === yesterday.toDateString()) return "Hier";
|
|
9
|
+
return date.toLocaleDateString("fr-FR", { day: "numeric", month: "short", year: "numeric" });
|
|
10
|
+
}
|
|
11
|
+
function formatMessageDate(dateStr) {
|
|
12
|
+
const date = new Date(dateStr);
|
|
13
|
+
const today = /* @__PURE__ */ new Date();
|
|
14
|
+
const yesterday = new Date(today);
|
|
15
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
16
|
+
const time = date.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
17
|
+
if (date.toDateString() === today.toDateString()) return time;
|
|
18
|
+
if (date.toDateString() === yesterday.toDateString()) return `Hier, ${time}`;
|
|
19
|
+
if (date.getFullYear() === today.getFullYear()) {
|
|
20
|
+
return `${date.toLocaleDateString("fr-FR", { day: "numeric", month: "short" })}, ${time}`;
|
|
21
|
+
}
|
|
22
|
+
return `${date.toLocaleDateString("fr-FR", { day: "numeric", month: "short", year: "numeric" })}, ${time}`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { formatMessageDate, getDateLabel };
|
package/dist/index.cjs
CHANGED
|
@@ -5658,7 +5658,7 @@ function createTicketsCollection(slugs, options) {
|
|
|
5658
5658
|
type: "ui",
|
|
5659
5659
|
admin: {
|
|
5660
5660
|
components: {
|
|
5661
|
-
Field: options?.conversationComponent || "@consilioweb/payload-support/
|
|
5661
|
+
Field: options?.conversationComponent || "@consilioweb/payload-support/components/TicketConversation"
|
|
5662
5662
|
}
|
|
5663
5663
|
}
|
|
5664
5664
|
});
|
|
@@ -7657,7 +7657,7 @@ function supportPlugin(config) {
|
|
|
7657
7657
|
...config?.features
|
|
7658
7658
|
};
|
|
7659
7659
|
const bp = config?.basePath || "/support";
|
|
7660
|
-
const viewsBase = "@consilioweb/payload-support/
|
|
7660
|
+
const viewsBase = "@consilioweb/payload-support/views";
|
|
7661
7661
|
const slugs = resolveSlugs({
|
|
7662
7662
|
...config?.collectionSlugs,
|
|
7663
7663
|
users: config?.userCollectionSlug || "users"
|
package/dist/index.js
CHANGED
|
@@ -5652,7 +5652,7 @@ function createTicketsCollection(slugs, options) {
|
|
|
5652
5652
|
type: "ui",
|
|
5653
5653
|
admin: {
|
|
5654
5654
|
components: {
|
|
5655
|
-
Field: options?.conversationComponent || "@consilioweb/payload-support/
|
|
5655
|
+
Field: options?.conversationComponent || "@consilioweb/payload-support/components/TicketConversation"
|
|
5656
5656
|
}
|
|
5657
5657
|
}
|
|
5658
5658
|
});
|
|
@@ -7651,7 +7651,7 @@ function supportPlugin(config) {
|
|
|
7651
7651
|
...config?.features
|
|
7652
7652
|
};
|
|
7653
7653
|
const bp = config?.basePath || "/support";
|
|
7654
|
-
const viewsBase = "@consilioweb/payload-support/
|
|
7654
|
+
const viewsBase = "@consilioweb/payload-support/views";
|
|
7655
7655
|
const slugs = resolveSlugs({
|
|
7656
7656
|
...config?.collectionSlugs,
|
|
7657
7657
|
users: config?.userCollectionSlug || "users"
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
// BillingView — Clean admin aesthetic, 2026
|
|
2
|
+
|
|
3
|
+
.page {
|
|
4
|
+
max-width: 1920px;
|
|
5
|
+
margin: 0 auto;
|
|
6
|
+
padding: 20px 24px 60px;
|
|
7
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Header
|
|
11
|
+
.header {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
justify-content: space-between;
|
|
15
|
+
margin-bottom: 20px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.title {
|
|
19
|
+
font-size: 24px;
|
|
20
|
+
font-weight: 800;
|
|
21
|
+
color: var(--theme-text);
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.subtitle {
|
|
26
|
+
color: var(--theme-elevation-500);
|
|
27
|
+
margin: 4px 0 0;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Filters
|
|
32
|
+
.filters {
|
|
33
|
+
padding: 16px;
|
|
34
|
+
border: 1px solid var(--theme-elevation-300);
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
background: var(--theme-elevation-100);
|
|
37
|
+
margin-bottom: 20px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.quickPeriod {
|
|
41
|
+
display: flex;
|
|
42
|
+
gap: 8px;
|
|
43
|
+
margin-bottom: 12px;
|
|
44
|
+
flex-wrap: wrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.filterRow {
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: 12px;
|
|
50
|
+
align-items: flex-end;
|
|
51
|
+
flex-wrap: wrap;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.fieldGroup {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.label {
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
color: var(--theme-elevation-500);
|
|
63
|
+
margin-bottom: 4px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.input {
|
|
67
|
+
padding: 10px 12px;
|
|
68
|
+
border-radius: 8px;
|
|
69
|
+
border: 1px solid var(--theme-elevation-300);
|
|
70
|
+
font-size: 14px;
|
|
71
|
+
background: var(--theme-elevation-100);
|
|
72
|
+
color: var(--theme-text);
|
|
73
|
+
transition: border-color 150ms, box-shadow 150ms;
|
|
74
|
+
|
|
75
|
+
&:focus {
|
|
76
|
+
outline: none;
|
|
77
|
+
border-color: #2563eb;
|
|
78
|
+
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.select {
|
|
83
|
+
composes: input;
|
|
84
|
+
min-width: 180px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.rateRow {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: 4px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.rateInput {
|
|
94
|
+
composes: input;
|
|
95
|
+
width: 80px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.rateUnit {
|
|
99
|
+
font-weight: 700;
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
color: var(--theme-text);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Buttons
|
|
105
|
+
.btn {
|
|
106
|
+
padding: 8px 16px;
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
border: 1px solid var(--theme-elevation-300);
|
|
109
|
+
color: #fff;
|
|
110
|
+
font-weight: 600;
|
|
111
|
+
font-size: 13px;
|
|
112
|
+
cursor: pointer;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
transition: opacity 100ms, background-color 100ms;
|
|
115
|
+
|
|
116
|
+
&:hover { opacity: 0.9; }
|
|
117
|
+
&:disabled {
|
|
118
|
+
cursor: not-allowed;
|
|
119
|
+
opacity: 0.5;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.btnPrimary { composes: btn; background: #2563eb; }
|
|
124
|
+
.btnSecondary { composes: btn; background: var(--theme-elevation-100); color: var(--theme-text); }
|
|
125
|
+
.btnAmber { composes: btn; background: #d97706; }
|
|
126
|
+
.btnMuted { composes: btn; background: var(--theme-elevation-150); color: var(--theme-text); }
|
|
127
|
+
.btnGreen { composes: btn; background: #16a34a; }
|
|
128
|
+
.btnSuccess { composes: btn; background: #22c55e; }
|
|
129
|
+
|
|
130
|
+
// Empty state
|
|
131
|
+
.empty {
|
|
132
|
+
padding: 40px;
|
|
133
|
+
text-align: center;
|
|
134
|
+
border: 1px solid var(--theme-elevation-300);
|
|
135
|
+
border-radius: 8px;
|
|
136
|
+
background: var(--theme-elevation-100);
|
|
137
|
+
color: var(--theme-elevation-500);
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Project group card
|
|
142
|
+
.groupCard {
|
|
143
|
+
border: 1px solid var(--theme-elevation-300);
|
|
144
|
+
border-radius: 8px;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
margin-bottom: 16px;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.groupHeader {
|
|
150
|
+
padding: 12px 16px;
|
|
151
|
+
background: var(--theme-elevation-150);
|
|
152
|
+
border-bottom: 1px solid var(--theme-elevation-300);
|
|
153
|
+
display: flex;
|
|
154
|
+
justify-content: space-between;
|
|
155
|
+
align-items: center;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.groupName {
|
|
159
|
+
font-weight: 600;
|
|
160
|
+
font-size: 15px;
|
|
161
|
+
color: var(--theme-text);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.groupClient {
|
|
165
|
+
color: var(--theme-elevation-500);
|
|
166
|
+
margin-left: 10px;
|
|
167
|
+
font-size: 13px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.groupTotals {
|
|
171
|
+
text-align: right;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.groupDuration {
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
color: var(--theme-text);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.groupAmount {
|
|
181
|
+
font-weight: 600;
|
|
182
|
+
font-size: 15px;
|
|
183
|
+
color: var(--theme-text);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.groupAmountBilled {
|
|
187
|
+
composes: groupAmount;
|
|
188
|
+
color: #16a34a;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.groupAmountStrike {
|
|
192
|
+
font-size: 11px;
|
|
193
|
+
color: var(--theme-elevation-500);
|
|
194
|
+
text-decoration: line-through;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Table
|
|
198
|
+
.table {
|
|
199
|
+
width: 100%;
|
|
200
|
+
border-collapse: collapse;
|
|
201
|
+
font-size: 13px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.th {
|
|
205
|
+
padding: 8px 12px;
|
|
206
|
+
font-weight: 600;
|
|
207
|
+
font-size: 11px;
|
|
208
|
+
text-transform: uppercase;
|
|
209
|
+
letter-spacing: 0.5px;
|
|
210
|
+
text-align: center;
|
|
211
|
+
color: var(--theme-elevation-500);
|
|
212
|
+
background: var(--theme-elevation-50);
|
|
213
|
+
border-bottom: 1px solid var(--theme-elevation-300);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.thLeft { composes: th; text-align: left; }
|
|
217
|
+
.thCheckbox { composes: th; width: 40px; }
|
|
218
|
+
|
|
219
|
+
.td {
|
|
220
|
+
padding: 8px 12px;
|
|
221
|
+
text-align: center;
|
|
222
|
+
vertical-align: top;
|
|
223
|
+
color: var(--theme-text);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.tdLeft { composes: td; text-align: left; }
|
|
227
|
+
|
|
228
|
+
.tableRow {
|
|
229
|
+
border-bottom: 1px solid var(--theme-elevation-200);
|
|
230
|
+
transition: opacity 200ms, background-color 200ms;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.tableRowBilled {
|
|
234
|
+
composes: tableRow;
|
|
235
|
+
background: var(--theme-elevation-100);
|
|
236
|
+
opacity: 0.4;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.tableRowEven {
|
|
240
|
+
background: var(--theme-elevation-100);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.tableRowOdd {
|
|
244
|
+
background: var(--theme-elevation-50);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.checkbox {
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
width: 16px;
|
|
250
|
+
height: 16px;
|
|
251
|
+
accent-color: #2563eb;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.ticketLink {
|
|
255
|
+
color: var(--theme-text);
|
|
256
|
+
text-decoration: underline;
|
|
257
|
+
font-weight: 700;
|
|
258
|
+
|
|
259
|
+
&:hover { color: #2563eb; }
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.strikethrough {
|
|
263
|
+
text-decoration: line-through;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.bold {
|
|
267
|
+
font-weight: 700;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.secondary {
|
|
271
|
+
color: var(--theme-elevation-500);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.billedAmount {
|
|
275
|
+
font-weight: 700;
|
|
276
|
+
color: #16a34a;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
// Grand total
|
|
280
|
+
.grandTotal {
|
|
281
|
+
padding: 16px;
|
|
282
|
+
border: 1px solid var(--theme-elevation-300);
|
|
283
|
+
border-radius: 8px;
|
|
284
|
+
background: var(--theme-elevation-150);
|
|
285
|
+
display: flex;
|
|
286
|
+
justify-content: space-between;
|
|
287
|
+
align-items: center;
|
|
288
|
+
flex-wrap: wrap;
|
|
289
|
+
gap: 12px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.totalMeta {
|
|
293
|
+
font-size: 13px;
|
|
294
|
+
color: var(--theme-elevation-500);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.totalChecked {
|
|
298
|
+
margin-left: 8px;
|
|
299
|
+
color: #16a34a;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.totalAmount {
|
|
303
|
+
font-size: 20px;
|
|
304
|
+
font-weight: 600;
|
|
305
|
+
color: var(--theme-text);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.totalActions {
|
|
309
|
+
display: flex;
|
|
310
|
+
gap: 8px;
|
|
311
|
+
}
|