diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java index 9e517b7..8da5536 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java @@ -24,7 +24,6 @@ public class AuthenticatorService { return tokenService.getUserFromToken(token); } - public String login(String identifier, String password, Date expirationDate){ User user = userService.getUser(identifier); if (user == null){return null;} diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java index aef2beb..d641df9 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java @@ -28,6 +28,7 @@ public class InscriptionService { private final MinervalRepository minervalRepository; private final ExternalCurriculumRepository externalCurriculumRepository; private final UserService userService; + public InscriptionService(InscriptionRepository inscriptionRepo, UserRepository userRepo, UserCurriculumRepository userCurriculumRepo, CurriculumRepository curriculumRepo, MinervalRepository minervalRepository, ExternalCurriculumRepository externalCurriculumRepository, UserService userService){ this.inscriptionRepo = inscriptionRepo; this.userRepo = userRepo; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java index d08951e..74369b8 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java @@ -117,6 +117,7 @@ public class ProtectionService { toReturn.put("identityCard", inscriptionRequest.getIdentityCard()); toReturn.put("submissionDate", inscriptionRequest.getSubmissionDate()); toReturn.put("equivalenceState", inscriptionRequest.getEquivalenceState()); + toReturn.put("admissionDocUrl", inscriptionRequest.getAdmissionDocUrl()); return toReturn; } diff --git a/frontend/src/Apps/Inscription/AboutRequest.vue b/frontend/src/Apps/Inscription/AboutRequest.vue index da04a4a..0f27478 100644 --- a/frontend/src/Apps/Inscription/AboutRequest.vue +++ b/frontend/src/Apps/Inscription/AboutRequest.vue @@ -58,17 +58,17 @@ async function refreshCursus(){ {{ i18n("login.guest.country") }} : {{request.country}}
- {{ i18n("login.guest.birthday") }} : {{request.birthDate}} + {{ i18n("login.guest.birthday") }} : {{request.birthDate.slice(0,10)}}
{{ i18n("WantedCursus") }} : BAB {{cursus.year}} {{cursus.option}}
- +
-
- +
+
diff --git a/frontend/src/Apps/Login.vue b/frontend/src/Apps/Login.vue index a6e4a88..6900ca3 100644 --- a/frontend/src/Apps/Login.vue +++ b/frontend/src/Apps/Login.vue @@ -16,7 +16,7 @@ surname:null, firstname:null, password:null, - birthday:null, + birthday:"1990-01-01", email:null, address:null, country:null, @@ -36,7 +36,7 @@ const ppData = ref({}) const idcardfile = ref({}) const justifcardfile = ref({}) - + const allfileshere = ref(0) const curricula= await getAllCurriculums(); function goBackHome(){ @@ -73,7 +73,13 @@ //We upload the two files and we get their paths on the server const identityCardFile = await uploadFile(idcardfile.value, "IdentityCard") const justifFile = ref(null) - const profilepic = await uploadProfilePicture(ppData.value) + + + const profilepic = ref(null) + if (imageSaved){ + profilepic.value = await uploadProfilePicture(ppData.value) + } + if (curricula[outputs.curriculum-1].requireCertificate){ justifFile.value = await uploadFile(justifcardfile.value, "JustificationDocument") @@ -86,7 +92,7 @@ justif = null } - const val = await register(outputs.firstname, outputs.surname, outputs.birthday, outputs.password, outputs.email, outputs.address, outputs.country, outputs.curriculum, profilepic.url, identityCardFile.url, new Date(), outputs.equivalenceState, justif); + const val = await register(outputs.firstname, outputs.surname, outputs.birthday, outputs.password, outputs.email, outputs.address, outputs.country, outputs.curriculum, profilepic.value.url, identityCardFile.url, new Date(), outputs.equivalenceState, justif); for (let item in externalCurrTab.value){ const temp = await uploadFile(externalCurrTab.value[item].justifdocUrl, "JustificationDocument") @@ -94,6 +100,13 @@ } } + function everyfilehere(){ + if(allfileshere.value === 2 || (allfileshere.value === 1 && curricula[outputs.curriculum-1].requireCertificate === false)){ + return true + }else{ + return false + } + }