Files
PleinR/src/lib/communes.ts
T
MichaelandClaude Opus 4.8 b5a606e945 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>
2026-06-27 10:21:10 +02:00

25 lines
630 B
TypeScript

// 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;
}