mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-19 21:28:09 +02:00
Backend: commune en menu deroulant (communes du Bassin de Pompey)
- Constante BASSIN_POMPEY_COMMUNES (13 communes) dans src/lib/communes.ts - Champ commune devenu un select dans : ajout adherent, edition fiche, espace adherent. communeOptions() conserve une valeur existante hors liste. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
7bdb234475
commit
b5a606e945
4 files changed
+51
-3
No files matched your search
@@ -0,0 +1,24 @@
|
||||
// Communes de la Communauté de communes du Bassin de Pompey.
|
||||
export const BASSIN_POMPEY_COMMUNES = [
|
||||
"Bouxières-aux-Dames",
|
||||
"Champigneulles",
|
||||
"Custines",
|
||||
"Faulx",
|
||||
"Frouard",
|
||||
"Lay-Saint-Christophe",
|
||||
"Liverdun",
|
||||
"Malleloy",
|
||||
"Marbache",
|
||||
"Millery",
|
||||
"Montenoy",
|
||||
"Pompey",
|
||||
"Saizerais",
|
||||
] as const;
|
||||
|
||||
// Liste d'options incluant une valeur courante hors liste (pour ne pas la perdre).
|
||||
export function communeOptions(current?: string | null): string[] {
|
||||
const list = [...BASSIN_POMPEY_COMMUNES] as string[];
|
||||
const c = (current ?? "").trim();
|
||||
if (c && !list.includes(c)) list.unshift(c);
|
||||
return list;
|
||||
}
|
||||
Reference in new issue
Block a user