@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,225 +1,270 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { inject, computed, reactive, ref, watch } from 'vue';
|
|
3
|
-
import { router } from '@inertiajs/vue3';
|
|
4
|
-
import { TICKET_STATUSES, TICKET_PRIORITIES } from '../utils/constants';
|
|
5
|
-
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
statuses: {
|
|
8
|
-
type: Array,
|
|
9
|
-
default: () => TICKET_STATUSES,
|
|
10
|
-
},
|
|
11
|
-
priorities: { type: Array, default: () => TICKET_PRIORITIES },
|
|
12
|
-
agents: { type: Array, default: () => [] },
|
|
13
|
-
departments: { type: Array, default: () => [] },
|
|
14
|
-
tags: { type: Array, default: () => [] },
|
|
15
|
-
filters: { type: Object, default: () => ({}) },
|
|
16
|
-
route: { type: String, required: true },
|
|
17
|
-
modelValue: { type: Object, default: () => ({}) },
|
|
18
|
-
showFollowing: { type: Boolean, default: false },
|
|
19
|
-
showAssignee: { type: Boolean, default: false },
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const emit = defineEmits(['update:modelValue']);
|
|
23
|
-
const escDark = inject(
|
|
24
|
-
'esc-dark',
|
|
25
|
-
computed(() => false),
|
|
26
|
-
);
|
|
27
|
-
|
|
28
|
-
const initial = { ...props.filters, ...props.modelValue };
|
|
29
|
-
|
|
30
|
-
const filterData = reactive({
|
|
31
|
-
status: initial.status || '',
|
|
32
|
-
priority: initial.priority || '',
|
|
33
|
-
assigned_to: initial.assigned_to || '',
|
|
34
|
-
department_id: initial.department_id || '',
|
|
35
|
-
search: initial.search || '',
|
|
36
|
-
following: initial.following || '',
|
|
37
|
-
created_after: initial.created_after || '',
|
|
38
|
-
created_before: initial.created_before || '',
|
|
39
|
-
tag: initial.tag || '',
|
|
40
|
-
has_attachments: initial.has_attachments || '',
|
|
41
|
-
requester: initial.requester || '',
|
|
42
|
-
ticket_type: initial.ticket_type || '',
|
|
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
|
-
<option
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
>
|
|
146
|
-
<option value="">All
|
|
147
|
-
<option
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { inject, computed, reactive, ref, watch } from 'vue';
|
|
3
|
+
import { router } from '@inertiajs/vue3';
|
|
4
|
+
import { TICKET_STATUSES, TICKET_PRIORITIES } from '../utils/constants';
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
statuses: {
|
|
8
|
+
type: Array,
|
|
9
|
+
default: () => TICKET_STATUSES,
|
|
10
|
+
},
|
|
11
|
+
priorities: { type: Array, default: () => TICKET_PRIORITIES },
|
|
12
|
+
agents: { type: Array, default: () => [] },
|
|
13
|
+
departments: { type: Array, default: () => [] },
|
|
14
|
+
tags: { type: Array, default: () => [] },
|
|
15
|
+
filters: { type: Object, default: () => ({}) },
|
|
16
|
+
route: { type: String, required: true },
|
|
17
|
+
modelValue: { type: Object, default: () => ({}) },
|
|
18
|
+
showFollowing: { type: Boolean, default: false },
|
|
19
|
+
showAssignee: { type: Boolean, default: false },
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const emit = defineEmits(['update:modelValue', 'save-view']);
|
|
23
|
+
const escDark = inject(
|
|
24
|
+
'esc-dark',
|
|
25
|
+
computed(() => false),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
const initial = { ...props.filters, ...props.modelValue };
|
|
29
|
+
|
|
30
|
+
const filterData = reactive({
|
|
31
|
+
status: initial.status || '',
|
|
32
|
+
priority: initial.priority || '',
|
|
33
|
+
assigned_to: initial.assigned_to || '',
|
|
34
|
+
department_id: initial.department_id || '',
|
|
35
|
+
search: initial.search || '',
|
|
36
|
+
following: initial.following || '',
|
|
37
|
+
created_after: initial.created_after || '',
|
|
38
|
+
created_before: initial.created_before || '',
|
|
39
|
+
tag: initial.tag || '',
|
|
40
|
+
has_attachments: initial.has_attachments || '',
|
|
41
|
+
requester: initial.requester || '',
|
|
42
|
+
ticket_type: initial.ticket_type || '',
|
|
43
|
+
snoozed: initial.snoozed || '',
|
|
44
|
+
live_chat: initial.live_chat || '',
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const showAdvanced = ref(
|
|
48
|
+
!!(initial.created_after || initial.created_before || initial.tag || initial.has_attachments || initial.requester),
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// Debounced watcher that navigates via Inertia router
|
|
52
|
+
let debounceTimer = null;
|
|
53
|
+
|
|
54
|
+
watch(
|
|
55
|
+
filterData,
|
|
56
|
+
(val) => {
|
|
57
|
+
emit('update:modelValue', { ...val });
|
|
58
|
+
|
|
59
|
+
if (debounceTimer) {
|
|
60
|
+
clearTimeout(debounceTimer);
|
|
61
|
+
}
|
|
62
|
+
debounceTimer = setTimeout(() => {
|
|
63
|
+
// Strip empty values to keep the URL clean
|
|
64
|
+
const params = {};
|
|
65
|
+
for (const [key, value] of Object.entries(val)) {
|
|
66
|
+
if (value !== '' && value !== null && value !== undefined) {
|
|
67
|
+
params[key] = value;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
router.get(props.route, params, { preserveState: true, preserveScroll: true });
|
|
71
|
+
}, 300);
|
|
72
|
+
},
|
|
73
|
+
{ deep: true },
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
const inputClass = computed(() =>
|
|
77
|
+
escDark.value
|
|
78
|
+
? 'rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] px-3 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] placeholder-[var(--esc-panel-text-muted)] focus:border-[var(--esc-panel-border-input)] focus:outline-none focus:ring-1 focus:ring-[var(--esc-panel-border-input)]'
|
|
79
|
+
: 'rounded-md border border-gray-300 px-3 py-1.5 text-sm focus:border-blue-500 focus:outline-none',
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const selectClass = computed(() =>
|
|
83
|
+
escDark.value
|
|
84
|
+
? 'rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] px-2 py-1.5 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)]'
|
|
85
|
+
: 'rounded-md border border-gray-300 px-2 py-1.5 text-sm',
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const checkboxClass = computed(() =>
|
|
89
|
+
escDark.value
|
|
90
|
+
? 'h-4 w-4 rounded border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] text-[var(--esc-panel-accent)] focus:ring-[var(--esc-panel-accent)]/20'
|
|
91
|
+
: 'h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-500',
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const toggleBtnClass = computed(() =>
|
|
95
|
+
escDark.value
|
|
96
|
+
? 'rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] px-3 py-1.5 text-sm text-[var(--esc-panel-text-secondary)] hover:bg-[var(--esc-panel-surface-alt)] transition-colors'
|
|
97
|
+
: 'rounded-md border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-600 hover:bg-gray-50 transition-colors',
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const labelClass = computed(() =>
|
|
101
|
+
escDark.value ? 'text-xs font-medium text-[var(--esc-panel-text-tertiary)]' : 'text-xs font-medium text-gray-500',
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const hasActiveFilters = computed(() => {
|
|
105
|
+
return Object.values(filterData).some((v) => v !== '' && v !== null && v !== undefined);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
defineExpose({ filterData });
|
|
109
|
+
</script>
|
|
110
|
+
|
|
111
|
+
<template>
|
|
112
|
+
<div class="space-y-3">
|
|
113
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
114
|
+
<input
|
|
115
|
+
v-model="filterData.search"
|
|
116
|
+
type="text"
|
|
117
|
+
placeholder="Search tickets..."
|
|
118
|
+
aria-label="Search tickets"
|
|
119
|
+
:class="inputClass"
|
|
120
|
+
/>
|
|
121
|
+
<button type="button" :class="toggleBtnClass" @click="showAdvanced = !showAdvanced">
|
|
122
|
+
{{ showAdvanced ? 'Simple' : 'Advanced' }}
|
|
123
|
+
</button>
|
|
124
|
+
<button
|
|
125
|
+
v-if="hasActiveFilters"
|
|
126
|
+
type="button"
|
|
127
|
+
:class="[
|
|
128
|
+
'rounded-md px-3 py-1.5 text-sm font-medium transition-colors',
|
|
129
|
+
escDark
|
|
130
|
+
? 'bg-cyan-600/20 text-cyan-400 hover:bg-cyan-600/30'
|
|
131
|
+
: 'bg-blue-50 text-blue-700 hover:bg-blue-100',
|
|
132
|
+
]"
|
|
133
|
+
@click="emit('save-view')"
|
|
134
|
+
>
|
|
135
|
+
Save as View
|
|
136
|
+
</button>
|
|
137
|
+
<select v-model="filterData.status" aria-label="Filter by status" :class="selectClass">
|
|
138
|
+
<option value="">All Statuses</option>
|
|
139
|
+
<option v-for="s in statuses" :key="s" :value="s">{{ s.replace(/_/g, ' ') }}</option>
|
|
140
|
+
</select>
|
|
141
|
+
<select v-model="filterData.priority" aria-label="Filter by priority" :class="selectClass">
|
|
142
|
+
<option value="">All Priorities</option>
|
|
143
|
+
<option v-for="p in priorities" :key="p" :value="p">{{ p }}</option>
|
|
144
|
+
</select>
|
|
145
|
+
<select v-model="filterData.ticket_type" aria-label="Filter by type" :class="selectClass">
|
|
146
|
+
<option value="">All Types</option>
|
|
147
|
+
<option value="question">Question</option>
|
|
148
|
+
<option value="problem">Problem</option>
|
|
149
|
+
<option value="incident">Incident</option>
|
|
150
|
+
<option value="task">Task</option>
|
|
151
|
+
</select>
|
|
152
|
+
<select
|
|
153
|
+
v-if="agents.length"
|
|
154
|
+
v-model="filterData.assigned_to"
|
|
155
|
+
aria-label="Filter by agent"
|
|
156
|
+
:class="selectClass"
|
|
157
|
+
>
|
|
158
|
+
<option value="">All Agents</option>
|
|
159
|
+
<option v-for="a in agents" :key="a.id" :value="a.id">{{ a.name }}</option>
|
|
160
|
+
</select>
|
|
161
|
+
<select
|
|
162
|
+
v-if="departments.length"
|
|
163
|
+
v-model="filterData.department_id"
|
|
164
|
+
aria-label="Filter by department"
|
|
165
|
+
:class="selectClass"
|
|
166
|
+
>
|
|
167
|
+
<option value="">All Departments</option>
|
|
168
|
+
<option v-for="d in departments" :key="d.id" :value="d.id">{{ d.name }}</option>
|
|
169
|
+
</select>
|
|
170
|
+
<label v-if="showFollowing" class="flex items-center gap-2">
|
|
171
|
+
<input
|
|
172
|
+
v-model="filterData.following"
|
|
173
|
+
type="checkbox"
|
|
174
|
+
true-value="1"
|
|
175
|
+
false-value=""
|
|
176
|
+
:class="checkboxClass"
|
|
177
|
+
/>
|
|
178
|
+
<span :class="['text-sm', escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-600']"
|
|
179
|
+
>Following</span
|
|
180
|
+
>
|
|
181
|
+
</label>
|
|
182
|
+
</div>
|
|
183
|
+
|
|
184
|
+
<!-- Advanced filters -->
|
|
185
|
+
<div
|
|
186
|
+
v-if="showAdvanced"
|
|
187
|
+
class="flex flex-wrap items-end gap-4 rounded-lg border p-3"
|
|
188
|
+
:class="
|
|
189
|
+
escDark
|
|
190
|
+
? 'border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)]'
|
|
191
|
+
: 'border-gray-200 bg-gray-50'
|
|
192
|
+
"
|
|
193
|
+
>
|
|
194
|
+
<div class="flex flex-col gap-1">
|
|
195
|
+
<label :class="labelClass">Created after</label>
|
|
196
|
+
<input
|
|
197
|
+
v-model="filterData.created_after"
|
|
198
|
+
type="date"
|
|
199
|
+
aria-label="Created after date"
|
|
200
|
+
:class="inputClass"
|
|
201
|
+
/>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="flex flex-col gap-1">
|
|
204
|
+
<label :class="labelClass">Created before</label>
|
|
205
|
+
<input
|
|
206
|
+
v-model="filterData.created_before"
|
|
207
|
+
type="date"
|
|
208
|
+
aria-label="Created before date"
|
|
209
|
+
:class="inputClass"
|
|
210
|
+
/>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="flex flex-col gap-1">
|
|
213
|
+
<label :class="labelClass">Tag</label>
|
|
214
|
+
<input
|
|
215
|
+
v-model="filterData.tag"
|
|
216
|
+
type="text"
|
|
217
|
+
placeholder="Tag name..."
|
|
218
|
+
aria-label="Filter by tag name"
|
|
219
|
+
:class="inputClass"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="flex flex-col gap-1">
|
|
223
|
+
<label :class="labelClass">Requester</label>
|
|
224
|
+
<input
|
|
225
|
+
v-model="filterData.requester"
|
|
226
|
+
type="text"
|
|
227
|
+
placeholder="Name or email..."
|
|
228
|
+
aria-label="Filter by requester"
|
|
229
|
+
:class="inputClass"
|
|
230
|
+
/>
|
|
231
|
+
</div>
|
|
232
|
+
<label class="flex items-center gap-2 self-center pt-4">
|
|
233
|
+
<input
|
|
234
|
+
v-model="filterData.has_attachments"
|
|
235
|
+
type="checkbox"
|
|
236
|
+
true-value="1"
|
|
237
|
+
false-value=""
|
|
238
|
+
:class="checkboxClass"
|
|
239
|
+
/>
|
|
240
|
+
<span :class="['text-sm', escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-600']"
|
|
241
|
+
>Has attachments</span
|
|
242
|
+
>
|
|
243
|
+
</label>
|
|
244
|
+
<label class="flex items-center gap-2 self-center pt-4">
|
|
245
|
+
<input
|
|
246
|
+
v-model="filterData.snoozed"
|
|
247
|
+
type="checkbox"
|
|
248
|
+
true-value="1"
|
|
249
|
+
false-value=""
|
|
250
|
+
:class="checkboxClass"
|
|
251
|
+
/>
|
|
252
|
+
<span :class="['text-sm', escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-600']"
|
|
253
|
+
>Snoozed</span
|
|
254
|
+
>
|
|
255
|
+
</label>
|
|
256
|
+
<label class="flex items-center gap-2 self-center pt-4">
|
|
257
|
+
<input
|
|
258
|
+
v-model="filterData.live_chat"
|
|
259
|
+
type="checkbox"
|
|
260
|
+
true-value="1"
|
|
261
|
+
false-value=""
|
|
262
|
+
:class="checkboxClass"
|
|
263
|
+
/>
|
|
264
|
+
<span :class="['text-sm', escDark ? 'text-[var(--esc-panel-text-tertiary)]' : 'text-gray-600']"
|
|
265
|
+
>Live Chats</span
|
|
266
|
+
>
|
|
267
|
+
</label>
|
|
268
|
+
</div>
|
|
269
|
+
</div>
|
|
270
|
+
</template>
|