netgescon-day0/resources/views/livewire/filament/topbar-live-call.blade.php

49 lines
3.0 KiB
PHP

<div wire:poll.8s="refreshLiveIncomingCall" class="hidden lg:flex lg:min-w-[24rem] lg:flex-1 lg:justify-center">
@if($liveIncomingCall)
<div class="mx-3 flex w-full max-w-2xl items-center justify-between gap-3 rounded-xl border border-emerald-300 bg-emerald-50 px-4 py-2 shadow-sm">
<div class="min-w-0">
<div class="text-[11px] font-semibold uppercase tracking-wide text-emerald-800">Chiamata in arrivo</div>
<div class="truncate text-sm font-semibold text-emerald-950">
{{ $liveIncomingCall['rubrica_nome'] ?: 'Numero non riconosciuto' }}
</div>
<div class="truncate text-xs text-emerald-800">
{{ $liveIncomingCall['phone'] ?? '-' }}
@if(!empty($liveIncomingCall['target_extension']))
· int. {{ $liveIncomingCall['target_extension'] }}
@endif
@if(!empty($liveIncomingCall['received_at']))
· {{ $liveIncomingCall['received_at'] }}
@endif
</div>
</div>
<div class="flex shrink-0 flex-wrap items-center gap-2">
<button type="button" wire:click="createPostIt" class="inline-flex items-center rounded-md bg-emerald-700 px-3 py-1.5 text-xs font-medium text-white hover:bg-emerald-600">
Post-it
</button>
<button type="button" wire:click="openTicketMobile" class="inline-flex items-center rounded-md bg-slate-900 px-3 py-1.5 text-xs font-medium text-white hover:bg-slate-800">
Prendi nota
</button>
@if(!empty($liveIncomingCall['rubrica_url']))
<a href="{{ $liveIncomingCall['rubrica_url'] }}" class="inline-flex items-center rounded-md border border-emerald-300 bg-white px-3 py-1.5 text-xs font-medium text-emerald-800 hover:bg-emerald-100">
Rubrica
</a>
@endif
</div>
</div>
@else
<div class="mx-3 flex w-full max-w-xl items-center justify-between gap-3 rounded-xl border border-slate-200 bg-slate-50 px-4 py-2 shadow-sm">
<div class="min-w-0">
<div class="text-[11px] font-semibold uppercase tracking-wide text-slate-700">CTI live</div>
<div class="truncate text-sm font-medium text-slate-900">In attesa di chiamate recenti</div>
<div class="truncate text-xs text-slate-600">Il box operativo si apre automaticamente quando arriva una inbound valida.</div>
</div>
<div class="shrink-0">
<a href="{{ \App\Filament\Pages\Strumenti\PostItGestione::getUrl(panel: 'admin-filament') }}" class="inline-flex items-center rounded-md border border-slate-300 bg-white px-3 py-1.5 text-xs font-medium text-slate-700 hover:bg-slate-100">
Log chiamate
</a>
</div>
</div>
@endif
</div>