mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-16 19:56:57 +02:00
Fiche adhérent complète, fidèle à la maquette
Enrichit la fiche : couverture + avatar, identité (catégorie, localisation, adhérent depuis, boutons Appeler/Itinéraire), à propos multi-paragraphes + tags, informations pratiques (horaires + contact tél/email/site), carte Google Maps, colonne promotions en cours et CTA contact. Ajoute les champs members: cover_url, phone, website, postal_code, member_since, hours, tags (migration 0001) ; éditables dans le back-office ; seed enrichi (Au Bon Pain conforme à la maquette). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XwfhYHzC9hQWPDnQ2p53GL
This commit is contained in:
10 files changed
+843
-249
No files matched your search
@@ -115,6 +115,12 @@ export async function updateMember(formData: FormData) {
|
||||
city: String(formData.get("city") ?? "").trim() || null,
|
||||
address: String(formData.get("address") ?? "").trim() || null,
|
||||
description: String(formData.get("description") ?? "").trim() || null,
|
||||
postalCode: String(formData.get("postalCode") ?? "").trim() || null,
|
||||
phone: String(formData.get("phone") ?? "").trim() || null,
|
||||
website: String(formData.get("website") ?? "").trim() || null,
|
||||
memberSince: formData.get("memberSince") ? Number(formData.get("memberSince")) : null,
|
||||
tags: String(formData.get("tags") ?? "").trim() || null,
|
||||
hours: String(formData.get("hours") ?? "").trim() || null,
|
||||
status: String(formData.get("status") ?? "pending") as "active" | "pending",
|
||||
highlighted: formData.get("highlighted") === "on",
|
||||
})
|
||||
|
||||
@@ -85,6 +85,22 @@ export default async function EditMemberPage({
|
||||
<label className="field-label">Adresse</label>
|
||||
<input name="address" defaultValue={member.address ?? ""} className="field" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">Code postal</label>
|
||||
<input name="postalCode" defaultValue={member.postalCode ?? ""} className="field" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">Téléphone</label>
|
||||
<input name="phone" defaultValue={member.phone ?? ""} className="field" placeholder="03 83 ..." />
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">Site web</label>
|
||||
<input name="website" defaultValue={member.website ?? ""} className="field" placeholder="https://..." />
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">Adhérent depuis (année)</label>
|
||||
<input name="memberSince" type="number" defaultValue={member.memberSince ?? ""} className="field" placeholder="2021" />
|
||||
</div>
|
||||
<div>
|
||||
<label className="field-label">Statut</label>
|
||||
<select name="status" className="field" defaultValue={member.status}>
|
||||
@@ -95,8 +111,18 @@ export default async function EditMemberPage({
|
||||
</div>
|
||||
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<label className="field-label">Description</label>
|
||||
<textarea name="description" rows={3} defaultValue={member.description ?? ""} className="field" style={{ resize: "vertical" }} />
|
||||
<label className="field-label">Description (une ligne vide sépare les paragraphes)</label>
|
||||
<textarea name="description" rows={4} defaultValue={member.description ?? ""} className="field" style={{ resize: "vertical" }} />
|
||||
</div>
|
||||
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<label className="field-label">Tags / spécialités (séparés par des virgules)</label>
|
||||
<input name="tags" defaultValue={member.tags ?? ""} className="field" placeholder="Levain naturel, Produits locaux, Fait maison" />
|
||||
</div>
|
||||
|
||||
<div style={{ marginTop: 16 }}>
|
||||
<label className="field-label">Horaires (une ligne par jour : « Jour|plage », ex : Mardi – Vendredi|7h – 19h30)</label>
|
||||
<textarea name="hours" rows={4} defaultValue={member.hours ?? ""} className="field" style={{ resize: "vertical" }} placeholder={"Mardi – Vendredi|7h – 19h30\nSamedi|7h – 19h\nDimanche|7h – 13h\nLundi|Fermé"} />
|
||||
</div>
|
||||
|
||||
<label style={{ display: "flex", alignItems: "center", gap: 9, marginTop: 16, fontSize: 14, color: "#3c3322", cursor: "pointer" }}>
|
||||
|
||||
Reference in new issue
Block a user