From 364f39c4bc71d0a60e06cb3e295e535a62379bb9 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Mon, 22 Apr 2024 11:58:42 +0200 Subject: [PATCH 1/3] put the about user in the middle --- frontend/src/Apps/AboutUser.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/Apps/AboutUser.vue b/frontend/src/Apps/AboutUser.vue index 0a3cce1..a86926c 100644 --- a/frontend/src/Apps/AboutUser.vue +++ b/frontend/src/Apps/AboutUser.vue @@ -147,8 +147,7 @@ async function modify(){ column-gap:2.7%; row-gap:45px; grid-template-areas: - "profilPic globalInfos" - "minfos minfos"; + "profilPic globalInfos"; } .profilPic{ @@ -167,7 +166,8 @@ async function modify(){ display:flex; align-items:center; justify-content:center; - margin-top:5%; + margin-right: auto; + margin-left: auto; } .subContainer{ From 34e537ff02a1c982969f69eda765298f592423f8 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Mon, 22 Apr 2024 12:19:21 +0200 Subject: [PATCH 2/3] fixed push of researcher --- frontend/src/Apps/AboutUser.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/Apps/AboutUser.vue b/frontend/src/Apps/AboutUser.vue index a86926c..3623f8e 100644 --- a/frontend/src/Apps/AboutUser.vue +++ b/frontend/src/Apps/AboutUser.vue @@ -32,6 +32,7 @@ async function createResearcher(){ toCreate.user = user.value await postResearcher(toCreate) creating.value = false + allResearcher.value = await fetchAllResearchers() for (let i = 0; i < allResearcher.value.length; i++) { if (user.value.regNo === allResearcher.value[i].user.regNo){ researcher.value = allResearcher.value[i] From 730a72dba3691e997488e2e6b207390f50bf8b7b Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Mon, 22 Apr 2024 13:19:08 +0200 Subject: [PATCH 3/3] added profile picture handling --- frontend/src/Apps/Profil.vue | 17 +++++++++++++---- .../ManageResearcherProfile.vue | 4 ++-- .../ResearcherProfile.vue | 2 +- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/Apps/Profil.vue b/frontend/src/Apps/Profil.vue index e4e942b..cd66f28 100644 --- a/frontend/src/Apps/Profil.vue +++ b/frontend/src/Apps/Profil.vue @@ -93,12 +93,14 @@ async function ChangeInfos(){ for (let element in toModify){ + console.log(element) + console.log(toModify[element]) if (element ==="email" && (toModify[element] !== null)){ await alterSelf(user.value.regNo,{email : toModify[element]}); } - if (element ==="profilPictureUrl" && (toModify[element] !== null)){ - await alterSelf(user.value.regNo,{ profilPictureUrl : toModify[element]}); + if (element ==="profilePictureUrl" && (toModify[element] !== null)){ + await alterSelf(user.value.regNo,{ profilePictureUrl : toModify[element]}); } else if(element === "address" && (toModify[element] !== null)){ await alterSelf(user.value.regNo,{address : toModify[element]}); @@ -116,7 +118,7 @@ toModify.address = item.address; toModify.profilPictureUrl = item.profilPictureUrl; toModify.email= item.email; - toModify.password= item.password; + toModify.password= item.password } function getPP(){ @@ -176,6 +178,13 @@ } } + + async function getProfilePic(data){ + const pp= await uploadProfilePicture(data) + toModify.profilePictureUrl = pp.url + } + +