+ {{-- Period selector --}}
+
+ Perioadă:
+ @foreach ($periods as $key => $label)
+
+ @endforeach
+
+
+ {{-- Tabs --}}
+
+ @foreach ($tabs as $key => $label)
+
+ @endforeach
+
+
+ {{-- Content per tab --}}
+ @if ($tab === 'finance')
+
+ @foreach ([
+ ['Încasări', $data['income'], 'success'],
+ ['Cheltuieli', $data['expenses'], 'danger'],
+ ['Profit', $data['profit'], $data['profit'] >= 0 ? 'success' : 'danger'],
+ ['Datorii clienți', $data['debt'], 'warning'],
+ ] as [$label, $value, $color])
+
+
{{ $label }}
+
+ {{ number_format((float)$value, 2, '.', ' ') }} MDL
+
+
+ @endforeach
+
+
+
+
Încasări pe metodă
+
+ | Metodă | Tranz. | Total |
+
+ @forelse ($data['by_method'] as $row)
+
+ | {{ \App\Models\Tenant\Payment::METHODS[$row->method] ?? $row->method }} |
+ {{ $row->cnt }} |
+ {{ number_format((float)$row->total, 2, '.', ' ') }} |
+
+ @empty
+ | Nicio plată în perioada selectată. |
+ @endforelse
+
+
+
+
+
Cheltuieli pe categorie
+
+ | Categorie | Nr. | Total |
+
+ @forelse ($data['by_category'] as $row)
+
+ | {{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }} |
+ {{ $row->cnt }} |
+ {{ number_format((float)$row->total, 2, '.', ' ') }} |
+
+ @empty
+ | Nicio cheltuială. |
+ @endforelse
+
+
+
+
+
Marjă profit: {{ $data['margin_pct'] }}%
+ @elseif ($tab === 'workload')
+
+
+
Fișe deschise
+
{{ $data['opened'] }}
+
+
+
Fișe închise
+
{{ $data['closed'] }}
+
+
+
+
Pe status
+
+
+ @foreach ($data['by_status'] as $row)
+
+ | {{ \App\Models\Tenant\WorkOrder::STATUSES[$row->status] ?? $row->status }} |
+ {{ $row->cnt }} |
+
+ @endforeach
+
+
+
+ @elseif ($tab === 'masters')
+
+
+
+ | Mecanic |
+ Specializare |
+ Manopere |
+ Ore |
+ Venit |
+
+
+ @forelse ($data['rows'] as $r)
+
+ | {{ $r['name'] }} |
+ {{ $r['specialization'] ?? '—' }} |
+ {{ $r['works'] }} |
+ {{ number_format($r['hours'], 1) }} |
+ {{ number_format($r['revenue'], 2, '.', ' ') }} |
+
+ @empty
+ | Niciun mecanic activ. |
+ @endforelse
+
+
+
+ @elseif ($tab === 'works')
+
+
+
+ | Manoperă |
+ Nr. |
+ Ore total |
+ Venit |
+
+
+ @forelse ($data['rows'] as $r)
+
+ | {{ $r->name }} |
+ {{ $r->cnt }} |
+ {{ number_format((float)$r->hours, 1) }} |
+ {{ number_format((float)$r->revenue, 2, '.', ' ') }} |
+
+ @empty
+ | Nicio manoperă efectuată. |
+ @endforelse
+
+
+
+ @elseif ($tab === 'parts')
+
+
+
Top piese vândute
+
+ | Piesă | Cant. | Venit | Marjă |
+
+ @forelse ($data['sold'] as $r)
+
+ | {{ $r->name }} {{ $r->brand }} |
+ {{ number_format((float)$r->qty, 2) }} |
+ {{ number_format((float)$r->revenue, 2, '.', ' ') }} |
+ {{ number_format((float)$r->margin, 2, '.', ' ') }} |
+
+ @empty
+ | Nicio piesă montată. |
+ @endforelse
+
+
+
+
+
⚠️ Stoc minim atins
+
+ | Piesă | Stoc | Min. |
+
+ @forelse ($data['low'] as $p)
+
+ | {{ $p->name }} |
+ {{ $p->qty }} |
+ {{ $p->min_qty }} |
+
+ @empty
+ | Toate piesele sunt în stoc. |
+ @endforelse
+
+
+
+
+ @elseif ($tab === 'clients')
+
+
+
Clienți noi în perioada
+
{{ $data['new_count'] }}
+
+
+
Lead-uri pe sursă
+
+ @foreach ($data['by_source'] as $row)
+
+ | {{ \App\Models\Tenant\Lead::SOURCES[$row->source] ?? ($row->source ?? '—') }} |
+ {{ $row->cnt }} |
+
+ @endforeach
+
+
+
+ @endif
+
+