Huge commit
- Rework the inscription requests system so that it considers the equivalence systems and the impact of the teacher in the inscription procedure.
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
address:null,
|
||||
country:null,
|
||||
curriculum:null,
|
||||
equivalenceState: "Unrequired"
|
||||
})
|
||||
|
||||
const notcompletedCheck = ref(false);
|
||||
@ -76,18 +77,12 @@
|
||||
//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 cursus.curriculumId + " BAB " + cursus.year + " " + cursus.option;
|
||||
return "BAB " + cursus.year + " " + cursus.option;
|
||||
}else{
|
||||
return cursus.curriculumId + " MA" + (parseInt(cursus.year)-3).toString() + " " + cursus.option;
|
||||
return "MA" + (parseInt(cursus.year)-3).toString() + " " + cursus.option;
|
||||
}
|
||||
}
|
||||
|
||||
//This function return the id of a decorated cursus (decorated by the function up)
|
||||
function parseDecoratedCursus(cursus){
|
||||
let id = cursus.substring(0, cursus.indexOf(" ")+1);
|
||||
return id;
|
||||
}
|
||||
|
||||
async function getCurriculumYear(curriculumId){
|
||||
const curriculum = await getcurriculum(curriculumId);
|
||||
return parseInt(curriculum.year);
|
||||
@ -97,7 +92,7 @@
|
||||
|
||||
//Post the register request and return the id of the newly created request and also post the external curriculum list in the database
|
||||
async function postRegisterReq(){
|
||||
const val = await register(outputs.firstname, outputs.surname, outputs.birthday, outputs.password, outputs.email, outputs.address, outputs.country, parseDecoratedCursus(outputs.curriculum), ppData, null, new Date());
|
||||
const val = await register(outputs.firstname, outputs.surname, outputs.birthday, outputs.password, outputs.email, outputs.address, outputs.country, outputs.curriculum, ppData, null, new Date(), outputs.equivalenceState);
|
||||
for (let item in externalCurrTab.value){
|
||||
await createExternalCurriculum(val.id, externalCurrTab.value[item].school, externalCurrTab.value[item].formation, externalCurrTab.value[item].completion, externalCurrTab.value[item].startYear, externalCurrTab.value[item].endYear, externalCurrTab.value[item].justifdocUrl);
|
||||
}
|
||||
@ -198,7 +193,7 @@
|
||||
<div class="inputBox">
|
||||
<p>{{i18n("Curriculum").toUpperCase()}}</p>
|
||||
<select v-model="outputs.curriculum">
|
||||
<option v-for="item in curricula">{{getCursusDisplay(item)}}</option>
|
||||
<option v-for="item in curricula" :value="item.curriculumId">{{getCursusDisplay(item)}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<p style="color:rgb(239,60,168);">
|
||||
|
Reference in New Issue
Block a user