mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-11 17:27:54 +02:00
Corrige la suppression d'adhérent (FK) et intègre le vrai logo
- deleteMember: supprime d'abord les promotions liées et détache les comptes utilisateurs (transaction) avant de supprimer l'adhérent, ce qui évite la violation de clé étrangère (erreur serveur au clic « Supprimer »). - Logo: remplace le SVG provisoire par le logo officiel (public/assets/logo.png) et met à jour toutes les références (accueil, login, backend, favicon). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XwfhYHzC9hQWPDnQ2p53GL
This commit is contained in:
7 files changed
+13
-54
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 1.3 MiB |
@@ -1,47 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 480" fill="none" role="img" aria-label="Plein R — Association des commerçants et entreprises du Bassin de Pompey">
|
||||
<defs>
|
||||
<linearGradient id="plr-tower" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#a9743f"/>
|
||||
<stop offset="1" stop-color="#8a5a30"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
|
||||
<!-- sparkles -->
|
||||
<g>
|
||||
<path d="M96 150 l9 24 24 9 -24 9 -9 24 -9 -24 -24 -9 24 -9 z" fill="#9a6638"/>
|
||||
<path d="M70 250 l7 18 18 7 -18 7 -7 18 -7 -18 -18 -7 18 -7 z" fill="#6FB0C6"/>
|
||||
<path d="M120 95 l6 16 16 6 -16 6 -6 16 -6 -16 -16 -6 16 -6 z" fill="#E0A63C"/>
|
||||
<path d="M300 110 l8 21 21 8 -21 8 -8 21 -8 -21 -21 -8 21 -8 z" fill="#9a6638"/>
|
||||
<path d="M330 215 l7 18 18 7 -18 7 -7 18 -7 -18 -18 -7 18 -7 z" fill="#6FB0C6"/>
|
||||
<path d="M280 250 l6 15 15 6 -15 6 -6 15 -6 -15 -15 -6 15 -6 z" fill="#2C6FB3"/>
|
||||
<circle cx="160" cy="120" r="6" fill="#6FB0C6"/>
|
||||
<circle cx="250" cy="150" r="5" fill="#E0A63C"/>
|
||||
<circle cx="78" cy="190" r="5" fill="#E0A63C"/>
|
||||
<circle cx="318" cy="160" r="5" fill="#9a6638"/>
|
||||
</g>
|
||||
|
||||
<!-- Eiffel tower -->
|
||||
<g stroke="#4a3a24" stroke-width="4" stroke-linejoin="round">
|
||||
<!-- antenna -->
|
||||
<rect x="196" y="60" width="8" height="34" rx="3" fill="url(#plr-tower)"/>
|
||||
<!-- top -->
|
||||
<path d="M188 94 h24 l-3 40 h-18 z" fill="url(#plr-tower)"/>
|
||||
<!-- upper section -->
|
||||
<path d="M183 134 h34 l-7 70 h-20 z" fill="url(#plr-tower)"/>
|
||||
<!-- mid platform -->
|
||||
<rect x="171" y="204" width="58" height="14" rx="3" fill="#6FB0C6"/>
|
||||
<!-- middle section -->
|
||||
<path d="M174 218 h52 l-12 86 h-28 z" fill="url(#plr-tower)"/>
|
||||
<!-- lower platform -->
|
||||
<rect x="156" y="304" width="88" height="16" rx="3" fill="#E0A63C"/>
|
||||
<!-- legs with the iconic arch -->
|
||||
<path d="M160 320 h80 l26 86 h-30 c-6 -34 -22 -44 -36 -44 -14 0 -30 10 -36 44 h-30 z" fill="url(#plr-tower)"/>
|
||||
</g>
|
||||
|
||||
<!-- ribbon banner -->
|
||||
<path d="M40 360 q160 96 320 0 l-12 40 q-148 84 -296 0 z" fill="#9a6638"/>
|
||||
<text x="200" y="402" text-anchor="middle" font-family="'Public Sans',Arial,sans-serif" font-size="20" font-weight="800" letter-spacing="1.5" fill="#f6f2e8">RÉSEAU · RENCONTRE · RÉUSSITE</text>
|
||||
|
||||
<!-- wordmark -->
|
||||
<text x="200" y="352" text-anchor="middle" font-family="'Bricolage Grotesque','Georgia',serif" font-style="italic" font-size="78" font-weight="800" fill="#1E588F" letter-spacing="-1">Plein R</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 KiB |
@@ -76,7 +76,7 @@ export function BackendShell({
|
||||
<div style={{ display: "flex", alignItems: "center", gap: 11, padding: "6px 8px 22px" }}>
|
||||
<span style={{ display: "inline-flex", background: "#F6F2E8", borderRadius: 11, padding: 6 }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/assets/logo.svg" alt="Plein R" style={{ height: 34, width: "auto", display: "block" }} />
|
||||
<img src="/assets/logo.png" alt="Plein R" style={{ height: 34, width: "auto", display: "block" }} />
|
||||
</span>
|
||||
<div>
|
||||
<div className="font-display" style={{ fontWeight: 800, fontSize: 17, color: "#fff", lineHeight: 1 }}>
|
||||
|
||||
@@ -129,7 +129,13 @@ export async function deleteMember(formData: FormData) {
|
||||
if (!can(role, "manageMembers")) throw new Error("Accès refusé");
|
||||
const id = Number(formData.get("id"));
|
||||
if (!id) return;
|
||||
await db.delete(members).where(eq(members.id, id));
|
||||
// Remove dependent rows first to satisfy foreign-key constraints:
|
||||
// delete the member's promotions and detach any linked user account.
|
||||
await db.transaction(async (tx) => {
|
||||
await tx.delete(promotions).where(eq(promotions.memberId, id));
|
||||
await tx.update(users).set({ memberId: null }).where(eq(users.memberId, id));
|
||||
await tx.delete(members).where(eq(members.id, id));
|
||||
});
|
||||
revalidatePath("/backend/adherents");
|
||||
revalidatePath("/");
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ export default function RootLayout({
|
||||
href="https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700;12..96,800&family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="icon" href="/assets/logo.svg" type="image/svg+xml" />
|
||||
<link rel="icon" href="/assets/logo.png" type="image/png" />
|
||||
</head>
|
||||
<body>{children}</body>
|
||||
</html>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function LoginPage() {
|
||||
<div style={{ width: "100%", maxWidth: 420 }}>
|
||||
<div style={{ textAlign: "center", marginBottom: 22 }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/assets/logo.svg" alt="Plein R" style={{ height: 92, width: "auto" }} />
|
||||
<img src="/assets/logo.png" alt="Plein R" style={{ height: 92, width: "auto" }} />
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
+3
-3
@@ -47,7 +47,7 @@ export default async function AccueilPage() {
|
||||
>
|
||||
<Link href="/" style={{ display: "flex", alignItems: "center", gap: 10, textDecoration: "none" }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/assets/logo.svg" alt="Plein R" style={{ height: 44, width: "auto" }} />
|
||||
<img src="/assets/logo.png" alt="Plein R" style={{ height: 44, width: "auto" }} />
|
||||
<span className="font-display" style={{ fontWeight: 800, fontSize: 20, color: "#13324F" }}>
|
||||
Plein R
|
||||
</span>
|
||||
@@ -96,7 +96,7 @@ export default async function AccueilPage() {
|
||||
<div style={{ display: "flex", justifyContent: "center", alignItems: "center" }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src="/assets/logo.svg"
|
||||
src="/assets/logo.png"
|
||||
alt="Plein R — Association des commerçants et entreprises du Bassin de Pompey"
|
||||
className="floatlogo"
|
||||
style={{
|
||||
@@ -571,7 +571,7 @@ export default async function AccueilPage() {
|
||||
>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: 10 }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/assets/logo.svg" alt="Plein R" style={{ height: 36, width: "auto" }} />
|
||||
<img src="/assets/logo.png" alt="Plein R" style={{ height: 36, width: "auto" }} />
|
||||
<span className="font-display" style={{ fontWeight: 800, fontSize: 16, color: "#13324F" }}>
|
||||
Plein R
|
||||
</span>
|
||||
|
||||
Reference in new issue
Block a user