1f471cc1ea
MechanicKpi getPeriodLabel() was hardcoded to ->locale('ro') which
forced Romanian month names ('iulie 2026') regardless of the app
locale. Same on PDF appointments day-label. Both now switch to
app()->getLocale() so RU shows «июль 2026», EN 'July 2026'.
SetLocale middleware already calls Carbon::setLocale on every
request, so translatedFormat() elsewhere already respects the app
locale — no other files needed patching.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
66 lines
3.0 KiB
PHP
66 lines
3.0 KiB
PHP
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>Programări {{ $periodLabel }}</title>
|
||
<style>
|
||
@page { margin: 18mm 14mm; }
|
||
body { font-family: DejaVu Sans, sans-serif; font-size: 11px; color: #1a202c; }
|
||
h1 { font-size: 18px; margin: 0 0 6px; color: #1a202c; }
|
||
.sub { color: #718096; font-size: 11px; margin-bottom: 14px; }
|
||
h2 { font-size: 14px; margin: 16px 0 8px; padding: 4px 8px; background: #ebf5ff; border-left: 3px solid #3b82f6; }
|
||
table { width: 100%; border-collapse: collapse; }
|
||
th { text-align: left; background: #f7fafc; font-size: 10px; padding: 6px 8px; border-bottom: 2px solid #e2e8f0; }
|
||
td { padding: 6px 8px; border-bottom: 1px solid #edf2f7; vertical-align: top; }
|
||
.time { font-weight: 700; color: #2563eb; white-space: nowrap; width: 60px; }
|
||
.client-name { font-weight: 600; }
|
||
.meta { color: #718096; font-size: 10px; }
|
||
.footer { margin-top: 24px; padding-top: 8px; border-top: 1px solid #e2e8f0; font-size: 10px; color: #94a3b8; }
|
||
.empty { padding: 20px; text-align: center; color: #94a3b8; font-style: italic; }
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<h1>Programări — {{ $periodLabel }}</h1>
|
||
<div class="sub">Generat la {{ $generatedAt }} · {{ $appointments->flatten()->count() }} programări total</div>
|
||
|
||
@forelse ($appointments as $date => $dayAppts)
|
||
@php $dateLabel = \Carbon\Carbon::parse($date)->locale(app()->getLocale())->isoFormat('dddd, D MMMM YYYY'); @endphp
|
||
<h2>{{ ucfirst($dateLabel) }} · {{ $dayAppts->count() }} programări</h2>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="width:60px;">{{ __('Ora') }}</th>
|
||
<th>{{ __('Subiect') }}</th>
|
||
<th>{{ __('Client / Auto') }}</th>
|
||
<th>{{ __('Pod') }}</th>
|
||
<th>{{ __('Maistru') }}</th>
|
||
<th style="width:60px;">{{ __('Status') }}</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@foreach ($dayAppts as $a)
|
||
<tr>
|
||
<td class="time">{{ substr($a->time_start ?? '', 0, 5) }}–{{ substr($a->time_end ?? '', 0, 5) }}</td>
|
||
<td>{{ $a->title }}@if ($a->notes)<div class="meta">{{ $a->notes }}</div>@endif</td>
|
||
<td>
|
||
<div class="client-name">{{ $a->client?->name ?? '—' }}</div>
|
||
<div class="meta">
|
||
@if ($a->vehicle?->make){{ $a->vehicle?->make }} {{ $a->vehicle?->model }}@endif
|
||
@if ($a->vehicle?->plate) · {{ $a->vehicle->plate }}@endif
|
||
</div>
|
||
</td>
|
||
<td>{{ $a->post?->name ?? '—' }}</td>
|
||
<td>{{ $a->master?->name ?? '—' }}</td>
|
||
<td>{{ ucfirst($a->status) }}</td>
|
||
</tr>
|
||
@endforeach
|
||
</tbody>
|
||
</table>
|
||
@empty
|
||
<div class="empty">{{ __('Nicio programare în această perioadă.') }}</div>
|
||
@endforelse
|
||
|
||
<div class="footer">{{ __('AutoCRM PSauto · psauto.service.mir.md') }}</div>
|
||
</body>
|
||
</html>
|