feat: complete Epic 0 — foundation migration & infrastructure setup

Stories 0.2-0.5: rename folders→declarations (backend+frontend), configure
Redis for cache/queue/sessions, add foundation database migrations
(permissions, archived_at), replace DeclarationStatus enum with architecture
lifecycle values, create DeclarationObserver for status transition validation
and auto-archive, fix controller status transitions to respect observer rules.

93 tests pass (240 assertions).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 18:25:32 +00:00
parent d380df4074
commit fd43a6f429
105 changed files with 3899 additions and 1558 deletions

View File

@@ -7,14 +7,14 @@ import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
type Folder = {
type Declaration = {
id: number;
title: string;
client_name: string;
};
type Props = {
folder: Folder;
declaration: Declaration;
token: string;
submitUrl: string;
};
@@ -27,31 +27,44 @@ const flash = computed(() => page.props.flash);
<template>
<div class="flex min-h-svh flex-col bg-background">
<Head :title="`Confirmation - ${folder.title}`" />
<Head :title="`Confirmation - ${declaration.title}`" />
<header class="border-b border-sidebar-border/70 px-4 py-4">
<div class="mx-auto flex max-w-2xl items-center gap-3">
<AppLogoIcon class="size-8 fill-current text-[var(--foreground)]" />
<AppLogoIcon
class="size-8 fill-current text-[var(--foreground)]"
/>
<div>
<h1 class="font-medium">{{ folder.title }}</h1>
<p class="text-sm text-muted-foreground">{{ folder.client_name }}</p>
<h1 class="font-medium">{{ declaration.title }}</h1>
<p class="text-sm text-muted-foreground">
{{ declaration.client_name }}
</p>
</div>
</div>
</header>
<main class="mx-auto w-full max-w-2xl flex-1 p-4">
<div v-if="flash?.message" class="mb-4 rounded-lg bg-green-100 p-3 text-sm text-green-800 dark:bg-green-900/30 dark:text-green-300">
<div
v-if="flash?.message"
class="mb-4 rounded-lg bg-green-100 p-3 text-sm text-green-800 dark:bg-green-900/30 dark:text-green-300"
>
{{ flash.message }}
</div>
<div class="space-y-6">
<div>
<h2 class="text-lg font-medium">Confirmer la situation</h2>
<p class="mt-1 text-sm text-muted-foreground">
Veuillez signer ci-dessous pour confirmer la situation présentée par votre cabinet.
Veuillez signer ci-dessous pour confirmer la situation
présentée par votre cabinet.
</p>
</div>
<Form :action="submitUrl" method="post" class="space-y-4" v-slot="{ processing }">
<Form
:action="submitUrl"
method="post"
class="space-y-4"
v-slot="{ processing }"
>
<div class="space-y-2">
<Label for="signature">Signature (nom complet)</Label>
<Input