mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-18 04:37:43 +02:00
Comptes adherents, boite de reception admin, edition profil
Comptes de connexion adherent - addMember cree desormais un compte users (role member, lie a la fiche) avec un mot de passe temporaire genere - Le mdp temporaire s'affiche sur la fiche admin (/backend/adherents/[id]) jusqu'a la 1ere connexion ; bouton "Reinitialiser le mot de passe" - 1ere connexion : changement de mot de passe force (must_change_password) via /backend/changer-mot-de-passe, redirection geree dans authorized() - users += must_change_password, temp_password (migration 0003) Boite de reception admin (consultation) - Page /backend/demandes : demandes d'adhesion + messages de contact avec statuts (approuvee/rejetee, lu/archive) - Lien sidebar + badge (nouveaux), carte tableau de bord cliquable Espace adherent - L'adherent peut editer sa propre fiche (updateOwnProfile) : infos, description, horaires, tags, image d'entete + logo - Statut/categorie/mise a l'honneur restent reserves au staff Promotions : moderation deja en place, inchangee. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
b4d94f2115
commit
119ad4665a
16 files changed
+1146
-25
No files matched your search
@@ -10,6 +10,7 @@ import { doSignOut } from "./actions";
|
||||
const TITLES: Record<string, [string, string]> = {
|
||||
"/backend": ["Tableau de bord", "Vue d'ensemble de l'association"],
|
||||
"/backend/adherents": ["Adhérents", "Gérer les commerçants et entreprises"],
|
||||
"/backend/demandes": ["Demandes & messages", "Demandes d'adhésion et messages de contact"],
|
||||
"/backend/promotions": [
|
||||
"Modération des promotions",
|
||||
"Validez les offres soumises par les adhérents",
|
||||
@@ -17,6 +18,7 @@ const TITLES: Record<string, [string, string]> = {
|
||||
"/backend/administrateurs": ["Administrateurs", "Gérer les accès à l'administration"],
|
||||
"/backend/categories": ["Catégories", "Gérer les métiers de l'annuaire"],
|
||||
"/backend/espace": ["Mon espace adhérent", "Publiez et suivez vos promotions"],
|
||||
"/backend/changer-mot-de-passe": ["Mot de passe", "Sécurisez votre compte"],
|
||||
};
|
||||
|
||||
function initialsOf(name: string) {
|
||||
@@ -47,10 +49,12 @@ function NavLink({
|
||||
export function BackendShell({
|
||||
user,
|
||||
pendingCount,
|
||||
inboxCount = 0,
|
||||
children,
|
||||
}: {
|
||||
user: { name: string; role: AppRole };
|
||||
pendingCount: number;
|
||||
inboxCount?: number;
|
||||
children: ReactNode;
|
||||
}) {
|
||||
const pathname = usePathname();
|
||||
@@ -99,6 +103,26 @@ export function BackendShell({
|
||||
{dotRound}Adhérents
|
||||
</NavLink>
|
||||
)}
|
||||
{can(user.role, "manageMembers") && (
|
||||
<NavLink href="/backend/demandes" active={pathname === "/backend/demandes"}>
|
||||
{dot}Demandes & messages
|
||||
{inboxCount > 0 && (
|
||||
<span
|
||||
style={{
|
||||
marginLeft: "auto",
|
||||
background: "#E0A63C",
|
||||
color: "#33291D",
|
||||
fontSize: 11,
|
||||
fontWeight: 800,
|
||||
borderRadius: 999,
|
||||
padding: "1px 8px",
|
||||
}}
|
||||
>
|
||||
{inboxCount}
|
||||
</span>
|
||||
)}
|
||||
</NavLink>
|
||||
)}
|
||||
{can(user.role, "moderatePromos") && (
|
||||
<NavLink href="/backend/promotions" active={pathname === "/backend/promotions"}>
|
||||
{dotDiamond}Promotions
|
||||
|
||||
Reference in new issue
Block a user