Add hero sections to Queue index pages and soften analytics cards.
Deploy Ladill Queue / deploy (push) Successful in 36s
Deploy Ladill Queue / deploy (push) Successful in 36s
Introduce shared x-qms.page-hero with summary stats across queues, tickets, counters, admin pages, and insights; remove bordered cards on Analytics, Reports, Feedback, and Branches list views. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,29 +1,49 @@
|
||||
@php
|
||||
$canManageWorkflows = app(\App\Services\Qms\QmsPermissions::class)->can(
|
||||
app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()),
|
||||
'workflows.manage'
|
||||
);
|
||||
@endphp
|
||||
|
||||
<x-app-layout title="Workflows">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h1 class="text-2xl font-semibold text-slate-900 dark:text-white">Workflows</h1>
|
||||
@if(app(\App\Services\Qms\QmsPermissions::class)->can(app(\App\Services\Qms\OrganizationResolver::class)->memberFor(auth()->user()), 'workflows.manage'))
|
||||
<a href="{{ route('qms.workflows.create') }}" class="btn-primary">New workflow</a>
|
||||
@endif
|
||||
</div>
|
||||
@include('partials.flash')
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Steps</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Status</th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@forelse ($workflows as $workflow)
|
||||
<tr>
|
||||
<td class="px-4 py-3"><a href="{{ route('qms.workflows.show', $workflow) }}" class="text-sm font-medium text-indigo-600">{{ $workflow->name }}</a></td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->steps_count }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->is_active ? 'Active' : 'Inactive' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="px-6 py-12 text-center text-sm text-slate-500">No workflows configured.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="space-y-6">
|
||||
<x-qms.page-hero
|
||||
badge="Multi-step · Routing · Automation"
|
||||
title="Workflows"
|
||||
description="Define multi-step customer journeys that route tickets through queues, counters, and departments in sequence."
|
||||
:stats="[
|
||||
['value' => number_format($heroStats['total']), 'label' => 'Workflows'],
|
||||
['value' => number_format($heroStats['active']), 'label' => 'Active'],
|
||||
['value' => number_format($heroStats['steps']), 'label' => 'Total steps'],
|
||||
]">
|
||||
@if ($canManageWorkflows)
|
||||
<x-slot name="actions">
|
||||
<a href="{{ route('qms.workflows.create') }}" class="btn-primary">New workflow</a>
|
||||
</x-slot>
|
||||
@endif
|
||||
</x-qms.page-hero>
|
||||
|
||||
@include('partials.flash')
|
||||
|
||||
<div class="overflow-hidden rounded-2xl border border-slate-200 bg-white">
|
||||
<table class="min-w-full divide-y divide-slate-200">
|
||||
<thead class="bg-slate-50"><tr>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Name</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Steps</th>
|
||||
<th class="px-4 py-3 text-left text-xs font-semibold uppercase text-slate-500">Status</th>
|
||||
</tr></thead>
|
||||
<tbody class="divide-y divide-slate-200">
|
||||
@forelse ($workflows as $workflow)
|
||||
<tr>
|
||||
<td class="px-4 py-3"><a href="{{ route('qms.workflows.show', $workflow) }}" class="text-sm font-medium text-indigo-600">{{ $workflow->name }}</a></td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->steps_count }}</td>
|
||||
<td class="px-4 py-3 text-sm">{{ $workflow->is_active ? 'Active' : 'Inactive' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="3" class="px-6 py-12 text-center text-sm text-slate-500">No workflows configured.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
|
||||
Reference in New Issue
Block a user