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:
MichaelandClaude Opus 4.8 committed 2026-06-27 10:21:10 +02:00
1 parent 7bdb234475
commit b5a606e945
4 files changed
+51 -3

No files matched your search

+9 -1
View File
@@ -3,6 +3,7 @@ import { auth } from "@/auth";
import { db } from "@/db";
import { categories, members, promotions, type Member } from "@/db/schema";
import { ImageField } from "@/components/ImageField";
import { communeOptions } from "@/lib/communes";
import { updateOwnProfile } from "../actions";
import { MemberSpaceForm } from "./MemberSpaceForm";
@@ -96,7 +97,14 @@ export default async function EspacePage() {
</div>
<div>
<label className="field-label">Commune</label>
<input name="city" defaultValue={profile.city ?? ""} className="field" />
<select name="city" className="field" defaultValue={profile.city ?? ""}>
<option value="">—</option>
{communeOptions(profile.city).map((c) => (
<option key={c} value={c}>
{c}
</option>
))}
</select>
</div>
<div>
<label className="field-label">Adresse</label>