@escalated-dev/escalated 0.11.7 → 0.11.9
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/LICENSE +1 -1
- package/README.md +10 -1
- package/package.json +1 -1
- package/pages.json +1 -1
- package/src/components/AuditLogEntry.vue +15 -9
- package/src/components/ChatQueue.vue +1 -1
- package/src/components/EscalatedLayout.vue +224 -38
- package/src/components/PeriodSelector.vue +1 -1
- package/src/components/PermissionMatrix.vue +1 -1
- package/src/components/QuickFilters.vue +5 -2
- package/src/components/TicketList.vue +2 -2
- package/src/components/admin/newsletters/DeliveriesTable.vue +29 -27
- package/src/components/admin/newsletters/ListMemberTable.vue +30 -28
- package/src/pages/Admin/ApiTokens/Index.vue +1 -1
- package/src/pages/Admin/Automations/Form.vue +10 -2
- package/src/pages/Admin/Automations/Index.vue +1 -1
- package/src/pages/Admin/BusinessHours/Index.vue +1 -1
- package/src/pages/Admin/Capacity/Index.vue +1 -1
- package/src/pages/Admin/CustomFields/Index.vue +1 -1
- package/src/pages/Admin/CustomObjects/Index.vue +1 -1
- package/src/pages/Admin/CustomObjects/Records.vue +19 -12
- package/src/pages/Admin/Departments/Index.vue +1 -1
- package/src/pages/Admin/EscalationRules/Index.vue +1 -1
- package/src/pages/Admin/Import/Index.vue +1 -1
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +3 -3
- package/src/pages/Admin/Macros/Index.vue +1 -1
- package/src/pages/Admin/Newsletters/Index.vue +31 -29
- package/src/pages/Admin/Newsletters/Lists/Index.vue +22 -20
- package/src/pages/Admin/Reports/AgentMetrics.vue +1 -1
- package/src/pages/Admin/Reports/AgentRanking.vue +3 -3
- package/src/pages/Admin/Reports/Cohorts.vue +7 -5
- package/src/pages/Admin/Reports/Comparison.vue +3 -3
- package/src/pages/Admin/Reports/Dashboard.vue +7 -5
- package/src/pages/Admin/Reports/ResolutionTimes.vue +54 -46
- package/src/pages/Admin/Reports/ResponseTimes.vue +54 -46
- package/src/pages/Admin/Reports/SlaReport.vue +70 -68
- package/src/pages/Admin/Reports/SlaTrends.vue +2 -2
- package/src/pages/Admin/Reports.vue +1 -1
- package/src/pages/Admin/Roles/Index.vue +1 -1
- package/src/pages/Admin/Settings/EmailSettings.vue +1 -1
- package/src/pages/Admin/Skills/Index.vue +1 -1
- package/src/pages/Admin/SlaPolicies/Index.vue +1 -1
- package/src/pages/Admin/Statuses/Index.vue +1 -1
- package/src/pages/Admin/Tags/Index.vue +1 -1
- package/src/pages/Admin/Users/Index.vue +1 -1
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +1 -1
- package/src/pages/Admin/Webhooks/Index.vue +1 -1
- package/src/pages/Admin/Workflows/Index.vue +1 -1
- package/src/pages/Admin/Workflows/Logs.vue +1 -1
- package/src/pages/Agent/Dashboard.vue +1 -1
- package/src/plugin.js +19 -0
- package/src/utils/scrollAffordance.js +87 -0
|
@@ -11,33 +11,35 @@
|
|
|
11
11
|
</select>
|
|
12
12
|
<button type="button" class="deliveries-table__export" @click="$emit('export')">Export CSV</button>
|
|
13
13
|
</div>
|
|
14
|
-
<table>
|
|
15
|
-
<
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
<
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
14
|
+
<div class="esc-table-scroll">
|
|
15
|
+
<table>
|
|
16
|
+
<thead>
|
|
17
|
+
<tr>
|
|
18
|
+
<th>Contact</th>
|
|
19
|
+
<th>Status</th>
|
|
20
|
+
<th>Sent</th>
|
|
21
|
+
<th>Opened</th>
|
|
22
|
+
<th>Last clicked</th>
|
|
23
|
+
<th>Bounce reason</th>
|
|
24
|
+
</tr>
|
|
25
|
+
</thead>
|
|
26
|
+
<tbody>
|
|
27
|
+
<tr v-for="row in rows" :key="row.id">
|
|
28
|
+
<td>
|
|
29
|
+
<div>{{ row.contact.name ?? '—' }}</div>
|
|
30
|
+
<div class="deliveries-table__email">{{ row.contact.email }}</div>
|
|
31
|
+
</td>
|
|
32
|
+
<td>
|
|
33
|
+
<span :class="`status status--${row.status}`">{{ row.status }}</span>
|
|
34
|
+
</td>
|
|
35
|
+
<td>{{ row.sent_at ? new Date(row.sent_at).toLocaleString() : '—' }}</td>
|
|
36
|
+
<td>{{ row.opened_at ? new Date(row.opened_at).toLocaleString() : '—' }}</td>
|
|
37
|
+
<td>{{ row.last_clicked_at ? new Date(row.last_clicked_at).toLocaleString() : '—' }}</td>
|
|
38
|
+
<td>{{ row.bounce_reason ?? '—' }}</td>
|
|
39
|
+
</tr>
|
|
40
|
+
</tbody>
|
|
41
|
+
</table>
|
|
42
|
+
</div>
|
|
41
43
|
</div>
|
|
42
44
|
</template>
|
|
43
45
|
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
<div class="esc-table-scroll">
|
|
3
|
+
<table class="list-member-table">
|
|
4
|
+
<thead>
|
|
5
|
+
<tr>
|
|
6
|
+
<th>Contact</th>
|
|
7
|
+
<th>Added</th>
|
|
8
|
+
<th></th>
|
|
9
|
+
</tr>
|
|
10
|
+
</thead>
|
|
11
|
+
<tbody>
|
|
12
|
+
<tr v-for="m in members" :key="m.id">
|
|
13
|
+
<td>
|
|
14
|
+
<div>{{ m.contact.name ?? '—' }}</div>
|
|
15
|
+
<div class="list-member-table__email">{{ m.contact.email }}</div>
|
|
16
|
+
</td>
|
|
17
|
+
<td>{{ new Date(m.added_at).toLocaleDateString() }}</td>
|
|
18
|
+
<td>
|
|
19
|
+
<button
|
|
20
|
+
type="button"
|
|
21
|
+
data-action="remove"
|
|
22
|
+
:data-contact-id="m.contact.id"
|
|
23
|
+
@click="$emit('remove', m.contact.id)"
|
|
24
|
+
>
|
|
25
|
+
Remove
|
|
26
|
+
</button>
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
30
32
|
</template>
|
|
31
33
|
|
|
32
34
|
<script setup>
|
|
@@ -287,7 +287,7 @@ function formatDate(iso) {
|
|
|
287
287
|
<!-- Tokens table -->
|
|
288
288
|
<div
|
|
289
289
|
:class="dark ? 'border-[var(--esc-panel-border)]' : 'border-gray-200'"
|
|
290
|
-
class="
|
|
290
|
+
class="esc-table-scroll rounded-lg border"
|
|
291
291
|
>
|
|
292
292
|
<table class="w-full text-sm">
|
|
293
293
|
<thead
|
|
@@ -156,7 +156,11 @@ function submit() {
|
|
|
156
156
|
</button>
|
|
157
157
|
</div>
|
|
158
158
|
|
|
159
|
-
<div
|
|
159
|
+
<div
|
|
160
|
+
v-for="(condition, i) in form.conditions"
|
|
161
|
+
:key="`condition-${i}`"
|
|
162
|
+
class="mb-2 flex flex-col gap-2 sm:flex-row"
|
|
163
|
+
>
|
|
160
164
|
<select
|
|
161
165
|
v-model="condition.field"
|
|
162
166
|
:aria-label="`Condition ${i + 1} field`"
|
|
@@ -227,7 +231,11 @@ function submit() {
|
|
|
227
231
|
</button>
|
|
228
232
|
</div>
|
|
229
233
|
|
|
230
|
-
<div
|
|
234
|
+
<div
|
|
235
|
+
v-for="(action, i) in form.actions"
|
|
236
|
+
:key="`action-${i}`"
|
|
237
|
+
class="mb-2 flex flex-col gap-2 sm:flex-row"
|
|
238
|
+
>
|
|
231
239
|
<select
|
|
232
240
|
v-model="action.type"
|
|
233
241
|
:aria-label="`Action ${i + 1} type`"
|
|
@@ -93,7 +93,7 @@ function actionSummary(action) {
|
|
|
93
93
|
</Link>
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
|
-
<div class="
|
|
96
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
97
97
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
98
98
|
<thead>
|
|
99
99
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -21,7 +21,7 @@ function destroy(id) {
|
|
|
21
21
|
Add Schedule
|
|
22
22
|
</Link>
|
|
23
23
|
</div>
|
|
24
|
-
<div class="
|
|
24
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
25
25
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
26
26
|
<thead>
|
|
27
27
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -26,7 +26,7 @@ function saveEdit(id) {
|
|
|
26
26
|
|
|
27
27
|
<template>
|
|
28
28
|
<EscalatedLayout title="Agent Capacity">
|
|
29
|
-
<div class="
|
|
29
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
30
30
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
31
31
|
<thead>
|
|
32
32
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -31,7 +31,7 @@ function destroy(id) {
|
|
|
31
31
|
Add Field
|
|
32
32
|
</Link>
|
|
33
33
|
</div>
|
|
34
|
-
<div class="
|
|
34
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
35
35
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
36
36
|
<thead>
|
|
37
37
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -31,7 +31,7 @@ function deleteObject(obj) {
|
|
|
31
31
|
</Link>
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<div v-if="objects.length" class="
|
|
34
|
+
<div v-if="objects.length" class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
35
35
|
<table class="w-full">
|
|
36
36
|
<thead>
|
|
37
37
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -12,20 +12,27 @@ const fields = computed(() => props.object.fields_schema || []);
|
|
|
12
12
|
const editingId = ref(null);
|
|
13
13
|
const showAddForm = ref(false);
|
|
14
14
|
|
|
15
|
+
// The record's field values travel as `data`, which is what every backend
|
|
16
|
+
// validates. They cannot live under that name on the form itself: `data()` is
|
|
17
|
+
// one of useForm's own methods, Inertia refuses the field (and logs an error),
|
|
18
|
+
// and assigning to it replaced the method the form submits with. They are kept
|
|
19
|
+
// as `values` and renamed on the way out.
|
|
20
|
+
const toRecordBody = (form) => ({ data: form.values });
|
|
21
|
+
|
|
15
22
|
const newRecordForm = useForm({
|
|
16
|
-
|
|
17
|
-
});
|
|
23
|
+
values: {},
|
|
24
|
+
}).transform(toRecordBody);
|
|
18
25
|
|
|
19
26
|
const editForm = useForm({
|
|
20
|
-
|
|
21
|
-
});
|
|
27
|
+
values: {},
|
|
28
|
+
}).transform(toRecordBody);
|
|
22
29
|
|
|
23
30
|
function startAdd() {
|
|
24
31
|
const data = {};
|
|
25
32
|
fields.value.forEach((f) => {
|
|
26
33
|
data[f.name] = '';
|
|
27
34
|
});
|
|
28
|
-
newRecordForm.
|
|
35
|
+
newRecordForm.values = data;
|
|
29
36
|
showAddForm.value = true;
|
|
30
37
|
}
|
|
31
38
|
|
|
@@ -41,7 +48,7 @@ function addRecord() {
|
|
|
41
48
|
|
|
42
49
|
function startEdit(record) {
|
|
43
50
|
editingId.value = record.id;
|
|
44
|
-
editForm.
|
|
51
|
+
editForm.values = { ...(record.data || {}) };
|
|
45
52
|
}
|
|
46
53
|
|
|
47
54
|
function saveEdit(record) {
|
|
@@ -96,7 +103,7 @@ function deleteRecord(record) {
|
|
|
96
103
|
</label>
|
|
97
104
|
<select
|
|
98
105
|
v-if="field.type === 'select'"
|
|
99
|
-
v-model="newRecordForm.
|
|
106
|
+
v-model="newRecordForm.values[field.name]"
|
|
100
107
|
class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
101
108
|
>
|
|
102
109
|
<option value="">Select...</option>
|
|
@@ -104,19 +111,19 @@ function deleteRecord(record) {
|
|
|
104
111
|
</select>
|
|
105
112
|
<input
|
|
106
113
|
v-else-if="field.type === 'date'"
|
|
107
|
-
v-model="newRecordForm.
|
|
114
|
+
v-model="newRecordForm.values[field.name]"
|
|
108
115
|
type="date"
|
|
109
116
|
class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
110
117
|
/>
|
|
111
118
|
<input
|
|
112
119
|
v-else-if="field.type === 'number'"
|
|
113
|
-
v-model="newRecordForm.
|
|
120
|
+
v-model="newRecordForm.values[field.name]"
|
|
114
121
|
type="number"
|
|
115
122
|
class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
116
123
|
/>
|
|
117
124
|
<input
|
|
118
125
|
v-else
|
|
119
|
-
v-model="newRecordForm.
|
|
126
|
+
v-model="newRecordForm.values[field.name]"
|
|
120
127
|
type="text"
|
|
121
128
|
class="mt-1 w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
122
129
|
/>
|
|
@@ -141,7 +148,7 @@ function deleteRecord(record) {
|
|
|
141
148
|
</div>
|
|
142
149
|
|
|
143
150
|
<!-- Records Table -->
|
|
144
|
-
<div v-if="records.length" class="
|
|
151
|
+
<div v-if="records.length" class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
145
152
|
<table class="w-full">
|
|
146
153
|
<thead>
|
|
147
154
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -171,7 +178,7 @@ function deleteRecord(record) {
|
|
|
171
178
|
<!-- Edit mode -->
|
|
172
179
|
<template v-if="editingId === record.id">
|
|
173
180
|
<input
|
|
174
|
-
v-model="editForm.
|
|
181
|
+
v-model="editForm.values[field.name]"
|
|
175
182
|
:type="field.type === 'number' ? 'number' : field.type === 'date' ? 'date' : 'text'"
|
|
176
183
|
class="w-full rounded border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] px-2 py-1 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
|
|
177
184
|
/>
|
|
@@ -21,7 +21,7 @@ function destroy(id) {
|
|
|
21
21
|
Add Department
|
|
22
22
|
</Link>
|
|
23
23
|
</div>
|
|
24
|
-
<div class="
|
|
24
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
25
25
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
26
26
|
<thead>
|
|
27
27
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -107,7 +107,7 @@ function toggleCategory(cat) {
|
|
|
107
107
|
|
|
108
108
|
<div
|
|
109
109
|
v-if="!collapsedCategories[category]"
|
|
110
|
-
class="
|
|
110
|
+
class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]"
|
|
111
111
|
>
|
|
112
112
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
113
113
|
<thead>
|
|
@@ -60,7 +60,7 @@ const statusColors = {
|
|
|
60
60
|
<!-- Import history -->
|
|
61
61
|
<div v-if="jobs.length">
|
|
62
62
|
<h3 class="mb-3 text-sm font-semibold text-[var(--esc-panel-text)]">Import History</h3>
|
|
63
|
-
<div class="
|
|
63
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
64
64
|
<table class="w-full text-sm">
|
|
65
65
|
<thead class="bg-[var(--esc-panel-surface-alt)]">
|
|
66
66
|
<tr>
|
|
@@ -46,8 +46,8 @@ const statusColors = {
|
|
|
46
46
|
|
|
47
47
|
<template>
|
|
48
48
|
<EscalatedLayout title="Knowledge Base — Articles">
|
|
49
|
-
<div class="mb-6 flex items-center justify-between">
|
|
50
|
-
<div class="flex items-center gap-3">
|
|
49
|
+
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
|
|
50
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
51
51
|
<input
|
|
52
52
|
v-model="search"
|
|
53
53
|
type="text"
|
|
@@ -78,7 +78,7 @@ const statusColors = {
|
|
|
78
78
|
</Link>
|
|
79
79
|
</div>
|
|
80
80
|
|
|
81
|
-
<div class="
|
|
81
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
82
82
|
<table class="w-full">
|
|
83
83
|
<thead>
|
|
84
84
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -339,7 +339,7 @@ const selectClass =
|
|
|
339
339
|
</form>
|
|
340
340
|
|
|
341
341
|
<!-- Macros table -->
|
|
342
|
-
<div class="
|
|
342
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
343
343
|
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
344
344
|
<thead>
|
|
345
345
|
<tr class="bg-[var(--esc-panel-hover)]">
|
|
@@ -17,35 +17,37 @@
|
|
|
17
17
|
{{ $t(`newsletters.index.tabs.${tabItem.key}`) }}
|
|
18
18
|
</Link>
|
|
19
19
|
</nav>
|
|
20
|
-
<table>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
20
|
+
<div class="esc-table-scroll">
|
|
21
|
+
<table>
|
|
22
|
+
<thead>
|
|
23
|
+
<tr>
|
|
24
|
+
<th>{{ $t('newsletters.index.columns.subject') }}</th>
|
|
25
|
+
<th>{{ $t('newsletters.index.columns.list') }}</th>
|
|
26
|
+
<th>{{ $t('newsletters.index.columns.status') }}</th>
|
|
27
|
+
<th>{{ $t('newsletters.index.columns.scheduled') }}</th>
|
|
28
|
+
<th>{{ $t('newsletters.index.columns.sent') }}</th>
|
|
29
|
+
<th>{{ $t('newsletters.index.columns.recipients') }}</th>
|
|
30
|
+
</tr>
|
|
31
|
+
</thead>
|
|
32
|
+
<tbody>
|
|
33
|
+
<tr v-if="!filtered.length">
|
|
34
|
+
<td colspan="6" class="empty">{{ emptyMessage }}</td>
|
|
35
|
+
</tr>
|
|
36
|
+
<tr v-for="n in filtered" :key="n.id">
|
|
37
|
+
<td>
|
|
38
|
+
<Link :href="`/admin/newsletters/${n.id}`">{{ n.subject }}</Link>
|
|
39
|
+
</td>
|
|
40
|
+
<td>{{ n.target_list.name }}</td>
|
|
41
|
+
<td>
|
|
42
|
+
<span :class="`status status--${n.status}`">{{ n.status }}</span>
|
|
43
|
+
</td>
|
|
44
|
+
<td>{{ n.scheduled_at ? new Date(n.scheduled_at).toLocaleString() : '—' }}</td>
|
|
45
|
+
<td>{{ n.sent_at ? new Date(n.sent_at).toLocaleString() : '—' }}</td>
|
|
46
|
+
<td>{{ n.summary_total ?? '—' }}</td>
|
|
47
|
+
</tr>
|
|
48
|
+
</tbody>
|
|
49
|
+
</table>
|
|
50
|
+
</div>
|
|
49
51
|
</div>
|
|
50
52
|
</EscalatedLayout>
|
|
51
53
|
</template>
|
|
@@ -7,26 +7,28 @@
|
|
|
7
7
|
{{ $t('newsletters.lists.new') }}
|
|
8
8
|
</Link>
|
|
9
9
|
</header>
|
|
10
|
-
<table>
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
<
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
<div class="esc-table-scroll">
|
|
11
|
+
<table>
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>{{ $t('newsletters.lists.columns.name') }}</th>
|
|
15
|
+
<th>{{ $t('newsletters.lists.columns.kind') }}</th>
|
|
16
|
+
<th>{{ $t('newsletters.lists.columns.members') }}</th>
|
|
17
|
+
<th>{{ $t('newsletters.lists.columns.opted_out') }}</th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr v-for="l in lists" :key="l.id">
|
|
22
|
+
<td>
|
|
23
|
+
<Link :href="`/admin/newsletters/lists/${l.id}`">{{ l.name }}</Link>
|
|
24
|
+
</td>
|
|
25
|
+
<td>{{ l.kind }}</td>
|
|
26
|
+
<td>{{ l.member_count }}</td>
|
|
27
|
+
<td>{{ l.opted_out_count }}</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
30
32
|
</div>
|
|
31
33
|
</EscalatedLayout>
|
|
32
34
|
</template>
|
|
@@ -40,7 +40,7 @@ function changePeriod(days) {
|
|
|
40
40
|
</div>
|
|
41
41
|
|
|
42
42
|
<!-- Agent Table -->
|
|
43
|
-
<div class="mb-8
|
|
43
|
+
<div class="mb-8 esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
44
44
|
<table class="w-full">
|
|
45
45
|
<thead>
|
|
46
46
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -67,9 +67,9 @@ function renderSparkline(points) {
|
|
|
67
67
|
|
|
68
68
|
<template>
|
|
69
69
|
<EscalatedLayout title="Agent Performance Rankings">
|
|
70
|
-
<div class="mb-6 flex items-center justify-between">
|
|
70
|
+
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
|
|
71
71
|
<PeriodSelector :model-value="periodDays" @update:model-value="changePeriod" />
|
|
72
|
-
<div class="flex items-center gap-3">
|
|
72
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
73
73
|
<ReportExportButton report-name="agent-ranking" :period-days="periodDays" />
|
|
74
74
|
<Link
|
|
75
75
|
:href="route('escalated.admin.reports')"
|
|
@@ -141,7 +141,7 @@ function renderSparkline(points) {
|
|
|
141
141
|
</div>
|
|
142
142
|
|
|
143
143
|
<!-- Ranked Table -->
|
|
144
|
-
<div class="
|
|
144
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
145
145
|
<table class="w-full">
|
|
146
146
|
<thead>
|
|
147
147
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -73,9 +73,9 @@ function toggleSort(col) {
|
|
|
73
73
|
|
|
74
74
|
<template>
|
|
75
75
|
<EscalatedLayout title="Cohort Analysis">
|
|
76
|
-
<div class="mb-6 flex items-center justify-between">
|
|
76
|
+
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
|
|
77
77
|
<PeriodSelector :model-value="periodDays" @update:model-value="changePeriod" />
|
|
78
|
-
<div class="flex items-center gap-3">
|
|
78
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
79
79
|
<ReportExportButton report-name="cohorts" :period-days="periodDays" />
|
|
80
80
|
<Link
|
|
81
81
|
:href="route('escalated.admin.reports')"
|
|
@@ -87,12 +87,14 @@ function toggleSort(col) {
|
|
|
87
87
|
</div>
|
|
88
88
|
|
|
89
89
|
<!-- Tab Selector -->
|
|
90
|
-
<div
|
|
90
|
+
<div
|
|
91
|
+
class="mb-6 flex gap-1 overflow-x-auto rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] p-1"
|
|
92
|
+
>
|
|
91
93
|
<button
|
|
92
94
|
v-for="tab in tabs"
|
|
93
95
|
:key="tab.key"
|
|
94
96
|
:class="[
|
|
95
|
-
'rounded-md px-4 py-2 text-sm font-medium transition-all',
|
|
97
|
+
'shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition-all',
|
|
96
98
|
activeTab === tab.key
|
|
97
99
|
? 'bg-[var(--esc-panel-active)] text-[var(--esc-panel-text)]'
|
|
98
100
|
: 'text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]',
|
|
@@ -114,7 +116,7 @@ function toggleSort(col) {
|
|
|
114
116
|
</div>
|
|
115
117
|
|
|
116
118
|
<!-- Cohort Table -->
|
|
117
|
-
<div class="
|
|
119
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
118
120
|
<table class="w-full">
|
|
119
121
|
<thead>
|
|
120
122
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|
|
@@ -61,9 +61,9 @@ const overlayPreviousData = computed(() => {
|
|
|
61
61
|
|
|
62
62
|
<template>
|
|
63
63
|
<EscalatedLayout title="Period Comparison">
|
|
64
|
-
<div class="mb-6 flex items-center justify-between">
|
|
64
|
+
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
|
|
65
65
|
<PeriodSelector :model-value="periodDays" @update:model-value="changePeriod" />
|
|
66
|
-
<div class="flex items-center gap-3">
|
|
66
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
67
67
|
<ReportExportButton report-name="comparison" :period-days="periodDays" />
|
|
68
68
|
<Link
|
|
69
69
|
:href="route('escalated.admin.reports')"
|
|
@@ -75,7 +75,7 @@ const overlayPreviousData = computed(() => {
|
|
|
75
75
|
</div>
|
|
76
76
|
|
|
77
77
|
<!-- Period Labels -->
|
|
78
|
-
<div class="mb-6 flex items-center gap-4">
|
|
78
|
+
<div class="mb-6 flex flex-wrap items-center gap-4">
|
|
79
79
|
<div class="flex items-center gap-2">
|
|
80
80
|
<span class="inline-block h-3 w-3 rounded-full bg-cyan-500"></span>
|
|
81
81
|
<span class="text-sm font-medium text-[var(--esc-panel-text-secondary)]"
|
|
@@ -45,9 +45,9 @@ function changePeriod(days) {
|
|
|
45
45
|
<template>
|
|
46
46
|
<EscalatedLayout title="Reports Dashboard">
|
|
47
47
|
<!-- Period selector & export -->
|
|
48
|
-
<div class="mb-6 flex items-center justify-between">
|
|
48
|
+
<div class="mb-6 flex flex-wrap items-center justify-between gap-3">
|
|
49
49
|
<PeriodSelector :model-value="period_days" @update:model-value="changePeriod" />
|
|
50
|
-
<div class="flex items-center gap-3">
|
|
50
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
51
51
|
<ReportExportButton report-name="dashboard" :period-days="period_days" />
|
|
52
52
|
<Link
|
|
53
53
|
:href="route('escalated.admin.reports')"
|
|
@@ -59,12 +59,14 @@ function changePeriod(days) {
|
|
|
59
59
|
</div>
|
|
60
60
|
|
|
61
61
|
<!-- Tabs -->
|
|
62
|
-
<div
|
|
62
|
+
<div
|
|
63
|
+
class="mb-6 flex gap-1 overflow-x-auto rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] p-1"
|
|
64
|
+
>
|
|
63
65
|
<button
|
|
64
66
|
v-for="tab in tabs"
|
|
65
67
|
:key="tab.key"
|
|
66
68
|
:class="[
|
|
67
|
-
'rounded-md px-4 py-2 text-sm font-medium transition-all',
|
|
69
|
+
'shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-sm font-medium transition-all',
|
|
68
70
|
activeTab === tab.key
|
|
69
71
|
? 'bg-[var(--esc-panel-active)] text-[var(--esc-panel-text)]'
|
|
70
72
|
: 'text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]',
|
|
@@ -119,7 +121,7 @@ function changePeriod(days) {
|
|
|
119
121
|
Full Agent Report →
|
|
120
122
|
</Link>
|
|
121
123
|
</div>
|
|
122
|
-
<div class="
|
|
124
|
+
<div class="esc-table-scroll rounded-xl border border-[var(--esc-panel-border)]">
|
|
123
125
|
<table class="w-full">
|
|
124
126
|
<thead>
|
|
125
127
|
<tr class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)]">
|