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:
2024-04-11 16:45:48 +02:00
parent 34c0a2bfe8
commit 4199663d64
18 changed files with 253 additions and 192 deletions

View File

@ -43,3 +43,4 @@ export async function getAllRegisters(){
export async function validateRegister(id, state){
return restPatch("/request/register/" + id, state);
}

View File

@ -26,7 +26,7 @@ export function disconnect(){
* @param curriculum
* @param imageId id of the image in database returned when uploaded
*/
export async function register(firstname, lastname, birthDate, password, email, address, country, curriculumId, imageId, identityCardId, submissionDate){
export async function register(firstname, lastname, birthDate, password, email, address, country, curriculumId, imageId, identityCardId, submissionDate, equivalence){
return restPost("/register", {
firstName: firstname,
lastName: lastname,
@ -38,7 +38,8 @@ export async function register(firstname, lastname, birthDate, password, email,
curriculumId: curriculumId,
profilePicture: imageId,
identityCard : identityCardId,
submissionDate : submissionDate
submissionDate : submissionDate,
equivalenceState : equivalence
});
}

View File

@ -1,4 +1,4 @@
import {restGet, restPost} from "@/rest/restConsumer.js";
import {restGet, restPatch, restPost} from "@/rest/restConsumer.js";
import {parseInteger} from "jsdom/lib/jsdom/living/helpers/strings.js";
export async function createExternalCurriculum(inscriptionRequestId,school, formation, completion, startYear, endYear, justifdocUrl){
@ -14,5 +14,9 @@ export async function createExternalCurriculum(inscriptionRequestId,school, form
}
export async function getExternalCurriculumByInscrReq(inscrReqId){
return restGet("/externalcurriculum/"+inscrReqId);
return restGet("/externalcurriculum/"+inscrReqId)
}
export async function editExternalCurriculum(extReqId, newState){
return restPatch("/externalcurriculum/"+extReqId+"/"+newState)
}

View File

@ -1,4 +1,4 @@
import {restGet, restPost} from "@/rest/restConsumer.js";
import {restGet, restPatch, restPost} from "@/rest/restConsumer.js";
export async function createExemptionsRequest(exempReq){
return restPost("/exemptionreq", exempReq)
@ -14,4 +14,8 @@ export async function getAllScholarShipsRequest(){
export async function getAllExemptionsRequest(){
return restGet("/exemptionsreq")
}
export async function editEquivalenceState(id, newstate){
return restPatch("/request/registerequiv/"+id+"/"+newstate)
}