3911012c65
Broad sweep across the whole codebase:
- Blade views (39 files, 315 wraps): tag-text and title/placeholder/alt
attributes wrapped with {{ __() }}. Excludes scripts, styles, @php,
@verbatim, {{ }}, {!! !!}, comments to avoid touching interpolations.
- PHP (54 files, 179 wraps): array 'key' => 'RO value' patterns and
list items with diacritics wrapped with __(). Reverted __() inside
const arrays (PHP disallows non-constant expressions).
- Added 269 new keys to lang/{ru,en}.json (identity fallback for
unknowns → 161 human RU + 163 EN translations added for the most
common enums, stages, roles, statuses, payment methods, vehicle
categories, warehouse, portal, form actions.
Missing translations fall back to RO so the UI never breaks. All 306
tests pass; view cache compiles cleanly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
56 lines
2.7 KiB
PHP
56 lines
2.7 KiB
PHP
<x-filament-panels::page>
|
|
@php $rows = $this->getRows(); @endphp
|
|
<style>
|
|
.kpi-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:18px; background:white; padding:12px 16px; border-radius:8px; border:1px solid #e2e8f0; }
|
|
.dark .kpi-toolbar { background:#1f2937; border-color:#374151; }
|
|
.kpi-period { font-size:16px; font-weight:600; min-width:200px; text-align:center; }
|
|
.kpi-btn { padding:6px 12px; border:1px solid #cbd5e1; border-radius:6px; background:white; cursor:pointer; }
|
|
.kpi-table { width:100%; border-collapse:collapse; background:white; border-radius:8px; overflow:hidden; border:1px solid #e2e8f0; }
|
|
.dark .kpi-table { background:#1f2937; border-color:#374151; }
|
|
.kpi-table th, .kpi-table td { padding:10px 14px; text-align:left; border-bottom:1px solid #e2e8f0; }
|
|
.kpi-table th { background:#f7fafc; font-size:12px; text-transform:uppercase; letter-spacing:.3px; color:#4a5568; }
|
|
.kpi-table tr:last-child td { border-bottom:none; }
|
|
.kpi-badge { display:inline-block; padding:2px 8px; border-radius:4px; font-size:12px; font-weight:600; }
|
|
.kpi-green { background:#dcfce7; color:#15803d; }
|
|
.kpi-amber { background:#fef3c7; color:#92400e; }
|
|
.kpi-red { background:#fee2e2; color:#991b1b; }
|
|
.kpi-gray { background:#f1f5f9; color:#475569; }
|
|
.kpi-empty { padding:32px; text-align:center; color:#718096; }
|
|
</style>
|
|
|
|
<div class="kpi-toolbar">
|
|
<button class="kpi-btn" wire:click="shiftMonth(-1)">{{ __('◀ Luna precedentă') }}</button>
|
|
<div class="kpi-period">{{ $this->getPeriodLabel() }}</div>
|
|
<button class="kpi-btn" wire:click="shiftMonth(1)">{{ __('Luna următoare ▶') }}</button>
|
|
</div>
|
|
|
|
@if (empty($rows))
|
|
<div class="kpi-empty">{{ __('Niciun mecanic nu a finalizat lucrări în această perioadă.') }}</div>
|
|
@else
|
|
<table class="kpi-table">
|
|
<thead>
|
|
<tr>
|
|
<th>Mecanic</th>
|
|
<th>{{ __('Lucrări') }}</th>
|
|
<th>Norma ore</th>
|
|
<th>Real ore</th>
|
|
<th>{{ __('Eficiență') }}</th>
|
|
<th>Venit manopere</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($rows as $r)
|
|
<tr>
|
|
<td style="font-weight:600">{{ $r['master_name'] }}</td>
|
|
<td>{{ $r['tasks_done'] }}</td>
|
|
<td>{{ $r['norm_hours'] }}</td>
|
|
<td>{{ $r['actual_hours'] }}</td>
|
|
<td>@if ($r['efficiency_pct'] !== null)<span class="kpi-badge kpi-{{ $r['efficiency_class'] }}">{{ $r['efficiency_pct'] }}%</span>@else <span class="kpi-badge kpi-gray">—</span>@endif</td>
|
|
<td>{{ number_format($r['revenue'], 0, '.', ' ') }} MDL</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
@endif
|
|
</x-filament-panels::page>
|