@escalated-dev/escalated 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -2
- package/package.json +31 -2
- package/src/components/ActivityTimeline.stories.js +55 -0
- package/src/components/ActivityTimeline.vue +24 -7
- package/src/components/AdminDashboard.stories.js +1095 -0
- package/src/components/AgentLoadIndicator.stories.js +37 -0
- package/src/components/AgentLoadIndicator.vue +49 -0
- package/src/components/AgentPerformanceCard.vue +44 -0
- package/src/components/ArticleEditor.vue +82 -0
- package/src/components/AssigneeSelect.vue +19 -5
- package/src/components/AttachmentList.vue +53 -37
- package/src/components/AuditLogEntry.vue +95 -0
- package/src/components/BulkActionBar.vue +99 -30
- package/src/components/CategoryTree.vue +89 -0
- package/src/components/ChartWidget.vue +46 -0
- package/src/components/CollisionWarning.stories.js +30 -0
- package/src/components/CollisionWarning.vue +68 -0
- package/src/components/ConditionalFieldRules.vue +135 -0
- package/src/components/ContextPanel.vue +66 -0
- package/src/components/ContextPanelSection.vue +65 -0
- package/src/components/CustomFieldRenderer.vue +159 -0
- package/src/components/EscalatedLayout.vue +400 -69
- package/src/components/FileDropzone.vue +26 -10
- package/src/components/FollowButton.stories.js +30 -0
- package/src/components/FollowButton.vue +53 -28
- package/src/components/KeyboardShortcutHelp.vue +129 -39
- package/src/components/KnowledgePanel.vue +122 -0
- package/src/components/KpiCard.stories.js +32 -0
- package/src/components/KpiCard.vue +88 -0
- package/src/components/MacroDropdown.vue +95 -35
- package/src/components/PermissionMatrix.vue +107 -0
- package/src/components/PinnedNotes.vue +70 -31
- package/src/components/PresenceIndicator.vue +93 -27
- package/src/components/PriorityBadge.stories.js +33 -0
- package/src/components/PriorityBadge.vue +9 -2
- package/src/components/QuickFilters.vue +65 -49
- package/src/components/ReplyComposer.vue +144 -30
- package/src/components/ReplyThread.vue +72 -20
- package/src/components/SatisfactionRating.vue +98 -46
- package/src/components/ScheduleEditor.vue +104 -0
- package/src/components/SideConversation.vue +165 -0
- package/src/components/SideConversationList.vue +147 -0
- package/src/components/SkillTagManager.vue +79 -0
- package/src/components/SlaComplianceChart.vue +53 -0
- package/src/components/SlaTimer.stories.js +35 -0
- package/src/components/SlaTimer.vue +17 -4
- package/src/components/StatsCard.stories.js +24 -0
- package/src/components/StatsCard.vue +58 -46
- package/src/components/StatusBadge.stories.js +53 -0
- package/src/components/StatusBadge.vue +36 -4
- package/src/components/TagSelect.vue +43 -12
- package/src/components/TicketFilters.vue +225 -69
- package/src/components/TicketLinkPanel.vue +193 -0
- package/src/components/TicketList.vue +594 -193
- package/src/components/TicketMergeDialog.vue +157 -0
- package/src/components/TicketSidebar.vue +167 -99
- package/src/components/TicketTypeSelector.vue +21 -0
- package/src/components/TotpInput.stories.js +9 -0
- package/src/components/TotpInput.vue +81 -0
- package/src/components/TwoFactorSetup.vue +113 -0
- package/src/composables/useDebouncedSearch.js +38 -0
- package/src/composables/usePluginExtensions.js +95 -3
- package/src/composables/usePluginHooks.js +65 -0
- package/src/defineEscalatedPlugin.js +34 -8
- package/src/index.js +72 -35
- package/src/locales/en.json +25 -0
- package/src/pages/Admin/ApiTokens/Index.vue +231 -67
- package/src/pages/Admin/AuditLog/Index.vue +154 -0
- package/src/pages/Admin/Automations/Form.vue +184 -0
- package/src/pages/Admin/Automations/Index.vue +129 -0
- package/src/pages/Admin/BusinessHours/Form.vue +172 -0
- package/src/pages/Admin/BusinessHours/Index.vue +113 -0
- package/src/pages/Admin/CannedResponses/Index.vue +127 -70
- package/src/pages/Admin/Capacity/Index.vue +134 -0
- package/src/pages/Admin/CustomFields/Form.vue +195 -0
- package/src/pages/Admin/CustomFields/Index.vue +134 -0
- package/src/pages/Admin/CustomObjects/Form.vue +202 -0
- package/src/pages/Admin/CustomObjects/Index.vue +127 -0
- package/src/pages/Admin/CustomObjects/Records.vue +228 -0
- package/src/pages/Admin/Departments/Form.vue +75 -51
- package/src/pages/Admin/Departments/Index.vue +109 -57
- package/src/pages/Admin/EscalationRules/Form.vue +157 -96
- package/src/pages/Admin/EscalationRules/Index.vue +178 -57
- package/src/pages/Admin/Import/Connect.vue +96 -0
- package/src/pages/Admin/Import/Index.vue +102 -0
- package/src/pages/Admin/Import/Mapping.vue +110 -0
- package/src/pages/Admin/Import/Progress.vue +153 -0
- package/src/pages/Admin/Import/Review.vue +76 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Form.vue +142 -0
- package/src/pages/Admin/KnowledgeBase/Articles/Index.vue +195 -0
- package/src/pages/Admin/KnowledgeBase/Categories/Index.vue +193 -0
- package/src/pages/Admin/Macros/Index.vue +250 -89
- package/src/pages/Admin/Plugins/Index.vue +205 -75
- package/src/pages/Admin/Reports/AgentMetrics.vue +115 -0
- package/src/pages/Admin/Reports/CsatReport.vue +127 -0
- package/src/pages/Admin/Reports/Dashboard.vue +211 -0
- package/src/pages/Admin/Reports/SlaReport.vue +166 -0
- package/src/pages/Admin/Reports.vue +139 -34
- package/src/pages/Admin/Roles/Form.vue +71 -0
- package/src/pages/Admin/Roles/Index.vue +122 -0
- package/src/pages/Admin/Settings/CsatSettings.vue +165 -0
- package/src/pages/Admin/Settings/DataRetention.vue +182 -0
- package/src/pages/Admin/Settings/EmailSettings.vue +243 -0
- package/src/pages/Admin/Settings/Sandbox.vue +135 -0
- package/src/pages/Admin/Settings/SsoSettings.vue +218 -0
- package/src/pages/Admin/Settings/TwoFactor.vue +110 -0
- package/src/pages/Admin/Settings.vue +468 -260
- package/src/pages/Admin/Skills/Form.vue +53 -0
- package/src/pages/Admin/Skills/Index.vue +94 -0
- package/src/pages/Admin/SlaPolicies/Form.vue +118 -75
- package/src/pages/Admin/SlaPolicies/Index.vue +120 -59
- package/src/pages/Admin/Statuses/Form.vue +114 -0
- package/src/pages/Admin/Statuses/Index.vue +153 -0
- package/src/pages/Admin/Tags/Index.vue +191 -105
- package/src/pages/Admin/Tickets/Index.vue +91 -39
- package/src/pages/Admin/Tickets/Show.vue +101 -37
- package/src/pages/Admin/Webhooks/DeliveryLog.vue +120 -0
- package/src/pages/Admin/Webhooks/Form.vue +110 -0
- package/src/pages/Admin/Webhooks/Index.vue +136 -0
- package/src/pages/Agent/Dashboard.vue +311 -186
- package/src/pages/Agent/TicketIndex.vue +88 -38
- package/src/pages/Agent/TicketShow.vue +258 -51
- package/src/pages/Customer/Create.vue +36 -9
- package/src/pages/Customer/Index.vue +31 -24
- package/src/pages/Customer/KnowledgeBase/Article.vue +127 -0
- package/src/pages/Customer/KnowledgeBase/Index.vue +151 -0
- package/src/plugin.js +86 -1
- package/src/utils/constants.js +30 -0
- package/src/utils/formatting.js +35 -0
- package/src/pages/Admin/Plugins.vue +0 -129
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { useForm } from '@inertiajs/vue3';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
skill: { type: Object, default: null },
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const form = useForm({
|
|
10
|
+
name: props.skill?.name || '',
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
function submit() {
|
|
14
|
+
if (props.skill) {
|
|
15
|
+
form.put(route('escalated.admin.skills.update', props.skill.id));
|
|
16
|
+
} else {
|
|
17
|
+
form.post(route('escalated.admin.skills.store'));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<EscalatedLayout :title="skill ? 'Edit Skill' : 'Create Skill'">
|
|
24
|
+
<form class="max-w-lg space-y-4" @submit.prevent="submit">
|
|
25
|
+
<div>
|
|
26
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Name</label>
|
|
27
|
+
<input
|
|
28
|
+
v-model="form.name"
|
|
29
|
+
type="text"
|
|
30
|
+
required
|
|
31
|
+
class="mt-1 w-full 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)]"
|
|
32
|
+
/>
|
|
33
|
+
<p v-if="form.errors.name" class="mt-1 text-xs text-rose-400">{{ form.errors.name }}</p>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<div class="flex gap-3">
|
|
37
|
+
<button
|
|
38
|
+
type="submit"
|
|
39
|
+
:disabled="form.processing"
|
|
40
|
+
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"
|
|
41
|
+
>
|
|
42
|
+
{{ skill ? 'Update' : 'Create' }}
|
|
43
|
+
</button>
|
|
44
|
+
<a
|
|
45
|
+
:href="route('escalated.admin.skills.index')"
|
|
46
|
+
class="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)]"
|
|
47
|
+
>
|
|
48
|
+
Cancel
|
|
49
|
+
</a>
|
|
50
|
+
</div>
|
|
51
|
+
</form>
|
|
52
|
+
</EscalatedLayout>
|
|
53
|
+
</template>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { Link, router } from '@inertiajs/vue3';
|
|
4
|
+
|
|
5
|
+
defineProps({ skills: Array });
|
|
6
|
+
|
|
7
|
+
function destroy(id) {
|
|
8
|
+
if (confirm('Delete this skill?')) {
|
|
9
|
+
router.delete(route('escalated.admin.skills.destroy', id));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<EscalatedLayout title="Skills">
|
|
16
|
+
<div class="mb-4 flex justify-end">
|
|
17
|
+
<Link
|
|
18
|
+
:href="route('escalated.admin.skills.create')"
|
|
19
|
+
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)]"
|
|
20
|
+
>
|
|
21
|
+
Add Skill
|
|
22
|
+
</Link>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
25
|
+
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
26
|
+
<thead>
|
|
27
|
+
<tr class="bg-[var(--esc-panel-hover)]">
|
|
28
|
+
<th
|
|
29
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
30
|
+
>
|
|
31
|
+
Name
|
|
32
|
+
</th>
|
|
33
|
+
<th
|
|
34
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
35
|
+
>
|
|
36
|
+
Agents
|
|
37
|
+
</th>
|
|
38
|
+
<th
|
|
39
|
+
class="px-4 py-3 text-right text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
40
|
+
>
|
|
41
|
+
Actions
|
|
42
|
+
</th>
|
|
43
|
+
</tr>
|
|
44
|
+
</thead>
|
|
45
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
46
|
+
<tr v-if="!skills?.length">
|
|
47
|
+
<td colspan="3" class="px-4 py-12 text-center">
|
|
48
|
+
<svg
|
|
49
|
+
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
50
|
+
fill="none"
|
|
51
|
+
stroke="currentColor"
|
|
52
|
+
stroke-width="1.5"
|
|
53
|
+
viewBox="0 0 24 24"
|
|
54
|
+
>
|
|
55
|
+
<path
|
|
56
|
+
stroke-linecap="round"
|
|
57
|
+
stroke-linejoin="round"
|
|
58
|
+
d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"
|
|
59
|
+
/>
|
|
60
|
+
</svg>
|
|
61
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No skills yet</p>
|
|
62
|
+
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
63
|
+
Create skills for agent routing
|
|
64
|
+
</p>
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
<tr
|
|
68
|
+
v-for="skill in skills"
|
|
69
|
+
:key="skill.id"
|
|
70
|
+
class="transition-colors hover:bg-[var(--esc-panel-hover)]"
|
|
71
|
+
>
|
|
72
|
+
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
73
|
+
{{ skill.name }}
|
|
74
|
+
</td>
|
|
75
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
76
|
+
{{ skill.agents_count }}
|
|
77
|
+
</td>
|
|
78
|
+
<td class="px-4 py-3 text-right text-sm">
|
|
79
|
+
<Link
|
|
80
|
+
:href="route('escalated.admin.skills.edit', skill.id)"
|
|
81
|
+
class="text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
82
|
+
>
|
|
83
|
+
Edit
|
|
84
|
+
</Link>
|
|
85
|
+
<button class="ml-3 text-rose-400 hover:text-rose-300" @click="destroy(skill.id)">
|
|
86
|
+
Delete
|
|
87
|
+
</button>
|
|
88
|
+
</td>
|
|
89
|
+
</tr>
|
|
90
|
+
</tbody>
|
|
91
|
+
</table>
|
|
92
|
+
</div>
|
|
93
|
+
</EscalatedLayout>
|
|
94
|
+
</template>
|
|
@@ -1,75 +1,118 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
-
import { useForm } from '@inertiajs/vue3';
|
|
4
|
-
|
|
5
|
-
const props = defineProps({ policy: { type: Object, default: null }, priorities: Array });
|
|
6
|
-
|
|
7
|
-
const form = useForm({
|
|
8
|
-
name: props.policy?.name || '',
|
|
9
|
-
description: props.policy?.description || '',
|
|
10
|
-
is_default: props.policy?.is_default ?? false,
|
|
11
|
-
first_response_hours: props.policy?.first_response_hours || {},
|
|
12
|
-
resolution_hours: props.policy?.resolution_hours || {},
|
|
13
|
-
business_hours_only: props.policy?.business_hours_only ?? false,
|
|
14
|
-
is_active: props.policy?.is_active ?? true,
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
function submit() {
|
|
18
|
-
if (props.policy) {
|
|
19
|
-
form.put(route('escalated.admin.sla-policies.update', props.policy.id));
|
|
20
|
-
} else {
|
|
21
|
-
form.post(route('escalated.admin.sla-policies.store'));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<EscalatedLayout :title="policy ? 'Edit SLA Policy' : 'New SLA Policy'">
|
|
28
|
-
<form
|
|
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
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { useForm } from '@inertiajs/vue3';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({ policy: { type: Object, default: null }, priorities: Array });
|
|
6
|
+
|
|
7
|
+
const form = useForm({
|
|
8
|
+
name: props.policy?.name || '',
|
|
9
|
+
description: props.policy?.description || '',
|
|
10
|
+
is_default: props.policy?.is_default ?? false,
|
|
11
|
+
first_response_hours: props.policy?.first_response_hours || {},
|
|
12
|
+
resolution_hours: props.policy?.resolution_hours || {},
|
|
13
|
+
business_hours_only: props.policy?.business_hours_only ?? false,
|
|
14
|
+
is_active: props.policy?.is_active ?? true,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
function submit() {
|
|
18
|
+
if (props.policy) {
|
|
19
|
+
form.put(route('escalated.admin.sla-policies.update', props.policy.id));
|
|
20
|
+
} else {
|
|
21
|
+
form.post(route('escalated.admin.sla-policies.store'));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<EscalatedLayout :title="policy ? 'Edit SLA Policy' : 'New SLA Policy'">
|
|
28
|
+
<form
|
|
29
|
+
class="mx-auto max-w-lg space-y-5 rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-6"
|
|
30
|
+
@submit.prevent="submit"
|
|
31
|
+
>
|
|
32
|
+
<div>
|
|
33
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Name</label>
|
|
34
|
+
<input
|
|
35
|
+
v-model="form.name"
|
|
36
|
+
type="text"
|
|
37
|
+
required
|
|
38
|
+
class="mt-1 w-full 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)]"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div>
|
|
42
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Description</label>
|
|
43
|
+
<textarea
|
|
44
|
+
v-model="form.description"
|
|
45
|
+
rows="2"
|
|
46
|
+
class="mt-1 w-full 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)]"
|
|
47
|
+
></textarea>
|
|
48
|
+
</div>
|
|
49
|
+
<div>
|
|
50
|
+
<h3 class="mb-2 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
51
|
+
First Response Hours (by priority)
|
|
52
|
+
</h3>
|
|
53
|
+
<div class="grid grid-cols-2 gap-3">
|
|
54
|
+
<div v-for="p in priorities" :key="p">
|
|
55
|
+
<label class="text-xs capitalize text-[var(--esc-panel-text-tertiary)]">{{ p }}</label>
|
|
56
|
+
<input
|
|
57
|
+
v-model.number="form.first_response_hours[p]"
|
|
58
|
+
type="number"
|
|
59
|
+
step="0.5"
|
|
60
|
+
min="0"
|
|
61
|
+
class="w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] 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)]"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
<div>
|
|
67
|
+
<h3 class="mb-2 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
68
|
+
Resolution Hours (by priority)
|
|
69
|
+
</h3>
|
|
70
|
+
<div class="grid grid-cols-2 gap-3">
|
|
71
|
+
<div v-for="p in priorities" :key="p">
|
|
72
|
+
<label class="text-xs capitalize text-[var(--esc-panel-text-tertiary)]">{{ p }}</label>
|
|
73
|
+
<input
|
|
74
|
+
v-model.number="form.resolution_hours[p]"
|
|
75
|
+
type="number"
|
|
76
|
+
step="0.5"
|
|
77
|
+
min="0"
|
|
78
|
+
class="w-full rounded-lg border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface-alt)] 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)]"
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<label class="flex items-center gap-2">
|
|
84
|
+
<input
|
|
85
|
+
v-model="form.business_hours_only"
|
|
86
|
+
type="checkbox"
|
|
87
|
+
class="rounded border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] text-white focus:ring-[var(--esc-panel-border-input)]"
|
|
88
|
+
/>
|
|
89
|
+
<span class="text-sm text-[var(--esc-panel-text-secondary)]">Business hours only</span>
|
|
90
|
+
</label>
|
|
91
|
+
<label class="flex items-center gap-2">
|
|
92
|
+
<input
|
|
93
|
+
v-model="form.is_default"
|
|
94
|
+
type="checkbox"
|
|
95
|
+
class="rounded border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] text-white focus:ring-[var(--esc-panel-border-input)]"
|
|
96
|
+
/>
|
|
97
|
+
<span class="text-sm text-[var(--esc-panel-text-secondary)]">Default policy</span>
|
|
98
|
+
</label>
|
|
99
|
+
<label class="flex items-center gap-2">
|
|
100
|
+
<input
|
|
101
|
+
v-model="form.is_active"
|
|
102
|
+
type="checkbox"
|
|
103
|
+
class="rounded border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-surface)] text-white focus:ring-[var(--esc-panel-border-input)]"
|
|
104
|
+
/>
|
|
105
|
+
<span class="text-sm text-[var(--esc-panel-text-secondary)]">Active</span>
|
|
106
|
+
</label>
|
|
107
|
+
<div class="flex justify-end">
|
|
108
|
+
<button
|
|
109
|
+
type="submit"
|
|
110
|
+
:disabled="form.processing"
|
|
111
|
+
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"
|
|
112
|
+
>
|
|
113
|
+
{{ policy ? 'Update' : 'Create' }}
|
|
114
|
+
</button>
|
|
115
|
+
</div>
|
|
116
|
+
</form>
|
|
117
|
+
</EscalatedLayout>
|
|
118
|
+
</template>
|
|
@@ -1,59 +1,120 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
-
import { Link, router } from '@inertiajs/vue3';
|
|
4
|
-
|
|
5
|
-
defineProps({ policies: Array });
|
|
6
|
-
|
|
7
|
-
function destroy(id) {
|
|
8
|
-
if (confirm('Delete this SLA policy?')) {
|
|
9
|
-
router.delete(route('escalated.admin.sla-policies.destroy', id));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<template>
|
|
15
|
-
<EscalatedLayout title="SLA Policies">
|
|
16
|
-
<div class="mb-4 flex justify-end">
|
|
17
|
-
<Link
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<th
|
|
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
|
-
</
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import { Link, router } from '@inertiajs/vue3';
|
|
4
|
+
|
|
5
|
+
defineProps({ policies: Array });
|
|
6
|
+
|
|
7
|
+
function destroy(id) {
|
|
8
|
+
if (confirm('Delete this SLA policy?')) {
|
|
9
|
+
router.delete(route('escalated.admin.sla-policies.destroy', id));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<EscalatedLayout title="SLA Policies">
|
|
16
|
+
<div class="mb-4 flex justify-end">
|
|
17
|
+
<Link
|
|
18
|
+
:href="route('escalated.admin.sla-policies.create')"
|
|
19
|
+
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)]"
|
|
20
|
+
>
|
|
21
|
+
Add Policy
|
|
22
|
+
</Link>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="overflow-hidden rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)]">
|
|
25
|
+
<table class="min-w-full divide-y divide-[var(--esc-panel-border)]">
|
|
26
|
+
<thead>
|
|
27
|
+
<tr class="bg-[var(--esc-panel-hover)]">
|
|
28
|
+
<th
|
|
29
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
30
|
+
>
|
|
31
|
+
Name
|
|
32
|
+
</th>
|
|
33
|
+
<th
|
|
34
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
35
|
+
>
|
|
36
|
+
Default
|
|
37
|
+
</th>
|
|
38
|
+
<th
|
|
39
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
40
|
+
>
|
|
41
|
+
Business Hours
|
|
42
|
+
</th>
|
|
43
|
+
<th
|
|
44
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
45
|
+
>
|
|
46
|
+
Tickets
|
|
47
|
+
</th>
|
|
48
|
+
<th
|
|
49
|
+
class="px-4 py-3 text-left text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
50
|
+
>
|
|
51
|
+
Active
|
|
52
|
+
</th>
|
|
53
|
+
<th
|
|
54
|
+
class="px-4 py-3 text-right text-[11px] font-semibold uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
55
|
+
>
|
|
56
|
+
Actions
|
|
57
|
+
</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</thead>
|
|
60
|
+
<tbody class="divide-y divide-[var(--esc-panel-border)]">
|
|
61
|
+
<tr v-if="!policies?.length">
|
|
62
|
+
<td colspan="6" class="px-4 py-12 text-center">
|
|
63
|
+
<svg
|
|
64
|
+
class="mx-auto mb-3 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
65
|
+
fill="none"
|
|
66
|
+
stroke="currentColor"
|
|
67
|
+
stroke-width="1.5"
|
|
68
|
+
viewBox="0 0 24 24"
|
|
69
|
+
>
|
|
70
|
+
<path
|
|
71
|
+
stroke-linecap="round"
|
|
72
|
+
stroke-linejoin="round"
|
|
73
|
+
d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No SLA policies yet</p>
|
|
77
|
+
<p class="mt-1 text-xs text-[var(--esc-panel-text-muted)]">
|
|
78
|
+
Define response and resolution time targets
|
|
79
|
+
</p>
|
|
80
|
+
</td>
|
|
81
|
+
</tr>
|
|
82
|
+
<tr
|
|
83
|
+
v-for="policy in policies"
|
|
84
|
+
:key="policy.id"
|
|
85
|
+
class="transition-colors hover:bg-[var(--esc-panel-hover)]"
|
|
86
|
+
>
|
|
87
|
+
<td class="px-4 py-3 text-sm font-medium text-[var(--esc-panel-text-secondary)]">
|
|
88
|
+
{{ policy.name }}
|
|
89
|
+
</td>
|
|
90
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
91
|
+
{{ policy.is_default ? 'Yes' : 'No' }}
|
|
92
|
+
</td>
|
|
93
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
94
|
+
{{ policy.business_hours_only ? 'Yes' : 'No' }}
|
|
95
|
+
</td>
|
|
96
|
+
<td class="px-4 py-3 text-sm text-[var(--esc-panel-text-tertiary)]">
|
|
97
|
+
{{ policy.tickets_count }}
|
|
98
|
+
</td>
|
|
99
|
+
<td class="px-4 py-3 text-sm">
|
|
100
|
+
<span
|
|
101
|
+
:class="policy.is_active ? 'text-emerald-400' : 'text-[var(--esc-panel-text-muted)]'"
|
|
102
|
+
>{{ policy.is_active ? 'Yes' : 'No' }}</span
|
|
103
|
+
>
|
|
104
|
+
</td>
|
|
105
|
+
<td class="px-4 py-3 text-right text-sm">
|
|
106
|
+
<Link
|
|
107
|
+
:href="route('escalated.admin.sla-policies.edit', policy.id)"
|
|
108
|
+
class="text-[var(--esc-panel-text-secondary)] hover:text-[var(--esc-panel-text)]"
|
|
109
|
+
>Edit</Link
|
|
110
|
+
>
|
|
111
|
+
<button class="ml-3 text-rose-400 hover:text-rose-300" @click="destroy(policy.id)">
|
|
112
|
+
Delete
|
|
113
|
+
</button>
|
|
114
|
+
</td>
|
|
115
|
+
</tr>
|
|
116
|
+
</tbody>
|
|
117
|
+
</table>
|
|
118
|
+
</div>
|
|
119
|
+
</EscalatedLayout>
|
|
120
|
+
</template>
|