diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java index df79ede..96e7be4 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -67,11 +67,15 @@ public class MockController { Curriculum chemistryBab1 = new Curriculum(1,"chemistry"); Curriculum psychologyBab1 = new Curriculum(1,"psychology"); Curriculum infoBab2 = new Curriculum(2,"info"); + Curriculum masterinfo1 = new Curriculum(4, "info"); + Curriculum masterinfo2 = new Curriculum(5, "info"); curriculumService.save(infoBab1); curriculumService.save(chemistryBab1); curriculumService.save(psychologyBab1); curriculumService.save(infoBab2); + curriculumService.save(masterinfo1); + curriculumService.save(masterinfo2); ucr.save(new UserCurriculum(joe, infoBab1, 2022)); ucr.save(new UserCurriculum(joe, chemistryBab1, 2023)); diff --git a/frontend/src/Apps/AboutRequest.vue b/frontend/src/Apps/AboutRequest.vue index c443ad0..a818e18 100644 --- a/frontend/src/Apps/AboutRequest.vue +++ b/frontend/src/Apps/AboutRequest.vue @@ -9,10 +9,10 @@ let request = await getRegisters(props.target); const cursus = await getcurriculum(request.curriculum); function getPP(){ - if(request.profilePicture === null){ + if(request.profilePictureUrl === null){ return "/Clyde.png" } - return request.profilePicture; + return request.profilePictureUrl; } diff --git a/frontend/src/Apps/Inscription.vue b/frontend/src/Apps/Inscription.vue index 6f79966..b02cfcd 100644 --- a/frontend/src/Apps/Inscription.vue +++ b/frontend/src/Apps/Inscription.vue @@ -13,7 +13,6 @@ async function upPage(id,review){ await validateRegister(id,review); requests.value = await getAllRegisters(); - } diff --git a/frontend/src/Apps/Login.vue b/frontend/src/Apps/Login.vue index cf68d13..036b6fb 100644 --- a/frontend/src/Apps/Login.vue +++ b/frontend/src/Apps/Login.vue @@ -24,9 +24,12 @@ const submitValue= ref(i18n("login.guest.submit")) const passwordConfirm=ref("") - + + //Allows to display MA or BAB for years + let yearprefix = ""; + const imageSaved = ref(false) - const ppData = ref(false) + let ppData = ""; const curricula= await getAllCurriculums(); @@ -50,7 +53,20 @@ disconnect(); window.location.reload();} - + async function uploadPP(arg){ + const data = await uploadProfilePicture(arg); + ppData = data.url; + console.log(ppData); + } + + //This functions makes the distinction between a master cursus (year 4 or more) and a bachelor cursus (year 3 or less) + function getCursusDisplay(cursus){ + if (cursus.year <= 3){ + return "BAB " + cursus.year + " " + cursus.option; + }else{ + return "MA" + (parseInt(cursus.year)-3).toString() + " " + cursus.option; + } + } @@ -130,16 +146,16 @@
{{i18n("Curriculum").toUpperCase()}}