@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
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
-
import { useForm, router } from '@inertiajs/vue3';
|
|
4
|
-
import { ref } from 'vue';
|
|
5
|
-
|
|
6
|
-
defineProps({ tags: Array });
|
|
7
|
-
|
|
8
|
-
const showForm = ref(false);
|
|
9
|
-
const editingTag = ref(null);
|
|
10
|
-
|
|
11
|
-
const form = useForm({ name: '', color: '#06b6d4' });
|
|
12
|
-
|
|
13
|
-
function createTag() {
|
|
14
|
-
form.post(route('escalated.admin.tags.store'), {
|
|
15
|
-
onSuccess: () => {
|
|
16
|
-
form.reset();
|
|
17
|
-
showForm.value = false;
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
function startEdit(tag) {
|
|
23
|
-
editingTag.value = tag.id;
|
|
24
|
-
form.name = tag.name;
|
|
25
|
-
form.color = tag.color;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function updateTag(id) {
|
|
29
|
-
form.put(route('escalated.admin.tags.update', id), {
|
|
30
|
-
onSuccess: () => {
|
|
31
|
-
editingTag.value = null;
|
|
32
|
-
form.reset();
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function destroy(id) {
|
|
38
|
-
if (confirm('Delete this tag?')) {
|
|
39
|
-
router.delete(route('escalated.admin.tags.destroy', id));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<template>
|
|
45
|
-
<EscalatedLayout title="Tags">
|
|
46
|
-
<div class="mb-4 flex justify-end">
|
|
47
|
-
<button
|
|
48
|
-
:class="
|
|
49
|
-
showForm
|
|
50
|
-
? 'rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] px-4 py-2 text-sm font-medium text-[var(--esc-panel-text-secondary)] transition-colors hover:bg-[var(--esc-panel-hover)]'
|
|
51
|
-
: 'rounded-lg bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] px-4 py-2 text-sm font-medium text-white shadow-lg shadow-[var(--esc-panel-bg)]/20 transition-all hover:from-[var(--esc-panel-accent-hover)] hover:to-[var(--esc-panel-accent-secondary-hover)]'
|
|
52
|
-
"
|
|
53
|
-
@click="showForm = !showForm"
|
|
54
|
-
>
|
|
55
|
-
{{ showForm ? 'Cancel' : 'Add Tag' }}
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<form
|
|
59
|
-
v-if="showForm"
|
|
60
|
-
class="mb-6 flex items-end gap-3 rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-4"
|
|
61
|
-
@submit.prevent="createTag"
|
|
62
|
-
>
|
|
63
|
-
<div>
|
|
64
|
-
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Name</label>
|
|
65
|
-
<input
|
|
66
|
-
v-model="form.name"
|
|
67
|
-
type="text"
|
|
68
|
-
required
|
|
69
|
-
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
70
|
-
/>
|
|
71
|
-
</div>
|
|
72
|
-
<div>
|
|
73
|
-
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Color</label>
|
|
74
|
-
<input
|
|
75
|
-
v-model="form.color"
|
|
76
|
-
type="color"
|
|
77
|
-
class="mt-1 h-10 w-16 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)]"
|
|
78
|
-
/>
|
|
79
|
-
</div>
|
|
80
|
-
<button
|
|
81
|
-
type="submit"
|
|
82
|
-
:disabled="form.processing"
|
|
83
|
-
class="rounded-lg bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] px-4 py-2 text-sm font-medium text-white shadow-lg shadow-[var(--esc-panel-bg)]/20 transition-all hover:from-[var(--esc-panel-accent-hover)] hover:to-[var(--esc-panel-accent-secondary-hover)] disabled:opacity-50"
|
|
84
|
-
>
|
|
85
|
-
Create
|
|
86
|
-
</button>
|
|
87
|
-
</form>
|
|
88
|
-
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
89
|
-
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
90
|
-
<thead>
|
|
91
|
-
<tr class="bg-[var(--esc-panel-hover)]">
|
|
92
|
-
<th
|
|
93
|
-
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
94
|
-
>
|
|
95
|
-
Color
|
|
96
|
-
</th>
|
|
97
|
-
<th
|
|
98
|
-
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
99
|
-
>
|
|
100
|
-
Name
|
|
101
|
-
</th>
|
|
102
|
-
<th
|
|
103
|
-
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
104
|
-
>
|
|
105
|
-
Tickets
|
|
106
|
-
</th>
|
|
107
|
-
<th
|
|
108
|
-
class="px-4 py-3 text-right text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
109
|
-
>
|
|
110
|
-
Actions
|
|
111
|
-
</th>
|
|
112
|
-
</tr>
|
|
113
|
-
</thead>
|
|
114
|
-
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
115
|
-
<tr v-if="!tags?.length">
|
|
116
|
-
<td colspan="4" class="px-4 py-12 text-center">
|
|
117
|
-
<svg
|
|
118
|
-
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
119
|
-
fill="none"
|
|
120
|
-
stroke="currentColor"
|
|
121
|
-
stroke-width="1.5"
|
|
122
|
-
viewBox="0 0 24 24"
|
|
123
|
-
>
|
|
124
|
-
<path
|
|
125
|
-
stroke-linecap="round"
|
|
126
|
-
stroke-linejoin="round"
|
|
127
|
-
d="M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z M6 6h.008v.008H6V6z"
|
|
128
|
-
/>
|
|
129
|
-
</svg>
|
|
130
|
-
<p class="text-sm text-[var(--esc-panel-text-muted)]">No tags yet</p>
|
|
131
|
-
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
132
|
-
Create tags to categorize and filter tickets
|
|
133
|
-
</p>
|
|
134
|
-
</td>
|
|
135
|
-
</tr>
|
|
136
|
-
<tr v-for="tag in tags" :key="tag.id" class="transition-colors hover:bg-[var(--esc-panel-hover)]">
|
|
137
|
-
<td class="px-4 py-3">
|
|
138
|
-
<span
|
|
139
|
-
class="inline-block h-4 w-4 rounded-full ring-1 ring-[var(--esc-panel-border-input)]"
|
|
140
|
-
:style="{ backgroundColor: tag.color }"
|
|
141
|
-
></span>
|
|
142
|
-
</td>
|
|
143
|
-
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
144
|
-
<template v-if="editingTag === tag.id">
|
|
145
|
-
<form class="flex items-center gap-2" @submit.prevent="updateTag(tag.id)">
|
|
146
|
-
<input
|
|
147
|
-
v-model="form.name"
|
|
148
|
-
type="text"
|
|
149
|
-
required
|
|
150
|
-
class="rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
151
|
-
/>
|
|
152
|
-
<input
|
|
153
|
-
v-model="form.color"
|
|
154
|
-
type="color"
|
|
155
|
-
class="h-8 w-10 rounded border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)]"
|
|
156
|
-
/>
|
|
157
|
-
<button
|
|
158
|
-
type="submit"
|
|
159
|
-
class="text-sm text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
160
|
-
>
|
|
161
|
-
Save
|
|
162
|
-
</button>
|
|
163
|
-
<button
|
|
164
|
-
type="button"
|
|
165
|
-
class="text-sm text-[var(--esc-panel-text-tertiary)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
166
|
-
@click="editingTag = null"
|
|
167
|
-
>
|
|
168
|
-
Cancel
|
|
169
|
-
</button>
|
|
170
|
-
</form>
|
|
171
|
-
</template>
|
|
172
|
-
<template v-else>{{ tag.name }}</template>
|
|
173
|
-
</td>
|
|
174
|
-
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">{{ tag.tickets_count }}</td>
|
|
175
|
-
<td class="px-4 py-3 text-right text-sm">
|
|
176
|
-
<button
|
|
177
|
-
class="text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
178
|
-
@click="startEdit(tag)"
|
|
179
|
-
>
|
|
180
|
-
Edit
|
|
181
|
-
</button>
|
|
182
|
-
<button class="ml-3 text-rose-400 hover:text-rose-300" @click="destroy(tag.id)">
|
|
183
|
-
Delete
|
|
184
|
-
</button>
|
|
185
|
-
</td>
|
|
186
|
-
</tr>
|
|
187
|
-
</tbody>
|
|
188
|
-
</table>
|
|
189
|
-
</div>
|
|
190
|
-
</EscalatedLayout>
|
|
191
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { useForm, router } from '@inertiajs/vue3';
|
|
4
|
+
import { ref } from 'vue';
|
|
5
|
+
|
|
6
|
+
defineProps({ tags: Array });
|
|
7
|
+
|
|
8
|
+
const showForm = ref(false);
|
|
9
|
+
const editingTag = ref(null);
|
|
10
|
+
|
|
11
|
+
const form = useForm({ name: '', color: '#06b6d4' });
|
|
12
|
+
|
|
13
|
+
function createTag() {
|
|
14
|
+
form.post(route('escalated.admin.tags.store'), {
|
|
15
|
+
onSuccess: () => {
|
|
16
|
+
form.reset();
|
|
17
|
+
showForm.value = false;
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function startEdit(tag) {
|
|
23
|
+
editingTag.value = tag.id;
|
|
24
|
+
form.name = tag.name;
|
|
25
|
+
form.color = tag.color;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function updateTag(id) {
|
|
29
|
+
form.put(route('escalated.admin.tags.update', id), {
|
|
30
|
+
onSuccess: () => {
|
|
31
|
+
editingTag.value = null;
|
|
32
|
+
form.reset();
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function destroy(id) {
|
|
38
|
+
if (confirm('Delete this tag?')) {
|
|
39
|
+
router.delete(route('escalated.admin.tags.destroy', id));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<template>
|
|
45
|
+
<EscalatedLayout title="Tags">
|
|
46
|
+
<div class="mb-4 flex justify-end">
|
|
47
|
+
<button
|
|
48
|
+
:class="
|
|
49
|
+
showForm
|
|
50
|
+
? 'rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] px-4 py-2 text-sm font-medium text-[var(--esc-panel-text-secondary)] transition-colors hover:bg-[var(--esc-panel-hover)]'
|
|
51
|
+
: 'rounded-lg bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] px-4 py-2 text-sm font-medium text-white shadow-lg shadow-[var(--esc-panel-bg)]/20 transition-all hover:from-[var(--esc-panel-accent-hover)] hover:to-[var(--esc-panel-accent-secondary-hover)]'
|
|
52
|
+
"
|
|
53
|
+
@click="showForm = !showForm"
|
|
54
|
+
>
|
|
55
|
+
{{ showForm ? 'Cancel' : 'Add Tag' }}
|
|
56
|
+
</button>
|
|
57
|
+
</div>
|
|
58
|
+
<form
|
|
59
|
+
v-if="showForm"
|
|
60
|
+
class="mb-6 flex items-end gap-3 rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-4"
|
|
61
|
+
@submit.prevent="createTag"
|
|
62
|
+
>
|
|
63
|
+
<div>
|
|
64
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Name</label>
|
|
65
|
+
<input
|
|
66
|
+
v-model="form.name"
|
|
67
|
+
type="text"
|
|
68
|
+
required
|
|
69
|
+
class="mt-1 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-3 py-2 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
<div>
|
|
73
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Color</label>
|
|
74
|
+
<input
|
|
75
|
+
v-model="form.color"
|
|
76
|
+
type="color"
|
|
77
|
+
class="mt-1 h-10 w-16 rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)]"
|
|
78
|
+
/>
|
|
79
|
+
</div>
|
|
80
|
+
<button
|
|
81
|
+
type="submit"
|
|
82
|
+
:disabled="form.processing"
|
|
83
|
+
class="rounded-lg bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] px-4 py-2 text-sm font-medium text-white shadow-lg shadow-[var(--esc-panel-bg)]/20 transition-all hover:from-[var(--esc-panel-accent-hover)] hover:to-[var(--esc-panel-accent-secondary-hover)] disabled:opacity-50"
|
|
84
|
+
>
|
|
85
|
+
Create
|
|
86
|
+
</button>
|
|
87
|
+
</form>
|
|
88
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
89
|
+
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
90
|
+
<thead>
|
|
91
|
+
<tr class="bg-[var(--esc-panel-hover)]">
|
|
92
|
+
<th
|
|
93
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
94
|
+
>
|
|
95
|
+
Color
|
|
96
|
+
</th>
|
|
97
|
+
<th
|
|
98
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
99
|
+
>
|
|
100
|
+
Name
|
|
101
|
+
</th>
|
|
102
|
+
<th
|
|
103
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
104
|
+
>
|
|
105
|
+
Tickets
|
|
106
|
+
</th>
|
|
107
|
+
<th
|
|
108
|
+
class="px-4 py-3 text-right text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
109
|
+
>
|
|
110
|
+
Actions
|
|
111
|
+
</th>
|
|
112
|
+
</tr>
|
|
113
|
+
</thead>
|
|
114
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
115
|
+
<tr v-if="!tags?.length">
|
|
116
|
+
<td colspan="4" class="px-4 py-12 text-center">
|
|
117
|
+
<svg
|
|
118
|
+
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
119
|
+
fill="none"
|
|
120
|
+
stroke="currentColor"
|
|
121
|
+
stroke-width="1.5"
|
|
122
|
+
viewBox="0 0 24 24"
|
|
123
|
+
>
|
|
124
|
+
<path
|
|
125
|
+
stroke-linecap="round"
|
|
126
|
+
stroke-linejoin="round"
|
|
127
|
+
d="M9.568 3H5.25A2.25 2.25 0 003 5.25v4.318c0 .597.237 1.17.659 1.591l9.581 9.581c.699.699 1.78.872 2.607.33a18.095 18.095 0 005.223-5.223c.542-.827.369-1.908-.33-2.607L11.16 3.66A2.25 2.25 0 009.568 3z M6 6h.008v.008H6V6z"
|
|
128
|
+
/>
|
|
129
|
+
</svg>
|
|
130
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No tags yet</p>
|
|
131
|
+
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
132
|
+
Create tags to categorize and filter tickets
|
|
133
|
+
</p>
|
|
134
|
+
</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr v-for="tag in tags" :key="tag.id" class="transition-colors hover:bg-[var(--esc-panel-hover)]">
|
|
137
|
+
<td class="px-4 py-3">
|
|
138
|
+
<span
|
|
139
|
+
class="inline-block h-4 w-4 rounded-full ring-1 ring-[var(--esc-panel-border-input)]"
|
|
140
|
+
:style="{ backgroundColor: tag.color }"
|
|
141
|
+
></span>
|
|
142
|
+
</td>
|
|
143
|
+
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
144
|
+
<template v-if="editingTag === tag.id">
|
|
145
|
+
<form class="flex items-center gap-2" @submit.prevent="updateTag(tag.id)">
|
|
146
|
+
<input
|
|
147
|
+
v-model="form.name"
|
|
148
|
+
type="text"
|
|
149
|
+
required
|
|
150
|
+
class="rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] px-2 py-1 text-sm text-[var(--esc-panel-text-secondary)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]"
|
|
151
|
+
/>
|
|
152
|
+
<input
|
|
153
|
+
v-model="form.color"
|
|
154
|
+
type="color"
|
|
155
|
+
class="h-8 w-10 rounded border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)]"
|
|
156
|
+
/>
|
|
157
|
+
<button
|
|
158
|
+
type="submit"
|
|
159
|
+
class="text-sm text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
160
|
+
>
|
|
161
|
+
Save
|
|
162
|
+
</button>
|
|
163
|
+
<button
|
|
164
|
+
type="button"
|
|
165
|
+
class="text-sm text-[var(--esc-panel-text-tertiary)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
166
|
+
@click="editingTag = null"
|
|
167
|
+
>
|
|
168
|
+
Cancel
|
|
169
|
+
</button>
|
|
170
|
+
</form>
|
|
171
|
+
</template>
|
|
172
|
+
<template v-else>{{ tag.name }}</template>
|
|
173
|
+
</td>
|
|
174
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">{{ tag.tickets_count }}</td>
|
|
175
|
+
<td class="px-4 py-3 text-right text-sm">
|
|
176
|
+
<button
|
|
177
|
+
class="text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
178
|
+
@click="startEdit(tag)"
|
|
179
|
+
>
|
|
180
|
+
Edit
|
|
181
|
+
</button>
|
|
182
|
+
<button class="ml-3 text-rose-400 hover:text-rose-300" @click="destroy(tag.id)">
|
|
183
|
+
Delete
|
|
184
|
+
</button>
|
|
185
|
+
</td>
|
|
186
|
+
</tr>
|
|
187
|
+
</tbody>
|
|
188
|
+
</table>
|
|
189
|
+
</div>
|
|
190
|
+
</EscalatedLayout>
|
|
191
|
+
</template>
|
|
@@ -1,91 +1,126 @@
|
|
|
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
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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 SavedViewSidebar from '../../../components/SavedViewSidebar.vue';
|
|
12
|
+
import SaveViewDialog from '../../../components/SaveViewDialog.vue';
|
|
13
|
+
import { useKeyboardShortcuts } from '../../../composables/useKeyboardShortcuts';
|
|
14
|
+
import { usePluginExtensions } from '../../../composables/usePluginExtensions';
|
|
15
|
+
|
|
16
|
+
defineProps({
|
|
17
|
+
tickets: Object,
|
|
18
|
+
filters: Object,
|
|
19
|
+
departments: Array,
|
|
20
|
+
tags: Array,
|
|
21
|
+
agents: Array,
|
|
22
|
+
savedViews: { type: Array, default: () => [] },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const page = usePage();
|
|
26
|
+
const selectedIds = ref([]);
|
|
27
|
+
const ticketListRef = ref(null);
|
|
28
|
+
const showShortcutHelp = ref(false);
|
|
29
|
+
const showSaveDialog = ref(false);
|
|
30
|
+
const ticketFiltersRef = ref(null);
|
|
31
|
+
|
|
32
|
+
useKeyboardShortcuts({
|
|
33
|
+
j: () => {
|
|
34
|
+
ticketListRef.value?.moveDown();
|
|
35
|
+
},
|
|
36
|
+
k: () => {
|
|
37
|
+
ticketListRef.value?.moveUp();
|
|
38
|
+
},
|
|
39
|
+
x: () => {
|
|
40
|
+
ticketListRef.value?.toggleSelectFocused();
|
|
41
|
+
},
|
|
42
|
+
Enter: () => {
|
|
43
|
+
ticketListRef.value?.openFocused();
|
|
44
|
+
},
|
|
45
|
+
'?': () => {
|
|
46
|
+
showShortcutHelp.value = true;
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const { getPageComponents } = usePluginExtensions();
|
|
51
|
+
|
|
52
|
+
function applyQuickFilter(filter) {
|
|
53
|
+
router.get(route('escalated.admin.tickets.index'), filter, { preserveState: true });
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function onViewSaved() {
|
|
57
|
+
router.reload({ only: ['savedViews'] });
|
|
58
|
+
}
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<template>
|
|
62
|
+
<EscalatedLayout title="All Tickets">
|
|
63
|
+
<div class="flex gap-6">
|
|
64
|
+
<!-- Saved Views Sidebar -->
|
|
65
|
+
<aside v-if="savedViews && savedViews.length" class="hidden w-52 shrink-0 lg:block">
|
|
66
|
+
<div class="sticky top-4">
|
|
67
|
+
<h3 class="mb-2 px-3 text-xs font-semibold uppercase tracking-wider text-gray-400">Views</h3>
|
|
68
|
+
<SavedViewSidebar
|
|
69
|
+
:saved-views="savedViews"
|
|
70
|
+
:current-filters="filters"
|
|
71
|
+
:route="route('escalated.admin.tickets.index')"
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</aside>
|
|
75
|
+
|
|
76
|
+
<!-- Main content -->
|
|
77
|
+
<div class="min-w-0 flex-1">
|
|
78
|
+
<div class="mb-4">
|
|
79
|
+
<QuickFilters :current-user-id="page.props.auth?.user?.id" @filter="applyQuickFilter" />
|
|
80
|
+
</div>
|
|
81
|
+
<PluginSlot
|
|
82
|
+
slot="ticket.list.before_filters"
|
|
83
|
+
:components="getPageComponents('ticket.list', 'before_filters')"
|
|
84
|
+
/>
|
|
85
|
+
<div class="mb-6">
|
|
86
|
+
<TicketFilters
|
|
87
|
+
ref="ticketFiltersRef"
|
|
88
|
+
:filters="filters"
|
|
89
|
+
:route="route('escalated.admin.tickets.index')"
|
|
90
|
+
:departments="departments"
|
|
91
|
+
:tags="tags"
|
|
92
|
+
:agents="agents"
|
|
93
|
+
show-assignee
|
|
94
|
+
show-following
|
|
95
|
+
@save-view="showSaveDialog = true"
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
<TicketList
|
|
99
|
+
ref="ticketListRef"
|
|
100
|
+
v-model:selected-ids="selectedIds"
|
|
101
|
+
:tickets="tickets"
|
|
102
|
+
route-prefix="escalated.admin.tickets"
|
|
103
|
+
:columns="['reference', 'subject', 'requester', 'status', 'priority', 'assignee', 'updated']"
|
|
104
|
+
selectable
|
|
105
|
+
navigable
|
|
106
|
+
/>
|
|
107
|
+
<BulkActionBar
|
|
108
|
+
:selected-ids="selectedIds"
|
|
109
|
+
:bulk-route="route('escalated.admin.tickets.bulk')"
|
|
110
|
+
:agents="agents"
|
|
111
|
+
:departments="departments"
|
|
112
|
+
@clear="selectedIds = []"
|
|
113
|
+
/>
|
|
114
|
+
<PluginSlot slot="ticket.list.footer" :components="getPageComponents('ticket.list', 'footer')" />
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<SaveViewDialog
|
|
119
|
+
:show="showSaveDialog"
|
|
120
|
+
:filters="ticketFiltersRef?.filterData || filters"
|
|
121
|
+
@close="showSaveDialog = false"
|
|
122
|
+
@saved="onViewSaved"
|
|
123
|
+
/>
|
|
124
|
+
<KeyboardShortcutHelp v-model:show="showShortcutHelp" context="list" />
|
|
125
|
+
</EscalatedLayout>
|
|
126
|
+
</template>
|