@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,206 +1,206 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
3
|
-
import StatsCard from '../../components/StatsCard.vue';
|
|
4
|
-
import PluginSlot from '../../components/PluginSlot.vue';
|
|
5
|
-
import { router, Link } from '@inertiajs/vue3';
|
|
6
|
-
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
period_days: Number,
|
|
10
|
-
total_tickets: Number,
|
|
11
|
-
resolved_tickets: Number,
|
|
12
|
-
avg_first_response_hours: Number,
|
|
13
|
-
sla_breach_count: Number,
|
|
14
|
-
by_status: Object,
|
|
15
|
-
by_priority: Object,
|
|
16
|
-
csat: { type: Object, default: () => ({}) },
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
function changePeriod(days) {
|
|
20
|
-
router.get(route('escalated.admin.reports'), { days }, { preserveState: true });
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function renderStars(rating) {
|
|
24
|
-
return Array.from({ length: 5 }, (_, i) => (i < Math.round(rating) ? 'filled' : 'empty'));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const { getPageComponents
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<template>
|
|
31
|
-
<EscalatedLayout title="Reports">
|
|
32
|
-
<!-- Sub-report navigation -->
|
|
33
|
-
<div
|
|
34
|
-
class="mb-6 flex items-center gap-3 rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] p-3"
|
|
35
|
-
>
|
|
36
|
-
<span class="text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
37
|
-
>Detailed Reports:</span
|
|
38
|
-
>
|
|
39
|
-
<Link
|
|
40
|
-
:href="route('escalated.admin.reports.dashboard')"
|
|
41
|
-
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
42
|
-
>
|
|
43
|
-
Dashboard
|
|
44
|
-
</Link>
|
|
45
|
-
<Link
|
|
46
|
-
:href="route('escalated.admin.reports.agents')"
|
|
47
|
-
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
48
|
-
>
|
|
49
|
-
Agent Metrics
|
|
50
|
-
</Link>
|
|
51
|
-
<Link
|
|
52
|
-
:href="route('escalated.admin.reports.sla')"
|
|
53
|
-
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
54
|
-
>
|
|
55
|
-
SLA Report
|
|
56
|
-
</Link>
|
|
57
|
-
<Link
|
|
58
|
-
:href="route('escalated.admin.reports.csat')"
|
|
59
|
-
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
60
|
-
>
|
|
61
|
-
CSAT Report
|
|
62
|
-
</Link>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<div class="mb-6 flex gap-2">
|
|
66
|
-
<button
|
|
67
|
-
v-for="d in [7, 30, 90]"
|
|
68
|
-
:key="d"
|
|
69
|
-
:class="[
|
|
70
|
-
'rounded-lg px-3.5 py-1.5 text-sm font-medium transition-all',
|
|
71
|
-
period_days === d
|
|
72
|
-
? 'bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] text-white shadow-lg shadow-[var(--esc-panel-bg)]/20'
|
|
73
|
-
: 'border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]',
|
|
74
|
-
]"
|
|
75
|
-
@click="changePeriod(d)"
|
|
76
|
-
>
|
|
77
|
-
Last {{ d }} days
|
|
78
|
-
</button>
|
|
79
|
-
</div>
|
|
80
|
-
<div class="mb-8 grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
81
|
-
<StatsCard label="Total Tickets" :value="total_tickets" color="indigo" />
|
|
82
|
-
<StatsCard label="Resolved" :value="resolved_tickets" color="green" />
|
|
83
|
-
<StatsCard label="Avg First Response" :value="`${avg_first_response_hours}h`" color="yellow" />
|
|
84
|
-
<StatsCard label="SLA Breaches" :value="sla_breach_count" color="red" />
|
|
85
|
-
</div>
|
|
86
|
-
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
87
|
-
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
88
|
-
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">By Status</h3>
|
|
89
|
-
<template v-if="by_status && Object.keys(by_status).length">
|
|
90
|
-
<div
|
|
91
|
-
v-for="(count, status) in by_status"
|
|
92
|
-
:key="status"
|
|
93
|
-
class="mb-2.5 flex items-center justify-between"
|
|
94
|
-
>
|
|
95
|
-
<span class="text-sm capitalize text-[var(--esc-panel-text-tertiary)]">{{
|
|
96
|
-
status.replace('_', ' ')
|
|
97
|
-
}}</span>
|
|
98
|
-
<span class="text-sm font-semibold text-[var(--esc-panel-text)]">{{ count }}</span>
|
|
99
|
-
</div>
|
|
100
|
-
</template>
|
|
101
|
-
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
102
|
-
<svg
|
|
103
|
-
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
104
|
-
fill="none"
|
|
105
|
-
stroke="currentColor"
|
|
106
|
-
stroke-width="1.5"
|
|
107
|
-
viewBox="0 0 24 24"
|
|
108
|
-
>
|
|
109
|
-
<path
|
|
110
|
-
stroke-linecap="round"
|
|
111
|
-
stroke-linejoin="round"
|
|
112
|
-
d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"
|
|
113
|
-
/>
|
|
114
|
-
</svg>
|
|
115
|
-
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ticket data for this period</p>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
119
|
-
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">By Priority</h3>
|
|
120
|
-
<template v-if="by_priority && Object.keys(by_priority).length">
|
|
121
|
-
<div
|
|
122
|
-
v-for="(count, priority) in by_priority"
|
|
123
|
-
:key="priority"
|
|
124
|
-
class="mb-2.5 flex items-center justify-between"
|
|
125
|
-
>
|
|
126
|
-
<span class="text-sm capitalize text-[var(--esc-panel-text-tertiary)]">{{ priority }}</span>
|
|
127
|
-
<span class="text-sm font-semibold text-[var(--esc-panel-text)]">{{ count }}</span>
|
|
128
|
-
</div>
|
|
129
|
-
</template>
|
|
130
|
-
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
131
|
-
<svg
|
|
132
|
-
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
133
|
-
fill="none"
|
|
134
|
-
stroke="currentColor"
|
|
135
|
-
stroke-width="1.5"
|
|
136
|
-
viewBox="0 0 24 24"
|
|
137
|
-
>
|
|
138
|
-
<path
|
|
139
|
-
stroke-linecap="round"
|
|
140
|
-
stroke-linejoin="round"
|
|
141
|
-
d="M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"
|
|
142
|
-
/>
|
|
143
|
-
</svg>
|
|
144
|
-
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ticket data for this period</p>
|
|
145
|
-
</div>
|
|
146
|
-
</div>
|
|
147
|
-
<!-- CSAT -->
|
|
148
|
-
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
149
|
-
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">Customer Satisfaction</h3>
|
|
150
|
-
<template v-if="csat?.total > 0">
|
|
151
|
-
<div class="mb-3 flex items-center gap-2">
|
|
152
|
-
<div class="flex items-center gap-0.5">
|
|
153
|
-
<svg
|
|
154
|
-
v-for="(star, i) in renderStars(csat.average)"
|
|
155
|
-
:key="i"
|
|
156
|
-
class="h-5 w-5"
|
|
157
|
-
:class="star === 'filled' ? 'text-amber-400' : 'text-[var(--esc-panel-text-muted)]'"
|
|
158
|
-
fill="currentColor"
|
|
159
|
-
viewBox="0 0 20 20"
|
|
160
|
-
>
|
|
161
|
-
<path
|
|
162
|
-
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
|
|
163
|
-
/>
|
|
164
|
-
</svg>
|
|
165
|
-
</div>
|
|
166
|
-
<span class="text-lg font-bold text-[var(--esc-panel-text)]">{{ csat.average }}</span>
|
|
167
|
-
<span class="text-sm text-[var(--esc-panel-text-muted)]">({{ csat.total }} ratings)</span>
|
|
168
|
-
</div>
|
|
169
|
-
<div v-if="csat.breakdown && Object.keys(csat.breakdown).length" class="space-y-1.5">
|
|
170
|
-
<div v-for="rating in [5, 4, 3, 2, 1]" :key="rating" class="flex items-center gap-2">
|
|
171
|
-
<span class="w-3 text-xs text-[var(--esc-panel-text-muted)]">{{ rating }}</span>
|
|
172
|
-
<div class="h-2 flex-1 overflow-hidden rounded-full bg-[var(--esc-panel-hover)]">
|
|
173
|
-
<div
|
|
174
|
-
class="h-full rounded-full bg-amber-400"
|
|
175
|
-
:style="{
|
|
176
|
-
width: `${csat.total ? ((csat.breakdown[rating] || 0) / csat.total) * 100 : 0}%`,
|
|
177
|
-
}"
|
|
178
|
-
></div>
|
|
179
|
-
</div>
|
|
180
|
-
<span class="w-6 text-right text-xs text-[var(--esc-panel-text-muted)]">{{
|
|
181
|
-
csat.breakdown[rating] || 0
|
|
182
|
-
}}</span>
|
|
183
|
-
</div>
|
|
184
|
-
</div>
|
|
185
|
-
</template>
|
|
186
|
-
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
187
|
-
<svg
|
|
188
|
-
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
189
|
-
fill="none"
|
|
190
|
-
stroke="currentColor"
|
|
191
|
-
stroke-width="1.5"
|
|
192
|
-
viewBox="0 0 24 24"
|
|
193
|
-
>
|
|
194
|
-
<path
|
|
195
|
-
stroke-linecap="round"
|
|
196
|
-
stroke-linejoin="round"
|
|
197
|
-
d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"
|
|
198
|
-
/>
|
|
199
|
-
</svg>
|
|
200
|
-
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ratings for this period</p>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
<PluginSlot slot="admin.reports.footer" :components="getPageComponents('admin.reports', 'footer')" />
|
|
205
|
-
</EscalatedLayout>
|
|
206
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../components/EscalatedLayout.vue';
|
|
3
|
+
import StatsCard from '../../components/StatsCard.vue';
|
|
4
|
+
import PluginSlot from '../../components/PluginSlot.vue';
|
|
5
|
+
import { router, Link } from '@inertiajs/vue3';
|
|
6
|
+
import { usePluginExtensions } from '../../composables/usePluginExtensions';
|
|
7
|
+
|
|
8
|
+
defineProps({
|
|
9
|
+
period_days: Number,
|
|
10
|
+
total_tickets: Number,
|
|
11
|
+
resolved_tickets: Number,
|
|
12
|
+
avg_first_response_hours: Number,
|
|
13
|
+
sla_breach_count: Number,
|
|
14
|
+
by_status: Object,
|
|
15
|
+
by_priority: Object,
|
|
16
|
+
csat: { type: Object, default: () => ({}) },
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
function changePeriod(days) {
|
|
20
|
+
router.get(route('escalated.admin.reports'), { days }, { preserveState: true });
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function renderStars(rating) {
|
|
24
|
+
return Array.from({ length: 5 }, (_, i) => (i < Math.round(rating) ? 'filled' : 'empty'));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const { getPageComponents } = usePluginExtensions();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<EscalatedLayout title="Reports">
|
|
32
|
+
<!-- Sub-report navigation -->
|
|
33
|
+
<div
|
|
34
|
+
class="mb-6 flex items-center gap-3 rounded-lg border border-[var(--esc-panel-border)] bg-[var(--esc-panel-hover)] p-3"
|
|
35
|
+
>
|
|
36
|
+
<span class="text-xs font-medium uppercase tracking-wider text-[var(--esc-panel-text-muted)]"
|
|
37
|
+
>Detailed Reports:</span
|
|
38
|
+
>
|
|
39
|
+
<Link
|
|
40
|
+
:href="route('escalated.admin.reports.dashboard')"
|
|
41
|
+
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
42
|
+
>
|
|
43
|
+
Dashboard
|
|
44
|
+
</Link>
|
|
45
|
+
<Link
|
|
46
|
+
:href="route('escalated.admin.reports.agents')"
|
|
47
|
+
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
48
|
+
>
|
|
49
|
+
Agent Metrics
|
|
50
|
+
</Link>
|
|
51
|
+
<Link
|
|
52
|
+
:href="route('escalated.admin.reports.sla')"
|
|
53
|
+
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
54
|
+
>
|
|
55
|
+
SLA Report
|
|
56
|
+
</Link>
|
|
57
|
+
<Link
|
|
58
|
+
:href="route('escalated.admin.reports.csat')"
|
|
59
|
+
class="rounded-md px-3 py-1.5 text-sm text-[var(--esc-panel-text-tertiary)] transition-colors hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]"
|
|
60
|
+
>
|
|
61
|
+
CSAT Report
|
|
62
|
+
</Link>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<div class="mb-6 flex gap-2">
|
|
66
|
+
<button
|
|
67
|
+
v-for="d in [7, 30, 90]"
|
|
68
|
+
:key="d"
|
|
69
|
+
:class="[
|
|
70
|
+
'rounded-lg px-3.5 py-1.5 text-sm font-medium transition-all',
|
|
71
|
+
period_days === d
|
|
72
|
+
? 'bg-gradient-to-r from-[var(--esc-panel-accent)] to-[var(--esc-panel-accent-secondary)] text-white shadow-lg shadow-[var(--esc-panel-bg)]/20'
|
|
73
|
+
: 'border border-[var(--esc-panel-border-input)] bg-[var(--esc-panel-hover)] text-[var(--esc-panel-text-tertiary)] hover:bg-[var(--esc-panel-hover)] hover:text-[var(--esc-panel-text-secondary)]',
|
|
74
|
+
]"
|
|
75
|
+
@click="changePeriod(d)"
|
|
76
|
+
>
|
|
77
|
+
Last {{ d }} days
|
|
78
|
+
</button>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="mb-8 grid grid-cols-2 gap-4 md:grid-cols-4">
|
|
81
|
+
<StatsCard label="Total Tickets" :value="total_tickets" color="indigo" />
|
|
82
|
+
<StatsCard label="Resolved" :value="resolved_tickets" color="green" />
|
|
83
|
+
<StatsCard label="Avg First Response" :value="`${avg_first_response_hours}h`" color="yellow" />
|
|
84
|
+
<StatsCard label="SLA Breaches" :value="sla_breach_count" color="red" />
|
|
85
|
+
</div>
|
|
86
|
+
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
|
87
|
+
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
88
|
+
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">By Status</h3>
|
|
89
|
+
<template v-if="by_status && Object.keys(by_status).length">
|
|
90
|
+
<div
|
|
91
|
+
v-for="(count, status) in by_status"
|
|
92
|
+
:key="status"
|
|
93
|
+
class="mb-2.5 flex items-center justify-between"
|
|
94
|
+
>
|
|
95
|
+
<span class="text-sm capitalize text-[var(--esc-panel-text-tertiary)]">{{
|
|
96
|
+
status.replace('_', ' ')
|
|
97
|
+
}}</span>
|
|
98
|
+
<span class="text-sm font-semibold text-[var(--esc-panel-text)]">{{ count }}</span>
|
|
99
|
+
</div>
|
|
100
|
+
</template>
|
|
101
|
+
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
102
|
+
<svg
|
|
103
|
+
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
104
|
+
fill="none"
|
|
105
|
+
stroke="currentColor"
|
|
106
|
+
stroke-width="1.5"
|
|
107
|
+
viewBox="0 0 24 24"
|
|
108
|
+
>
|
|
109
|
+
<path
|
|
110
|
+
stroke-linecap="round"
|
|
111
|
+
stroke-linejoin="round"
|
|
112
|
+
d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z"
|
|
113
|
+
/>
|
|
114
|
+
</svg>
|
|
115
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ticket data for this period</p>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
119
|
+
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">By Priority</h3>
|
|
120
|
+
<template v-if="by_priority && Object.keys(by_priority).length">
|
|
121
|
+
<div
|
|
122
|
+
v-for="(count, priority) in by_priority"
|
|
123
|
+
:key="priority"
|
|
124
|
+
class="mb-2.5 flex items-center justify-between"
|
|
125
|
+
>
|
|
126
|
+
<span class="text-sm capitalize text-[var(--esc-panel-text-tertiary)]">{{ priority }}</span>
|
|
127
|
+
<span class="text-sm font-semibold text-[var(--esc-panel-text)]">{{ count }}</span>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
131
|
+
<svg
|
|
132
|
+
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
133
|
+
fill="none"
|
|
134
|
+
stroke="currentColor"
|
|
135
|
+
stroke-width="1.5"
|
|
136
|
+
viewBox="0 0 24 24"
|
|
137
|
+
>
|
|
138
|
+
<path
|
|
139
|
+
stroke-linecap="round"
|
|
140
|
+
stroke-linejoin="round"
|
|
141
|
+
d="M3 4.5h14.25M3 9h9.75M3 13.5h5.25m5.25-.75L17.25 9m0 0L21 12.75M17.25 9v12"
|
|
142
|
+
/>
|
|
143
|
+
</svg>
|
|
144
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ticket data for this period</p>
|
|
145
|
+
</div>
|
|
146
|
+
</div>
|
|
147
|
+
<!-- CSAT -->
|
|
148
|
+
<div class="rounded-xl border border-[var(--esc-panel-border)] bg-[var(--esc-panel-surface)] p-5">
|
|
149
|
+
<h3 class="mb-4 text-sm font-semibold text-[var(--esc-panel-text-secondary)]">Customer Satisfaction</h3>
|
|
150
|
+
<template v-if="csat?.total > 0">
|
|
151
|
+
<div class="mb-3 flex items-center gap-2">
|
|
152
|
+
<div class="flex items-center gap-0.5">
|
|
153
|
+
<svg
|
|
154
|
+
v-for="(star, i) in renderStars(csat.average)"
|
|
155
|
+
:key="i"
|
|
156
|
+
class="h-5 w-5"
|
|
157
|
+
:class="star === 'filled' ? 'text-amber-400' : 'text-[var(--esc-panel-text-muted)]'"
|
|
158
|
+
fill="currentColor"
|
|
159
|
+
viewBox="0 0 20 20"
|
|
160
|
+
>
|
|
161
|
+
<path
|
|
162
|
+
d="M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"
|
|
163
|
+
/>
|
|
164
|
+
</svg>
|
|
165
|
+
</div>
|
|
166
|
+
<span class="text-lg font-bold text-[var(--esc-panel-text)]">{{ csat.average }}</span>
|
|
167
|
+
<span class="text-sm text-[var(--esc-panel-text-muted)]">({{ csat.total }} ratings)</span>
|
|
168
|
+
</div>
|
|
169
|
+
<div v-if="csat.breakdown && Object.keys(csat.breakdown).length" class="space-y-1.5">
|
|
170
|
+
<div v-for="rating in [5, 4, 3, 2, 1]" :key="rating" class="flex items-center gap-2">
|
|
171
|
+
<span class="w-3 text-xs text-[var(--esc-panel-text-muted)]">{{ rating }}</span>
|
|
172
|
+
<div class="h-2 flex-1 overflow-hidden rounded-full bg-[var(--esc-panel-hover)]">
|
|
173
|
+
<div
|
|
174
|
+
class="h-full rounded-full bg-amber-400"
|
|
175
|
+
:style="{
|
|
176
|
+
width: `${csat.total ? ((csat.breakdown[rating] || 0) / csat.total) * 100 : 0}%`,
|
|
177
|
+
}"
|
|
178
|
+
></div>
|
|
179
|
+
</div>
|
|
180
|
+
<span class="w-6 text-right text-xs text-[var(--esc-panel-text-muted)]">{{
|
|
181
|
+
csat.breakdown[rating] || 0
|
|
182
|
+
}}</span>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</template>
|
|
186
|
+
<div v-else class="flex flex-col items-center py-6 text-center">
|
|
187
|
+
<svg
|
|
188
|
+
class="mb-2 h-8 w-8 text-[var(--esc-panel-text-muted)]"
|
|
189
|
+
fill="none"
|
|
190
|
+
stroke="currentColor"
|
|
191
|
+
stroke-width="1.5"
|
|
192
|
+
viewBox="0 0 24 24"
|
|
193
|
+
>
|
|
194
|
+
<path
|
|
195
|
+
stroke-linecap="round"
|
|
196
|
+
stroke-linejoin="round"
|
|
197
|
+
d="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z"
|
|
198
|
+
/>
|
|
199
|
+
</svg>
|
|
200
|
+
<p class="text-sm text-[var(--esc-panel-text-muted)]">No ratings for this period</p>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
<PluginSlot slot="admin.reports.footer" :components="getPageComponents('admin.reports', 'footer')" />
|
|
205
|
+
</EscalatedLayout>
|
|
206
|
+
</template>
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
-
import PermissionMatrix from '../../../components/PermissionMatrix.vue';
|
|
4
|
-
import { useForm } from '@inertiajs/vue3';
|
|
5
|
-
|
|
6
|
-
const props = defineProps({
|
|
7
|
-
role: { type: Object, default: null },
|
|
8
|
-
permissions: { type: Object, default: () => ({}) },
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
const form = useForm({
|
|
12
|
-
name: props.role?.name || '',
|
|
13
|
-
description: props.role?.description || '',
|
|
14
|
-
permissions: props.role?.permissions?.map((p) => p.id) || [],
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
function submit() {
|
|
18
|
-
if (props.role) {
|
|
19
|
-
form.put(route('escalated.admin.roles.update', props.role.id));
|
|
20
|
-
} else {
|
|
21
|
-
form.post(route('escalated.admin.roles.store'));
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
</script>
|
|
25
|
-
|
|
26
|
-
<template>
|
|
27
|
-
<EscalatedLayout :title="role ? 'Edit Role' : 'New Role'">
|
|
28
|
-
<form
|
|
29
|
-
class="mx-auto max-w-3xl 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 v-if="form.errors.name" class="mt-1 text-sm text-rose-400">{{ form.errors.name }}</div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<div>
|
|
44
|
-
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Description</label>
|
|
45
|
-
<textarea
|
|
46
|
-
v-model="form.description"
|
|
47
|
-
rows="2"
|
|
48
|
-
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)]"
|
|
49
|
-
></textarea>
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div>
|
|
53
|
-
<label class="mb-2 block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Permissions</label>
|
|
54
|
-
<PermissionMatrix v-model="form.permissions" :permissions="permissions" />
|
|
55
|
-
<div v-if="form.errors.permissions" class="mt-1 text-sm text-rose-400">
|
|
56
|
-
{{ form.errors.permissions }}
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
|
|
60
|
-
<div class="flex justify-end">
|
|
61
|
-
<button
|
|
62
|
-
type="submit"
|
|
63
|
-
:disabled="form.processing"
|
|
64
|
-
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"
|
|
65
|
-
>
|
|
66
|
-
{{ role ? 'Update' : 'Create' }}
|
|
67
|
-
</button>
|
|
68
|
-
</div>
|
|
69
|
-
</form>
|
|
70
|
-
</EscalatedLayout>
|
|
71
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import EscalatedLayout from '../../../components/EscalatedLayout.vue';
|
|
3
|
+
import PermissionMatrix from '../../../components/PermissionMatrix.vue';
|
|
4
|
+
import { useForm } from '@inertiajs/vue3';
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
role: { type: Object, default: null },
|
|
8
|
+
permissions: { type: Object, default: () => ({}) },
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const form = useForm({
|
|
12
|
+
name: props.role?.name || '',
|
|
13
|
+
description: props.role?.description || '',
|
|
14
|
+
permissions: props.role?.permissions?.map((p) => p.id) || [],
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
function submit() {
|
|
18
|
+
if (props.role) {
|
|
19
|
+
form.put(route('escalated.admin.roles.update', props.role.id));
|
|
20
|
+
} else {
|
|
21
|
+
form.post(route('escalated.admin.roles.store'));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<EscalatedLayout :title="role ? 'Edit Role' : 'New Role'">
|
|
28
|
+
<form
|
|
29
|
+
class="mx-auto max-w-3xl 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 v-if="form.errors.name" class="mt-1 text-sm text-rose-400">{{ form.errors.name }}</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div>
|
|
44
|
+
<label class="block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Description</label>
|
|
45
|
+
<textarea
|
|
46
|
+
v-model="form.description"
|
|
47
|
+
rows="2"
|
|
48
|
+
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)]"
|
|
49
|
+
></textarea>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<div>
|
|
53
|
+
<label class="mb-2 block text-sm font-medium text-[var(--esc-panel-text-secondary)]">Permissions</label>
|
|
54
|
+
<PermissionMatrix v-model="form.permissions" :permissions="permissions" />
|
|
55
|
+
<div v-if="form.errors.permissions" class="mt-1 text-sm text-rose-400">
|
|
56
|
+
{{ form.errors.permissions }}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
|
|
60
|
+
<div class="flex justify-end">
|
|
61
|
+
<button
|
|
62
|
+
type="submit"
|
|
63
|
+
:disabled="form.processing"
|
|
64
|
+
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"
|
|
65
|
+
>
|
|
66
|
+
{{ role ? 'Update' : 'Create' }}
|
|
67
|
+
</button>
|
|
68
|
+
</div>
|
|
69
|
+
</form>
|
|
70
|
+
</EscalatedLayout>
|
|
71
|
+
</template>
|