Fix fews things and rename the inscription app to managerequests also sort the files
This commit is contained in:
		@ -64,8 +64,8 @@ public class ApplicationsController {
 | 
			
		||||
        if (!authServ.isNotIn(new Role[]{Role.Teacher,Role.Secretary,Role.Admin},token))
 | 
			
		||||
            authorizedApps.add(Applications.ManageCourses);
 | 
			
		||||
 | 
			
		||||
        if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin},token)){
 | 
			
		||||
            authorizedApps.add(Applications.Inscription);
 | 
			
		||||
        if (!authServ.isNotIn(new Role[]{Role.InscriptionService,Role.Admin, Role.Teacher},token)){
 | 
			
		||||
            authorizedApps.add(Applications.Requests);
 | 
			
		||||
            authorizedApps.add(Applications.StudentsList);}
 | 
			
		||||
 | 
			
		||||
        if (!authServ.isNotIn(new Role[]{Role.Secretary,Role.Admin},token)){ 
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,8 @@ package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
 | 
			
		||||
@ -1,13 +1,12 @@
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.ExternalCurriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ExternalCurriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
@ -29,7 +28,7 @@ public class ExternalCurriculumController {
 | 
			
		||||
    public ResponseEntity<ExternalCurriculum> postExternalCurriculum(@RequestBody Map<String, Object> externalCurrInfos){
 | 
			
		||||
        InscriptionRequest ir = inscriptionRepository.findById((Integer) externalCurrInfos.get("inscriptionRequestId"));
 | 
			
		||||
 | 
			
		||||
        ExternalCurriculum toSave = new ExternalCurriculum(ir, (String) externalCurrInfos.get("school"),(String) externalCurrInfos.get("formation"),(String) externalCurrInfos.get("completion"), (Integer)externalCurrInfos.get("startYear"), (Integer)externalCurrInfos.get("endYear"), (String)externalCurrInfos.get("justifDocUrl"), RequestState.Pending);
 | 
			
		||||
        ExternalCurriculum toSave = new ExternalCurriculum(ir, (String) externalCurrInfos.get("school"),(String) externalCurrInfos.get("formation"),(String) externalCurrInfos.get("completion"), (Integer)externalCurrInfos.get("startYear"), (Integer)externalCurrInfos.get("endYear"), (String)externalCurrInfos.get("justifDocUrl"));
 | 
			
		||||
 | 
			
		||||
        return new ResponseEntity<>(ecr.save(toSave), HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
@ -41,12 +40,4 @@ public class ExternalCurriculumController {
 | 
			
		||||
        ArrayList<ExternalCurriculum> toReturn = ecr.getExternalCurriculumByInscriptionRequest(ir);
 | 
			
		||||
        return new ResponseEntity<>(toReturn, HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @PatchMapping("/externalcurriculum/{extcurrid}/{newstate}")
 | 
			
		||||
    public ResponseEntity<Object> changeExternalCurrState(@PathVariable long extcurrid, @PathVariable RequestState newstate){
 | 
			
		||||
        ExternalCurriculum externalCurriculum = ecr.getExternalCurriculumById(extcurrid);
 | 
			
		||||
        externalCurriculum.setState(newstate);
 | 
			
		||||
        ecr.save(externalCurriculum);
 | 
			
		||||
        return new ResponseEntity<>(HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,14 +1,13 @@
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.apache.tomcat.util.http.parser.Authorization;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.AuthenticatorService;
 | 
			
		||||
import ovh.herisson.Clyde.Services.InscriptionService;
 | 
			
		||||
import ovh.herisson.Clyde.Services.Inscription.InscriptionService;
 | 
			
		||||
import ovh.herisson.Clyde.Services.ProtectionService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Role;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
@ -1,13 +1,12 @@
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.apache.coyote.Response;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.MinervalRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.MinervalRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.AuthenticatorService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Minerval;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Minerval;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Role;
 | 
			
		||||
 | 
			
		||||
import java.util.*;
 | 
			
		||||
@ -1,18 +1,13 @@
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints.Inscription;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.PaymentRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Minerval;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Payment;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Role;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.PaymentRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Payment;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Calendar;
 | 
			
		||||
import java.util.GregorianCalendar;
 | 
			
		||||
 | 
			
		||||
@RestController
 | 
			
		||||
@CrossOrigin(originPatterns = "*", allowCredentials = "true")
 | 
			
		||||
@ -1,15 +1,17 @@
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
package ovh.herisson.Clyde.EndPoints.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.CourseRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.ExemptionsRequestRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.ScholarshipRequestRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ExemptionsRequestRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ScholarshipRequestRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.UserRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.AuthenticatorService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ExemptionsRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ScholarshipRequest;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
@ -6,12 +6,11 @@ import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.CurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Responses.UnauthorizedResponse;
 | 
			
		||||
import ovh.herisson.Clyde.Services.AuthenticatorService;
 | 
			
		||||
import ovh.herisson.Clyde.Services.ProtectionService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Curriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
@ -3,8 +3,17 @@ package ovh.herisson.Clyde.EndPoints;
 | 
			
		||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.MinervalRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ScholarshipRequestRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Services.*;
 | 
			
		||||
import ovh.herisson.Clyde.Services.Inscription.InscriptionService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ExternalCurriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Minerval;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ScholarshipRequest;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
import java.util.Arrays;
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
@ -119,7 +128,7 @@ public class MockController {
 | 
			
		||||
 | 
			
		||||
        inscriptionService.save(inscriptionRequest);
 | 
			
		||||
 | 
			
		||||
        ExternalCurriculum externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, RequestState.Pending);
 | 
			
		||||
        ExternalCurriculum externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null);
 | 
			
		||||
        externalCurriculumRepository.save(externalCurriculum);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.ExemptionsRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ExemptionsRequest;
 | 
			
		||||
 | 
			
		||||
public interface ExemptionsRequestRepository extends CrudRepository<ExemptionsRequest, Long> {
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,8 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.ExternalCurriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.User;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ExternalCurriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public interface InscriptionRepository extends CrudRepository<InscriptionRequest,Long> {
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Minerval;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Minerval;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Payment;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Payment;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Repositories;
 | 
			
		||||
package ovh.herisson.Clyde.Repositories.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.data.repository.CrudRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.ScholarshipRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.ScholarshipRequest;
 | 
			
		||||
 | 
			
		||||
public interface ScholarshipRequestRepository extends CrudRepository<ScholarshipRequest, Long> {
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,10 @@
 | 
			
		||||
package ovh.herisson.Clyde.Services;
 | 
			
		||||
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import ovh.herisson.Clyde.Services.Inscription.InscriptionService;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
@Service
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,13 @@
 | 
			
		||||
package ovh.herisson.Clyde.Services;
 | 
			
		||||
package ovh.herisson.Clyde.Services.Inscription;
 | 
			
		||||
 | 
			
		||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.*;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.InscriptionRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.MinervalRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.Minerval;
 | 
			
		||||
 | 
			
		||||
@Service
 | 
			
		||||
public class InscriptionService {
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
package ovh.herisson.Clyde.Services;
 | 
			
		||||
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Course;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Inscription.InscriptionRequest;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.User;
 | 
			
		||||
 | 
			
		||||
import java.util.ArrayList;
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@ package ovh.herisson.Clyde.Services;
 | 
			
		||||
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.CurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.Inscription.ExternalCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Repositories.UserCurriculumRepository;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.*;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -18,6 +18,6 @@ public enum Applications {
 | 
			
		||||
    UsersList,
 | 
			
		||||
 | 
			
		||||
    // InscriptionService authorization
 | 
			
		||||
    Inscription,
 | 
			
		||||
    Requests,
 | 
			
		||||
    StudentsList
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,12 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
import org.hibernate.annotations.OnDelete;
 | 
			
		||||
import org.hibernate.annotations.OnDeleteAction;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Course;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.User;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
@ -25,12 +25,9 @@ public class ExternalCurriculum {
 | 
			
		||||
    private int endYear;
 | 
			
		||||
    private String justifdocUrl;
 | 
			
		||||
 | 
			
		||||
    //Accepted if the document justifies the claimed formation
 | 
			
		||||
    private RequestState state;
 | 
			
		||||
 | 
			
		||||
    public ExternalCurriculum(){}
 | 
			
		||||
 | 
			
		||||
    public ExternalCurriculum(InscriptionRequest ir, String school, String formation, String completion, int startYear, int endYear, String justifdocUrl, RequestState state){
 | 
			
		||||
    public ExternalCurriculum(InscriptionRequest ir, String school, String formation, String completion, int startYear, int endYear, String justifdocUrl){
 | 
			
		||||
        this.inscriptionRequest = ir;
 | 
			
		||||
        this.school = school;
 | 
			
		||||
        this.formation = formation;
 | 
			
		||||
@ -38,7 +35,6 @@ public class ExternalCurriculum {
 | 
			
		||||
        this.startYear = startYear;
 | 
			
		||||
        this.endYear = endYear;
 | 
			
		||||
        this.justifdocUrl = justifdocUrl;
 | 
			
		||||
        this.state = state;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public int getId() {
 | 
			
		||||
@ -100,12 +96,4 @@ public class ExternalCurriculum {
 | 
			
		||||
    public String getJustifdocUrl() {
 | 
			
		||||
        return justifdocUrl;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public RequestState getState() {
 | 
			
		||||
        return state;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void setState(RequestState state) {
 | 
			
		||||
        this.state = state;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@ -1,6 +1,8 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.Entity;
 | 
			
		||||
import jakarta.persistence.GeneratedValue;
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.Entity;
 | 
			
		||||
import jakarta.persistence.GeneratedValue;
 | 
			
		||||
@ -1,8 +1,11 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
import org.hibernate.annotations.OnDelete;
 | 
			
		||||
import org.hibernate.annotations.OnDeleteAction;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.Curriculum;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.User;
 | 
			
		||||
 | 
			
		||||
@Entity
 | 
			
		||||
public class ReInscriptionRequest {
 | 
			
		||||
@ -1,8 +1,10 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.*;
 | 
			
		||||
import org.hibernate.annotations.OnDelete;
 | 
			
		||||
import org.hibernate.annotations.OnDeleteAction;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.User;
 | 
			
		||||
 | 
			
		||||
import java.util.Date;
 | 
			
		||||
 | 
			
		||||
@ -1,9 +1,10 @@
 | 
			
		||||
package ovh.herisson.Clyde.Tables;
 | 
			
		||||
package ovh.herisson.Clyde.Tables.Inscription;
 | 
			
		||||
 | 
			
		||||
import jakarta.persistence.Entity;
 | 
			
		||||
import jakarta.persistence.GeneratedValue;
 | 
			
		||||
import jakarta.persistence.GenerationType;
 | 
			
		||||
import jakarta.persistence.Id;
 | 
			
		||||
import ovh.herisson.Clyde.Tables.RequestState;
 | 
			
		||||
 | 
			
		||||
@Entity
 | 
			
		||||
public class UninscriptionRequest {
 | 
			
		||||
@ -1,12 +1,12 @@
 | 
			
		||||
<script setup>
 | 
			
		||||
import i18n from "@/i18n.js"
 | 
			
		||||
import {getSelf, getUser} from '../rest/Users.js'
 | 
			
		||||
import {getSelf, getUser} from '../../rest/Users.js'
 | 
			
		||||
import {getcurriculum,getSomeonesCurriculumList} from "@/rest/curriculum.js";
 | 
			
		||||
import {getRegisters} from "@/rest/ServiceInscription.js";
 | 
			
		||||
import {get} from "jsdom/lib/jsdom/named-properties-tracker.js";
 | 
			
		||||
import {getExternalCurriculumByInscrReq} from "@/rest/externalCurriculum.js";
 | 
			
		||||
import {ref} from "vue";
 | 
			
		||||
import ExternalCurriculumList from "@/Apps/ExternalCurriculumList.vue";
 | 
			
		||||
import ExternalCurriculumList from "@/Apps/Inscription/ExternalCurriculumList.vue";
 | 
			
		||||
import {editEquivalenceState} from "@/rest/requests.js";
 | 
			
		||||
 | 
			
		||||
const props = defineProps(['target']);
 | 
			
		||||
@ -63,9 +63,10 @@ async function editEquivalence(id, newstate){
 | 
			
		||||
  </div>
 | 
			
		||||
  <div v-if="list==true">
 | 
			
		||||
    <ExternalCurriculumList :ext-curr-list="externalCurriculum" :inscr-req-id="request.id"></ExternalCurriculumList>
 | 
			
		||||
    <div>
 | 
			
		||||
      <button @click="editEquivalence(request.id, 'Accepted'); request.equivalenceState='Accepted'">Accept Equivalence</button>
 | 
			
		||||
      <button @click="editEquivalence(request.id, 'Refused'); request.equivalenceState='Refused'">Refuse Equivalence</button>
 | 
			
		||||
    <div style="margin-left: 15%;margin-top: 5%;">
 | 
			
		||||
      <button style="margin-left: 2%" @click="list = false;editEquivalence(request.id, 'Accepted'); request.equivalenceState='Accepted'">Accept Equivalence</button>
 | 
			
		||||
      <button style="margin-left: 2%" @click="list = false;editEquivalence(request.id, 'Refused'); request.equivalenceState='Refused'">Refuse Equivalence</button>
 | 
			
		||||
      <button style="margin-left: 2%" @click="list=false">Return to profile</button>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@ -127,6 +128,5 @@ button{
 | 
			
		||||
  width:100px;
 | 
			
		||||
  border:none;
 | 
			
		||||
  border-radius:20px;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
@ -1,6 +1,6 @@
 | 
			
		||||
<script setup>
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {getUser} from '../rest/Users.js'
 | 
			
		||||
  import {getUser} from '../../rest/Users.js'
 | 
			
		||||
  import {getSomeonesCurriculumList} from "@/rest/curriculum.js";
 | 
			
		||||
 | 
			
		||||
  const props = defineProps(['target']);
 | 
			
		||||
@ -1,8 +1,6 @@
 | 
			
		||||
<script setup>
 | 
			
		||||
  import i18n from "@/i18n.js";
 | 
			
		||||
  import {editExternalCurriculum} from "@/rest/externalCurriculum.js";
 | 
			
		||||
  import {ref} from "vue";
 | 
			
		||||
  import {editEquivalenceState} from "@/rest/requests.js";
 | 
			
		||||
 | 
			
		||||
  const props = defineProps(["extCurrList","inscrReqId"])
 | 
			
		||||
 | 
			
		||||
@ -64,19 +62,6 @@
 | 
			
		||||
  font-size: 70%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.accept{
 | 
			
		||||
  grid-area:accept;
 | 
			
		||||
  align-self:center;
 | 
			
		||||
  white-space: nowrap;
 | 
			
		||||
  overflow: hidden;
 | 
			
		||||
  text-overflow:ellipsis;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.refuse{
 | 
			
		||||
  grid-area: refuse;
 | 
			
		||||
  align-self:center;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.download{
 | 
			
		||||
  grid-area: download;
 | 
			
		||||
  align-self:center;
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {ref} from 'vue'
 | 
			
		||||
  import {validateRegister, getAllRegisters } from '@/rest/ServiceInscription.js'
 | 
			
		||||
  import AboutRequest from "@/Apps/AboutRequest.vue";
 | 
			
		||||
  import AboutRequest from "@/Apps/Inscription/AboutRequest.vue";
 | 
			
		||||
  import {getAllExemptionsRequest, getAllScholarShipsRequest} from "@/rest/requests.js";
 | 
			
		||||
 | 
			
		||||
  const requests = ref(await getAllRegisters());
 | 
			
		||||
@ -38,7 +38,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div v-if="windowsState === 1">
 | 
			
		||||
    <AboutRequest :target="targetId"></AboutRequest>
 | 
			
		||||
    <button style="background-color:rgb(105,05,105);margin-left: 30%; margin-top: 5%" @click="windowsState=0;loadRequests()">Retour</button>
 | 
			
		||||
  </div>
 | 
			
		||||
  <div v-if="windowsState === 0">
 | 
			
		||||
    <div style="margin-top: 2%;margin-left: 2%">
 | 
			
		||||
@ -146,10 +145,6 @@
 | 
			
		||||
    align-self:center;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .titles {
 | 
			
		||||
    grid-area:titles;
 | 
			
		||||
    align-self:center;
 | 
			
		||||
  }
 | 
			
		||||
  .date{
 | 
			
		||||
    grid-area:date;
 | 
			
		||||
    margin-left:40px;
 | 
			
		||||
@ -162,11 +157,6 @@
 | 
			
		||||
    align-self:center;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .type{
 | 
			
		||||
    grid-area:type;
 | 
			
		||||
    align-self:center;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .surname{
 | 
			
		||||
    grid-area:surname;
 | 
			
		||||
    align-self:center;
 | 
			
		||||
@ -5,7 +5,7 @@
 | 
			
		||||
  import {getCourses} from "../rest/courses.js"
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {uploadFile, uploadProfilePicture} from '@/rest/uploads.js'
 | 
			
		||||
  import CourseList from "@/Apps/CourseList.vue";
 | 
			
		||||
  import CourseList from "@/Apps/Inscription/CourseList.vue";
 | 
			
		||||
  import {editMinerval, getCurrentMinerval} from "@/rest/minerval.js";
 | 
			
		||||
  import {postPayment} from "@/rest/payment.js";
 | 
			
		||||
  import {createScholarshipRequest} from "@/rest/requests.js";
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {provide, reactive, ref} from 'vue'
 | 
			
		||||
  import { getStudents } from '../rest/Users.js'
 | 
			
		||||
  import AboutStudent from "@/Apps/AboutStudent.vue";
 | 
			
		||||
  import AboutStudent from "@/Apps/Inscription/AboutStudent.vue";
 | 
			
		||||
  const users = await getStudents();
 | 
			
		||||
 | 
			
		||||
  let targetRegNo = "";
 | 
			
		||||
 | 
			
		||||
@ -4,17 +4,18 @@ import i18n from '@/i18n.js'
 | 
			
		||||
 | 
			
		||||
// Liste des apps
 | 
			
		||||
import LoginPage from '@/Apps/Login.vue'
 | 
			
		||||
import Inscription from "@/Apps/Inscription.vue"
 | 
			
		||||
import Inscription from "@/Apps/Inscription/ManageRequests.vue"
 | 
			
		||||
import Profil from "@/Apps/Profil.vue"
 | 
			
		||||
import Courses from "@/Apps/ManageCourses.vue"
 | 
			
		||||
import Users from "@/Apps/UsersList.vue"
 | 
			
		||||
import Students from "@/Apps/StudentsList.vue"
 | 
			
		||||
import AboutStudent from "@/Apps/AboutStudent.vue";
 | 
			
		||||
import AboutStudent from "@/Apps/Inscription/AboutStudent.vue";
 | 
			
		||||
import Msg from "@/Apps/Msg.vue"
 | 
			
		||||
import ManageRequests from "@/Apps/Inscription/ManageRequests.vue";
 | 
			
		||||
 | 
			
		||||
const apps = {
 | 
			
		||||
		'/login': LoginPage,
 | 
			
		||||
		'/inscription': Inscription,
 | 
			
		||||
		'/requests': ManageRequests,
 | 
			
		||||
		'/profil': Profil,
 | 
			
		||||
		'/manage-courses' : Courses,
 | 
			
		||||
		'/users-list' : Users,
 | 
			
		||||
@ -27,7 +28,7 @@ const appsList = {
 | 
			
		||||
		'Notification': { path: '#/notifs', icon: 'fa-bell', text: i18n("app.notifications") },
 | 
			
		||||
		'Forum': { path: '#/forum', icon: 'fa-envelope', text: i18n("app.forum") },
 | 
			
		||||
		'Schedule': { path: '#/schedule', icon: 'fa-calendar-days', text: i18n("app.schedules") },
 | 
			
		||||
		'Inscription': { path: '#/inscription', icon: 'fa-users', text: i18n("app.inscription.requests") },
 | 
			
		||||
		'Requests': { path: '#/requests', icon: 'fa-users', text: "Requests" },
 | 
			
		||||
		'ManageCourses': { path: '#/manage-courses', icon: 'fa-book', text: i18n("app.manage.courses") },
 | 
			
		||||
		'StudentsList':{ path: '#/students-list',icon: 'fa-users',text: i18n("app.studentList")},
 | 
			
		||||
		'UsersList':{ path: '#/users-list',icon: 'fa-users',text: i18n("app.users")},
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,3 @@ export async function getExternalCurriculumByInscrReq(inscrReqId){
 | 
			
		||||
    return restGet("/externalcurriculum/"+inscrReqId)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function editExternalCurriculum(extReqId, newState){
 | 
			
		||||
    return restPatch("/externalcurriculum/"+extReqId+"/"+newState)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user