77 lines
4.6 KiB
PHP
77 lines
4.6 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
<title>NetGescon Mobile Hub</title>
|
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
</head>
|
|
<body class="min-h-screen bg-slate-100 text-slate-900">
|
|
<main class="mx-auto w-full max-w-3xl p-4 pb-8">
|
|
<section class="rounded-2xl bg-white p-4 shadow-sm">
|
|
<h1 class="text-lg font-semibold">NetGescon Mobile Hub</h1>
|
|
<p class="mt-1 text-xs text-slate-500">Vista rapida smartphone per ticket e riconoscimento chiamante.</p>
|
|
<div class="mt-3 flex flex-wrap gap-2">
|
|
<a href="{{ \App\Filament\Pages\Supporto\TicketMobile::getUrl(panel: 'admin-filament') }}" class="rounded-lg bg-blue-600 px-3 py-2 text-xs font-medium text-white">Apri Ticket Mobile (Filament)</a>
|
|
<a href="{{ route('admin.dashboard') }}?desktop=1" class="rounded-lg border border-slate-300 px-3 py-2 text-xs">Apri dashboard desktop</a>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="mt-4 rounded-2xl bg-white p-4 shadow-sm">
|
|
<h2 class="text-sm font-semibold">Ricerca chiamante in rubrica</h2>
|
|
<form method="GET" action="{{ route('admin.mobile') }}" class="mt-2 flex gap-2">
|
|
<input type="text" name="phone" value="{{ $phoneQuery }}" placeholder="Numero in ingresso" class="w-full rounded-lg border-slate-300 text-sm" />
|
|
<button type="submit" class="rounded-lg bg-emerald-600 px-3 py-2 text-xs font-medium text-white">Cerca</button>
|
|
</form>
|
|
|
|
@if($callerMatches->count() > 0)
|
|
<div class="mt-3 space-y-2">
|
|
@foreach($callerMatches as $match)
|
|
<div class="rounded-lg border p-3">
|
|
<div class="text-sm font-medium">{{ $match->nome_completo ?: ($match->ragione_sociale ?: 'Contatto') }}</div>
|
|
<div class="text-xs text-slate-600">{{ $match->categoria ?: 'altro' }} @if($match->email) · {{ $match->email }} @endif</div>
|
|
<div class="mt-1 text-xs">{{ $match->telefono_cellulare ?: $match->telefono_ufficio ?: $match->telefono_casa ?: 'Telefono non valorizzato' }}</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@elseif(filled($phoneQuery))
|
|
<p class="mt-3 text-xs text-slate-500">Nessun contatto trovato.</p>
|
|
@endif
|
|
</section>
|
|
|
|
<section class="mt-4 rounded-2xl bg-white p-4 shadow-sm">
|
|
<div class="flex items-center justify-between gap-2">
|
|
<h2 class="text-sm font-semibold">Ticket rapidi</h2>
|
|
<form method="GET" action="{{ route('admin.mobile') }}">
|
|
<input type="hidden" name="phone" value="{{ $phoneQuery }}">
|
|
<select name="status" onchange="this.form.submit()" class="rounded-lg border-slate-300 text-xs">
|
|
<option value="open" @selected($status === 'open')>Aperti</option>
|
|
<option value="urgent" @selected($status === 'urgent')>Urgenti</option>
|
|
<option value="all" @selected($status === 'all')>Tutti</option>
|
|
</select>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="mt-3 space-y-2">
|
|
@forelse($tickets as $ticket)
|
|
<article class="rounded-lg border p-3">
|
|
<div class="flex items-start justify-between gap-2">
|
|
<h3 class="text-sm font-medium">#{{ $ticket->id }} · {{ $ticket->titolo }}</h3>
|
|
<span class="rounded-full bg-slate-100 px-2 py-0.5 text-[11px]">{{ $ticket->priorita }}</span>
|
|
</div>
|
|
<p class="mt-1 text-xs text-slate-600">{{ $ticket->stato }} · {{ optional($ticket->data_apertura)->format('d/m/Y H:i') }}</p>
|
|
<p class="mt-2 text-sm text-slate-700">{{ \Illuminate\Support\Str::limit((string) $ticket->descrizione, 150) }}</p>
|
|
<div class="mt-2">
|
|
<a href="{{ route('admin.tickets.show', $ticket) }}" class="text-xs text-blue-600">Apri dettaglio</a>
|
|
</div>
|
|
</article>
|
|
@empty
|
|
<p class="text-xs text-slate-500">Nessun ticket disponibile.</p>
|
|
@endforelse
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|