@escalated-dev/escalated 0.7.0 → 0.8.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/LICENSE +21 -21
- package/README.md +36 -1
- package/package.json +16 -7
- package/src/components/ActiveChatsPanel.vue +246 -0
- package/src/components/ActivityTimeline.stories.js +55 -55
- package/src/components/ActivityTimeline.vue +83 -83
- package/src/components/AdminDashboard.stories.js +1423 -1095
- package/src/components/AgentLoadIndicator.stories.js +37 -37
- package/src/components/AgentLoadIndicator.vue +49 -49
- package/src/components/AgentPerformanceCard.vue +44 -44
- package/src/components/ArticleEditor.vue +82 -82
- package/src/components/AssigneeSelect.vue +37 -37
- package/src/components/AttachmentList.vue +13 -1
- package/src/components/AuditLogEntry.vue +95 -95
- package/src/components/BulkActionBar.vue +166 -166
- package/src/components/CategoryTree.vue +89 -89
- package/src/components/ChartWidget.vue +46 -46
- package/src/components/ChatActionBar.vue +226 -0
- package/src/components/ChatBubble.vue +162 -0
- package/src/components/ChatComposer.vue +308 -0
- package/src/components/ChatQueue.vue +222 -0
- package/src/components/ChatThread.vue +197 -0
- package/src/components/CollisionWarning.stories.js +30 -30
- package/src/components/CollisionWarning.vue +68 -68
- package/src/components/ConditionalFieldRules.vue +135 -135
- package/src/components/ContextPanel.vue +66 -66
- package/src/components/ContextPanelSection.vue +65 -65
- package/src/components/CustomFieldRenderer.vue +159 -159
- package/src/components/EscalatedLayout.vue +35 -6
- package/src/components/FileDropzone.vue +57 -57
- package/src/components/FollowButton.stories.js +30 -30
- package/src/components/FollowButton.vue +88 -88
- package/src/components/KeyboardShortcutHelp.vue +213 -213
- package/src/components/KnowledgePanel.vue +122 -122
- package/src/components/KpiCard.stories.js +32 -32
- package/src/components/KpiCard.vue +88 -88
- package/src/components/MacroDropdown.vue +150 -150
- package/src/components/MentionDropdown.vue +154 -0
- package/src/components/MetricComparison.vue +89 -0
- package/src/components/PercentileChart.vue +67 -0
- package/src/components/PeriodSelector.vue +98 -0
- package/src/components/PermissionMatrix.vue +107 -107
- package/src/components/PinnedNotes.vue +129 -129
- package/src/components/PluginSlot.vue +68 -62
- package/src/components/PresenceIndicator.vue +46 -2
- package/src/components/PriorityBadge.stories.js +33 -33
- package/src/components/PriorityBadge.vue +46 -46
- package/src/components/ReplyComposer.vue +81 -18
- package/src/components/ReplyThread.vue +40 -2
- package/src/components/ReportChart.vue +395 -0
- package/src/components/ReportExportButton.vue +108 -0
- package/src/components/SatisfactionRating.vue +180 -180
- package/src/components/SaveViewDialog.vue +172 -0
- package/src/components/SavedViewSidebar.vue +208 -0
- package/src/components/ScheduleEditor.vue +104 -104
- package/src/components/SideConversation.vue +165 -165
- package/src/components/SideConversationList.vue +147 -147
- package/src/components/SkillTagManager.vue +83 -79
- package/src/components/SlaComplianceChart.vue +46 -53
- package/src/components/SlaTimer.stories.js +35 -35
- package/src/components/SlaTimer.vue +62 -62
- package/src/components/SnoozeButton.vue +247 -0
- package/src/components/StatsCard.stories.js +24 -24
- package/src/components/StatsCard.vue +58 -58
- package/src/components/StatusBadge.stories.js +53 -53
- package/src/components/StatusBadge.vue +78 -78
- package/src/components/TagSelect.vue +84 -84
- package/src/components/TicketFilters.vue +270 -225
- package/src/components/TicketLinkPanel.vue +193 -193
- package/src/components/TicketList.vue +655 -594
- package/src/components/TicketMergeDialog.vue +157 -157
- package/src/components/TicketSplitDialog.vue +98 -0
- package/src/components/TotpInput.stories.js +9 -9
- package/src/components/TotpInput.vue +81 -81
- package/src/components/TwoFactorSetup.vue +113 -113
- package/src/components/VariableTokenInput.vue +111 -0
- package/src/components/WorkflowActionConfig.vue +287 -0
- package/src/components/WorkflowActionList.vue +350 -0
- package/src/components/WorkflowConditionBuilder.vue +265 -0
- package/src/components/WorkflowTriggerSelector.vue +125 -0
- package/src/composables/useChat.js +187 -0
- package/src/composables/useI18n.js +30 -8
- package/src/composables/useKeyboardShortcuts.js +46 -46
- package/src/composables/useMentions.js +134 -0
- package/src/composables/usePluginExtensions.js +159 -159
- package/src/composables/usePluginHooks.js +65 -65
- package/src/composables/useRealtime.js +182 -0
- package/src/defineEscalatedPlugin.js +76 -76
- package/src/index.js +84 -72
- package/src/locales/README.md +13 -0
- package/src/locales/ar.json +727 -0
- package/src/locales/de.json +678 -430
- package/src/locales/en.json +717 -455
- package/src/locales/es.json +679 -430
- package/src/locales/fr.json +680 -431
- package/src/locales/index.js +12 -2
- package/src/locales/it.json +727 -0
- package/src/locales/ja.json +727 -0
- package/src/locales/ko.json +727 -0
- package/src/locales/nl.json +727 -0
- package/src/locales/pl.json +727 -0
- package/src/locales/pt-BR.json +727 -0
- package/src/locales/ru.json +727 -0
- package/src/locales/tr.json +727 -0
- package/src/locales/zh-CN.json +727 -0
- package/src/pages/Admin/ApiTokens/Index.vue +381 -381
- package/src/pages/Admin/AuditLog/Index.vue +154 -154
- package/src/pages/Admin/BusinessHours/Form.vue +172 -172
- package/src/pages/Admin/BusinessHours/Index.vue +113 -113
- package/src/pages/Admin/CannedResponses/Index.vue +127 -127
- package/src/pages/Admin/Capacity/Index.vue +134 -134
- package/src/pages/Admin/CustomFields/Form.vue +195 -195
- package/src/pages/Admin/CustomFields/Index.vue +134 -134
- package/src/pages/Admin/CustomObjects/Form.vue +202 -202
- package/src/pages/Admin/CustomObjects/Index.vue +127 -127
- package/src/pages/Admin/CustomObjects/Records.vue +228 -228
- package/src/pages/Admin/Departments/Form.vue +75 -75
- package/src/pages/Admin/Departments/Index.vue +110 -109
- package/src/pages/Admin/EscalationRules/Form.vue +157 -157
- package/src/pages/Admin/EscalationRules/Index.vue +178 -178
- package/src/pages/Admin/Import/Connect.vue +0 -1
- package/src/pages/Admin/Import/Index.vue +1 -1
- package/src/pages/Admin/Import/Progress.vue +1 -1
- package/src/pages/Admin/KnowledgeBase/Articles/Form.vue +142 -142
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +195 -195
- package/src/pages/Admin/KnowledgeBase/Categories/Index.vue +193 -193
- package/src/pages/Admin/Macros/Index.vue +448 -448
- package/src/pages/Admin/Plugins/Index.vue +327 -327
- package/src/pages/Admin/Reports/AgentDetail.vue +132 -0
- package/src/pages/Admin/Reports/AgentMetrics.vue +115 -115
- package/src/pages/Admin/Reports/AgentRanking.vue +246 -0
- package/src/pages/Admin/Reports/Cohorts.vue +180 -0
- package/src/pages/Admin/Reports/Comparison.vue +141 -0
- package/src/pages/Admin/Reports/CsatReport.vue +127 -127
- package/src/pages/Admin/Reports/Dashboard.vue +36 -21
- package/src/pages/Admin/Reports/ResolutionTimes.vue +164 -0
- package/src/pages/Admin/Reports/ResponseTimes.vue +164 -0
- package/src/pages/Admin/Reports/SlaReport.vue +162 -166
- package/src/pages/Admin/Reports/SlaTrends.vue +183 -0
- package/src/pages/Admin/Reports.vue +206 -206
- package/src/pages/Admin/Roles/Form.vue +71 -71
- package/src/pages/Admin/Roles/Index.vue +122 -122
- package/src/pages/Admin/Settings/CsatSettings.vue +165 -165
- package/src/pages/Admin/Settings/DataRetention.vue +182 -182
- package/src/pages/Admin/Settings/EmailSettings.vue +243 -243
- package/src/pages/Admin/Settings/Sandbox.vue +135 -135
- package/src/pages/Admin/Settings/SsoSettings.vue +218 -218
- package/src/pages/Admin/Settings/TwoFactor.vue +110 -110
- package/src/pages/Admin/Settings.vue +1008 -468
- package/src/pages/Admin/Skills/Form.vue +193 -53
- package/src/pages/Admin/Skills/Index.vue +105 -94
- package/src/pages/Admin/SlaPolicies/Form.vue +118 -118
- package/src/pages/Admin/SlaPolicies/Index.vue +121 -120
- package/src/pages/Admin/Statuses/Form.vue +114 -114
- package/src/pages/Admin/Statuses/Index.vue +153 -153
- package/src/pages/Admin/Tags/Index.vue +191 -191
- package/src/pages/Admin/Tickets/Index.vue +126 -91
- package/src/pages/Admin/Tickets/Show.vue +29 -0
- package/src/pages/Admin/Users/Index.vue +145 -0
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +120 -120
- package/src/pages/Admin/Webhooks/Form.vue +110 -110
- package/src/pages/Admin/Webhooks/Index.vue +136 -136
- package/src/pages/Admin/Workflows/Builder.vue +207 -0
- package/src/pages/Admin/Workflows/Index.vue +235 -0
- package/src/pages/Admin/Workflows/Logs.vue +286 -0
- package/src/pages/Agent/TicketIndex.vue +112 -88
- package/src/pages/Agent/TicketShow.vue +192 -60
- package/src/pages/Customer/Create.vue +1 -1
- package/src/pages/Customer/Index.vue +26 -1
- package/src/pages/Customer/KnowledgeBase/Article.vue +4 -2
- package/src/pages/Customer/KnowledgeBase/Index.vue +151 -151
- package/src/pages/Customer/Show.vue +69 -63
- package/src/pages/Guest/Create.vue +40 -15
- package/src/pages/Guest/Show.vue +124 -93
- package/src/plugin.js +26 -1
- package/src/utils/mentionHighlight.js +24 -0
- package/src/utils/sanitizeHtml.js +78 -64
- package/src/widget/EscalatedWidget.vue +804 -0
- package/src/widget/index.js +254 -0
- package/src/pages/Admin/Automations/Form.vue +0 -184
- package/src/pages/Admin/Automations/Index.vue +0 -129
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { ref } from 'vue';
|
|
4
|
+
|
|
5
|
+
defineProps({
|
|
6
|
+
logs: { type: Array, default: () => [] },
|
|
7
|
+
workflows: { type: Array, default: () => [] },
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const expandedLog = ref(null);
|
|
11
|
+
const filterWorkflow = ref('');
|
|
12
|
+
const filterDateFrom = ref('');
|
|
13
|
+
const filterDateTo = ref('');
|
|
14
|
+
const filterTicket = ref('');
|
|
15
|
+
|
|
16
|
+
function toggleLog(id) {
|
|
17
|
+
expandedLog.value = expandedLog.value === id ? null : id;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function statusBadgeClass(status) {
|
|
21
|
+
switch (status) {
|
|
22
|
+
case 'success':
|
|
23
|
+
return 'bg-emerald-500/10 text-emerald-400';
|
|
24
|
+
case 'failed':
|
|
25
|
+
return 'bg-rose-500/10 text-rose-400';
|
|
26
|
+
case 'skipped':
|
|
27
|
+
return 'bg-gray-500/10 text-gray-400';
|
|
28
|
+
default:
|
|
29
|
+
return 'bg-gray-500/10 text-gray-400';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function statusLabel(status) {
|
|
34
|
+
switch (status) {
|
|
35
|
+
case 'success':
|
|
36
|
+
return 'Success';
|
|
37
|
+
case 'failed':
|
|
38
|
+
return 'Failed';
|
|
39
|
+
case 'skipped':
|
|
40
|
+
return 'Skipped';
|
|
41
|
+
default:
|
|
42
|
+
return status;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function actionStatusIcon(status) {
|
|
47
|
+
switch (status) {
|
|
48
|
+
case 'success':
|
|
49
|
+
return 'M4.5 12.75l6 6 9-13.5';
|
|
50
|
+
case 'failed':
|
|
51
|
+
return 'M6 18L18 6M6 6l12 12';
|
|
52
|
+
case 'skipped':
|
|
53
|
+
return 'M3 8.688c0-.864.933-1.405 1.683-.977l7.108 4.062a1.125 1.125 0 010 1.953l-7.108 4.062A1.125 1.125 0 013 16.81V8.688zM12.75 8.688c0-.864.933-1.405 1.683-.977l7.108 4.062a1.125 1.125 0 010 1.953l-7.108 4.062a1.125 1.125 0 01-1.683-.977V8.688z';
|
|
54
|
+
default:
|
|
55
|
+
return 'M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<EscalatedLayout title="Workflow Logs">
|
|
62
|
+
<div class="mb-4">
|
|
63
|
+
<h2 class="text-lg font-semibold text-[var(--esc-panel-text-secondary)]">Workflow Execution Logs</h2>
|
|
64
|
+
<p class="text-xs text-[var(--esc-panel-text-muted)]">Track workflow executions and debug issues</p>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- Filters -->
|
|
68
|
+
<div
|
|
69
|
+
class="mb-4 flex flex-wrap items-center gap-3 rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-4"
|
|
70
|
+
>
|
|
71
|
+
<div>
|
|
72
|
+
<label class="block text-[10px] font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
73
|
+
>Workflow</label
|
|
74
|
+
>
|
|
75
|
+
<select
|
|
76
|
+
v-model="filterWorkflow"
|
|
77
|
+
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
|
|
78
|
+
>
|
|
79
|
+
<option value="">All Workflows</option>
|
|
80
|
+
<option v-for="w in workflows" :key="w.id" :value="w.id">{{ w.name }}</option>
|
|
81
|
+
</select>
|
|
82
|
+
</div>
|
|
83
|
+
<div>
|
|
84
|
+
<label class="block text-[10px] font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
85
|
+
>From</label
|
|
86
|
+
>
|
|
87
|
+
<input
|
|
88
|
+
v-model="filterDateFrom"
|
|
89
|
+
type="date"
|
|
90
|
+
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<div>
|
|
94
|
+
<label class="block text-[10px] font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
95
|
+
>To</label
|
|
96
|
+
>
|
|
97
|
+
<input
|
|
98
|
+
v-model="filterDateTo"
|
|
99
|
+
type="date"
|
|
100
|
+
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<label class="block text-[10px] font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
105
|
+
>Ticket</label
|
|
106
|
+
>
|
|
107
|
+
<input
|
|
108
|
+
v-model="filterTicket"
|
|
109
|
+
type="text"
|
|
110
|
+
placeholder="Reference..."
|
|
111
|
+
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none"
|
|
112
|
+
/>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<!-- Logs table -->
|
|
117
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
118
|
+
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
119
|
+
<thead>
|
|
120
|
+
<tr class="bg-[var(--esc-panel-hover)]">
|
|
121
|
+
<th
|
|
122
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
123
|
+
>
|
|
124
|
+
Timestamp
|
|
125
|
+
</th>
|
|
126
|
+
<th
|
|
127
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
128
|
+
>
|
|
129
|
+
Workflow
|
|
130
|
+
</th>
|
|
131
|
+
<th
|
|
132
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
133
|
+
>
|
|
134
|
+
Ticket
|
|
135
|
+
</th>
|
|
136
|
+
<th
|
|
137
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
138
|
+
>
|
|
139
|
+
Event
|
|
140
|
+
</th>
|
|
141
|
+
<th
|
|
142
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
143
|
+
>
|
|
144
|
+
Matched
|
|
145
|
+
</th>
|
|
146
|
+
<th
|
|
147
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
148
|
+
>
|
|
149
|
+
Actions
|
|
150
|
+
</th>
|
|
151
|
+
<th
|
|
152
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
153
|
+
>
|
|
154
|
+
Duration
|
|
155
|
+
</th>
|
|
156
|
+
<th
|
|
157
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
158
|
+
>
|
|
159
|
+
Status
|
|
160
|
+
</th>
|
|
161
|
+
</tr>
|
|
162
|
+
</thead>
|
|
163
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
164
|
+
<tr v-if="!logs?.length">
|
|
165
|
+
<td colspan="8" class="px-4 py-12 text-center">
|
|
166
|
+
<svg
|
|
167
|
+
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
168
|
+
fill="none"
|
|
169
|
+
stroke="currentColor"
|
|
170
|
+
stroke-width="1.5"
|
|
171
|
+
viewBox="0 0 24 24"
|
|
172
|
+
>
|
|
173
|
+
<path
|
|
174
|
+
stroke-linecap="round"
|
|
175
|
+
stroke-linejoin="round"
|
|
176
|
+
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
|
177
|
+
/>
|
|
178
|
+
</svg>
|
|
179
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No execution logs yet</p>
|
|
180
|
+
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
181
|
+
Logs appear when workflows are triggered
|
|
182
|
+
</p>
|
|
183
|
+
</td>
|
|
184
|
+
</tr>
|
|
185
|
+
<template v-for="log in logs" :key="log.id">
|
|
186
|
+
<tr
|
|
187
|
+
class="cursor-pointer transition-colors hover:bg-[var(--esc-panel-hover)]"
|
|
188
|
+
@click="toggleLog(log.id)"
|
|
189
|
+
>
|
|
190
|
+
<td class="px-4 py-3 text-xs text-[var(--esc-panel-text-tertiary)]">
|
|
191
|
+
{{ log.created_at }}
|
|
192
|
+
</td>
|
|
193
|
+
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
194
|
+
{{ log.workflow_name }}
|
|
195
|
+
</td>
|
|
196
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
197
|
+
{{ log.ticket_reference }}
|
|
198
|
+
</td>
|
|
199
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
200
|
+
{{ log.event }}
|
|
201
|
+
</td>
|
|
202
|
+
<td class="px-4 py-3">
|
|
203
|
+
<span
|
|
204
|
+
class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium"
|
|
205
|
+
:class="
|
|
206
|
+
log.matched
|
|
207
|
+
? 'bg-emerald-500/10 text-emerald-400'
|
|
208
|
+
: 'bg-gray-500/10 text-gray-400'
|
|
209
|
+
"
|
|
210
|
+
>
|
|
211
|
+
{{ log.matched ? 'Yes' : 'No' }}
|
|
212
|
+
</span>
|
|
213
|
+
</td>
|
|
214
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
215
|
+
{{ log.actions_executed || 0 }}
|
|
216
|
+
</td>
|
|
217
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
218
|
+
{{ log.duration_ms ? log.duration_ms + 'ms' : '---' }}
|
|
219
|
+
</td>
|
|
220
|
+
<td class="px-4 py-3">
|
|
221
|
+
<span
|
|
222
|
+
class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium"
|
|
223
|
+
:class="statusBadgeClass(log.status)"
|
|
224
|
+
>
|
|
225
|
+
{{ statusLabel(log.status) }}
|
|
226
|
+
</span>
|
|
227
|
+
</td>
|
|
228
|
+
</tr>
|
|
229
|
+
<!-- Expanded detail row -->
|
|
230
|
+
<tr v-if="expandedLog === log.id">
|
|
231
|
+
<td colspan="8" class="bg-[var(--esc-panel-hover)] px-6 py-4">
|
|
232
|
+
<h4
|
|
233
|
+
class="mb-3 text-xs font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
234
|
+
>
|
|
235
|
+
Action-by-Action Execution
|
|
236
|
+
</h4>
|
|
237
|
+
<div v-if="log.action_details?.length" class="space-y-2">
|
|
238
|
+
<div
|
|
239
|
+
v-for="(detail, i) in log.action_details"
|
|
240
|
+
:key="i"
|
|
241
|
+
class="flex items-start gap-3 rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-3"
|
|
242
|
+
>
|
|
243
|
+
<svg
|
|
244
|
+
class="mt-0.5 h-4 w-4 flex-shrink-0"
|
|
245
|
+
:class="statusBadgeClass(detail.status).split(' ')[1]"
|
|
246
|
+
fill="none"
|
|
247
|
+
stroke="currentColor"
|
|
248
|
+
stroke-width="2"
|
|
249
|
+
viewBox="0 0 24 24"
|
|
250
|
+
>
|
|
251
|
+
<path
|
|
252
|
+
stroke-linecap="round"
|
|
253
|
+
stroke-linejoin="round"
|
|
254
|
+
:d="actionStatusIcon(detail.status)"
|
|
255
|
+
/>
|
|
256
|
+
</svg>
|
|
257
|
+
<div class="min-w-0 flex-1">
|
|
258
|
+
<div class="text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
259
|
+
{{ detail.action_type }}
|
|
260
|
+
</div>
|
|
261
|
+
<div
|
|
262
|
+
v-if="detail.message"
|
|
263
|
+
class="mt-0.5 text-xs text-[var(--esc-panel-text-muted)]"
|
|
264
|
+
>
|
|
265
|
+
{{ detail.message }}
|
|
266
|
+
</div>
|
|
267
|
+
<div v-if="detail.error" class="mt-1 text-xs text-rose-400">
|
|
268
|
+
{{ detail.error }}
|
|
269
|
+
</div>
|
|
270
|
+
</div>
|
|
271
|
+
<div class="text-xs text-[var(--esc-panel-text-muted)]">
|
|
272
|
+
{{ detail.duration_ms ? detail.duration_ms + 'ms' : '' }}
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
<p v-else class="text-xs text-[var(--esc-panel-text-muted)]">
|
|
277
|
+
No detailed action logs available
|
|
278
|
+
</p>
|
|
279
|
+
</td>
|
|
280
|
+
</tr>
|
|
281
|
+
</template>
|
|
282
|
+
</tbody>
|
|
283
|
+
</table>
|
|
284
|
+
</div>
|
|
285
|
+
</EscalatedLayout>
|
|
286
|
+
</template>
|
|
@@ -1,88 +1,112 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref } from 'vue';
|
|
3
|
-
import { usePage, router } from '@inertiajs/vue3';
|
|
4
|
-
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
5
|
-
import TicketList from '../../components/TicketList.vue';
|
|
6
|
-
import TicketFilters from '../../components/TicketFilters.vue';
|
|
7
|
-
import QuickFilters from '../../components/QuickFilters.vue';
|
|
8
|
-
import BulkActionBar from '../../components/BulkActionBar.vue';
|
|
9
|
-
import KeyboardShortcutHelp from '../../components/KeyboardShortcutHelp.vue';
|
|
10
|
-
import PluginSlot from '../../components/PluginSlot.vue';
|
|
11
|
-
import { useKeyboardShortcuts } from '../../composables/useKeyboardShortcuts';
|
|
12
|
-
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, onMounted } from 'vue';
|
|
3
|
+
import { usePage, router } from '@inertiajs/vue3';
|
|
4
|
+
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
5
|
+
import TicketList from '../../components/TicketList.vue';
|
|
6
|
+
import TicketFilters from '../../components/TicketFilters.vue';
|
|
7
|
+
import QuickFilters from '../../components/QuickFilters.vue';
|
|
8
|
+
import BulkActionBar from '../../components/BulkActionBar.vue';
|
|
9
|
+
import KeyboardShortcutHelp from '../../components/KeyboardShortcutHelp.vue';
|
|
10
|
+
import PluginSlot from '../../components/PluginSlot.vue';
|
|
11
|
+
import { useKeyboardShortcuts } from '../../composables/useKeyboardShortcuts';
|
|
12
|
+
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
13
|
+
import { useRealtime } from '../../composables/useRealtime';
|
|
14
|
+
|
|
15
|
+
defineProps({
|
|
16
|
+
tickets: Object,
|
|
17
|
+
filters: Object,
|
|
18
|
+
departments: Array,
|
|
19
|
+
tags: Array,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const page = usePage();
|
|
23
|
+
const selectedIds = ref([]);
|
|
24
|
+
const ticketListRef = ref(null);
|
|
25
|
+
const showShortcutHelp = ref(false);
|
|
26
|
+
|
|
27
|
+
useKeyboardShortcuts({
|
|
28
|
+
j: () => {
|
|
29
|
+
ticketListRef.value?.moveDown();
|
|
30
|
+
},
|
|
31
|
+
k: () => {
|
|
32
|
+
ticketListRef.value?.moveUp();
|
|
33
|
+
},
|
|
34
|
+
x: () => {
|
|
35
|
+
ticketListRef.value?.toggleSelectFocused();
|
|
36
|
+
},
|
|
37
|
+
Enter: () => {
|
|
38
|
+
ticketListRef.value?.openFocused();
|
|
39
|
+
},
|
|
40
|
+
'?': () => {
|
|
41
|
+
showShortcutHelp.value = true;
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const { getPageComponents } = usePluginExtensions();
|
|
46
|
+
|
|
47
|
+
function applyQuickFilter(filter) {
|
|
48
|
+
router.get(route('escalated.agent.tickets.index'), filter, { preserveState: true });
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Real-time updates - refresh the ticket list when new tickets arrive or statuses change
|
|
52
|
+
const { echoAvailable, subscribeToTickets, subscribeToAgent } = useRealtime();
|
|
53
|
+
|
|
54
|
+
onMounted(() => {
|
|
55
|
+
if (!echoAvailable.value) return;
|
|
56
|
+
|
|
57
|
+
subscribeToTickets({
|
|
58
|
+
onTicketCreated() {
|
|
59
|
+
router.reload({ only: ['tickets'], preserveScroll: true });
|
|
60
|
+
},
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const userId = page.props.auth?.user?.id;
|
|
64
|
+
if (userId) {
|
|
65
|
+
subscribeToAgent(userId, {
|
|
66
|
+
onTicketAssigned() {
|
|
67
|
+
router.reload({ only: ['tickets'], preserveScroll: true });
|
|
68
|
+
},
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<template>
|
|
75
|
+
<EscalatedLayout title="Ticket Queue">
|
|
76
|
+
<div class="mb-4">
|
|
77
|
+
<QuickFilters :current-user-id="page.props.auth?.user?.id" @filter="applyQuickFilter" />
|
|
78
|
+
</div>
|
|
79
|
+
<PluginSlot
|
|
80
|
+
slot="ticket.list.before_filters"
|
|
81
|
+
:components="getPageComponents('ticket.list', 'before_filters')"
|
|
82
|
+
/>
|
|
83
|
+
<div class="mb-6">
|
|
84
|
+
<TicketFilters
|
|
85
|
+
:filters="filters"
|
|
86
|
+
:route="route('escalated.agent.tickets.index')"
|
|
87
|
+
:departments="departments"
|
|
88
|
+
:tags="tags"
|
|
89
|
+
show-assignee
|
|
90
|
+
show-following
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
<TicketList
|
|
94
|
+
ref="ticketListRef"
|
|
95
|
+
v-model:selected-ids="selectedIds"
|
|
96
|
+
:tickets="tickets"
|
|
97
|
+
route-prefix="escalated.agent.tickets"
|
|
98
|
+
:columns="['reference', 'subject', 'requester', 'status', 'priority', 'assignee', 'updated']"
|
|
99
|
+
selectable
|
|
100
|
+
navigable
|
|
101
|
+
show-live-badge
|
|
102
|
+
/>
|
|
103
|
+
<BulkActionBar
|
|
104
|
+
:selected-ids="selectedIds"
|
|
105
|
+
:bulk-route="route('escalated.agent.tickets.bulk')"
|
|
106
|
+
:departments="departments"
|
|
107
|
+
@clear="selectedIds = []"
|
|
108
|
+
/>
|
|
109
|
+
<PluginSlot slot="ticket.list.footer" :components="getPageComponents('ticket.list', 'footer')" />
|
|
110
|
+
<KeyboardShortcutHelp v-model:show="showShortcutHelp" context="list" />
|
|
111
|
+
</EscalatedLayout>
|
|
112
|
+
</template>
|