@php $days = $this->getDays(); $rows = $this->getRows(); $matrix = $this->getMatrix(); $stats = $this->getStats(); $openEvent = $this->getOpenEvent(); @endphp
{{ __('CRM › Programări ›') }} {{ __('Calendar vizual') }}

{{ __('Calendar vizual') }}

{{ __('Ore programate') }}
{{ $stats['scheduled_hours'] }} / {{ $stats['capacity_hours'] }}
{{ __('săptămâna curentă') }} · {{ $stats['utilization_pct'] }}% {{ __('capacitate') }}
{{ __('Fișe deschise') }}
{{ $stats['open_count'] }}
{{ __('programări active') }}
{{ __('Confirmate') }}
{{ $stats['confirmed_count'] }} / {{ $stats['total_count'] }}
{{ $stats['confirmation_rate_pct'] }}% {{ __('rata confirmare') }}
{{ __('No-show alert') }}
{{ $stats['no_show_alert'] }}
{{ __('programări neconfirmate < 24h') }}
{{ $this->getWeekLabel() }}
{{ __('Mod:') }}
{{ __('Grupare:') }}
@if ($viewMode === 'custom')
{{ __('De la:') }} {{ __('Până la:') }}
@endif
{{ __('Filtru:') }}
{{ __('⚙ Cum funcționează:') }} {{ __('Matricea') }} {{ $groupBy === 'post' ? __('Pod') : __('Mecanic') }} × {{ __('Zile') }}. {{ __('Drag-and-drop între celule pentru a reprograma. Indicator de încărcare pe fiecare celulă (ore planificate / capacitate). Click pe celulă goală → programare rapidă. Click pe eveniment → detalii.') }}
@if ($viewMode === 'list') @php $list = $this->getListAppointments(); @endphp
@if (empty($list))
{{ __('Nicio programare în perioada selectată.') }}
@else @foreach (['Data', 'Ora', 'Subiect', 'Client', 'Telefon', 'Auto', 'Pod', 'Maistru', 'Status'] as $h) @endforeach @foreach ($list as $a) @endforeach
{{ $h }}
{{ $a['date'] }} {{ $a['time'] }} {{ $a['title'] }} {{ $a['client_name'] ?? '—' }} {{ $a['client_phone'] ?? '—' }} {{ $a['vehicle'] }} {{ $a['post_name'] }} {{ $a['master_name'] }} {{ ucfirst($a['status']) }}
@endif
@else
{{ $groupBy === 'post' ? __('Pod / Zi') : __('Mecanic / Zi') }}
@foreach ($days as $day)
{{ $day['name'] }} {{ $day['label'] }}
@endforeach @foreach ($rows as $row)
{{ $row['name'] }} @if ($row['kind'] === 'post') @endif
{{ $row['meta'] }}
@foreach ($days as $day) @php $cell = $matrix[$row['id']][$day['date']] ?? ['events' => [], 'load_hours' => 0, 'capacity' => $row['capacity_hours']]; $loadClass = ''; $cap = $cell['capacity'] ?: 10; $loadRatio = $cap > 0 ? $cell['load_hours'] / $cap : 0; if ($loadRatio >= 0.9) $loadClass = 'full'; elseif ($loadRatio >= 0.5) $loadClass = 'warn'; @endphp
@if (! $day['is_closed']) {{ rtrim(rtrim(number_format($cell['load_hours'], 1), '0'), '.') ?: '0' }}/{{ (int)$cap }} @foreach ($cell['events'] as $e)
{{ $e['client_name'] ?: $e['title'] }}
{{ $e['vehicle'] ?: '—' }}@if($e['plate']) · {{ $e['plate'] }}@endif
{{ $e['time'] }}@if($e['master_initial']) · {{ $e['master_initial'] }}@endif
@endforeach @endif
@endforeach @endforeach
@endif

{{ __('Legendă') }}

{{ __('Mecanici') }}
@foreach ($this->getMasterOptions() as $id => $name) @php $u = \App\Models\Tenant\User::find($id); $color = $u?->color ?: '#94a3b8'; $spec = $u?->specialization ?: ''; @endphp
{{ $name }} @if($spec)· {{ $spec }} @endif
@endforeach
{{ __('Încărcare celulă') }}
{{ __('0–5h/10') }} {{ __('liber/ușor') }}
{{ __('5–8.5h/10') }} {{ __('mediu') }}
{{ __('≥9h/10') }} {{ __('plin') }}
{{ __('Stare zi') }}
{{ __('Weekend') }}
{{ __('Închis (Duminică/sărbătoare)') }}
{{ __('Astăzi') }}
@if ($openEvent)
{{ $openEvent['title'] ?: $openEvent['client_name'] }}
{{ $openEvent['date'] }} · {{ $openEvent['time'] }} · {{ ucfirst($openEvent['status']) }}
@if ($openEvent['client_name'])
{{ $openEvent['client_name'] }}
@endif @if ($openEvent['client_phone'])
{{ $openEvent['client_phone'] }}
@endif @if ($openEvent['vehicle'])
{{ $openEvent['vehicle'] }}
@endif @if ($openEvent['plate'])
{{ $openEvent['plate'] }}
@endif @if ($openEvent['master_name'])
{{ $openEvent['master_name'] }}
@endif @if ($openEvent['post_name'])
{{ $openEvent['post_name'] }}
@endif
@if ($openEvent['notes'])
{{ $openEvent['notes'] }}
@endif
{{ __('↗ Editare') }}
@endif
@if ($showNewForm)
{{ __('Programare nouă') }}
{{ $newAppt['date'] ?? '' }}
@endif
{{-- NEW POST QUICK-ADD MODAL --}} @if ($showNewPostForm)

{{ __('+ Pod / spațiu nou') }}

{{ __('Poți adăuga un loc de muncă (cu lift sau fără — ex: curte, atelier electric).') }}

@endif {{-- RENAME POST MODAL --}} @if ($renamingPostId)

{{ __('✏ Editează pod') }}

{{ __('Pre-completat automat la programări noi pe acest pod.') }}

@endif