@escalated-dev/escalated 0.7.1 → 0.9.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 +380 -357
- package/package.json +85 -81
- package/src/components/ActiveChatsPanel.vue +246 -246
- package/src/components/AdminDashboard.stories.js +1423 -1423
- package/src/components/AttachmentList.vue +65 -65
- package/src/components/ChatActionBar.vue +226 -226
- package/src/components/ChatBubble.vue +162 -162
- package/src/components/ChatComposer.vue +308 -308
- package/src/components/ChatQueue.vue +222 -222
- package/src/components/ChatThread.vue +197 -197
- package/src/components/CustomTicketActions.stories.js +71 -0
- package/src/components/CustomTicketActions.vue +101 -0
- package/src/components/EscalatedLayout.vue +619 -598
- package/src/components/FollowButton.vue +20 -1
- package/src/components/MentionDropdown.vue +154 -154
- package/src/components/MetricComparison.vue +89 -89
- package/src/components/PercentileChart.vue +67 -67
- package/src/components/PeriodSelector.vue +98 -98
- package/src/components/PresenceIndicator.vue +228 -213
- package/src/components/ReplyComposer.vue +336 -336
- package/src/components/ReplyThread.vue +153 -153
- package/src/components/ReportChart.vue +395 -395
- package/src/components/ReportExportButton.vue +108 -108
- package/src/components/SaveViewDialog.vue +172 -172
- package/src/components/SavedViewSidebar.vue +208 -208
- package/src/components/SkillTagManager.vue +29 -22
- package/src/components/SnoozeButton.vue +247 -247
- package/src/components/TicketFilters.vue +270 -270
- package/src/components/TicketList.vue +655 -655
- package/src/components/TicketSidebar.vue +4 -0
- package/src/components/TicketSplitDialog.vue +98 -98
- package/src/components/TicketSubjects.stories.js +63 -0
- package/src/components/TicketSubjects.vue +107 -0
- package/src/components/TwoFactorSetup.vue +1 -37
- package/src/components/VariableTokenInput.vue +111 -111
- package/src/components/WorkflowActionConfig.vue +287 -287
- package/src/components/WorkflowActionList.vue +350 -350
- package/src/components/WorkflowConditionBuilder.vue +265 -265
- package/src/components/WorkflowTriggerSelector.vue +125 -125
- package/src/components/admin/newsletters/AnalyticsTiles.stories.js +14 -0
- package/src/components/admin/newsletters/AnalyticsTiles.vue +55 -0
- package/src/components/admin/newsletters/DeliveriesTable.stories.js +28 -0
- package/src/components/admin/newsletters/DeliveriesTable.vue +104 -0
- package/src/components/admin/newsletters/DynamicFilterBuilder.stories.js +11 -0
- package/src/components/admin/newsletters/DynamicFilterBuilder.vue +53 -0
- package/src/components/admin/newsletters/ListMemberTable.stories.js +12 -0
- package/src/components/admin/newsletters/ListMemberTable.vue +53 -0
- package/src/components/admin/newsletters/MarkdownEditor.stories.js +6 -0
- package/src/components/admin/newsletters/MarkdownEditor.vue +53 -0
- package/src/components/admin/newsletters/MergeFieldDropdown.stories.js +6 -0
- package/src/components/admin/newsletters/MergeFieldDropdown.vue +84 -0
- package/src/components/admin/newsletters/PreviewIframe.stories.js +7 -0
- package/src/components/admin/newsletters/PreviewIframe.vue +40 -0
- package/src/components/admin/newsletters/SummaryTiles.stories.js +8 -0
- package/src/components/admin/newsletters/SummaryTiles.vue +63 -0
- package/src/composables/useChat.js +187 -187
- package/src/composables/useI18n.js +30 -8
- package/src/composables/useMentions.js +134 -134
- package/src/composables/usePermissions.js +31 -0
- package/src/composables/useRealtime.js +182 -182
- package/src/index.js +85 -84
- package/src/locales/README.md +13 -0
- package/src/locales/ar.json +727 -727
- package/src/locales/de.json +690 -690
- package/src/locales/en.json +889 -729
- package/src/locales/es.json +691 -691
- package/src/locales/fr.json +691 -691
- package/src/locales/index.js +16 -16
- package/src/locales/it.json +727 -727
- package/src/locales/ja.json +727 -727
- package/src/locales/ko.json +727 -727
- package/src/locales/nl.json +727 -727
- package/src/locales/pl.json +727 -727
- package/src/locales/pt-BR.json +727 -727
- package/src/locales/ru.json +727 -727
- package/src/locales/tr.json +727 -727
- package/src/locales/zh-CN.json +727 -727
- package/src/pages/Admin/Newsletters/Compose.vue +192 -0
- package/src/pages/Admin/Newsletters/Edit.vue +24 -0
- package/src/pages/Admin/Newsletters/Index.vue +141 -0
- package/src/pages/Admin/Newsletters/Lists/Create.vue +64 -0
- package/src/pages/Admin/Newsletters/Lists/Index.vue +59 -0
- package/src/pages/Admin/Newsletters/Lists/Show.vue +53 -0
- package/src/pages/Admin/Newsletters/Settings.vue +85 -0
- package/src/pages/Admin/Newsletters/Show.vue +140 -0
- package/src/pages/Admin/Newsletters/Templates/Create.vue +11 -0
- package/src/pages/Admin/Newsletters/Templates/Index.vue +54 -0
- package/src/pages/Admin/Newsletters/Templates/Show.vue +65 -0
- package/src/pages/Admin/Newsletters/usePreview.js +44 -0
- package/src/pages/Admin/Reports/AgentDetail.vue +132 -132
- package/src/pages/Admin/Reports/AgentRanking.vue +246 -246
- package/src/pages/Admin/Reports/Cohorts.vue +180 -180
- package/src/pages/Admin/Reports/Comparison.vue +141 -141
- package/src/pages/Admin/Reports/Dashboard.vue +226 -226
- package/src/pages/Admin/Reports/ResolutionTimes.vue +164 -164
- package/src/pages/Admin/Reports/ResponseTimes.vue +164 -164
- package/src/pages/Admin/Reports/SlaTrends.vue +183 -183
- package/src/pages/Admin/Settings/SsoSettings.vue +157 -4
- package/src/pages/Admin/Settings/TwoFactor.vue +32 -6
- package/src/pages/Admin/Settings.vue +1008 -1008
- package/src/pages/Admin/Skills/Form.vue +164 -4
- package/src/pages/Admin/Skills/Index.vue +14 -3
- package/src/pages/Admin/Tickets/Index.vue +126 -126
- package/src/pages/Admin/Tickets/Show.vue +254 -249
- package/src/pages/Admin/Users/Index.vue +145 -0
- package/src/pages/Admin/Workflows/Builder.vue +207 -207
- package/src/pages/Admin/Workflows/Index.vue +235 -235
- package/src/pages/Admin/Workflows/Logs.vue +286 -286
- package/src/pages/Agent/TicketIndex.vue +112 -112
- package/src/pages/Agent/TicketShow.vue +547 -494
- package/src/pages/Customer/Index.vue +26 -1
- package/src/pages/Customer/KnowledgeBase/Article.vue +129 -129
- package/src/plugin.js +175 -175
- package/src/utils/mentionHighlight.js +24 -24
- package/src/widget/EscalatedWidget.vue +804 -804
- package/src/widget/index.js +254 -254
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
-
import KpiCard from '../../../components/KpiCard.vue';
|
|
4
|
-
import ReportChart from '../../../components/ReportChart.vue';
|
|
5
|
-
import PeriodSelector from '../../../components/PeriodSelector.vue';
|
|
6
|
-
import ReportExportButton from '../../../components/ReportExportButton.vue';
|
|
7
|
-
import { router, Link } from '@inertiajs/vue3';
|
|
8
|
-
import { ref, computed } from 'vue';
|
|
9
|
-
|
|
10
|
-
const props = defineProps({
|
|
11
|
-
period_days: { type: Number, default: 30 },
|
|
12
|
-
avg_resolution: { type: Number, default: 0 },
|
|
13
|
-
median_resolution: { type: Number, default: 0 },
|
|
14
|
-
p90_resolution: { type: Number, default: 0 },
|
|
15
|
-
pct_under_target: { type: Number, default: 0 },
|
|
16
|
-
distribution: { type: Array, default: () => [] },
|
|
17
|
-
trend: { type: Array, default: () => [] },
|
|
18
|
-
by_agent: { type: Array, default: () => [] },
|
|
19
|
-
by_department: { type: Array, default: () => [] },
|
|
20
|
-
by_channel: { type: Array, default: () => [] },
|
|
21
|
-
target_hours: { type: Number, default: 24 },
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const periodDays = ref(props.period_days);
|
|
25
|
-
const sortColumn = ref('avg');
|
|
26
|
-
const sortDir = ref('asc');
|
|
27
|
-
|
|
28
|
-
function changePeriod(days) {
|
|
29
|
-
periodDays.value = days;
|
|
30
|
-
router.get(route('escalated.admin.reports.resolution-times'), { days }, { preserveState: true });
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function resColor(value) {
|
|
34
|
-
if (value <= props.target_hours * 0.5) return 'text-emerald-400';
|
|
35
|
-
if (value <= props.target_hours) return 'text-amber-400';
|
|
36
|
-
return 'text-red-400';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const sortedAgents = computed(() => {
|
|
40
|
-
const agents = [...(props.by_agent || [])];
|
|
41
|
-
agents.sort((a, b) => {
|
|
42
|
-
const aVal = a[sortColumn.value] ?? 0;
|
|
43
|
-
const bVal = b[sortColumn.value] ?? 0;
|
|
44
|
-
return sortDir.value === 'asc' ? aVal - bVal : bVal - aVal;
|
|
45
|
-
});
|
|
46
|
-
return agents;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
function toggleSort(col) {
|
|
50
|
-
if (sortColumn.value === col) {
|
|
51
|
-
sortDir.value = sortDir.value === 'asc' ? 'desc' : 'asc';
|
|
52
|
-
} else {
|
|
53
|
-
sortColumn.value = col;
|
|
54
|
-
sortDir.value = 'asc';
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
</script>
|
|
58
|
-
|
|
59
|
-
<template>
|
|
60
|
-
<EscalatedLayout title="Resolution Time Analysis">
|
|
61
|
-
<div class="mb-6 flex items-center justify-between">
|
|
62
|
-
<PeriodSelector :model-value="periodDays" @update:model-value="changePeriod" />
|
|
63
|
-
<div class="flex items-center gap-3">
|
|
64
|
-
<ReportExportButton report-name="resolution-times" :period-days="periodDays" />
|
|
65
|
-
<Link
|
|
66
|
-
:href="route('escalated.admin.reports')"
|
|
67
|
-
class="text-sm text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
68
|
-
>
|
|
69
|
-
← Back
|
|
70
|
-
</Link>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<!-- KPI Cards -->
|
|
75
|
-
<div class="mb-6 grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
76
|
-
<KpiCard
|
|
77
|
-
label="Avg Resolution"
|
|
78
|
-
:value="`${avg_resolution}h`"
|
|
79
|
-
:icon="'M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z'"
|
|
80
|
-
/>
|
|
81
|
-
<KpiCard
|
|
82
|
-
label="Median Resolution"
|
|
83
|
-
:value="`${median_resolution}h`"
|
|
84
|
-
:icon="'M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5'"
|
|
85
|
-
/>
|
|
86
|
-
<KpiCard
|
|
87
|
-
label="P90 Resolution"
|
|
88
|
-
:value="`${p90_resolution}h`"
|
|
89
|
-
:icon="'M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75z'"
|
|
90
|
-
/>
|
|
91
|
-
<KpiCard
|
|
92
|
-
label="Under Target"
|
|
93
|
-
:value="`${pct_under_target}%`"
|
|
94
|
-
:icon="'M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z'"
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<!-- Charts -->
|
|
99
|
-
<div class="mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
100
|
-
<ReportChart
|
|
101
|
-
type="histogram"
|
|
102
|
-
title="Resolution Time Distribution"
|
|
103
|
-
:data="distribution"
|
|
104
|
-
:colors="['#8b5cf6']"
|
|
105
|
-
x-label="Resolution Time Buckets"
|
|
106
|
-
/>
|
|
107
|
-
<ReportChart type="line" title="Avg Resolution Time Trend" :data="trend" :colors="['#06b6d4']" />
|
|
108
|
-
<ReportChart type="bar" title="Resolution by Department" :data="by_department" :colors="['#f59e0b']" />
|
|
109
|
-
<ReportChart type="bar" title="Resolution by Channel" :data="by_channel" :colors="['#10b981']" />
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
<!-- Agent Table -->
|
|
113
|
-
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)]">
|
|
114
|
-
<div class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] px-4 py-3">
|
|
115
|
-
<h3 class="text-sm font-semibold text-[var(--esc-panel-text-secondary)]">Resolution Time by Agent</h3>
|
|
116
|
-
</div>
|
|
117
|
-
<table class="w-full">
|
|
118
|
-
<thead>
|
|
119
|
-
<tr class="border-b border-[var(--esc-panel-border)]">
|
|
120
|
-
<th
|
|
121
|
-
class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
122
|
-
>
|
|
123
|
-
Agent
|
|
124
|
-
</th>
|
|
125
|
-
<th
|
|
126
|
-
v-for="col in [
|
|
127
|
-
{ key: 'avg', label: 'Avg' },
|
|
128
|
-
{ key: 'median', label: 'Median' },
|
|
129
|
-
{ key: 'p90', label: 'P90' },
|
|
130
|
-
]"
|
|
131
|
-
:key="col.key"
|
|
132
|
-
class="cursor-pointer px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
133
|
-
@click="toggleSort(col.key)"
|
|
134
|
-
>
|
|
135
|
-
{{ col.label }}
|
|
136
|
-
<span v-if="sortColumn === col.key">{{ sortDir === 'asc' ? ' ▲' : ' ▼' }}</span>
|
|
137
|
-
</th>
|
|
138
|
-
</tr>
|
|
139
|
-
</thead>
|
|
140
|
-
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
141
|
-
<tr v-for="agent in sortedAgents" :key="agent.agent_id" class="hover:bg-[var(--esc-panel-hover)]">
|
|
142
|
-
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
143
|
-
{{ agent.agent_name }}
|
|
144
|
-
</td>
|
|
145
|
-
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.avg)">
|
|
146
|
-
{{ agent.avg ?? '—' }}h
|
|
147
|
-
</td>
|
|
148
|
-
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.median)">
|
|
149
|
-
{{ agent.median ?? '—' }}h
|
|
150
|
-
</td>
|
|
151
|
-
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.p90)">
|
|
152
|
-
{{ agent.p90 ?? '—' }}h
|
|
153
|
-
</td>
|
|
154
|
-
</tr>
|
|
155
|
-
<tr v-if="!sortedAgents.length">
|
|
156
|
-
<td colspan="4" class="px-4 py-8 text-center text-sm text-[var(--esc-panel-text-muted)]">
|
|
157
|
-
No agent data for this period.
|
|
158
|
-
</td>
|
|
159
|
-
</tr>
|
|
160
|
-
</tbody>
|
|
161
|
-
</table>
|
|
162
|
-
</div>
|
|
163
|
-
</EscalatedLayout>
|
|
164
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import KpiCard from '../../../components/KpiCard.vue';
|
|
4
|
+
import ReportChart from '../../../components/ReportChart.vue';
|
|
5
|
+
import PeriodSelector from '../../../components/PeriodSelector.vue';
|
|
6
|
+
import ReportExportButton from '../../../components/ReportExportButton.vue';
|
|
7
|
+
import { router, Link } from '@inertiajs/vue3';
|
|
8
|
+
import { ref, computed } from 'vue';
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
period_days: { type: Number, default: 30 },
|
|
12
|
+
avg_resolution: { type: Number, default: 0 },
|
|
13
|
+
median_resolution: { type: Number, default: 0 },
|
|
14
|
+
p90_resolution: { type: Number, default: 0 },
|
|
15
|
+
pct_under_target: { type: Number, default: 0 },
|
|
16
|
+
distribution: { type: Array, default: () => [] },
|
|
17
|
+
trend: { type: Array, default: () => [] },
|
|
18
|
+
by_agent: { type: Array, default: () => [] },
|
|
19
|
+
by_department: { type: Array, default: () => [] },
|
|
20
|
+
by_channel: { type: Array, default: () => [] },
|
|
21
|
+
target_hours: { type: Number, default: 24 },
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const periodDays = ref(props.period_days);
|
|
25
|
+
const sortColumn = ref('avg');
|
|
26
|
+
const sortDir = ref('asc');
|
|
27
|
+
|
|
28
|
+
function changePeriod(days) {
|
|
29
|
+
periodDays.value = days;
|
|
30
|
+
router.get(route('escalated.admin.reports.resolution-times'), { days }, { preserveState: true });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function resColor(value) {
|
|
34
|
+
if (value <= props.target_hours * 0.5) return 'text-emerald-400';
|
|
35
|
+
if (value <= props.target_hours) return 'text-amber-400';
|
|
36
|
+
return 'text-red-400';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const sortedAgents = computed(() => {
|
|
40
|
+
const agents = [...(props.by_agent || [])];
|
|
41
|
+
agents.sort((a, b) => {
|
|
42
|
+
const aVal = a[sortColumn.value] ?? 0;
|
|
43
|
+
const bVal = b[sortColumn.value] ?? 0;
|
|
44
|
+
return sortDir.value === 'asc' ? aVal - bVal : bVal - aVal;
|
|
45
|
+
});
|
|
46
|
+
return agents;
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
function toggleSort(col) {
|
|
50
|
+
if (sortColumn.value === col) {
|
|
51
|
+
sortDir.value = sortDir.value === 'asc' ? 'desc' : 'asc';
|
|
52
|
+
} else {
|
|
53
|
+
sortColumn.value = col;
|
|
54
|
+
sortDir.value = 'asc';
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<EscalatedLayout title="Resolution Time Analysis">
|
|
61
|
+
<div class="mb-6 flex items-center justify-between">
|
|
62
|
+
<PeriodSelector :model-value="periodDays" @update:model-value="changePeriod" />
|
|
63
|
+
<div class="flex items-center gap-3">
|
|
64
|
+
<ReportExportButton report-name="resolution-times" :period-days="periodDays" />
|
|
65
|
+
<Link
|
|
66
|
+
:href="route('escalated.admin.reports')"
|
|
67
|
+
class="text-sm text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
68
|
+
>
|
|
69
|
+
← Back
|
|
70
|
+
</Link>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- KPI Cards -->
|
|
75
|
+
<div class="mb-6 grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
76
|
+
<KpiCard
|
|
77
|
+
label="Avg Resolution"
|
|
78
|
+
:value="`${avg_resolution}h`"
|
|
79
|
+
:icon="'M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z'"
|
|
80
|
+
/>
|
|
81
|
+
<KpiCard
|
|
82
|
+
label="Median Resolution"
|
|
83
|
+
:value="`${median_resolution}h`"
|
|
84
|
+
:icon="'M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5'"
|
|
85
|
+
/>
|
|
86
|
+
<KpiCard
|
|
87
|
+
label="P90 Resolution"
|
|
88
|
+
:value="`${p90_resolution}h`"
|
|
89
|
+
:icon="'M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75z'"
|
|
90
|
+
/>
|
|
91
|
+
<KpiCard
|
|
92
|
+
label="Under Target"
|
|
93
|
+
:value="`${pct_under_target}%`"
|
|
94
|
+
:icon="'M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z'"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<!-- Charts -->
|
|
99
|
+
<div class="mb-6 grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
100
|
+
<ReportChart
|
|
101
|
+
type="histogram"
|
|
102
|
+
title="Resolution Time Distribution"
|
|
103
|
+
:data="distribution"
|
|
104
|
+
:colors="['#8b5cf6']"
|
|
105
|
+
x-label="Resolution Time Buckets"
|
|
106
|
+
/>
|
|
107
|
+
<ReportChart type="line" title="Avg Resolution Time Trend" :data="trend" :colors="['#06b6d4']" />
|
|
108
|
+
<ReportChart type="bar" title="Resolution by Department" :data="by_department" :colors="['#f59e0b']" />
|
|
109
|
+
<ReportChart type="bar" title="Resolution by Channel" :data="by_channel" :colors="['#10b981']" />
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<!-- Agent Table -->
|
|
113
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)]">
|
|
114
|
+
<div class="border-b border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] px-4 py-3">
|
|
115
|
+
<h3 class="text-sm font-semibold text-[var(--esc-panel-text-secondary)]">Resolution Time by Agent</h3>
|
|
116
|
+
</div>
|
|
117
|
+
<table class="w-full">
|
|
118
|
+
<thead>
|
|
119
|
+
<tr class="border-b border-[var(--esc-panel-border)]">
|
|
120
|
+
<th
|
|
121
|
+
class="px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
122
|
+
>
|
|
123
|
+
Agent
|
|
124
|
+
</th>
|
|
125
|
+
<th
|
|
126
|
+
v-for="col in [
|
|
127
|
+
{ key: 'avg', label: 'Avg' },
|
|
128
|
+
{ key: 'median', label: 'Median' },
|
|
129
|
+
{ key: 'p90', label: 'P90' },
|
|
130
|
+
]"
|
|
131
|
+
:key="col.key"
|
|
132
|
+
class="cursor-pointer px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
133
|
+
@click="toggleSort(col.key)"
|
|
134
|
+
>
|
|
135
|
+
{{ col.label }}
|
|
136
|
+
<span v-if="sortColumn === col.key">{{ sortDir === 'asc' ? ' ▲' : ' ▼' }}</span>
|
|
137
|
+
</th>
|
|
138
|
+
</tr>
|
|
139
|
+
</thead>
|
|
140
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
141
|
+
<tr v-for="agent in sortedAgents" :key="agent.agent_id" class="hover:bg-[var(--esc-panel-hover)]">
|
|
142
|
+
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
143
|
+
{{ agent.agent_name }}
|
|
144
|
+
</td>
|
|
145
|
+
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.avg)">
|
|
146
|
+
{{ agent.avg ?? '—' }}h
|
|
147
|
+
</td>
|
|
148
|
+
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.median)">
|
|
149
|
+
{{ agent.median ?? '—' }}h
|
|
150
|
+
</td>
|
|
151
|
+
<td class="px-4 py-3 text-sm font-medium" :class="resColor(agent.p90)">
|
|
152
|
+
{{ agent.p90 ?? '—' }}h
|
|
153
|
+
</td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr v-if="!sortedAgents.length">
|
|
156
|
+
<td colspan="4" class="px-4 py-8 text-center text-sm text-[var(--esc-panel-text-muted)]">
|
|
157
|
+
No agent data for this period.
|
|
158
|
+
</td>
|
|
159
|
+
</tr>
|
|
160
|
+
</tbody>
|
|
161
|
+
</table>
|
|
162
|
+
</div>
|
|
163
|
+
</EscalatedLayout>
|
|
164
|
+
</template>
|