feat(inspections): add photos support with edit + lightbox

- Validación robusta fotos (10MB, jpeg/png/webp, max 10)
- Editar inspección existente: botón en historial, modal y tabla
- Eliminación individual de fotos en edición (marcar + guardar)
- Lightbox/carousel en modal ver + editar (Alpine.js)
- Columna 'Fotos' en InspectionTable con thumbnails + contador
- Permiso 'edit inspections' en seeders + checks en componente
- Test actualizado: seed roles/permisos + attach template pivot
- Fix: removed unsupported filterable() on secondaryHeaderFilter
This commit is contained in:
Javier Braña
2026-07-29 01:44:38 +02:00
parent 847ba1c2f8
commit a65d4b12f2
7 changed files with 374 additions and 13 deletions
@@ -78,8 +78,18 @@
<span class="text-xs text-gray-400">{{ __("by") }} {{ $inspection->user->name }}</span>
@endif
</div>
<div class="text-center">
<div class="flex items-center gap-1 ml-2">
<span class="badge badge-sm">{{ __("View") }}</span>
@can('edit inspections')
<button
wire:click="$dispatch('edit-inspection', { id: {{ $inspection->id } }})"
class="btn btn-xs btn-ghost btn-circle"
title="{{ __('Edit') }}"
onclick="event.stopPropagation();"
>
<x-heroicon-o-pencil class="w-4 h-4" />
</button>
@endcan
</div>
</div>
</div>