Compare commits

..

No commits in common. "2d20b45c3a00e418306d80dc38b5da51361a930e" and "a90243f4b9e45684789b09d331b658ac3a81e307" have entirely different histories.

5 changed files with 30 additions and 30 deletions

View File

@ -24,6 +24,7 @@ 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;}

View File

@ -28,7 +28,6 @@ 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;

View File

@ -117,7 +117,6 @@ 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;
}

View File

@ -58,17 +58,17 @@ async function refreshCursus(){
{{ i18n("login.guest.country") }} : {{request.country}}
</div>
<div>
{{ i18n("login.guest.birthday") }} : {{request.birthDate.slice(0,10)}}
{{ i18n("login.guest.birthday") }} : {{request.birthDate}}
</div>
<div>
{{ i18n("WantedCursus") }} : BAB {{cursus.year}} {{cursus.option}}
</div>
<div style="margin-top: 3%">
<button><a :href="request.identityCard">{{ i18n("dlidentitycard") }}</a></button>
<button style="margin-left: 3%" v-if="request.admissionDocUrl != null"><a :href="request.admissionDocUrl">{{ i18n("dladmissiondoc") }}</a></button>
<button v-if="request.admissionDocUrl != null"><a :href="request.admissionDocUrl">{{ i18n("dladmissiondoc") }}</a></button>
</div>
<div>
<button style="background-color:rgb(105,05,105);margin-top: 3%" @click="list=!list" v-if="(user.role === 'Teacher' || user.role === 'Admin')">{{ i18n("seeextcur") }}</button>
<div v-if="externalCurriculum.length !== 0">
<button style="background-color:rgb(105,05,105);margin-top: 3%" @click="list=!list" v-if="(user.role == 'Teacher' || user.role == 'Admin')">{{ i18n("seeextcur") }}</button>
</div>
</div>
</div>

View File

@ -16,7 +16,7 @@
surname:null,
firstname:null,
password:null,
birthday:"1990-01-01",
birthday:null,
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,13 +73,7 @@
//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 = ref(null)
if (imageSaved){
profilepic.value = await uploadProfilePicture(ppData.value)
}
const profilepic = await uploadProfilePicture(ppData.value)
if (curricula[outputs.curriculum-1].requireCertificate){
justifFile.value = await uploadFile(justifcardfile.value, "JustificationDocument")
@ -92,7 +86,7 @@
justif = null
}
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);
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);
for (let item in externalCurrTab.value){
const temp = await uploadFile(externalCurrTab.value[item].justifdocUrl, "JustificationDocument")
@ -100,13 +94,6 @@
}
}
function everyfilehere(){
if(allfileshere.value === 2 || (allfileshere.value === 1 && curricula[outputs.curriculum-1].requireCertificate === false)){
return true
}else{
return false
}
}
</script>
<template>
@ -151,7 +138,7 @@
</div>
<div class="inputBox">
<p>{{i18n("login.guest.birthday")}}</p>
<input type="date" v-model="outputs.birthday" value="1990-01-05" min="1912-01-01" max="2024-01-01">
<input type="date" v-model="outputs.birthday">
</div>
<div class="inputBox">
<p>{{i18n("login.guest.password")}}</p>
@ -163,7 +150,7 @@
</div>
<div class="switchpage">
<button @click="verifyInputs(outputs.password);idcardfile={};justifcardfile={}">{{i18n("login.guest.nextpage")}}</button>
<button @click="verifyInputs(outputs.password);">{{i18n("login.guest.nextpage")}}</button>
</div>
<div @click="(loginPage=!loginPage) && (page=0)" class="register">
@ -186,7 +173,13 @@
<form class="inputBox" novalidate enctype="multipart/form-data">
<p>{{i18n("profile.picture").toUpperCase()}}</p>
</form>
<input style="color:rgb(239,60,168);" type="file" name="picture" @change="ppData = $event.target.files;imageSaved=true" accept="image/*">
<label class="browser">
{{i18n("login.guest.browse")}}
<input type="file" :disabled="imageSaved" @change="ppData = $event.target.files; imageSaved = true;" accept="image/*">
</label>
<form novalidate enctype="multipart/form-data" class="inputBox">
<input type="file" @change="imageSaved = true;" accept="image/*">
</form>
<div class="inputBox">
<p>{{i18n("Curriculum").toUpperCase()}}</p>
<select v-model="outputs.curriculum">
@ -210,16 +203,21 @@
</div>
<div v-if="page === 2">
<p style="color:rgb(239,60,168);">{{i18n("login.guest.identityCard")}}</p>
<input style="color:rgb(239,60,168);margin-bottom: 3%" type="file" @change="idcardfile = $event.target.files;allfileshere = Math.min(allfileshere+1, 2)">
<label class="browser">
{{i18n("login.guest.browse")}}
<input type="file" @change="idcardfile = $event.target.files">
</label>
<div v-if="curricula[outputs.curriculum-1].requireCertificate === true" style="margin-top: 3%; margin-bottom: 4%">
<p style="color:rgb(239,60,168);">{{ i18n("login.guest.attestationdisclaimer") }}</p>
<div style="margin-top: 2%">
<p style="color:rgb(239,60,168);">Attestation:</p>
<input style=" color:rgb(239,60,168);" type="file" @change="justifcardfile = $event.target.files;allfileshere = Math.min(allfileshere+1, 2)">
<label class="browser">
{{i18n("login.guest.browse")}}
<input type="file" @change="justifcardfile = $event.target.files">
</label>
</div>
</div>
<div v-if="everyfilehere()"><button @click="page++;" style="margin-top: 10%">{{i18n("login.guest.nextpage")}}</button></div>
<div v-else style="color: rgb(239,60,168); margin-top: 5%; margin-bottom: 5%">Please upload all the required files</div>
<button @click="page++;" style="margin-top: 10%">{{i18n("login.guest.nextpage")}}</button>
</div>
<div v-if="page === 3">
<p style="color:rgb(239,60,168);margin-bottom: 5%">
@ -322,6 +320,9 @@ input[type=submit],button,select{
}
input[type=file]{
display:none;
}
.browser{
display:inline-block;