feat: implement Story 2.1 — Owner/Manager Command Center Dashboard
- Rewrite DashboardController with cached role-scoped KPI aggregation (Cache::remember, 5-min TTL, Declaration::forUser scope) - Create StatCard.vue component with CVA status variants and a11y - Rewrite Dashboard.vue with 4-column KPI grid + urgent declarations table - Add mise_en_demeure status to DeclarationStatus enum with transitions - Exclude termine, mise_en_demeure, ferme from dashboard queries - Set deadline proximity red threshold to ≤5 days - Add abort(404) for non-member workspace access per architecture - Fix null-safe client access for soft-deleted clients - Fix hardcoded routes with Wayfinder type-safe imports - Fix DashboardProps.stats type to allow null - Add aria-pressed to StatCard for accessibility - Install shadcn-vue table component (11 files) - Add 11 Pest feature tests + 3 mise_en_demeure transition tests - Fix DeclarationFactory eager workspace creation causing slug collisions - 196 tests pass, 836 assertions, zero regressions
This commit is contained in:
@@ -14,6 +14,8 @@ final class DeclarationStatus extends Enum
|
||||
|
||||
const Termine = 'termine';
|
||||
|
||||
const MiseEnDemeure = 'mise_en_demeure';
|
||||
|
||||
const Ferme = 'ferme';
|
||||
|
||||
/**
|
||||
@@ -28,6 +30,7 @@ final class DeclarationStatus extends Enum
|
||||
self::EnCours => 'En cours',
|
||||
self::EnAttenteClient => 'En attente client',
|
||||
self::Termine => 'Terminé',
|
||||
self::MiseEnDemeure => 'Mise en demeure',
|
||||
self::Ferme => 'Fermé',
|
||||
];
|
||||
}
|
||||
@@ -42,8 +45,9 @@ final class DeclarationStatus extends Enum
|
||||
return [
|
||||
self::Created => [self::EnCours],
|
||||
self::EnCours => [self::EnAttenteClient, self::Termine],
|
||||
self::EnAttenteClient => [self::EnCours],
|
||||
self::EnAttenteClient => [self::EnCours, self::MiseEnDemeure],
|
||||
self::Termine => [self::Ferme],
|
||||
self::MiseEnDemeure => [self::EnCours, self::Ferme],
|
||||
self::Ferme => [],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user