@escalated-dev/escalated 0.5.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 +102 -0
- package/package.json +37 -6
- package/src/components/ActivityTimeline.stories.js +55 -0
- package/src/components/ActivityTimeline.vue +83 -66
- 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 +37 -23
- 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 +57 -41
- 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 +75 -33
- package/src/components/PresenceIndicator.vue +93 -27
- package/src/components/PriorityBadge.stories.js +33 -0
- package/src/components/PriorityBadge.vue +46 -39
- package/src/components/QuickFilters.vue +65 -49
- package/src/components/ReplyComposer.vue +273 -159
- package/src/components/ReplyThread.vue +78 -23
- 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 +62 -49
- 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 +78 -46
- package/src/components/TagSelect.vue +84 -53
- 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/useI18n.js +80 -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/de.json +442 -0
- package/src/locales/en.json +467 -0
- package/src/locales/es.json +442 -0
- package/src/locales/fr.json +442 -0
- package/src/locales/index.js +6 -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/utils/sanitizeHtml.js +64 -0
- package/src/pages/Admin/Plugins.vue +0 -129
|
@@ -34,7 +34,9 @@ function addAction() {
|
|
|
34
34
|
|
|
35
35
|
function removeAction(index) {
|
|
36
36
|
form.actions.splice(index, 1);
|
|
37
|
-
form.actions.forEach((a, i) => {
|
|
37
|
+
form.actions.forEach((a, i) => {
|
|
38
|
+
a.order = i;
|
|
39
|
+
});
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
function moveAction(index, direction) {
|
|
@@ -43,12 +45,17 @@ function moveAction(index, direction) {
|
|
|
43
45
|
const temp = form.actions[index];
|
|
44
46
|
form.actions[index] = form.actions[newIndex];
|
|
45
47
|
form.actions[newIndex] = temp;
|
|
46
|
-
form.actions.forEach((a, i) => {
|
|
48
|
+
form.actions.forEach((a, i) => {
|
|
49
|
+
a.order = i;
|
|
50
|
+
});
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
function create() {
|
|
50
54
|
form.post(route('escalated.admin.macros.store'), {
|
|
51
|
-
onSuccess: () => {
|
|
55
|
+
onSuccess: () => {
|
|
56
|
+
form.reset();
|
|
57
|
+
showForm.value = false;
|
|
58
|
+
},
|
|
52
59
|
});
|
|
53
60
|
}
|
|
54
61
|
|
|
@@ -67,7 +74,11 @@ function startEdit(macro) {
|
|
|
67
74
|
|
|
68
75
|
function update() {
|
|
69
76
|
form.put(route('escalated.admin.macros.update', editingMacro.value), {
|
|
70
|
-
onSuccess: () => {
|
|
77
|
+
onSuccess: () => {
|
|
78
|
+
editingMacro.value = null;
|
|
79
|
+
form.reset();
|
|
80
|
+
showForm.value = false;
|
|
81
|
+
},
|
|
71
82
|
});
|
|
72
83
|
}
|
|
73
84
|
|
|
@@ -91,85 +102,146 @@ function handleSubmit() {
|
|
|
91
102
|
}
|
|
92
103
|
}
|
|
93
104
|
|
|
94
|
-
const inputClass =
|
|
95
|
-
|
|
105
|
+
const inputClass =
|
|
106
|
+
'w-full rounded-lg border border-white/10 bg-neutral-950 px-3 py-2 text-sm text-neutral-200 placeholder-neutral-600 focus:border-white/20 focus:outline-none focus:ring-1 focus:ring-white/10';
|
|
107
|
+
const selectClass =
|
|
108
|
+
'rounded-lg border border-white/10 bg-neutral-950 px-3 py-2 text-sm text-neutral-200 focus:border-white/20 focus:outline-none focus:ring-1 focus:ring-white/10';
|
|
96
109
|
</script>
|
|
97
110
|
|
|
98
111
|
<template>
|
|
99
112
|
<EscalatedLayout title="Macros">
|
|
100
113
|
<!-- Top bar -->
|
|
101
114
|
<div class="mb-4 flex items-center justify-between">
|
|
102
|
-
<p class="text-sm text-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">Macros automate repetitive actions on tickets.</p>
|
|
116
|
+
<button
|
|
117
|
+
:class="
|
|
118
|
+
showForm
|
|
119
|
+
? '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)]'
|
|
120
|
+
: '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)]'
|
|
121
|
+
"
|
|
122
|
+
@click="showForm ? cancelEdit() : (showForm = true)"
|
|
123
|
+
>
|
|
109
124
|
{{ showForm ? 'Cancel' : 'Create Macro' }}
|
|
110
125
|
</button>
|
|
111
126
|
</div>
|
|
112
127
|
|
|
113
128
|
<!-- Create/Edit form -->
|
|
114
|
-
<form
|
|
129
|
+
<form
|
|
130
|
+
v-if="showForm"
|
|
131
|
+
class="mb-6 space-y-4 rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5"
|
|
132
|
+
@submit.prevent="handleSubmit"
|
|
133
|
+
>
|
|
115
134
|
<div class="grid grid-cols-2 gap-4">
|
|
116
135
|
<div>
|
|
117
|
-
<label class="mb-1 block text-sm font-medium text-
|
|
118
|
-
<input
|
|
119
|
-
|
|
136
|
+
<label class="mb-1 block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Name</label>
|
|
137
|
+
<input
|
|
138
|
+
v-model="form.name"
|
|
139
|
+
type="text"
|
|
140
|
+
required
|
|
141
|
+
placeholder="e.g., Close & Thank"
|
|
142
|
+
:class="inputClass"
|
|
143
|
+
/>
|
|
120
144
|
</div>
|
|
121
145
|
<div>
|
|
122
|
-
<label class="mb-1 block text-sm font-medium text-
|
|
123
|
-
|
|
124
|
-
|
|
146
|
+
<label class="mb-1 block text-sm font-medium text-[var(--esc-panel-text-secondary)]"
|
|
147
|
+
>Description</label
|
|
148
|
+
>
|
|
149
|
+
<input
|
|
150
|
+
v-model="form.description"
|
|
151
|
+
type="text"
|
|
152
|
+
placeholder="Optional description"
|
|
153
|
+
:class="inputClass"
|
|
154
|
+
/>
|
|
125
155
|
</div>
|
|
126
156
|
</div>
|
|
127
157
|
|
|
128
158
|
<div class="flex items-center gap-3">
|
|
129
159
|
<label class="flex items-center gap-2">
|
|
130
|
-
<input
|
|
131
|
-
|
|
132
|
-
|
|
160
|
+
<input
|
|
161
|
+
v-model="form.is_shared"
|
|
162
|
+
type="checkbox"
|
|
163
|
+
class="rounded border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] text-cyan-500 focus:ring-[var(--esc-panel-border-input)]"
|
|
164
|
+
/>
|
|
165
|
+
<span class="text-sm text-[var(--esc-panel-text-secondary)]">Shared with all agents</span>
|
|
133
166
|
</label>
|
|
134
167
|
</div>
|
|
135
168
|
|
|
136
169
|
<!-- Action builder -->
|
|
137
170
|
<div>
|
|
138
171
|
<div class="mb-2 flex items-center justify-between">
|
|
139
|
-
<label class="text-sm font-medium text-
|
|
140
|
-
<button
|
|
141
|
-
|
|
172
|
+
<label class="text-sm font-medium text-[var(--esc-panel-text-secondary)]">Actions</label>
|
|
173
|
+
<button
|
|
174
|
+
type="button"
|
|
175
|
+
class="rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] px-3 py-1.5 text-xs font-medium text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
176
|
+
@click="addAction"
|
|
177
|
+
>
|
|
142
178
|
+ Add Action
|
|
143
179
|
</button>
|
|
144
180
|
</div>
|
|
145
181
|
|
|
146
|
-
<div
|
|
147
|
-
|
|
182
|
+
<div
|
|
183
|
+
v-if="!form.actions.length"
|
|
184
|
+
class="rounded-lg border border-dashed border-[var(--esc-panel-border-input)] px-4 py-6 text-center"
|
|
185
|
+
>
|
|
186
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">
|
|
187
|
+
No actions yet. Add actions to define what this macro does.
|
|
188
|
+
</p>
|
|
148
189
|
</div>
|
|
149
190
|
|
|
150
191
|
<div v-else class="space-y-2">
|
|
151
|
-
<div
|
|
152
|
-
|
|
192
|
+
<div
|
|
193
|
+
v-for="(action, index) in form.actions"
|
|
194
|
+
:key="index"
|
|
195
|
+
class="flex items-center gap-2 rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] p-3"
|
|
196
|
+
>
|
|
153
197
|
<!-- Order controls -->
|
|
154
198
|
<div class="flex flex-col gap-0.5">
|
|
155
|
-
<button
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
199
|
+
<button
|
|
200
|
+
type="button"
|
|
201
|
+
:disabled="index === 0"
|
|
202
|
+
class="rounded p-0.5 text-[var(--esc-panel-text-muted)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-tertiary)] disabled:opacity-30"
|
|
203
|
+
@click="moveAction(index, -1)"
|
|
204
|
+
>
|
|
205
|
+
<svg
|
|
206
|
+
class="h-3.5 w-3.5"
|
|
207
|
+
fill="none"
|
|
208
|
+
stroke="currentColor"
|
|
209
|
+
stroke-width="2"
|
|
210
|
+
viewBox="0 0 24 24"
|
|
211
|
+
>
|
|
212
|
+
<path
|
|
213
|
+
stroke-linecap="round"
|
|
214
|
+
stroke-linejoin="round"
|
|
215
|
+
d="M4.5 15.75l7.5-7.5 7.5 7.5"
|
|
216
|
+
/>
|
|
160
217
|
</svg>
|
|
161
218
|
</button>
|
|
162
|
-
<button
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
219
|
+
<button
|
|
220
|
+
type="button"
|
|
221
|
+
:disabled="index === form.actions.length - 1"
|
|
222
|
+
class="rounded p-0.5 text-[var(--esc-panel-text-muted)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-tertiary)] disabled:opacity-30"
|
|
223
|
+
@click="moveAction(index, 1)"
|
|
224
|
+
>
|
|
225
|
+
<svg
|
|
226
|
+
class="h-3.5 w-3.5"
|
|
227
|
+
fill="none"
|
|
228
|
+
stroke="currentColor"
|
|
229
|
+
stroke-width="2"
|
|
230
|
+
viewBox="0 0 24 24"
|
|
231
|
+
>
|
|
232
|
+
<path
|
|
233
|
+
stroke-linecap="round"
|
|
234
|
+
stroke-linejoin="round"
|
|
235
|
+
d="M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
236
|
+
/>
|
|
167
237
|
</svg>
|
|
168
238
|
</button>
|
|
169
239
|
</div>
|
|
170
240
|
|
|
171
241
|
<!-- Action number -->
|
|
172
|
-
<span
|
|
242
|
+
<span
|
|
243
|
+
class="flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-[var(--esc-panel-hover)] text-xs font-semibold text-[var(--esc-panel-text-muted)]"
|
|
244
|
+
>
|
|
173
245
|
{{ index + 1 }}
|
|
174
246
|
</span>
|
|
175
247
|
|
|
@@ -184,36 +256,69 @@ const selectClass = 'rounded-lg border border-white/10 bg-neutral-950 px-3 py-2
|
|
|
184
256
|
<option v-for="s in statusOptions" :key="s" :value="s">{{ s.replace(/_/g, ' ') }}</option>
|
|
185
257
|
</select>
|
|
186
258
|
|
|
187
|
-
<select
|
|
259
|
+
<select
|
|
260
|
+
v-else-if="action.type === 'priority'"
|
|
261
|
+
v-model="action.value"
|
|
262
|
+
:class="[selectClass, 'flex-1']"
|
|
263
|
+
>
|
|
188
264
|
<option value="">Select priority...</option>
|
|
189
265
|
<option v-for="p in priorityOptions" :key="p" :value="p">{{ p }}</option>
|
|
190
266
|
</select>
|
|
191
267
|
|
|
192
|
-
<input
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
<input
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
268
|
+
<input
|
|
269
|
+
v-else-if="action.type === 'assign'"
|
|
270
|
+
v-model="action.value"
|
|
271
|
+
type="text"
|
|
272
|
+
placeholder="Agent ID or email"
|
|
273
|
+
:class="[inputClass, 'flex-1']"
|
|
274
|
+
/>
|
|
275
|
+
|
|
276
|
+
<input
|
|
277
|
+
v-else-if="action.type === 'tags'"
|
|
278
|
+
v-model="action.value"
|
|
279
|
+
type="text"
|
|
280
|
+
placeholder="Comma-separated tag names"
|
|
281
|
+
:class="[inputClass, 'flex-1']"
|
|
282
|
+
/>
|
|
283
|
+
|
|
284
|
+
<input
|
|
285
|
+
v-else-if="action.type === 'department'"
|
|
286
|
+
v-model="action.value"
|
|
287
|
+
type="text"
|
|
288
|
+
placeholder="Department ID or name"
|
|
289
|
+
:class="[inputClass, 'flex-1']"
|
|
290
|
+
/>
|
|
291
|
+
|
|
292
|
+
<textarea
|
|
293
|
+
v-else-if="action.type === 'reply' || action.type === 'note'"
|
|
294
|
+
v-model="action.value"
|
|
295
|
+
rows="2"
|
|
296
|
+
:placeholder="action.type === 'reply' ? 'Reply message...' : 'Note content...'"
|
|
297
|
+
:class="[inputClass, 'flex-1']"
|
|
298
|
+
>
|
|
208
299
|
</textarea>
|
|
209
300
|
|
|
210
|
-
<input
|
|
211
|
-
|
|
301
|
+
<input
|
|
302
|
+
v-else
|
|
303
|
+
v-model="action.value"
|
|
304
|
+
type="text"
|
|
305
|
+
placeholder="Value"
|
|
306
|
+
:class="[inputClass, 'flex-1']"
|
|
307
|
+
/>
|
|
212
308
|
|
|
213
309
|
<!-- Remove -->
|
|
214
|
-
<button
|
|
215
|
-
|
|
216
|
-
|
|
310
|
+
<button
|
|
311
|
+
type="button"
|
|
312
|
+
class="shrink-0 rounded-lg p-1.5 text-[var(--esc-panel-text-muted)] transition-colors hover:bg-rose-500/10 hover:text-rose-400"
|
|
313
|
+
@click="removeAction(index)"
|
|
314
|
+
>
|
|
315
|
+
<svg
|
|
316
|
+
class="h-4 w-4"
|
|
317
|
+
fill="none"
|
|
318
|
+
stroke="currentColor"
|
|
319
|
+
stroke-width="1.5"
|
|
320
|
+
viewBox="0 0 24 24"
|
|
321
|
+
>
|
|
217
322
|
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
|
|
218
323
|
</svg>
|
|
219
324
|
</button>
|
|
@@ -223,61 +328,117 @@ const selectClass = 'rounded-lg border border-white/10 bg-neutral-950 px-3 py-2
|
|
|
223
328
|
|
|
224
329
|
<!-- Submit -->
|
|
225
330
|
<div class="flex justify-end">
|
|
226
|
-
<button
|
|
227
|
-
|
|
331
|
+
<button
|
|
332
|
+
type="submit"
|
|
333
|
+
:disabled="form.processing"
|
|
334
|
+
class="rounded-lg bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] px-5 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"
|
|
335
|
+
>
|
|
228
336
|
{{ editingMacro ? 'Update Macro' : 'Create Macro' }}
|
|
229
337
|
</button>
|
|
230
338
|
</div>
|
|
231
339
|
</form>
|
|
232
340
|
|
|
233
341
|
<!-- Macros table -->
|
|
234
|
-
<div class="overflow-hidden rounded-xl border border-
|
|
235
|
-
<table class="min-w-full divide-y divide-
|
|
342
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
343
|
+
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
236
344
|
<thead>
|
|
237
|
-
<tr class="bg-
|
|
238
|
-
<th
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
<th
|
|
345
|
+
<tr class="bg-[var(--esc-panel-hover)]">
|
|
346
|
+
<th
|
|
347
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
348
|
+
>
|
|
349
|
+
Name
|
|
350
|
+
</th>
|
|
351
|
+
<th
|
|
352
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
353
|
+
>
|
|
354
|
+
Description
|
|
355
|
+
</th>
|
|
356
|
+
<th
|
|
357
|
+
class="px-4 py-3 text-center text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
358
|
+
>
|
|
359
|
+
Actions
|
|
360
|
+
</th>
|
|
361
|
+
<th
|
|
362
|
+
class="px-4 py-3 text-center text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
363
|
+
>
|
|
364
|
+
Shared
|
|
365
|
+
</th>
|
|
366
|
+
<th
|
|
367
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
368
|
+
>
|
|
369
|
+
Creator
|
|
370
|
+
</th>
|
|
371
|
+
<th
|
|
372
|
+
class="px-4 py-3 text-right text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
373
|
+
></th>
|
|
244
374
|
</tr>
|
|
245
375
|
</thead>
|
|
246
|
-
<tbody class="divide-y divide-
|
|
376
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
247
377
|
<tr v-if="!macros?.length">
|
|
248
378
|
<td colspan="6" class="px-4 py-12 text-center">
|
|
249
|
-
<svg
|
|
250
|
-
|
|
379
|
+
<svg
|
|
380
|
+
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
381
|
+
fill="none"
|
|
382
|
+
stroke="currentColor"
|
|
383
|
+
stroke-width="1.5"
|
|
384
|
+
viewBox="0 0 24 24"
|
|
385
|
+
>
|
|
386
|
+
<path
|
|
387
|
+
stroke-linecap="round"
|
|
388
|
+
stroke-linejoin="round"
|
|
389
|
+
d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z"
|
|
390
|
+
/>
|
|
251
391
|
</svg>
|
|
252
|
-
<p class="text-sm text-
|
|
253
|
-
<p class="mt-1 text-xs text-
|
|
392
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No macros yet</p>
|
|
393
|
+
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
394
|
+
Create macros to automate repetitive ticket actions
|
|
395
|
+
</p>
|
|
254
396
|
</td>
|
|
255
397
|
</tr>
|
|
256
|
-
<tr
|
|
398
|
+
<tr
|
|
399
|
+
v-for="macro in macros"
|
|
400
|
+
:key="macro.id"
|
|
401
|
+
class="transition-colors hover:bg-[var(--esc-panel-hover)]"
|
|
402
|
+
>
|
|
257
403
|
<td class="px-4 py-3">
|
|
258
|
-
<span class="text-sm font-medium text-
|
|
404
|
+
<span class="text-sm font-medium text-[var(--esc-panel-text-secondary)]">{{
|
|
405
|
+
macro.name
|
|
406
|
+
}}</span>
|
|
259
407
|
</td>
|
|
260
408
|
<td class="px-4 py-3">
|
|
261
|
-
<span class="text-sm text-
|
|
409
|
+
<span class="text-sm text-[var(--esc-panel-text-tertiary)]">{{
|
|
410
|
+
macro.description || '--'
|
|
411
|
+
}}</span>
|
|
262
412
|
</td>
|
|
263
413
|
<td class="px-4 py-3 text-center">
|
|
264
|
-
<span
|
|
414
|
+
<span
|
|
415
|
+
class="inline-flex items-center rounded-full bg-[var(--esc-panel-hover)] px-2 py-0.5 text-xs font-medium text-[var(--esc-panel-text-tertiary)] ring-1 ring-[var(--esc-panel-border)]"
|
|
416
|
+
>
|
|
265
417
|
{{ macro.actions?.length || 0 }}
|
|
266
418
|
</span>
|
|
267
419
|
</td>
|
|
268
420
|
<td class="px-4 py-3 text-center">
|
|
269
|
-
<span
|
|
270
|
-
|
|
421
|
+
<span
|
|
422
|
+
v-if="macro.is_shared"
|
|
423
|
+
class="inline-flex items-center rounded-full bg-cyan-500/10 px-2 py-0.5 text-xs font-medium text-cyan-400 ring-1 ring-cyan-500/20"
|
|
424
|
+
>
|
|
271
425
|
Shared
|
|
272
426
|
</span>
|
|
273
|
-
<span v-else class="text-xs text-
|
|
427
|
+
<span v-else class="text-xs text-[var(--esc-panel-text-muted)]">Private</span>
|
|
274
428
|
</td>
|
|
275
|
-
<td class="px-4 py-3 text-sm text-
|
|
429
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
276
430
|
{{ macro.creator?.name || macro.user?.name || '--' }}
|
|
277
431
|
</td>
|
|
278
432
|
<td class="px-4 py-3 text-right text-sm">
|
|
279
|
-
<button
|
|
280
|
-
|
|
433
|
+
<button
|
|
434
|
+
class="text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
435
|
+
@click="startEdit(macro)"
|
|
436
|
+
>
|
|
437
|
+
Edit
|
|
438
|
+
</button>
|
|
439
|
+
<button class="ml-3 text-rose-400 hover:text-rose-300" @click="destroy(macro.id)">
|
|
440
|
+
Delete
|
|
441
|
+
</button>
|
|
281
442
|
</td>
|
|
282
443
|
</tr>
|
|
283
444
|
</tbody>
|