Files
autocrm/resources/views/pdf/appointments.blade.php
T
Vasyka 7077fff3b3 feat(i18n): convert 38 hardcoded static labels + safe blade wrap + 226 keys
- Convert all remaining static \$modelLabel/\$pluralModelLabel to getter
  methods with __() (AppointmentResource, WorkOrderResource, MasterResource,
  ServiceTemplateResource, LaborResource, and 33 others)
- Safe blade wrap v2 (37 files, 201 wraps): fixed the regex to not match
  `->`, `=>`, `!<` — previous aggressive pass broke @if directives
- Bulk-translate lowercase model-label keys (programări, fișe lucru,
  tehnicieni, șabloane servicii, norme-ore, etc.) — these were the RO
  strings appearing in page titles/breadcrumbs
- Add human RU/EN for mechanic-kpi (Mecanic/Lucrări/Norma ore/etc.)
  and calendar-board words

Tests 306 green. Blade compiles cleanly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-07-15 06:17:10 +00:00

66 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!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('ro')->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>