@escalated-dev/escalated 0.7.0 → 0.7.1
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 +31 -0
- package/package.json +12 -6
- 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 +29 -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 +79 -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 +80 -80
- 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/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 +53 -53
- package/src/pages/Admin/Skills/Index.vue +94 -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/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 +31 -31
- 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 +25 -0
- 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
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import AgentLoadIndicator from './AgentLoadIndicator.vue';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: 'Components/AgentLoadIndicator',
|
|
5
|
-
component: AgentLoadIndicator,
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const Low = { args: { current: 3, max: 20 } };
|
|
9
|
-
export const Medium = { args: { current: 15, max: 20 } };
|
|
10
|
-
export const High = { args: { current: 18, max: 20 } };
|
|
11
|
-
export const Full = { args: { current: 20, max: 20 } };
|
|
12
|
-
|
|
13
|
-
export const AllLevels = {
|
|
14
|
-
render: () => ({
|
|
15
|
-
components: { AgentLoadIndicator },
|
|
16
|
-
template: `
|
|
17
|
-
<div class="space-y-3" style="max-width: 200px;">
|
|
18
|
-
<div class="flex items-center justify-between">
|
|
19
|
-
<span class="text-xs text-neutral-400">Light</span>
|
|
20
|
-
<AgentLoadIndicator :current="3" :max="20" />
|
|
21
|
-
</div>
|
|
22
|
-
<div class="flex items-center justify-between">
|
|
23
|
-
<span class="text-xs text-neutral-400">Moderate</span>
|
|
24
|
-
<AgentLoadIndicator :current="12" :max="20" />
|
|
25
|
-
</div>
|
|
26
|
-
<div class="flex items-center justify-between">
|
|
27
|
-
<span class="text-xs text-neutral-400">Heavy</span>
|
|
28
|
-
<AgentLoadIndicator :current="16" :max="20" />
|
|
29
|
-
</div>
|
|
30
|
-
<div class="flex items-center justify-between">
|
|
31
|
-
<span class="text-xs text-neutral-400">At Capacity</span>
|
|
32
|
-
<AgentLoadIndicator :current="20" :max="20" />
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
`,
|
|
36
|
-
}),
|
|
37
|
-
};
|
|
1
|
+
import AgentLoadIndicator from './AgentLoadIndicator.vue';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Components/AgentLoadIndicator',
|
|
5
|
+
component: AgentLoadIndicator,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export const Low = { args: { current: 3, max: 20 } };
|
|
9
|
+
export const Medium = { args: { current: 15, max: 20 } };
|
|
10
|
+
export const High = { args: { current: 18, max: 20 } };
|
|
11
|
+
export const Full = { args: { current: 20, max: 20 } };
|
|
12
|
+
|
|
13
|
+
export const AllLevels = {
|
|
14
|
+
render: () => ({
|
|
15
|
+
components: { AgentLoadIndicator },
|
|
16
|
+
template: `
|
|
17
|
+
<div class="space-y-3" style="max-width: 200px;">
|
|
18
|
+
<div class="flex items-center justify-between">
|
|
19
|
+
<span class="text-xs text-neutral-400">Light</span>
|
|
20
|
+
<AgentLoadIndicator :current="3" :max="20" />
|
|
21
|
+
</div>
|
|
22
|
+
<div class="flex items-center justify-between">
|
|
23
|
+
<span class="text-xs text-neutral-400">Moderate</span>
|
|
24
|
+
<AgentLoadIndicator :current="12" :max="20" />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="flex items-center justify-between">
|
|
27
|
+
<span class="text-xs text-neutral-400">Heavy</span>
|
|
28
|
+
<AgentLoadIndicator :current="16" :max="20" />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex items-center justify-between">
|
|
31
|
+
<span class="text-xs text-neutral-400">At Capacity</span>
|
|
32
|
+
<AgentLoadIndicator :current="20" :max="20" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
`,
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
current: { type: Number, required: true },
|
|
6
|
-
max: { type: Number, required: true },
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const escDark = inject(
|
|
10
|
-
'esc-dark',
|
|
11
|
-
computed(() => false),
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
const percentage = computed(() => {
|
|
15
|
-
if (props.max <= 0) return 100;
|
|
16
|
-
return Math.round((props.current / props.max) * 100);
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const colorClass = computed(() => {
|
|
20
|
-
if (percentage.value >= 90) return 'bg-rose-500';
|
|
21
|
-
if (percentage.value >= 70) return 'bg-amber-500';
|
|
22
|
-
return 'bg-emerald-500';
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const textColorClass = computed(() => {
|
|
26
|
-
if (percentage.value >= 90) return escDark.value ? 'text-rose-400' : 'text-rose-600';
|
|
27
|
-
if (percentage.value >= 70) return escDark.value ? 'text-amber-400' : 'text-amber-600';
|
|
28
|
-
return escDark.value ? 'text-emerald-400' : 'text-emerald-600';
|
|
29
|
-
});
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<div
|
|
34
|
-
class="flex items-center gap-2"
|
|
35
|
-
role="meter"
|
|
36
|
-
:aria-valuenow="percentage"
|
|
37
|
-
aria-valuemin="0"
|
|
38
|
-
aria-valuemax="100"
|
|
39
|
-
aria-label="Agent workload"
|
|
40
|
-
>
|
|
41
|
-
<div :class="['h-2 w-20 overflow-hidden rounded-full', escDark ? 'bg-white/[0.06]' : 'bg-gray-200']">
|
|
42
|
-
<div
|
|
43
|
-
:class="['h-full rounded-full transition-all', colorClass]"
|
|
44
|
-
:style="{ width: Math.min(percentage, 100) + '%' }"
|
|
45
|
-
></div>
|
|
46
|
-
</div>
|
|
47
|
-
<span :class="['text-xs font-medium', textColorClass]">{{ current }}/{{ max }}</span>
|
|
48
|
-
</div>
|
|
49
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
current: { type: Number, required: true },
|
|
6
|
+
max: { type: Number, required: true },
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const escDark = inject(
|
|
10
|
+
'esc-dark',
|
|
11
|
+
computed(() => false),
|
|
12
|
+
);
|
|
13
|
+
|
|
14
|
+
const percentage = computed(() => {
|
|
15
|
+
if (props.max <= 0) return 100;
|
|
16
|
+
return Math.round((props.current / props.max) * 100);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const colorClass = computed(() => {
|
|
20
|
+
if (percentage.value >= 90) return 'bg-rose-500';
|
|
21
|
+
if (percentage.value >= 70) return 'bg-amber-500';
|
|
22
|
+
return 'bg-emerald-500';
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const textColorClass = computed(() => {
|
|
26
|
+
if (percentage.value >= 90) return escDark.value ? 'text-rose-400' : 'text-rose-600';
|
|
27
|
+
if (percentage.value >= 70) return escDark.value ? 'text-amber-400' : 'text-amber-600';
|
|
28
|
+
return escDark.value ? 'text-emerald-400' : 'text-emerald-600';
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div
|
|
34
|
+
class="flex items-center gap-2"
|
|
35
|
+
role="meter"
|
|
36
|
+
:aria-valuenow="percentage"
|
|
37
|
+
aria-valuemin="0"
|
|
38
|
+
aria-valuemax="100"
|
|
39
|
+
aria-label="Agent workload"
|
|
40
|
+
>
|
|
41
|
+
<div :class="['h-2 w-20 overflow-hidden rounded-full', escDark ? 'bg-white/[0.06]' : 'bg-gray-200']">
|
|
42
|
+
<div
|
|
43
|
+
:class="['h-full rounded-full transition-all', colorClass]"
|
|
44
|
+
:style="{ width: Math.min(percentage, 100) + '%' }"
|
|
45
|
+
></div>
|
|
46
|
+
</div>
|
|
47
|
+
<span :class="['text-xs font-medium', textColorClass]">{{ current }}/{{ max }}</span>
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
defineProps({
|
|
3
|
-
agent: { type: Object, required: true },
|
|
4
|
-
});
|
|
5
|
-
</script>
|
|
6
|
-
|
|
7
|
-
<template>
|
|
8
|
-
<div class="rounded-xl border border-white/[0.06] bg-neutral-900/60 p-5">
|
|
9
|
-
<div class="mb-4 flex items-center gap-3">
|
|
10
|
-
<div
|
|
11
|
-
class="flex h-10 w-10 items-center justify-center rounded-lg bg-gradient-to-br from-cyan-500/20 to-violet-500/20 text-sm font-bold text-white"
|
|
12
|
-
>
|
|
13
|
-
{{ agent.agent_name?.charAt(0)?.toUpperCase() || '?' }}
|
|
14
|
-
</div>
|
|
15
|
-
<div>
|
|
16
|
-
<div class="text-sm font-semibold text-neutral-200">{{ agent.agent_name }}</div>
|
|
17
|
-
<div class="text-xs text-neutral-500">Agent</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="grid grid-cols-2 gap-3">
|
|
22
|
-
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
23
|
-
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Total Tickets</div>
|
|
24
|
-
<div class="mt-1 text-lg font-bold text-white">{{ agent.total_tickets }}</div>
|
|
25
|
-
</div>
|
|
26
|
-
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
27
|
-
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Resolved</div>
|
|
28
|
-
<div class="mt-1 text-lg font-bold text-emerald-400">{{ agent.resolved_tickets }}</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
31
|
-
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Avg Response</div>
|
|
32
|
-
<div class="mt-1 text-lg font-bold text-white">
|
|
33
|
-
{{ agent.avg_response_hours ?? '—' }}<span class="text-xs text-neutral-500">h</span>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
37
|
-
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Avg Resolution</div>
|
|
38
|
-
<div class="mt-1 text-lg font-bold text-white">
|
|
39
|
-
{{ agent.avg_resolution_hours ?? '—' }}<span class="text-xs text-neutral-500">h</span>
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
defineProps({
|
|
3
|
+
agent: { type: Object, required: true },
|
|
4
|
+
});
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="rounded-xl border border-white/[0.06] bg-neutral-900/60 p-5">
|
|
9
|
+
<div class="mb-4 flex items-center gap-3">
|
|
10
|
+
<div
|
|
11
|
+
class="flex h-10 w-10 items-center justify-center rounded-lg bg-gradient-to-br from-cyan-500/20 to-violet-500/20 text-sm font-bold text-white"
|
|
12
|
+
>
|
|
13
|
+
{{ agent.agent_name?.charAt(0)?.toUpperCase() || '?' }}
|
|
14
|
+
</div>
|
|
15
|
+
<div>
|
|
16
|
+
<div class="text-sm font-semibold text-neutral-200">{{ agent.agent_name }}</div>
|
|
17
|
+
<div class="text-xs text-neutral-500">Agent</div>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<div class="grid grid-cols-2 gap-3">
|
|
22
|
+
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
23
|
+
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Total Tickets</div>
|
|
24
|
+
<div class="mt-1 text-lg font-bold text-white">{{ agent.total_tickets }}</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
27
|
+
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Resolved</div>
|
|
28
|
+
<div class="mt-1 text-lg font-bold text-emerald-400">{{ agent.resolved_tickets }}</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
31
|
+
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Avg Response</div>
|
|
32
|
+
<div class="mt-1 text-lg font-bold text-white">
|
|
33
|
+
{{ agent.avg_response_hours ?? '—' }}<span class="text-xs text-neutral-500">h</span>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="rounded-lg bg-white/[0.03] p-3">
|
|
37
|
+
<div class="text-[11px] font-medium uppercase tracking-wider text-neutral-600">Avg Resolution</div>
|
|
38
|
+
<div class="mt-1 text-lg font-bold text-white">
|
|
39
|
+
{{ agent.avg_resolution_hours ?? '—' }}<span class="text-xs text-neutral-500">h</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</template>
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref } from 'vue';
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
modelValue: { type: String, default: '' },
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
const emit = defineEmits(['update:modelValue']);
|
|
9
|
-
const textarea = ref(null);
|
|
10
|
-
|
|
11
|
-
function insertMarkdown(before, after = '') {
|
|
12
|
-
const el = textarea.value;
|
|
13
|
-
if (!el) return;
|
|
14
|
-
|
|
15
|
-
const start = el.selectionStart;
|
|
16
|
-
const end = el.selectionEnd;
|
|
17
|
-
const text = props.modelValue;
|
|
18
|
-
const selected = text.substring(start, end);
|
|
19
|
-
const replacement = before + (selected || 'text') + after;
|
|
20
|
-
const newValue = text.substring(0, start) + replacement + text.substring(end);
|
|
21
|
-
|
|
22
|
-
emit('update:modelValue', newValue);
|
|
23
|
-
|
|
24
|
-
requestAnimationFrame(() => {
|
|
25
|
-
el.focus();
|
|
26
|
-
const cursorPos = start + before.length + (selected ? selected.length : 4);
|
|
27
|
-
el.setSelectionRange(cursorPos, cursorPos);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function insertBold() {
|
|
32
|
-
insertMarkdown('**', '**');
|
|
33
|
-
}
|
|
34
|
-
function insertItalic() {
|
|
35
|
-
insertMarkdown('*', '*');
|
|
36
|
-
}
|
|
37
|
-
function insertLink() {
|
|
38
|
-
insertMarkdown('[', '](url)');
|
|
39
|
-
}
|
|
40
|
-
function insertHeading() {
|
|
41
|
-
insertMarkdown('## ');
|
|
42
|
-
}
|
|
43
|
-
function insertList() {
|
|
44
|
-
insertMarkdown('- ');
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const buttons = [
|
|
48
|
-
{ label: 'Bold', action: insertBold, icon: 'B', cls: 'font-bold' },
|
|
49
|
-
{ label: 'Italic', action: insertItalic, icon: 'I', cls: 'italic' },
|
|
50
|
-
{ label: 'Link', action: insertLink, icon: 'Link', cls: '' },
|
|
51
|
-
{ label: 'Heading', action: insertHeading, icon: 'H', cls: 'font-bold' },
|
|
52
|
-
{ label: 'List', action: insertList, icon: 'List', cls: '' },
|
|
53
|
-
];
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<template>
|
|
57
|
-
<div>
|
|
58
|
-
<div class="flex gap-1 rounded-t-lg border border-white/[0.06] bg-neutral-800/60 px-2 py-1.5">
|
|
59
|
-
<button
|
|
60
|
-
v-for="btn in buttons"
|
|
61
|
-
:key="btn.label"
|
|
62
|
-
type="button"
|
|
63
|
-
:title="btn.label"
|
|
64
|
-
:class="[
|
|
65
|
-
'rounded px-2.5 py-1 text-xs text-neutral-400 transition-colors hover:bg-white/[0.08] hover:text-neutral-200',
|
|
66
|
-
btn.cls,
|
|
67
|
-
]"
|
|
68
|
-
@click="btn.action"
|
|
69
|
-
>
|
|
70
|
-
{{ btn.icon }}
|
|
71
|
-
</button>
|
|
72
|
-
</div>
|
|
73
|
-
<textarea
|
|
74
|
-
ref="textarea"
|
|
75
|
-
:value="modelValue"
|
|
76
|
-
class="block w-full rounded-b-lg border border-t-0 border-white/[0.06] bg-white/[0.03] px-3 py-3 text-sm text-neutral-200 placeholder-neutral-600 focus:border-cyan-500/40 focus:outline-none focus:ring-1 focus:ring-cyan-500/40"
|
|
77
|
-
rows="16"
|
|
78
|
-
placeholder="Write your article content using Markdown..."
|
|
79
|
-
@input="emit('update:modelValue', $event.target.value)"
|
|
80
|
-
></textarea>
|
|
81
|
-
</div>
|
|
82
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
modelValue: { type: String, default: '' },
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const emit = defineEmits(['update:modelValue']);
|
|
9
|
+
const textarea = ref(null);
|
|
10
|
+
|
|
11
|
+
function insertMarkdown(before, after = '') {
|
|
12
|
+
const el = textarea.value;
|
|
13
|
+
if (!el) return;
|
|
14
|
+
|
|
15
|
+
const start = el.selectionStart;
|
|
16
|
+
const end = el.selectionEnd;
|
|
17
|
+
const text = props.modelValue;
|
|
18
|
+
const selected = text.substring(start, end);
|
|
19
|
+
const replacement = before + (selected || 'text') + after;
|
|
20
|
+
const newValue = text.substring(0, start) + replacement + text.substring(end);
|
|
21
|
+
|
|
22
|
+
emit('update:modelValue', newValue);
|
|
23
|
+
|
|
24
|
+
requestAnimationFrame(() => {
|
|
25
|
+
el.focus();
|
|
26
|
+
const cursorPos = start + before.length + (selected ? selected.length : 4);
|
|
27
|
+
el.setSelectionRange(cursorPos, cursorPos);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function insertBold() {
|
|
32
|
+
insertMarkdown('**', '**');
|
|
33
|
+
}
|
|
34
|
+
function insertItalic() {
|
|
35
|
+
insertMarkdown('*', '*');
|
|
36
|
+
}
|
|
37
|
+
function insertLink() {
|
|
38
|
+
insertMarkdown('[', '](url)');
|
|
39
|
+
}
|
|
40
|
+
function insertHeading() {
|
|
41
|
+
insertMarkdown('## ');
|
|
42
|
+
}
|
|
43
|
+
function insertList() {
|
|
44
|
+
insertMarkdown('- ');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const buttons = [
|
|
48
|
+
{ label: 'Bold', action: insertBold, icon: 'B', cls: 'font-bold' },
|
|
49
|
+
{ label: 'Italic', action: insertItalic, icon: 'I', cls: 'italic' },
|
|
50
|
+
{ label: 'Link', action: insertLink, icon: 'Link', cls: '' },
|
|
51
|
+
{ label: 'Heading', action: insertHeading, icon: 'H', cls: 'font-bold' },
|
|
52
|
+
{ label: 'List', action: insertList, icon: 'List', cls: '' },
|
|
53
|
+
];
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<template>
|
|
57
|
+
<div>
|
|
58
|
+
<div class="flex gap-1 rounded-t-lg border border-white/[0.06] bg-neutral-800/60 px-2 py-1.5">
|
|
59
|
+
<button
|
|
60
|
+
v-for="btn in buttons"
|
|
61
|
+
:key="btn.label"
|
|
62
|
+
type="button"
|
|
63
|
+
:title="btn.label"
|
|
64
|
+
:class="[
|
|
65
|
+
'rounded px-2.5 py-1 text-xs text-neutral-400 transition-colors hover:bg-white/[0.08] hover:text-neutral-200',
|
|
66
|
+
btn.cls,
|
|
67
|
+
]"
|
|
68
|
+
@click="btn.action"
|
|
69
|
+
>
|
|
70
|
+
{{ btn.icon }}
|
|
71
|
+
</button>
|
|
72
|
+
</div>
|
|
73
|
+
<textarea
|
|
74
|
+
ref="textarea"
|
|
75
|
+
:value="modelValue"
|
|
76
|
+
class="block w-full rounded-b-lg border border-t-0 border-white/[0.06] bg-white/[0.03] px-3 py-3 text-sm text-neutral-200 placeholder-neutral-600 focus:border-cyan-500/40 focus:outline-none focus:ring-1 focus:ring-cyan-500/40"
|
|
77
|
+
rows="16"
|
|
78
|
+
placeholder="Write your article content using Markdown..."
|
|
79
|
+
@input="emit('update:modelValue', $event.target.value)"
|
|
80
|
+
></textarea>
|
|
81
|
+
</div>
|
|
82
|
+
</template>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, inject } from 'vue';
|
|
3
|
-
|
|
4
|
-
defineProps({
|
|
5
|
-
agents: { type: Array, required: true },
|
|
6
|
-
modelValue: { type: [Number, String], default: null },
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const emit = defineEmits(['update:modelValue']);
|
|
10
|
-
const dark = inject(
|
|
11
|
-
'esc-dark',
|
|
12
|
-
computed(() => false),
|
|
13
|
-
);
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div>
|
|
18
|
-
<label
|
|
19
|
-
:class="['mb-1 block text-xs font-medium', dark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-600']"
|
|
20
|
-
>Assigned To</label
|
|
21
|
-
>
|
|
22
|
-
<select
|
|
23
|
-
:value="modelValue"
|
|
24
|
-
aria-label="Assign to agent"
|
|
25
|
-
:class="[
|
|
26
|
-
'w-full rounded-md border px-2 py-1.5 text-sm focus:outline-none',
|
|
27
|
-
dark
|
|
28
|
-
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:ring-1 focus:ring-[var(--esc-panel-border-input)]'
|
|
29
|
-
: 'border-gray-300 focus:border-blue-500',
|
|
30
|
-
]"
|
|
31
|
-
@change="emit('update:modelValue', $event.target.value || null)"
|
|
32
|
-
>
|
|
33
|
-
<option value="">Unassigned</option>
|
|
34
|
-
<option v-for="agent in agents" :key="agent.id" :value="agent.id">{{ agent.name }}</option>
|
|
35
|
-
</select>
|
|
36
|
-
</div>
|
|
37
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject } from 'vue';
|
|
3
|
+
|
|
4
|
+
defineProps({
|
|
5
|
+
agents: { type: Array, required: true },
|
|
6
|
+
modelValue: { type: [Number, String], default: null },
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const emit = defineEmits(['update:modelValue']);
|
|
10
|
+
const dark = inject(
|
|
11
|
+
'esc-dark',
|
|
12
|
+
computed(() => false),
|
|
13
|
+
);
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div>
|
|
18
|
+
<label
|
|
19
|
+
:class="['mb-1 block text-xs font-medium', dark ? 'text-[var(--esc-panel-text-muted)]' : 'text-gray-600']"
|
|
20
|
+
>Assigned To</label
|
|
21
|
+
>
|
|
22
|
+
<select
|
|
23
|
+
:value="modelValue"
|
|
24
|
+
aria-label="Assign to agent"
|
|
25
|
+
:class="[
|
|
26
|
+
'w-full rounded-md border px-2 py-1.5 text-sm focus:outline-none',
|
|
27
|
+
dark
|
|
28
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:ring-1 focus:ring-[var(--esc-panel-border-input)]'
|
|
29
|
+
: 'border-gray-300 focus:border-blue-500',
|
|
30
|
+
]"
|
|
31
|
+
@change="emit('update:modelValue', $event.target.value || null)"
|
|
32
|
+
>
|
|
33
|
+
<option value="">Unassigned</option>
|
|
34
|
+
<option v-for="agent in agents" :key="agent.id" :value="agent.id">{{ agent.name }}</option>
|
|
35
|
+
</select>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
@@ -22,6 +22,18 @@ function iconForMime(mime) {
|
|
|
22
22
|
if (mime === 'application/pdf') return '📄';
|
|
23
23
|
return '📎';
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
function attachmentUrl(attachment) {
|
|
27
|
+
if (attachment.url) return attachment.url;
|
|
28
|
+
if (typeof window.route === 'function') {
|
|
29
|
+
try {
|
|
30
|
+
return window.route('escalated.attachments.download', attachment.id);
|
|
31
|
+
} catch {
|
|
32
|
+
// route not registered
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return `/escalated/attachments/${attachment.id}/download`;
|
|
36
|
+
}
|
|
25
37
|
</script>
|
|
26
38
|
|
|
27
39
|
<template>
|
|
@@ -36,7 +48,7 @@ function iconForMime(mime) {
|
|
|
36
48
|
>
|
|
37
49
|
<span>{{ iconForMime(attachment.mime_type) }}</span>
|
|
38
50
|
<a
|
|
39
|
-
:href="attachment
|
|
51
|
+
:href="attachmentUrl(attachment)"
|
|
40
52
|
target="_blank"
|
|
41
53
|
:class="[
|
|
42
54
|
'flex-1 truncate font-medium hover:underline',
|