From 4c7cacc765da4eb17c8f6dd1882257c14590ef3a Mon Sep 17 00:00:00 2001 From: Vasyka Date: Sun, 6 Sep 2026 12:19:59 +0000 Subject: [PATCH] Fix PDF filename double WO prefix, title translation, view cache clear MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - WorkOrderPdfService::filename() removed duplicate 'WO-' prefix ($wo->number already starts with 'WO-') - PDF now uses __('FIȘĂ DE LUCRU') so it shows in user locale - entrypoint: view:clear before view:cache to avoid stale compiled views Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --- app/Services/WorkOrderPdfService.php | 2 +- docker/entrypoint.sh | 1 + resources/views/pdf/work-order.blade.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/WorkOrderPdfService.php b/app/Services/WorkOrderPdfService.php index a5d7cbe..92c0b9c 100644 --- a/app/Services/WorkOrderPdfService.php +++ b/app/Services/WorkOrderPdfService.php @@ -57,6 +57,6 @@ class WorkOrderPdfService public function filename(WorkOrder $wo): string { - return 'WO-' . $wo->number . '-' . optional($wo->opened_at)->format('Ymd') . '.pdf'; + return $wo->number . '-' . optional($wo->opened_at)->format('Ymd') . '.pdf'; } } diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index a1c5f99..13c50c1 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -28,6 +28,7 @@ if [ "${APP_ENV:-production}" = "production" ]; then echo "[entrypoint] Caching config/routes/views..." php artisan config:cache --no-interaction || true php artisan route:cache --no-interaction || true + php artisan view:clear --no-interaction || true php artisan view:cache --no-interaction || true php artisan event:cache --no-interaction || true php artisan filament:cache-components --no-interaction || true diff --git a/resources/views/pdf/work-order.blade.php b/resources/views/pdf/work-order.blade.php index 070db95..57bb725 100644 --- a/resources/views/pdf/work-order.blade.php +++ b/resources/views/pdf/work-order.blade.php @@ -2,7 +2,7 @@ <html lang="ro"> <head> <meta charset="UTF-8"> - <title>{{ $wo->number }} — Fișă lucru + {{ $wo->number }} — {{ __('FIȘĂ DE LUCRU') }}