Étapes 6-9 + types de lieux + picker + filtres

- Étape 6 : formulaire de saisie dynamique des relevés (piloté par source_type_fields, calendriers grégorien/julien/républicain)
- Étape 7 : workflow de statut des sources + notifications mail+DB (SourceAValider, SourceRejetee)
- Étape 8 : recherche fulltext PostgreSQL avec filtres type/lieu/années et CTE récursive pour les subdivisions de lieux
- Étape 9 : export GEDCOM 5.5.1 (GedcomExportService + DateConversionService)
- Types de lieux : CRUD admin (LieuTypeController) avec champ ordre
- Composant lieu-picker : modale Alpine.js avec recherche AJAX + debounce
- Filtres sources : statut, type, lieu (CTE récursive), période annee_debut/annee_fin
- Filtres lieux : type, texte, lieu parent avec descendants (CTE récursive)
- Migration : lieu_id + annee_debut + annee_fin sur sources

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-04 17:17:53 +02:00
parent 7609d35287
commit d064f8d28e
54 changed files with 2861 additions and 116 deletions
@@ -0,0 +1,96 @@
<x-app-layout>
<x-slot name="header">
<div class="flex items-center justify-between">
<h2 class="text-xl font-semibold text-gray-800">Notifications</h2>
@if(auth()->user()->unreadNotifications->isNotEmpty())
<form method="POST" action="{{ route('notifications.read-all') }}">
@csrf
<button type="submit"
class="text-sm text-indigo-600 hover:underline">
Tout marquer comme lu
</button>
</form>
@endif
</div>
</x-slot>
<div class="py-8 max-w-3xl mx-auto px-4 sm:px-6 lg:px-8">
@if(session('success'))
<div class="mb-4 p-4 bg-green-50 border border-green-200 text-green-800 rounded-md">
{{ session('success') }}
</div>
@endif
<div class="bg-white shadow rounded-lg divide-y divide-gray-100">
@forelse($notifications as $notification)
@php
$data = $notification->data;
$isRejet = ($data['type'] ?? '') === 'rejet';
$isRead = $notification->read_at !== null;
@endphp
<div class="px-6 py-4 flex items-start gap-4 {{ $isRead ? 'opacity-60' : '' }}">
{{-- Icône --}}
<div class="shrink-0 mt-0.5">
@if($isRejet)
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-red-100 text-red-600">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</span>
@else
<span class="inline-flex items-center justify-center w-8 h-8 rounded-full bg-yellow-100 text-yellow-600">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
</span>
@endif
</div>
{{-- Contenu --}}
<div class="flex-1 min-w-0">
<p class="text-sm text-gray-900">
@if($isRejet)
<strong>{{ $data['rejete_par'] }}</strong> a renvoyé la source
<strong>{{ $data['source_nom'] }}</strong> en cours de saisie.
@else
<strong>{{ $data['soumis_par'] }}</strong> a soumis la source
<strong>{{ $data['source_nom'] }}</strong> pour validation.
@endif
</p>
<div class="mt-1 flex items-center gap-3 text-xs text-gray-400">
<span>{{ $notification->created_at->diffForHumans() }}</span>
@if(!$isRead)
<span class="inline-block w-2 h-2 rounded-full bg-indigo-500"></span>
@endif
</div>
</div>
{{-- Actions --}}
<div class="shrink-0 flex items-center gap-3">
<a href="{{ $data['url'] }}"
class="text-sm text-indigo-600 hover:underline">
Voir
</a>
@if(!$isRead)
<form method="POST" action="{{ route('notifications.read', $notification->id) }}">
@csrf
<button type="submit" class="text-xs text-gray-400 hover:text-gray-600" title="Marquer comme lu"></button>
</form>
@endif
</div>
</div>
@empty
<div class="px-6 py-16 text-center text-gray-400">
<svg class="mx-auto w-10 h-10 mb-3 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"/>
</svg>
<p>Aucune notification</p>
</div>
@endforelse
</div>
@if($notifications->hasPages())
<div class="mt-4">{{ $notifications->links() }}</div>
@endif
</div>
</x-app-layout>