É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,23 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('lieu_types', function (Blueprint $table) {
$table->id();
$table->string('nom')->unique();
$table->unsignedSmallInteger('ordre')->default(0);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('lieu_types');
}
};
@@ -10,10 +10,11 @@ return new class extends Migration
{
Schema::create('lieux', function (Blueprint $table) {
$table->id();
$table->foreignId('lieu_type_id')->nullable()->constrained('lieu_types')->nullOnDelete();
$table->string('nom');
$table->string('code')->nullable();
$table->foreignId('lieu_parent_id')->nullable()->constrained('lieux')->nullOnDelete();
$table->string('nom_long')->nullable(); // calculé : "Bordeaux, Gironde, France"
$table->string('nom_long')->nullable();
$table->decimal('latitude', 10, 7)->nullable();
$table->decimal('longitude', 10, 7)->nullable();
$table->text('note')->nullable();
@@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notifications');
}
};
@@ -0,0 +1,25 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('sources', function (Blueprint $table) {
$table->foreignId('lieu_id')->nullable()->after('depot_id')->constrained('lieux')->nullOnDelete();
$table->unsignedSmallInteger('annee_debut')->nullable()->after('lieu_id');
$table->unsignedSmallInteger('annee_fin')->nullable()->after('annee_debut');
});
}
public function down(): void
{
Schema::table('sources', function (Blueprint $table) {
$table->dropForeign(['lieu_id']);
$table->dropColumn(['lieu_id', 'annee_debut', 'annee_fin']);
});
}
};