@escalated-dev/escalated 0.6.0 → 0.7.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 +94 -2
- package/package.json +31 -2
- package/src/components/ActivityTimeline.stories.js +55 -0
- package/src/components/ActivityTimeline.vue +24 -7
- package/src/components/AdminDashboard.stories.js +1095 -0
- package/src/components/AgentLoadIndicator.stories.js +37 -0
- package/src/components/AgentLoadIndicator.vue +49 -0
- package/src/components/AgentPerformanceCard.vue +44 -0
- package/src/components/ArticleEditor.vue +82 -0
- package/src/components/AssigneeSelect.vue +19 -5
- package/src/components/AttachmentList.vue +53 -37
- package/src/components/AuditLogEntry.vue +95 -0
- package/src/components/BulkActionBar.vue +99 -30
- package/src/components/CategoryTree.vue +89 -0
- package/src/components/ChartWidget.vue +46 -0
- package/src/components/CollisionWarning.stories.js +30 -0
- package/src/components/CollisionWarning.vue +68 -0
- package/src/components/ConditionalFieldRules.vue +135 -0
- package/src/components/ContextPanel.vue +66 -0
- package/src/components/ContextPanelSection.vue +65 -0
- package/src/components/CustomFieldRenderer.vue +159 -0
- package/src/components/EscalatedLayout.vue +400 -69
- package/src/components/FileDropzone.vue +26 -10
- package/src/components/FollowButton.stories.js +30 -0
- package/src/components/FollowButton.vue +53 -28
- package/src/components/KeyboardShortcutHelp.vue +129 -39
- package/src/components/KnowledgePanel.vue +122 -0
- package/src/components/KpiCard.stories.js +32 -0
- package/src/components/KpiCard.vue +88 -0
- package/src/components/MacroDropdown.vue +95 -35
- package/src/components/PermissionMatrix.vue +107 -0
- package/src/components/PinnedNotes.vue +70 -31
- package/src/components/PresenceIndicator.vue +93 -27
- package/src/components/PriorityBadge.stories.js +33 -0
- package/src/components/PriorityBadge.vue +9 -2
- package/src/components/QuickFilters.vue +65 -49
- package/src/components/ReplyComposer.vue +144 -30
- package/src/components/ReplyThread.vue +72 -20
- package/src/components/SatisfactionRating.vue +98 -46
- package/src/components/ScheduleEditor.vue +104 -0
- package/src/components/SideConversation.vue +165 -0
- package/src/components/SideConversationList.vue +147 -0
- package/src/components/SkillTagManager.vue +79 -0
- package/src/components/SlaComplianceChart.vue +53 -0
- package/src/components/SlaTimer.stories.js +35 -0
- package/src/components/SlaTimer.vue +17 -4
- package/src/components/StatsCard.stories.js +24 -0
- package/src/components/StatsCard.vue +58 -46
- package/src/components/StatusBadge.stories.js +53 -0
- package/src/components/StatusBadge.vue +36 -4
- package/src/components/TagSelect.vue +43 -12
- package/src/components/TicketFilters.vue +225 -69
- package/src/components/TicketLinkPanel.vue +193 -0
- package/src/components/TicketList.vue +594 -193
- package/src/components/TicketMergeDialog.vue +157 -0
- package/src/components/TicketSidebar.vue +167 -99
- package/src/components/TicketTypeSelector.vue +21 -0
- package/src/components/TotpInput.stories.js +9 -0
- package/src/components/TotpInput.vue +81 -0
- package/src/components/TwoFactorSetup.vue +113 -0
- package/src/composables/useDebouncedSearch.js +38 -0
- package/src/composables/usePluginExtensions.js +95 -3
- package/src/composables/usePluginHooks.js +65 -0
- package/src/defineEscalatedPlugin.js +34 -8
- package/src/index.js +72 -35
- package/src/locales/en.json +25 -0
- package/src/pages/Admin/ApiTokens/Index.vue +231 -67
- package/src/pages/Admin/AuditLog/Index.vue +154 -0
- package/src/pages/Admin/Automations/Form.vue +184 -0
- package/src/pages/Admin/Automations/Index.vue +129 -0
- package/src/pages/Admin/BusinessHours/Form.vue +172 -0
- package/src/pages/Admin/BusinessHours/Index.vue +113 -0
- package/src/pages/Admin/CannedResponses/Index.vue +127 -70
- package/src/pages/Admin/Capacity/Index.vue +134 -0
- package/src/pages/Admin/CustomFields/Form.vue +195 -0
- package/src/pages/Admin/CustomFields/Index.vue +134 -0
- package/src/pages/Admin/CustomObjects/Form.vue +202 -0
- package/src/pages/Admin/CustomObjects/Index.vue +127 -0
- package/src/pages/Admin/CustomObjects/Records.vue +228 -0
- package/src/pages/Admin/Departments/Form.vue +75 -51
- package/src/pages/Admin/Departments/Index.vue +109 -57
- package/src/pages/Admin/EscalationRules/Form.vue +157 -96
- package/src/pages/Admin/EscalationRules/Index.vue +178 -57
- package/src/pages/Admin/Import/Connect.vue +96 -0
- package/src/pages/Admin/Import/Index.vue +102 -0
- package/src/pages/Admin/Import/Mapping.vue +110 -0
- package/src/pages/Admin/Import/Progress.vue +153 -0
- package/src/pages/Admin/Import/Review.vue +76 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Form.vue +142 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +195 -0
- package/src/pages/Admin/KnowledgeBase/Categories/Index.vue +193 -0
- package/src/pages/Admin/Macros/Index.vue +250 -89
- package/src/pages/Admin/Plugins/Index.vue +205 -75
- package/src/pages/Admin/Reports/AgentMetrics.vue +115 -0
- package/src/pages/Admin/Reports/CsatReport.vue +127 -0
- package/src/pages/Admin/Reports/Dashboard.vue +211 -0
- package/src/pages/Admin/Reports/SlaReport.vue +166 -0
- package/src/pages/Admin/Reports.vue +139 -34
- package/src/pages/Admin/Roles/Form.vue +71 -0
- package/src/pages/Admin/Roles/Index.vue +122 -0
- package/src/pages/Admin/Settings/CsatSettings.vue +165 -0
- package/src/pages/Admin/Settings/DataRetention.vue +182 -0
- package/src/pages/Admin/Settings/EmailSettings.vue +243 -0
- package/src/pages/Admin/Settings/Sandbox.vue +135 -0
- package/src/pages/Admin/Settings/SsoSettings.vue +218 -0
- package/src/pages/Admin/Settings/TwoFactor.vue +110 -0
- package/src/pages/Admin/Settings.vue +468 -260
- package/src/pages/Admin/Skills/Form.vue +53 -0
- package/src/pages/Admin/Skills/Index.vue +94 -0
- package/src/pages/Admin/SlaPolicies/Form.vue +118 -75
- package/src/pages/Admin/SlaPolicies/Index.vue +120 -59
- package/src/pages/Admin/Statuses/Form.vue +114 -0
- package/src/pages/Admin/Statuses/Index.vue +153 -0
- package/src/pages/Admin/Tags/Index.vue +191 -105
- package/src/pages/Admin/Tickets/Index.vue +91 -39
- package/src/pages/Admin/Tickets/Show.vue +101 -37
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +120 -0
- package/src/pages/Admin/Webhooks/Form.vue +110 -0
- package/src/pages/Admin/Webhooks/Index.vue +136 -0
- package/src/pages/Agent/Dashboard.vue +311 -186
- package/src/pages/Agent/TicketIndex.vue +88 -38
- package/src/pages/Agent/TicketShow.vue +258 -51
- package/src/pages/Customer/Create.vue +36 -9
- package/src/pages/Customer/Index.vue +31 -24
- package/src/pages/Customer/KnowledgeBase/Article.vue +127 -0
- package/src/pages/Customer/KnowledgeBase/Index.vue +151 -0
- package/src/plugin.js +86 -1
- package/src/utils/constants.js +30 -0
- package/src/utils/formatting.js +35 -0
- package/src/pages/Admin/Plugins.vue +0 -129
|
@@ -1,186 +1,311 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, defineAsyncComponent } from 'vue';
|
|
3
|
-
import { Link } from '@inertiajs/vue3';
|
|
4
|
-
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
5
|
-
import StatsCard from '../../components/StatsCard.vue';
|
|
6
|
-
import StatusBadge from '../../components/StatusBadge.vue';
|
|
7
|
-
import PriorityBadge from '../../components/PriorityBadge.vue';
|
|
8
|
-
import PluginSlot from '../../components/PluginSlot.vue';
|
|
9
|
-
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, defineAsyncComponent, inject } from 'vue';
|
|
3
|
+
import { Link } from '@inertiajs/vue3';
|
|
4
|
+
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
5
|
+
import StatsCard from '../../components/StatsCard.vue';
|
|
6
|
+
import StatusBadge from '../../components/StatusBadge.vue';
|
|
7
|
+
import PriorityBadge from '../../components/PriorityBadge.vue';
|
|
8
|
+
import PluginSlot from '../../components/PluginSlot.vue';
|
|
9
|
+
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
10
|
+
import { timeAgo, slaClass } from '../../utils/formatting';
|
|
11
|
+
|
|
12
|
+
const props = defineProps({
|
|
13
|
+
stats: Object,
|
|
14
|
+
recentTickets: Array,
|
|
15
|
+
needsAttention: { type: Object, default: () => ({}) },
|
|
16
|
+
myPerformance: { type: Object, default: () => ({}) },
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function truncate(str, len = 50) {
|
|
20
|
+
if (!str) return '';
|
|
21
|
+
return str.length > len ? str.slice(0, len) + '...' : str;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const hasSlaBreaching = computed(() => needsAttention.value?.sla_breaching?.length > 0);
|
|
25
|
+
const hasUnassignedUrgent = computed(() => needsAttention.value?.unassigned_urgent?.length > 0);
|
|
26
|
+
const needsAttention = computed(() => props.needsAttention);
|
|
27
|
+
|
|
28
|
+
const escDark = inject(
|
|
29
|
+
'esc-dark',
|
|
30
|
+
computed(() => false),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
const { dashboardWidgets, getPageComponents } = usePluginExtensions();
|
|
34
|
+
|
|
35
|
+
// Load a plugin widget component dynamically
|
|
36
|
+
const loadWidgetComponent = (plugin, component) => {
|
|
37
|
+
return defineAsyncComponent(
|
|
38
|
+
() => import(`../../../../../plugins/escalated/${plugin}/resources/js/Components/${component}.vue`),
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<EscalatedLayout title="Agent Dashboard">
|
|
45
|
+
<!-- Plugin: dashboard header slot -->
|
|
46
|
+
<PluginSlot slot="dashboard.header" :components="getPageComponents('dashboard', 'header')" />
|
|
47
|
+
|
|
48
|
+
<!-- Stats row -->
|
|
49
|
+
<div class="mb-8 grid grid-cols-2 gap-4 md:grid-cols-5">
|
|
50
|
+
<StatsCard label="Open Tickets" :value="stats.open" color="cyan" />
|
|
51
|
+
<StatsCard label="My Assigned" :value="stats.my_assigned" color="violet" />
|
|
52
|
+
<StatsCard label="Unassigned" :value="stats.unassigned" color="amber" />
|
|
53
|
+
<StatsCard label="SLA Breached" :value="stats.sla_breached" color="red" />
|
|
54
|
+
<StatsCard label="Resolved Today" :value="stats.resolved_today" color="green" />
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div class="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
|
58
|
+
<div class="lg:col-span-2 space-y-6">
|
|
59
|
+
<!-- Needs Attention -->
|
|
60
|
+
<div v-if="hasSlaBreaching || hasUnassignedUrgent">
|
|
61
|
+
<h2 :class="['mb-4 text-lg font-semibold', escDark ? 'text-neutral-200' : 'text-gray-900']">
|
|
62
|
+
Needs Attention
|
|
63
|
+
</h2>
|
|
64
|
+
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
65
|
+
<div
|
|
66
|
+
v-if="hasSlaBreaching"
|
|
67
|
+
:class="[
|
|
68
|
+
'rounded-xl border p-4',
|
|
69
|
+
escDark ? 'border-rose-500/20 bg-rose-500/5' : 'border-rose-200 bg-rose-50',
|
|
70
|
+
]"
|
|
71
|
+
>
|
|
72
|
+
<h3
|
|
73
|
+
:class="[
|
|
74
|
+
'mb-3 flex items-center gap-2 text-sm font-semibold',
|
|
75
|
+
escDark ? 'text-rose-400' : 'text-rose-700',
|
|
76
|
+
]"
|
|
77
|
+
>
|
|
78
|
+
<span class="h-2 w-2 rounded-full bg-rose-500"></span>
|
|
79
|
+
SLA Breaching
|
|
80
|
+
</h3>
|
|
81
|
+
<div v-for="ticket in needsAttention.sla_breaching" :key="ticket.id" class="mb-2 last:mb-0">
|
|
82
|
+
<Link
|
|
83
|
+
:href="route('escalated.agent.tickets.show', ticket.reference)"
|
|
84
|
+
:class="[
|
|
85
|
+
'flex items-center justify-between rounded-lg px-2 py-1.5 text-sm transition-colors',
|
|
86
|
+
escDark ? 'hover:bg-white/[0.04]' : 'hover:bg-rose-100/60',
|
|
87
|
+
]"
|
|
88
|
+
>
|
|
89
|
+
<span
|
|
90
|
+
:class="['font-mono text-xs', escDark ? 'text-neutral-400' : 'text-gray-500']"
|
|
91
|
+
>{{ ticket.reference }}</span
|
|
92
|
+
>
|
|
93
|
+
<span
|
|
94
|
+
:class="['truncate', escDark ? 'text-neutral-300' : 'text-gray-700']"
|
|
95
|
+
style="max-width: 140px"
|
|
96
|
+
>{{ ticket.requester?.name }}</span
|
|
97
|
+
>
|
|
98
|
+
</Link>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
<div
|
|
102
|
+
v-if="hasUnassignedUrgent"
|
|
103
|
+
:class="[
|
|
104
|
+
'rounded-xl border p-4',
|
|
105
|
+
escDark ? 'border-amber-500/20 bg-amber-500/5' : 'border-amber-200 bg-amber-50',
|
|
106
|
+
]"
|
|
107
|
+
>
|
|
108
|
+
<h3
|
|
109
|
+
:class="[
|
|
110
|
+
'mb-3 flex items-center gap-2 text-sm font-semibold',
|
|
111
|
+
escDark ? 'text-amber-400' : 'text-amber-700',
|
|
112
|
+
]"
|
|
113
|
+
>
|
|
114
|
+
<span class="h-2 w-2 rounded-full bg-amber-500"></span>
|
|
115
|
+
Unassigned Urgent
|
|
116
|
+
</h3>
|
|
117
|
+
<div
|
|
118
|
+
v-for="ticket in needsAttention.unassigned_urgent"
|
|
119
|
+
:key="ticket.id"
|
|
120
|
+
class="mb-2 last:mb-0"
|
|
121
|
+
>
|
|
122
|
+
<Link
|
|
123
|
+
:href="route('escalated.agent.tickets.show', ticket.reference)"
|
|
124
|
+
:class="[
|
|
125
|
+
'flex items-center justify-between rounded-lg px-2 py-1.5 text-sm transition-colors',
|
|
126
|
+
escDark ? 'hover:bg-white/[0.04]' : 'hover:bg-amber-100/60',
|
|
127
|
+
]"
|
|
128
|
+
>
|
|
129
|
+
<span
|
|
130
|
+
:class="['font-mono text-xs', escDark ? 'text-neutral-400' : 'text-gray-500']"
|
|
131
|
+
>{{ ticket.reference }}</span
|
|
132
|
+
>
|
|
133
|
+
<PriorityBadge :priority="ticket.priority" />
|
|
134
|
+
</Link>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
<!-- Recent Tickets -->
|
|
141
|
+
<div>
|
|
142
|
+
<h2 :class="['mb-4 text-lg font-semibold', escDark ? 'text-neutral-200' : 'text-gray-900']">
|
|
143
|
+
Recent Tickets
|
|
144
|
+
</h2>
|
|
145
|
+
<div
|
|
146
|
+
:class="[
|
|
147
|
+
'overflow-hidden rounded-xl border',
|
|
148
|
+
escDark ? 'border-white/[0.06] bg-neutral-900/60' : 'border-gray-200 bg-white',
|
|
149
|
+
]"
|
|
150
|
+
>
|
|
151
|
+
<table
|
|
152
|
+
:class="[
|
|
153
|
+
'min-w-full',
|
|
154
|
+
escDark ? 'divide-y divide-white/[0.06]' : 'divide-y divide-gray-200',
|
|
155
|
+
]"
|
|
156
|
+
>
|
|
157
|
+
<thead>
|
|
158
|
+
<tr :class="escDark ? 'bg-white/[0.02]' : 'bg-gray-50'">
|
|
159
|
+
<th
|
|
160
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
161
|
+
>
|
|
162
|
+
Reference
|
|
163
|
+
</th>
|
|
164
|
+
<th
|
|
165
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
166
|
+
>
|
|
167
|
+
Subject
|
|
168
|
+
</th>
|
|
169
|
+
<th
|
|
170
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
171
|
+
>
|
|
172
|
+
Requester
|
|
173
|
+
</th>
|
|
174
|
+
<th
|
|
175
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
176
|
+
>
|
|
177
|
+
Status
|
|
178
|
+
</th>
|
|
179
|
+
<th
|
|
180
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
181
|
+
>
|
|
182
|
+
Priority
|
|
183
|
+
</th>
|
|
184
|
+
<th
|
|
185
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
186
|
+
>
|
|
187
|
+
Assignee
|
|
188
|
+
</th>
|
|
189
|
+
<th
|
|
190
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-gray-500"
|
|
191
|
+
>
|
|
192
|
+
Last Reply
|
|
193
|
+
</th>
|
|
194
|
+
</tr>
|
|
195
|
+
</thead>
|
|
196
|
+
<tbody :class="escDark ? 'divide-y divide-white/[0.04]' : 'divide-y divide-gray-100'">
|
|
197
|
+
<tr
|
|
198
|
+
v-for="ticket in recentTickets"
|
|
199
|
+
:key="ticket.id"
|
|
200
|
+
:class="[
|
|
201
|
+
'transition-colors',
|
|
202
|
+
escDark ? 'hover:bg-white/[0.03]' : 'hover:bg-gray-50',
|
|
203
|
+
]"
|
|
204
|
+
>
|
|
205
|
+
<td class="whitespace-nowrap px-4 py-3 text-sm font-medium">
|
|
206
|
+
<div class="flex items-center gap-2">
|
|
207
|
+
<span
|
|
208
|
+
v-if="slaClass(ticket)"
|
|
209
|
+
:class="['h-2 w-2 shrink-0 rounded-full', slaClass(ticket)]"
|
|
210
|
+
></span>
|
|
211
|
+
<Link
|
|
212
|
+
:href="route('escalated.agent.tickets.show', ticket.reference)"
|
|
213
|
+
:class="
|
|
214
|
+
escDark
|
|
215
|
+
? 'text-white hover:text-neutral-300'
|
|
216
|
+
: 'text-gray-900 hover:text-gray-600'
|
|
217
|
+
"
|
|
218
|
+
>
|
|
219
|
+
{{ ticket.reference }}
|
|
220
|
+
</Link>
|
|
221
|
+
</div>
|
|
222
|
+
</td>
|
|
223
|
+
<td :class="['px-4 py-3 text-sm', escDark ? 'text-neutral-300' : 'text-gray-700']">
|
|
224
|
+
{{ truncate(ticket.subject) }}
|
|
225
|
+
</td>
|
|
226
|
+
<td :class="['px-4 py-3 text-sm', escDark ? 'text-neutral-400' : 'text-gray-500']">
|
|
227
|
+
{{ ticket.requester?.name }}
|
|
228
|
+
</td>
|
|
229
|
+
<td class="px-4 py-3"><StatusBadge :status="ticket.status" /></td>
|
|
230
|
+
<td class="px-4 py-3"><PriorityBadge :priority="ticket.priority" /></td>
|
|
231
|
+
<td :class="['px-4 py-3 text-sm', escDark ? 'text-neutral-500' : 'text-gray-500']">
|
|
232
|
+
{{ ticket.assignee?.name || 'Unassigned' }}
|
|
233
|
+
</td>
|
|
234
|
+
<td
|
|
235
|
+
:class="[
|
|
236
|
+
'whitespace-nowrap px-4 py-3 text-sm',
|
|
237
|
+
escDark ? 'text-neutral-600' : 'text-gray-400',
|
|
238
|
+
]"
|
|
239
|
+
>
|
|
240
|
+
<template v-if="ticket.latest_reply">
|
|
241
|
+
<div :class="escDark ? 'text-neutral-400' : 'text-gray-500'">
|
|
242
|
+
{{ timeAgo(ticket.latest_reply.created_at) }}
|
|
243
|
+
</div>
|
|
244
|
+
<div :class="['text-xs', escDark ? 'text-neutral-600' : 'text-gray-400']">
|
|
245
|
+
{{ ticket.latest_reply.author?.name || '' }}
|
|
246
|
+
</div>
|
|
247
|
+
</template>
|
|
248
|
+
<span v-else :class="escDark ? 'text-neutral-700' : 'text-gray-300'">—</span>
|
|
249
|
+
</td>
|
|
250
|
+
</tr>
|
|
251
|
+
<tr v-if="!recentTickets?.length">
|
|
252
|
+
<td colspan="7" class="px-4 py-8 text-center text-sm text-neutral-500">
|
|
253
|
+
No recent tickets
|
|
254
|
+
</td>
|
|
255
|
+
</tr>
|
|
256
|
+
</tbody>
|
|
257
|
+
</table>
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<!-- My Performance sidebar -->
|
|
263
|
+
<div class="space-y-4">
|
|
264
|
+
<div
|
|
265
|
+
:class="[
|
|
266
|
+
'rounded-xl border p-5',
|
|
267
|
+
escDark ? 'border-white/[0.06] bg-neutral-900/60' : 'border-gray-200 bg-white',
|
|
268
|
+
]"
|
|
269
|
+
>
|
|
270
|
+
<h3 :class="['mb-4 text-sm font-semibold', escDark ? 'text-neutral-200' : 'text-gray-900']">
|
|
271
|
+
My Performance
|
|
272
|
+
</h3>
|
|
273
|
+
<dl class="space-y-3">
|
|
274
|
+
<div class="flex items-center justify-between">
|
|
275
|
+
<dt :class="['text-sm', escDark ? 'text-neutral-500' : 'text-gray-500']">
|
|
276
|
+
Resolved This Week
|
|
277
|
+
</dt>
|
|
278
|
+
<dd :class="['text-lg font-bold', escDark ? 'text-white' : 'text-gray-900']">
|
|
279
|
+
{{ myPerformance.resolved_this_week || 0 }}
|
|
280
|
+
</dd>
|
|
281
|
+
</div>
|
|
282
|
+
</dl>
|
|
283
|
+
</div>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
|
|
287
|
+
<!-- Plugin dashboard widgets -->
|
|
288
|
+
<div v-if="dashboardWidgets.length" class="mt-6 grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
289
|
+
<div
|
|
290
|
+
v-for="widget in dashboardWidgets"
|
|
291
|
+
:key="widget.id"
|
|
292
|
+
:class="[
|
|
293
|
+
'rounded-xl border p-5',
|
|
294
|
+
escDark ? 'border-white/[0.06] bg-neutral-900/60' : 'border-gray-200 bg-white',
|
|
295
|
+
widget.width === 'full' ? 'md:col-span-2' : '',
|
|
296
|
+
]"
|
|
297
|
+
>
|
|
298
|
+
<h3
|
|
299
|
+
v-if="widget.title"
|
|
300
|
+
:class="['mb-3 text-sm font-semibold', escDark ? 'text-neutral-200' : 'text-gray-900']"
|
|
301
|
+
>
|
|
302
|
+
{{ widget.title }}
|
|
303
|
+
</h3>
|
|
304
|
+
<component :is="loadWidgetComponent(widget.plugin, widget.component)" v-bind="widget.data || {}" />
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<!-- Plugin: dashboard footer slot -->
|
|
309
|
+
<PluginSlot slot="dashboard.footer" :components="getPageComponents('dashboard', 'footer')" />
|
|
310
|
+
</EscalatedLayout>
|
|
311
|
+
</template>
|