mirror of
https://github.com/R0m1k3/PleinR.git
synced 2026-10-18 12:47:56 +02:00
Logo annuaire + modals devenir membre & contact
- Logo en haut a gauche de la page Annuaire (prop logo sur SiteHeader) - Modal "Devenir adherent" sur les CTA accueil + annuaire : cree une demande d'adhesion (membership_requests) et alerte les admins via le journal d'activite (compteur tableau de bord deja cable) - Formulaire de contact (modal depuis le pied de page) : nouvelle table contact_messages + alerte admin - Composant Modal partage, server actions publiques (sans auth) - Migration drizzle 0002 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2cf03c9f3
commit
141acffc1c
12 files changed
+1057
-17
No files matched your search
@@ -25,6 +25,11 @@ export const requestStatusEnum = pgEnum("request_status", [
|
||||
"approved",
|
||||
"rejected",
|
||||
]);
|
||||
export const contactStatusEnum = pgEnum("contact_status", [
|
||||
"new",
|
||||
"read",
|
||||
"archived",
|
||||
]);
|
||||
|
||||
// ---- Categories (métiers) ----
|
||||
export const categories = pgTable("categories", {
|
||||
@@ -99,6 +104,17 @@ export const membershipRequests = pgTable("membership_requests", {
|
||||
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
});
|
||||
|
||||
// ---- Contact messages (formulaire de contact) ----
|
||||
export const contactMessages = pgTable("contact_messages", {
|
||||
id: serial("id").primaryKey(),
|
||||
name: varchar("name", { length: 200 }).notNull(),
|
||||
email: varchar("email", { length: 200 }).notNull(),
|
||||
subject: varchar("subject", { length: 200 }),
|
||||
message: text("message").notNull(),
|
||||
status: contactStatusEnum("status").notNull().default("new"),
|
||||
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
||||
});
|
||||
|
||||
// ---- Activity log (activité récente) ----
|
||||
export const activityLog = pgTable("activity_log", {
|
||||
id: serial("id").primaryKey(),
|
||||
@@ -135,4 +151,5 @@ export type Member = typeof members.$inferSelect;
|
||||
export type User = typeof users.$inferSelect;
|
||||
export type Promotion = typeof promotions.$inferSelect;
|
||||
export type MembershipRequest = typeof membershipRequests.$inferSelect;
|
||||
export type ContactMessage = typeof contactMessages.$inferSelect;
|
||||
export type ActivityEntry = typeof activityLog.$inferSelect;
|
||||
Reference in new issue
Block a user