Merge branch 'dev' into 'features/linkEventsPage'

# Conflicts:
#   src/pages/Profile/ProfilePage.jsx
This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-01-12 14:55:23 +00:00
commit 2def96dd18
46 files changed
+515 -111

No files matched your search

+16 -16
View File
@@ -12,24 +12,24 @@ function AdminPage() {
const { user } = useContext(AuthContext);
const navigate = useNavigate();
const [selected, setSelected] = useState("3");
const [participationRate, setParticipationRate] = useState(89);
const [selected, setSelected] = useState("3");
const [participationRate] = useState(89);
/*if(!user.isAdmin) navigate("/");*/
if(!user.isAdmin) navigate("/");
return (
<div className={styles.container}>
<ParticipationChart
selected={selected}
setSelected={setSelected}
participationRate={participationRate}
/>
<div className={styles.rightSection}>
<IncompleteEvents />
<PendingMembers />
</div>
</div>
);
return (
<div className={styles.container}>
<ParticipationChart
selected={selected}
setSelected={setSelected}
participationRate={participationRate}
/>
<div className={styles.rightSection}>
<IncompleteEvents />
<PendingMembers />
</div>
</div>
);
}
export default AdminPage;
+1 -1
View File
@@ -2,7 +2,7 @@ import { useEffect, useState } from "react";
import Event from "../../components/Event/Event.jsx";
import styles from "./EventsPage.module.css";
import ToolBar from "../../components/ToolBar/ToolBar.jsx";
import getAllEvents from "../../utils/event/getAllEvents.js";
import getAllEvents from "../../utils/events/getAllEvents.js";
import filter from "../../utils/filter.js";
+1 -1
View File
@@ -2,7 +2,7 @@ import styles from "./HomePage.module.css";
import Calendar from "../../components/homePage/calendar.jsx";
import EventList from "../../components/homePage/eventList.jsx";
import { useState, useEffect } from "react";
import getAllEvents from "../../utils/event/getAllEvents.js";
import getAllEvents from "../../utils/events/getAllEvents.js";
function HomePage() {
+1 -1
View File
@@ -9,6 +9,6 @@
.allContent{
display: flex;
flex-direction: column;
gap: 0px;
gap: 0;
}
}
+6 -1
View File
@@ -10,11 +10,16 @@ function LoginPage() {
const { user, loading } = useContext(AuthContext)
const navigate = useNavigate();
useEffect(() => {
console.log("loading" + loading);
console.log("user" + user);
if (!loading && user) {
navigate("/");
}
}, [loading, user]);
}, [loading, navigate, user]);
return (
<Background>
+2 -2
View File
@@ -25,11 +25,11 @@ function ProfilePage() {
<h2> {user?.name} {user?.lastname} </h2>
</div>
<div className={styles.topDescription}>
<div className={styles.infoBlock}>
<div className={`${styles.infoBlock} glassBorder`}>
<p><strong>Role :</strong> {user?.role}</p>
<p><strong>Membre depuis :</strong> {user && formatDate(user.created_at)}</p>
</div>
<div className={styles.infoBlock}>
<div className={`${styles.infoBlock} glassBorder`}>
<p><strong>Mail :</strong> {user?.email} </p>
<p><strong>Téléphone :</strong> {user?.phone === null ? "Pas de numéro enregistré" : user?.phone}</p>
</div>
-3
View File
@@ -47,9 +47,7 @@
.infoBlock {
width: 100%;
background: rgba(255, 255, 255, 0.1);
padding: 10px;
border-radius: 5px;
}
.eventTasks {
@@ -131,7 +129,6 @@
margin-bottom: 20px;
}
/* Desktop (1024px et plus) */
@media screen and (min-width: 1024px) {
.container {
max-width: 100%;
+1 -1
View File
@@ -117,7 +117,7 @@ function RegisterPage() {
<div className={styles.logButton}>
<Button variant={"transparent"} onClick={() => navigate("/login")}>Vous avez déjà un compte ?</Button>
<Button variant={"default"} onClick={handleSubmit}> Se connecter </Button>
<Button variant={"default"} onClick={handleSubmit}> Créer le compte </Button>
</div>
</div>
</div>
@@ -40,4 +40,5 @@ h1 {
.inputContainer {
padding: 15px;
width: 100%;
}
@@ -131,7 +131,6 @@
margin-bottom: 20px;
}
/* Desktop (1024px et plus) */
@media screen and (min-width: 1024px) {
.container {
max-width: 100%;