{{-- LANE principale --}}
name);
tipTime = formatTime(hoverMin);
} else {
tipShow = false;
}
"
@mouseleave="hoverMin=null; isAvail=false; tipShow=false"
@click="
if (hoverMin === null) return;
if (!isAvail) {
const ok = confirm('Quest\'orario è fuori dalle fasce disponibili. Forzare l\'inserimento?');
if (!ok) return;
$wire.openBookingFromTimeline({{ (int)$doc->id }}, '{{ $date }}', hoverMin, true);
return;
}
$wire.openBookingFromTimeline({{ (int)$doc->id }}, '{{ $date }}', hoverMin, false);
"
class="relative h-20 rounded-xl border border-gray-200 overflow-visible"
:class="isAvail ? 'cursor-pointer' : 'cursor-default'"
style="
/* CHIUSO: griglia più morbida */
background-color: rgba(55,65,81,0.18);
background-image: linear-gradient(to right, rgba(0,0,0,0.10) 1px, transparent 1px);
background-size: {{ (100 / (($timelineTotalMinutes / $stepMinutes))) }}% 100%;
"
>
{{-- hover cell SOLO disponibile: deve stare SOPRA availability (z-20) --}}
{{-- fasce disponibili: overlay chiaro (NO seconda griglia, evita sovrapposizioni) --}}
@foreach($availBlocks as $b)
@endforeach
{{-- appuntamenti attivi --}}
@foreach($apptBlocks as $b)
@php
$patientLabel = $b['patient_label'] ?? $b['patient_name'] ?? 'Paziente';
$patientInitials = $b['patient_initials'] ?? '';
$serviceName = $b['service_name'] ?? ($b['service_short'] ?? '');
$fullName = trim((string)($b['patient_name'] ?? ''));
$label = trim((string)($b['patient_label'] ?? $fullName));
if ($label === '') $label = 'Paziente';
$parts = preg_split('/\s+/', $label);
$line1 = $parts ? ($parts[0] ?? $label) : $label;
$line2 = count($parts) > 1 ? implode(' ', array_slice($parts, 1)) : $patientInitials;
@endphp
{{ $line1 }}
{{ $line2 }}
{{-- popover ancorato allo slot (hover) --}}
{{ $b['patient_name'] ?: $patientLabel }}
Orario: {{ $b['time'] }}
Prestazione: {{ $serviceName }}
@if(!empty($b['patient_email']))
Email: {{ $b['patient_email'] }}
@endif
@if(!empty($b['patient_phone']))
Telefono: {{ $b['patient_phone'] }}
@endif
Vai alla scheda paziente →
@endforeach
{{-- STRIP cancellati sotto (cliccabili + popover + riconferma) --}}
@if(!empty($cancelledBlocks))
@foreach($cancelledBlocks as $c)
@php
$p = trim((string)($c['patient_name'] ?? $c['patient_label'] ?? 'Paziente'));
if ($p === '') $p = 'Paziente';
$ini = $c['patient_initials'] ?? '';
$cid = $c['appointment_id'] ?? null;
$cTime = $c['time'] ?? '';
$cService = $c['service_name'] ?? ($c['service_short'] ?? '');
@endphp
{{ $ini !== '' ? $ini : '×' }}
{{ $p }}
×
{{-- popover hover per cancellati --}}
{{ $p }}
@if($cTime !== '')
Orario: {{ $cTime }}
@endif
@if($cService !== '')
Prestazione: {{ $cService }}
@endif
Cancellato
@if(!empty($c['patient_email']))
Email: {{ $c['patient_email'] }}
@endif
@if(!empty($c['patient_phone']))
Telefono: {{ $c['patient_phone'] }}
@endif
@endforeach