fix reports view: inline CSS scoped (rp-*) instead of Tailwind utilities
This commit is contained in:
@@ -5,217 +5,274 @@
|
|||||||
$periods = $this->periods();
|
$periods = $this->periods();
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
<div class="space-y-6">
|
<style>
|
||||||
{{-- Period selector --}}
|
.rp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
|
||||||
<div class="flex flex-wrap gap-2 items-center">
|
.rp-label { font-size: 13px; font-weight: 500; }
|
||||||
<span class="text-sm font-medium">Perioadă:</span>
|
.rp-pill {
|
||||||
|
padding: 6px 12px; border-radius: 6px; font-size: 13px;
|
||||||
|
background: #fff; border: 1px solid #e5e7eb; cursor: pointer; color: #374151;
|
||||||
|
transition: all .15s;
|
||||||
|
}
|
||||||
|
.dark .rp-pill { background: #1f2937; border-color: #374151; color: #d1d5db; }
|
||||||
|
.rp-pill:hover { background: #f9fafb; }
|
||||||
|
.dark .rp-pill:hover { background: #374151; }
|
||||||
|
.rp-pill.active { background: #3b82f6; color: #fff; border-color: #3b82f6; }
|
||||||
|
|
||||||
|
.rp-tabs {
|
||||||
|
display: flex; flex-wrap: wrap; gap: 4px;
|
||||||
|
border-bottom: 1px solid #e5e7eb; margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.dark .rp-tabs { border-color: #374151; }
|
||||||
|
.rp-tab {
|
||||||
|
padding: 10px 16px; font-size: 14px; font-weight: 500;
|
||||||
|
border: none; background: transparent; cursor: pointer;
|
||||||
|
border-bottom: 2px solid transparent; margin-bottom: -1px;
|
||||||
|
color: #6b7280;
|
||||||
|
}
|
||||||
|
.rp-tab:hover { color: #1f2937; }
|
||||||
|
.dark .rp-tab:hover { color: #f9fafb; }
|
||||||
|
.rp-tab.active { color: #3b82f6; border-bottom-color: #3b82f6; }
|
||||||
|
|
||||||
|
.rp-grid { display: grid; gap: 16px; }
|
||||||
|
.rp-grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
||||||
|
.rp-grid-2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
|
||||||
|
|
||||||
|
.rp-card {
|
||||||
|
background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
.dark .rp-card { background: #1f2937; border-color: #374151; }
|
||||||
|
.rp-stat-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .5px; }
|
||||||
|
.rp-stat-value { font-size: 28px; font-weight: 700; margin-top: 6px; }
|
||||||
|
|
||||||
|
.rp-h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
|
||||||
|
|
||||||
|
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||||
|
.rp-tbl thead th {
|
||||||
|
text-align: left; padding: 8px 4px; border-bottom: 1px solid #e5e7eb;
|
||||||
|
font-weight: 600; color: #6b7280;
|
||||||
|
}
|
||||||
|
.dark .rp-tbl thead th { border-color: #374151; }
|
||||||
|
.rp-tbl tbody td { padding: 8px 4px; border-bottom: 1px solid #f3f4f6; }
|
||||||
|
.dark .rp-tbl tbody td { border-color: #374151; }
|
||||||
|
.rp-tbl tbody tr:last-child td { border-bottom: none; }
|
||||||
|
.rp-right { text-align: right; }
|
||||||
|
.rp-bold { font-weight: 600; }
|
||||||
|
|
||||||
|
.rp-success { color: #059669; }
|
||||||
|
.rp-danger { color: #dc2626; }
|
||||||
|
.rp-warning { color: #d97706; }
|
||||||
|
.rp-muted { color: #9ca3af; text-align: center; padding: 16px 0; }
|
||||||
|
|
||||||
|
.rp-stack { display: flex; flex-direction: column; gap: 16px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="rp-stack">
|
||||||
|
<div class="rp-bar">
|
||||||
|
<span class="rp-label">Perioadă:</span>
|
||||||
@foreach ($periods as $key => $label)
|
@foreach ($periods as $key => $label)
|
||||||
<button
|
<button type="button" wire:click="setPeriod('{{ $key }}')"
|
||||||
type="button"
|
class="rp-pill {{ $period === $key ? 'active' : '' }}">{{ $label }}</button>
|
||||||
wire:click="setPeriod('{{ $key }}')"
|
|
||||||
@class([
|
|
||||||
'px-3 py-1.5 rounded-md text-sm border',
|
|
||||||
'bg-primary-600 text-white border-primary-600' => $period === $key,
|
|
||||||
'bg-white border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:border-gray-700' => $period !== $key,
|
|
||||||
])
|
|
||||||
>{{ $label }}</button>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Tabs --}}
|
<div class="rp-tabs">
|
||||||
<div class="flex flex-wrap gap-2 border-b border-gray-200 dark:border-gray-700">
|
|
||||||
@foreach ($tabs as $key => $label)
|
@foreach ($tabs as $key => $label)
|
||||||
<button
|
<button type="button" wire:click="setTab('{{ $key }}')"
|
||||||
type="button"
|
class="rp-tab {{ $tab === $key ? 'active' : '' }}">{{ $label }}</button>
|
||||||
wire:click="setTab('{{ $key }}')"
|
|
||||||
@class([
|
|
||||||
'px-4 py-2 text-sm font-medium -mb-px border-b-2',
|
|
||||||
'border-primary-600 text-primary-600' => $tab === $key,
|
|
||||||
'border-transparent text-gray-500 hover:text-gray-700' => $tab !== $key,
|
|
||||||
])
|
|
||||||
>{{ $label }}</button>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- Content per tab --}}
|
|
||||||
@if ($tab === 'finance')
|
@if ($tab === 'finance')
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
<div class="rp-grid rp-grid-4">
|
||||||
@foreach ([
|
@foreach ([
|
||||||
['Încasări', $data['income'], 'success'],
|
['Încasări', $data['income'], 'success'],
|
||||||
['Cheltuieli', $data['expenses'], 'danger'],
|
['Cheltuieli', $data['expenses'], 'danger'],
|
||||||
['Profit', $data['profit'], $data['profit'] >= 0 ? 'success' : 'danger'],
|
['Profit', $data['profit'], $data['profit'] >= 0 ? 'success' : 'danger'],
|
||||||
['Datorii clienți', $data['debt'], 'warning'],
|
['Datorii clienți', $data['debt'], 'warning'],
|
||||||
] as [$label, $value, $color])
|
] as [$label, $value, $color])
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<div class="text-xs text-gray-500">{{ $label }}</div>
|
<div class="rp-stat-label">{{ $label }}</div>
|
||||||
<div class="text-2xl font-bold text-{{ $color }}-600 mt-1">
|
<div class="rp-stat-value rp-{{ $color }}">
|
||||||
{{ number_format((float)$value, 2, '.', ' ') }} MDL
|
{{ number_format((float)$value, 2, '.', ' ') }} MDL
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-grid rp-grid-2">
|
||||||
<h3 class="font-semibold mb-3">Încasări pe metodă</h3>
|
<div class="rp-card">
|
||||||
<table class="w-full text-sm">
|
<div class="rp-h3">Încasări pe metodă</div>
|
||||||
<thead><tr class="border-b"><th class="text-left py-2">Metodă</th><th class="text-right">Tranz.</th><th class="text-right">Total</th></tr></thead>
|
<table class="rp-tbl">
|
||||||
|
<thead><tr><th>Metodă</th><th class="rp-right">Tranz.</th><th class="rp-right">Total</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['by_method'] as $row)
|
@forelse ($data['by_method'] as $row)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ \App\Models\Tenant\Payment::METHODS[$row->method] ?? $row->method }}</td>
|
<td>{{ \App\Models\Tenant\Payment::METHODS[$row->method] ?? $row->method }}</td>
|
||||||
<td class="text-right">{{ $row->cnt }}</td>
|
<td class="rp-right">{{ $row->cnt }}</td>
|
||||||
<td class="text-right font-semibold">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
<td class="rp-right rp-bold">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="3" class="py-4 text-gray-400 text-center">Nicio plată în perioada selectată.</td></tr>
|
<tr><td colspan="3" class="rp-muted">Nicio plată în perioada selectată.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<h3 class="font-semibold mb-3">Cheltuieli pe categorie</h3>
|
<div class="rp-h3">Cheltuieli pe categorie</div>
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<thead><tr class="border-b"><th class="text-left py-2">Categorie</th><th class="text-right">Nr.</th><th class="text-right">Total</th></tr></thead>
|
<thead><tr><th>Categorie</th><th class="rp-right">Nr.</th><th class="rp-right">Total</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['by_category'] as $row)
|
@forelse ($data['by_category'] as $row)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}</td>
|
<td>{{ \App\Models\Tenant\Expense::CATEGORIES[$row->category] ?? $row->category }}</td>
|
||||||
<td class="text-right">{{ $row->cnt }}</td>
|
<td class="rp-right">{{ $row->cnt }}</td>
|
||||||
<td class="text-right font-semibold text-red-600">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
<td class="rp-right rp-bold rp-danger">{{ number_format((float)$row->total, 2, '.', ' ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="3" class="py-4 text-gray-400 text-center">Nicio cheltuială.</td></tr>
|
<tr><td colspan="3" class="rp-muted">Nicio cheltuială.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-sm text-gray-500">Marjă profit: <b>{{ $data['margin_pct'] }}%</b></div>
|
<div style="font-size: 13px; color: #6b7280;">Marjă profit: <b>{{ $data['margin_pct'] }}%</b></div>
|
||||||
|
|
||||||
@elseif ($tab === 'workload')
|
@elseif ($tab === 'workload')
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
<div class="rp-grid rp-grid-2">
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<div class="text-xs text-gray-500">Fișe deschise</div>
|
<div class="rp-stat-label">Fișe deschise</div>
|
||||||
<div class="text-3xl font-bold">{{ $data['opened'] }}</div>
|
<div class="rp-stat-value">{{ $data['opened'] }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<div class="text-xs text-gray-500">Fișe închise</div>
|
<div class="rp-stat-label">Fișe închise</div>
|
||||||
<div class="text-3xl font-bold text-success-600">{{ $data['closed'] }}</div>
|
<div class="rp-stat-value rp-success">{{ $data['closed'] }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<h3 class="font-semibold mb-3">Pe status</h3>
|
<div class="rp-h3">Pe status</div>
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<tbody>
|
<tbody>
|
||||||
@foreach ($data['by_status'] as $row)
|
@forelse ($data['by_status'] as $row)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ \App\Models\Tenant\WorkOrder::STATUSES[$row->status] ?? $row->status }}</td>
|
<td>{{ \App\Models\Tenant\WorkOrder::STATUSES[$row->status] ?? $row->status }}</td>
|
||||||
<td class="text-right font-bold">{{ $row->cnt }}</td>
|
<td class="rp-right rp-bold">{{ $row->cnt }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@empty
|
||||||
|
<tr><td colspan="2" class="rp-muted">Nicio fișă în perioada selectată.</td></tr>
|
||||||
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@elseif ($tab === 'masters')
|
@elseif ($tab === 'masters')
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700 overflow-x-auto">
|
<div class="rp-card" style="overflow-x: auto;">
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<thead><tr class="border-b">
|
<thead><tr>
|
||||||
<th class="text-left py-2">Mecanic</th>
|
<th>Mecanic</th>
|
||||||
<th class="text-left">Specializare</th>
|
<th>Specializare</th>
|
||||||
<th class="text-right">Manopere</th>
|
<th class="rp-right">Manopere</th>
|
||||||
<th class="text-right">Ore</th>
|
<th class="rp-right">Ore</th>
|
||||||
<th class="text-right">Venit</th>
|
<th class="rp-right">Venit</th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['rows'] as $r)
|
@forelse ($data['rows'] as $r)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2 font-medium">{{ $r['name'] }}</td>
|
<td class="rp-bold">{{ $r['name'] }}</td>
|
||||||
<td class="text-gray-500">{{ $r['specialization'] ?? '—' }}</td>
|
<td style="color:#6b7280">{{ $r['specialization'] ?? '—' }}</td>
|
||||||
<td class="text-right">{{ $r['works'] }}</td>
|
<td class="rp-right">{{ $r['works'] }}</td>
|
||||||
<td class="text-right">{{ number_format($r['hours'], 1) }}</td>
|
<td class="rp-right">{{ number_format($r['hours'], 1) }}</td>
|
||||||
<td class="text-right font-semibold text-success-600">{{ number_format($r['revenue'], 2, '.', ' ') }}</td>
|
<td class="rp-right rp-bold rp-success">{{ number_format($r['revenue'], 2, '.', ' ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="5" class="py-4 text-gray-400 text-center">Niciun mecanic activ.</td></tr>
|
<tr><td colspan="5" class="rp-muted">Niciun mecanic activ.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@elseif ($tab === 'works')
|
@elseif ($tab === 'works')
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700 overflow-x-auto">
|
<div class="rp-card" style="overflow-x: auto;">
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<thead><tr class="border-b">
|
<thead><tr>
|
||||||
<th class="text-left py-2">Manoperă</th>
|
<th>Manoperă</th>
|
||||||
<th class="text-right">Nr.</th>
|
<th class="rp-right">Nr.</th>
|
||||||
<th class="text-right">Ore total</th>
|
<th class="rp-right">Ore total</th>
|
||||||
<th class="text-right">Venit</th>
|
<th class="rp-right">Venit</th>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['rows'] as $r)
|
@forelse ($data['rows'] as $r)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ $r->name }}</td>
|
<td>{{ $r->name }}</td>
|
||||||
<td class="text-right font-semibold">{{ $r->cnt }}</td>
|
<td class="rp-right rp-bold">{{ $r->cnt }}</td>
|
||||||
<td class="text-right">{{ number_format((float)$r->hours, 1) }}</td>
|
<td class="rp-right">{{ number_format((float)$r->hours, 1) }}</td>
|
||||||
<td class="text-right text-success-600">{{ number_format((float)$r->revenue, 2, '.', ' ') }}</td>
|
<td class="rp-right rp-success">{{ number_format((float)$r->revenue, 2, '.', ' ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="4" class="py-4 text-gray-400 text-center">Nicio manoperă efectuată.</td></tr>
|
<tr><td colspan="4" class="rp-muted">Nicio manoperă efectuată.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@elseif ($tab === 'parts')
|
@elseif ($tab === 'parts')
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
<div class="rp-grid rp-grid-2">
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700 overflow-x-auto">
|
<div class="rp-card" style="overflow-x: auto;">
|
||||||
<h3 class="font-semibold mb-3">Top piese vândute</h3>
|
<div class="rp-h3">Top piese vândute</div>
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<thead><tr class="border-b"><th class="text-left py-2">Piesă</th><th class="text-right">Cant.</th><th class="text-right">Venit</th><th class="text-right">Marjă</th></tr></thead>
|
<thead><tr><th>Piesă</th><th class="rp-right">Cant.</th><th class="rp-right">Venit</th><th class="rp-right">Marjă</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['sold'] as $r)
|
@forelse ($data['sold'] as $r)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ $r->name }} <span class="text-gray-400">{{ $r->brand }}</span></td>
|
<td>{{ $r->name }} <span style="color:#9ca3af">{{ $r->brand }}</span></td>
|
||||||
<td class="text-right">{{ number_format((float)$r->qty, 2) }}</td>
|
<td class="rp-right">{{ number_format((float)$r->qty, 2) }}</td>
|
||||||
<td class="text-right">{{ number_format((float)$r->revenue, 2, '.', ' ') }}</td>
|
<td class="rp-right">{{ number_format((float)$r->revenue, 2, '.', ' ') }}</td>
|
||||||
<td class="text-right text-success-600">{{ number_format((float)$r->margin, 2, '.', ' ') }}</td>
|
<td class="rp-right rp-success">{{ number_format((float)$r->margin, 2, '.', ' ') }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="4" class="py-4 text-gray-400 text-center">Nicio piesă montată.</td></tr>
|
<tr><td colspan="4" class="rp-muted">Nicio piesă montată.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<h3 class="font-semibold mb-3">⚠️ Stoc minim atins</h3>
|
<div class="rp-h3">⚠️ Stoc minim atins</div>
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
<thead><tr class="border-b"><th class="text-left py-2">Piesă</th><th class="text-right">Stoc</th><th class="text-right">Min.</th></tr></thead>
|
<thead><tr><th>Piesă</th><th class="rp-right">Stoc</th><th class="rp-right">Min.</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@forelse ($data['low'] as $p)
|
@forelse ($data['low'] as $p)
|
||||||
<tr class="border-b last:border-0">
|
<tr>
|
||||||
<td class="py-2">{{ $p->name }}</td>
|
<td>{{ $p->name }}</td>
|
||||||
<td class="text-right font-bold {{ $p->qty <= 0 ? 'text-red-600' : 'text-yellow-600' }}">{{ $p->qty }}</td>
|
<td class="rp-right rp-bold {{ $p->qty <= 0 ? 'rp-danger' : 'rp-warning' }}">{{ $p->qty }}</td>
|
||||||
<td class="text-right">{{ $p->min_qty }}</td>
|
<td class="rp-right">{{ $p->min_qty }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr><td colspan="3" class="py-4 text-gray-400 text-center">Toate piesele sunt în stoc.</td></tr>
|
<tr><td colspan="3" class="rp-muted">Toate piesele sunt în stoc.</td></tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@elseif ($tab === 'clients')
|
@elseif ($tab === 'clients')
|
||||||
<div class="grid md:grid-cols-2 gap-4">
|
<div class="rp-grid rp-grid-2">
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<div class="text-xs text-gray-500">Clienți noi în perioada</div>
|
<div class="rp-stat-label">Clienți noi în perioadă</div>
|
||||||
<div class="text-3xl font-bold">{{ $data['new_count'] }}</div>
|
<div class="rp-stat-value">{{ $data['new_count'] }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bg-white dark:bg-gray-800 rounded-lg p-4 border border-gray-200 dark:border-gray-700">
|
<div class="rp-card">
|
||||||
<h3 class="font-semibold mb-3">Lead-uri pe sursă</h3>
|
<div class="rp-h3">Lead-uri pe sursă</div>
|
||||||
<table class="w-full text-sm">
|
<table class="rp-tbl">
|
||||||
@foreach ($data['by_source'] as $row)
|
<tbody>
|
||||||
<tr class="border-b last:border-0">
|
@forelse ($data['by_source'] as $row)
|
||||||
<td class="py-1">{{ \App\Models\Tenant\Lead::SOURCES[$row->source] ?? ($row->source ?? '—') }}</td>
|
<tr>
|
||||||
<td class="text-right font-bold">{{ $row->cnt }}</td>
|
<td>{{ \App\Models\Tenant\Lead::SOURCES[$row->source] ?? ($row->source ?? '—') }}</td>
|
||||||
|
<td class="rp-right rp-bold">{{ $row->cnt }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@empty
|
||||||
|
<tr><td colspan="2" class="rp-muted">Niciun lead.</td></tr>
|
||||||
|
@endforelse
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user