@php $cols = $this->getColumns(); $counts = $this->getCounts(); @endphp
Active acum
{{ $counts['active'] }}
Închise azi
{{ $counts['closed_today'] }}
@foreach ($cols as $col)
{{ $col['label'] }} {{ $col['items']->count() }}
@forelse ($col['items'] as $wo)
#{{ $wo->number }} {{ $wo->vehicle?->plate ?? '—' }}
{{ $wo->client?->name ?? 'fără client' }} · {{ $wo->vehicle?->make }} {{ $wo->vehicle?->model }}
@if ($wo->complaint)
{{ $wo->complaint }}
@endif @php $works = $this->getWorksFor($wo->id) @endphp @if (! empty($works))
@foreach ($works as $w)
@php $ms = $w->mechanic_status ?: 'pending'; $stColor = ['pending' => '#94a3b8', 'in_progress' => '#3b82f6', 'paused' => '#f59e0b', 'done' => '#10b981', 'blocked' => '#dc2626'][$ms]; $eff = $w->efficiencyClass(); $effColor = ['green' => '#10b981', 'amber' => '#f59e0b', 'red' => '#dc2626'][$eff ?? ''] ?? null; @endphp
{{ $w->name }}
{{ \App\Models\Tenant\WorkOrderWork::MECHANIC_STATUSES[$ms] }} @if ($w->hours > 0) {{ rtrim(rtrim(number_format($w->hours, 2), '0'), '.') }}h norm @endif @if ($w->actual_hours > 0 && $effColor) {{ rtrim(rtrim(number_format($w->actual_hours, 2), '0'), '.') }}h real ({{ $w->efficiencyPct() }}%) @endif @if ($w->block_reason) ⚠ {{ \App\Models\Tenant\WorkOrderWork::BLOCK_REASONS[$w->block_reason] ?? $w->block_reason }} @endif
@if (in_array($ms, ['pending', 'blocked'])) @endif @if ($ms === 'in_progress') @endif @if ($ms === 'paused') @endif
@endforeach
@endif
@empty
@endforelse
@endforeach
{{-- BLOCK REASON MODAL --}} @if ($blockingWorkId)

🔴 Blochez lucrarea

Selectează motivul pentru care lucrarea nu poate continua. Va fi vizibil managerului.

@endif