From c66b8959484f9e1e655d2eaa65e3713bd6c63248 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Tue, 8 Sep 2026 12:21:37 +0000 Subject: [PATCH] feat: photo lightbox with prev/next navigation on dashboard MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace link-to-new-tab with Alpine.js lightbox overlay. Clicking a thumbnail opens a full-screen dark overlay with the full-size image, prev/next arrows (keyboard ←/→ supported), counter, and close button (ESC or ✕ or click outside). No external libraries. Co-Authored-By: Claude Sonnet 4.6 --- .../pages/work-order-dashboard.blade.php | 102 ++++++++++++------ 1 file changed, 72 insertions(+), 30 deletions(-) diff --git a/resources/views/filament/tenant/pages/work-order-dashboard.blade.php b/resources/views/filament/tenant/pages/work-order-dashboard.blade.php index cc8079a..6e52e80 100644 --- a/resources/views/filament/tenant/pages/work-order-dashboard.blade.php +++ b/resources/views/filament/tenant/pages/work-order-dashboard.blade.php @@ -697,38 +697,80 @@
@php $photos = $wo->getMedia('photos'); @endphp - {{-- Upload --}} -
- - @if (!empty($newPhotos)) - - {{ __('Se procesează...') }} - @endif -
+ {{-- Lightbox + Gallery --}} +
- {{-- Gallery --}} - @if ($photos->isNotEmpty()) -
- @foreach ($photos as $ph) -
- - - - -
- @endforeach + {{-- Upload bar --}} +
+ + @if (!empty($newPhotos)) + + {{ __('Se procesează...') }} + @endif
- @else -
{{ __('Nicio fotografie') }}
- @endif + + {{-- Thumbnail grid --}} + @if ($photos->isNotEmpty()) +
+ @foreach ($photos as $i => $ph) +
+ + +
+ @endforeach +
+ @else +
{{ __('Nicio fotografie') }}
+ @endif + + {{-- Lightbox overlay --}} +
+ + {{-- Prev --}} + + + {{-- Image --}} + + + {{-- Next --}} + + + {{-- Close --}} + + + {{-- Counter --}} +
+
+
{{-- ── DOCUMENTS TAB ── --}}