Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maj espace perso #9

Merged
merged 26 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
728c84d
maj comptes admin + dr
AntonyKLINGER May 27, 2024
c377c2c
mise à jour 29/05
May 29, 2024
935a387
maj
May 29, 2024
87c82d6
maj
AntonyKLINGER May 29, 2024
743328c
maj 29/05
AntonyKLINGER May 29, 2024
1e42653
Merge branch 'main' into update-from-repoA
AntonyKLINGER May 29, 2024
6bbe844
maj email style
AntonyKLINGER May 29, 2024
b8120fe
Merge branch 'update-from-repoA' of https://github.com/incubateur-ade…
AntonyKLINGER May 29, 2024
698a3b1
mise à jour 29/05
May 29, 2024
379528c
maj comptes admin + dr (#1)
AntonyKLINGER May 27, 2024
bf59512
Merge branch 'update-from-repoA' of https://github.com/incubateur-ade…
AntonyKLINGER May 29, 2024
3933546
maj 03/06 >> besoins + ajout titre par jour
AntonyKLINGER Jun 3, 2024
1004a96
Merge branch 'main' into update-from-repoA
AntonyKLINGER Jun 3, 2024
c34a10c
maj visuel session
AntonyKLINGER Jun 3, 2024
dcdf8a6
Merge branch 'update-from-repoA' of https://github.com/incubateur-ade…
AntonyKLINGER Jun 3, 2024
3cfe8a8
maj comptes DR
AntonyKLINGER Jun 3, 2024
97387e1
maj session programme + dr
AntonyKLINGER Jun 3, 2024
17082cf
Merge branch 'main' into update-from-repoA
AntonyKLINGER Jun 3, 2024
33e022e
maj emails
AntonyKLINGER Jun 17, 2024
89c2c64
Update 3/06 - 14h14 (#4) (#5)
AntonyKLINGER Jun 17, 2024
1fa54c8
last maj 17/06
Jun 17, 2024
996c20c
Merge branch 'main' into update-from-repoA
AntonyKLINGER Jun 17, 2024
f6c013e
maj questionnaire
Jun 18, 2024
9c44822
Merge branch 'main' into update-from-repoA
AntonyKLINGER Jun 18, 2024
6fe8a65
maj espace perso
Jun 18, 2024
41af9ba
Merge branch 'update-from-repoA' of https://github.com/incubateur-ade…
Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions components/RencontreDetail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ export default function RencontreDetail({ id, setOpen, userId, user }) {
const [responses, setResponses] = useState({});
const [hasResponded, setHasResponded] = useState(false);


const [modules, setModules] = useState([])

const getModules = async () => {
const geter = await fetch(`/api/modules`)
const json = await geter.json()
setModules(json)
}

useEffect(() => {
getModules()
}, [])

const questions = [
{
id: 1,
Expand Down Expand Up @@ -121,11 +134,7 @@ export default function RencontreDetail({ id, setOpen, userId, user }) {
{
id: 10,
text: "Il existe d’autres Rencontres Territoire Engagé Transition Ecologique. Quelles sont les thématiques susceptibles de vous intéresser ?",
options: [
{ value: "Climat", label: "Climat" },
{ value: "Energie", label: "Energie" },
{ value: "Mobilité", label: "Mobilité" },
],
options: modules.map(module => ({ value: module.nom, label: module.nom }))
}
];

Expand Down
2 changes: 1 addition & 1 deletion components/Rencontres.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Rencontres({ user }){
const [rencontres, setRencontres] = useState([])
const [status, setStatus] = useState('upcoming')
const [load, setLoad] = useState(false)


const getUserSessions = async () => {
setLoad(true)
Expand Down
6 changes: 6 additions & 0 deletions pages/rencontres/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ export default function Rencontres({ base, region, pilier, thematique }){
return `${day}/${month}/${year}`;
}

useEffect(() => {
if(region != ''){
setSwitcher(true)
}
}, [region])

const getModules = async () => {
const { pilier, nom, region, departement, thematique, dateDebut } = filtres
let url = '/api/modules/?'
Expand Down