Compare commits
No commits in common. "2d20b45c3a00e418306d80dc38b5da51361a930e" and "a90243f4b9e45684789b09d331b658ac3a81e307" have entirely different histories.
2d20b45c3a
...
a90243f4b9
@ -24,6 +24,7 @@ public class AuthenticatorService {
|
|||||||
return tokenService.getUserFromToken(token);
|
return tokenService.getUserFromToken(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String login(String identifier, String password, Date expirationDate){
|
public String login(String identifier, String password, Date expirationDate){
|
||||||
User user = userService.getUser(identifier);
|
User user = userService.getUser(identifier);
|
||||||
if (user == null){return null;}
|
if (user == null){return null;}
|
||||||
|
@ -28,7 +28,6 @@ public class InscriptionService {
|
|||||||
private final MinervalRepository minervalRepository;
|
private final MinervalRepository minervalRepository;
|
||||||
private final ExternalCurriculumRepository externalCurriculumRepository;
|
private final ExternalCurriculumRepository externalCurriculumRepository;
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
public InscriptionService(InscriptionRepository inscriptionRepo, UserRepository userRepo, UserCurriculumRepository userCurriculumRepo, CurriculumRepository curriculumRepo, MinervalRepository minervalRepository, ExternalCurriculumRepository externalCurriculumRepository, UserService userService){
|
public InscriptionService(InscriptionRepository inscriptionRepo, UserRepository userRepo, UserCurriculumRepository userCurriculumRepo, CurriculumRepository curriculumRepo, MinervalRepository minervalRepository, ExternalCurriculumRepository externalCurriculumRepository, UserService userService){
|
||||||
this.inscriptionRepo = inscriptionRepo;
|
this.inscriptionRepo = inscriptionRepo;
|
||||||
this.userRepo = userRepo;
|
this.userRepo = userRepo;
|
||||||
|
@ -117,7 +117,6 @@ public class ProtectionService {
|
|||||||
toReturn.put("identityCard", inscriptionRequest.getIdentityCard());
|
toReturn.put("identityCard", inscriptionRequest.getIdentityCard());
|
||||||
toReturn.put("submissionDate", inscriptionRequest.getSubmissionDate());
|
toReturn.put("submissionDate", inscriptionRequest.getSubmissionDate());
|
||||||
toReturn.put("equivalenceState", inscriptionRequest.getEquivalenceState());
|
toReturn.put("equivalenceState", inscriptionRequest.getEquivalenceState());
|
||||||
toReturn.put("admissionDocUrl", inscriptionRequest.getAdmissionDocUrl());
|
|
||||||
return toReturn;
|
return toReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,17 +58,17 @@ async function refreshCursus(){
|
|||||||
{{ i18n("login.guest.country") }} : {{request.country}}
|
{{ i18n("login.guest.country") }} : {{request.country}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ i18n("login.guest.birthday") }} : {{request.birthDate.slice(0,10)}}
|
{{ i18n("login.guest.birthday") }} : {{request.birthDate}}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ i18n("WantedCursus") }} : BAB {{cursus.year}} {{cursus.option}}
|
{{ i18n("WantedCursus") }} : BAB {{cursus.year}} {{cursus.option}}
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 3%">
|
<div style="margin-top: 3%">
|
||||||
<button><a :href="request.identityCard">{{ i18n("dlidentitycard") }}</a></button>
|
<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>
|
||||||
<div>
|
<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>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
surname:null,
|
surname:null,
|
||||||
firstname:null,
|
firstname:null,
|
||||||
password:null,
|
password:null,
|
||||||
birthday:"1990-01-01",
|
birthday:null,
|
||||||
email:null,
|
email:null,
|
||||||
address:null,
|
address:null,
|
||||||
country:null,
|
country:null,
|
||||||
@ -36,7 +36,7 @@
|
|||||||
const ppData = ref({})
|
const ppData = ref({})
|
||||||
const idcardfile = ref({})
|
const idcardfile = ref({})
|
||||||
const justifcardfile = ref({})
|
const justifcardfile = ref({})
|
||||||
const allfileshere = ref(0)
|
|
||||||
const curricula= await getAllCurriculums();
|
const curricula= await getAllCurriculums();
|
||||||
|
|
||||||
function goBackHome(){
|
function goBackHome(){
|
||||||
@ -73,13 +73,7 @@
|
|||||||
//We upload the two files and we get their paths on the server
|
//We upload the two files and we get their paths on the server
|
||||||
const identityCardFile = await uploadFile(idcardfile.value, "IdentityCard")
|
const identityCardFile = await uploadFile(idcardfile.value, "IdentityCard")
|
||||||
const justifFile = ref(null)
|
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){
|
if (curricula[outputs.curriculum-1].requireCertificate){
|
||||||
justifFile.value = await uploadFile(justifcardfile.value, "JustificationDocument")
|
justifFile.value = await uploadFile(justifcardfile.value, "JustificationDocument")
|
||||||
@ -92,7 +86,7 @@
|
|||||||
justif = null
|
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){
|
for (let item in externalCurrTab.value){
|
||||||
const temp = await uploadFile(externalCurrTab.value[item].justifdocUrl, "JustificationDocument")
|
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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -151,7 +138,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="inputBox">
|
<div class="inputBox">
|
||||||
<p>{{i18n("login.guest.birthday")}}</p>
|
<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>
|
||||||
<div class="inputBox">
|
<div class="inputBox">
|
||||||
<p>{{i18n("login.guest.password")}}</p>
|
<p>{{i18n("login.guest.password")}}</p>
|
||||||
@ -163,7 +150,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="switchpage">
|
<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>
|
||||||
<div @click="(loginPage=!loginPage) && (page=0)" class="register">
|
<div @click="(loginPage=!loginPage) && (page=0)" class="register">
|
||||||
@ -186,7 +173,13 @@
|
|||||||
<form class="inputBox" novalidate enctype="multipart/form-data">
|
<form class="inputBox" novalidate enctype="multipart/form-data">
|
||||||
<p>{{i18n("profile.picture").toUpperCase()}}</p>
|
<p>{{i18n("profile.picture").toUpperCase()}}</p>
|
||||||
</form>
|
</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">
|
<div class="inputBox">
|
||||||
<p>{{i18n("Curriculum").toUpperCase()}}</p>
|
<p>{{i18n("Curriculum").toUpperCase()}}</p>
|
||||||
<select v-model="outputs.curriculum">
|
<select v-model="outputs.curriculum">
|
||||||
@ -210,16 +203,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-if="page === 2">
|
<div v-if="page === 2">
|
||||||
<p style="color:rgb(239,60,168);">{{i18n("login.guest.identityCard")}}</p>
|
<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%">
|
<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>
|
<p style="color:rgb(239,60,168);">{{ i18n("login.guest.attestationdisclaimer") }}</p>
|
||||||
<div style="margin-top: 2%">
|
<div style="margin-top: 2%">
|
||||||
<p style="color:rgb(239,60,168);">Attestation:</p>
|
<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>
|
</div>
|
||||||
<div v-if="everyfilehere()"><button @click="page++;" style="margin-top: 10%">{{i18n("login.guest.nextpage")}}</button></div>
|
<button @click="page++;" style="margin-top: 10%">{{i18n("login.guest.nextpage")}}</button>
|
||||||
<div v-else style="color: rgb(239,60,168); margin-top: 5%; margin-bottom: 5%">Please upload all the required files</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div v-if="page === 3">
|
<div v-if="page === 3">
|
||||||
<p style="color:rgb(239,60,168);margin-bottom: 5%">
|
<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{
|
.browser{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
|
Loading…
Reference in New Issue
Block a user