mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-14 02:39:22 +02:00
- 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>
25 lines
630 B
TypeScript
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;
|
|
}
|