From a7bb9838f44dfacd1e4a858d665069d6dae6a32b Mon Sep 17 00:00:00 2001 From: Vasyka Date: Thu, 7 May 2026 12:07:08 +0000 Subject: [PATCH] fix reports view: inline CSS scoped (rp-*) instead of Tailwind utilities --- .../filament/tenant/pages/reports.blade.php | 307 +++++++++++------- 1 file changed, 182 insertions(+), 125 deletions(-) diff --git a/resources/views/filament/tenant/pages/reports.blade.php b/resources/views/filament/tenant/pages/reports.blade.php index dcbea4a..53ca75e 100644 --- a/resources/views/filament/tenant/pages/reports.blade.php +++ b/resources/views/filament/tenant/pages/reports.blade.php @@ -5,217 +5,274 @@ $periods = $this->periods(); @endphp -
- {{-- Period selector --}} -
- Perioadă: + + +
+
+ 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 }}
-
+
+
{{ $label }}
+
{{ number_format((float)$value, 2, '.', ' ') }} MDL
@endforeach
-
-
-

Încasări pe metodă

- - + +
+
+
Încasări pe metodă
+
MetodăTranz.Total
+ @forelse ($data['by_method'] as $row) - - - - + + + + @empty - + @endforelse
MetodăTranz.Total
{{ \App\Models\Tenant\Payment::METHODS[$row->method] ?? $row->method }}{{ $row->cnt }}{{ number_format((float)$row->total, 2, '.', ' ') }}
{{ \App\Models\Tenant\Payment::METHODS[$row->method] ?? $row->method }}{{ $row->cnt }}{{ number_format((float)$row->total, 2, '.', ' ') }}
Nicio plată în perioada selectată.
Nicio plată în perioada selectată.
-
-

Cheltuieli pe categorie

- - +
+
Cheltuieli pe categorie
+
CategorieNr.Total
+ @forelse ($data['by_category'] as $row) - - - - + + + + @empty - + @endforelse
CategorieNr.Total
{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}{{ $row->cnt }}{{ number_format((float)$row->total, 2, '.', ' ') }}
{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}{{ $row->cnt }}{{ number_format((float)$row->total, 2, '.', ' ') }}
Nicio cheltuială.
Nicio cheltuială.
-
Marjă profit: {{ $data['margin_pct'] }}%
+
Marjă profit: {{ $data['margin_pct'] }}%
+ @elseif ($tab === 'workload') -
-
-
Fișe deschise
-
{{ $data['opened'] }}
+
+
+
Fișe deschise
+
{{ $data['opened'] }}
-
-
Fișe închise
-
{{ $data['closed'] }}
+
+
Fișe închise
+
{{ $data['closed'] }}
-
-

Pe status

- +
+
Pe status
+
- @foreach ($data['by_status'] as $row) - - - + @forelse ($data['by_status'] as $row) + + + - @endforeach + @empty + + @endforelse
{{ \App\Models\Tenant\WorkOrder::STATUSES[$row->status] ?? $row->status }}{{ $row->cnt }}
{{ \App\Models\Tenant\WorkOrder::STATUSES[$row->status] ?? $row->status }}{{ $row->cnt }}
Nicio fișă în perioada selectată.
+ @elseif ($tab === 'masters') -
- - - - - - - +
+
MecanicSpecializareManopereOreVenit
+ + + + + + @forelse ($data['rows'] as $r) - - - - - - + + + + + + @empty - + @endforelse
MecanicSpecializareManopereOreVenit
{{ $r['name'] }}{{ $r['specialization'] ?? '—' }}{{ $r['works'] }}{{ number_format($r['hours'], 1) }}{{ number_format($r['revenue'], 2, '.', ' ') }}
{{ $r['name'] }}{{ $r['specialization'] ?? '—' }}{{ $r['works'] }}{{ number_format($r['hours'], 1) }}{{ number_format($r['revenue'], 2, '.', ' ') }}
Niciun mecanic activ.
Niciun mecanic activ.
+ @elseif ($tab === 'works') -
- - - - - - +
+
ManoperăNr.Ore totalVenit
+ + + + + @forelse ($data['rows'] as $r) - - - - - + + + + + @empty - + @endforelse
ManoperăNr.Ore totalVenit
{{ $r->name }}{{ $r->cnt }}{{ number_format((float)$r->hours, 1) }}{{ number_format((float)$r->revenue, 2, '.', ' ') }}
{{ $r->name }}{{ $r->cnt }}{{ number_format((float)$r->hours, 1) }}{{ number_format((float)$r->revenue, 2, '.', ' ') }}
Nicio manoperă efectuată.
Nicio manoperă efectuată.
+ @elseif ($tab === 'parts') -
-
-

Top piese vândute

- - +
+
+
Top piese vândute
+
PiesăCant.VenitMarjă
+ @forelse ($data['sold'] as $r) - - - - - + + + + + @empty - + @endforelse
PiesăCant.VenitMarjă
{{ $r->name }} {{ $r->brand }}{{ number_format((float)$r->qty, 2) }}{{ number_format((float)$r->revenue, 2, '.', ' ') }}{{ number_format((float)$r->margin, 2, '.', ' ') }}
{{ $r->name }} {{ $r->brand }}{{ number_format((float)$r->qty, 2) }}{{ number_format((float)$r->revenue, 2, '.', ' ') }}{{ number_format((float)$r->margin, 2, '.', ' ') }}
Nicio piesă montată.
Nicio piesă montată.
-
-

⚠️ Stoc minim atins

- - +
+
⚠️ Stoc minim atins
+
PiesăStocMin.
+ @forelse ($data['low'] as $p) - - - - + + + + @empty - + @endforelse
PiesăStocMin.
{{ $p->name }}{{ $p->qty }}{{ $p->min_qty }}
{{ $p->name }}{{ $p->qty }}{{ $p->min_qty }}
Toate piesele sunt în stoc.
Toate piesele sunt în stoc.
+ @elseif ($tab === 'clients') -
-
-
Clienți noi în perioada
-
{{ $data['new_count'] }}
+
+
+
Clienți noi în perioadă
+
{{ $data['new_count'] }}
-
-

Lead-uri pe sursă

- - @foreach ($data['by_source'] as $row) - - - - - @endforeach +
+
Lead-uri pe sursă
+
{{ \App\Models\Tenant\Lead::SOURCES[$row->source] ?? ($row->source ?? '—') }}{{ $row->cnt }}
+ + @forelse ($data['by_source'] as $row) + + + + + @empty + + @endforelse +
{{ \App\Models\Tenant\Lead::SOURCES[$row->source] ?? ($row->source ?? '—') }}{{ $row->cnt }}
Niciun lead.