From 8ebedec68953c3a55aa17b183bc4d50a8146b0a0 Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Thu, 11 Apr 2024 21:06:57 +0200 Subject: [PATCH] Fix fews things and rename the inscription app to managerequests also sort the files --- .../EndPoints/ApplicationsController.java | 4 ++-- .../Clyde/EndPoints/CurriculumController.java | 4 ++-- .../ExternalCurriculumController.java | 21 ++++++------------- .../InscriptionController.java | 7 +++---- .../{ => Inscription}/MinervalController.java | 7 +++---- .../{ => Inscription}/PaymentController.java | 11 +++------- .../{ => Inscription}/RequestsController.java | 8 ++++--- .../Clyde/EndPoints/LoginController.java | 3 +-- .../Clyde/EndPoints/MockController.java | 11 +++++++++- .../ExemptionsRequestRepository.java | 4 ++-- .../ExternalCurriculumRepository.java | 7 +++---- .../InscriptionRepository.java | 4 ++-- .../{ => Inscription}/MinervalRepository.java | 4 ++-- .../{ => Inscription}/PaymentRepository.java | 4 ++-- .../ScholarshipRequestRepository.java | 4 ++-- .../Clyde/Services/AuthenticatorService.java | 3 +++ .../{ => Inscription}/InscriptionService.java | 6 +++++- .../Clyde/Services/ProtectionService.java | 2 +- .../Clyde/Services/UserCurriculumService.java | 2 +- .../herisson/Clyde/Tables/Applications.java | 2 +- .../{ => Inscription}/ExemptionsRequest.java | 5 ++++- .../{ => Inscription}/ExternalCurriculum.java | 16 ++------------ .../{ => Inscription}/InscriptionRequest.java | 4 +++- .../Tables/{ => Inscription}/Minerval.java | 2 +- .../Tables/{ => Inscription}/Payment.java | 2 +- .../ReInscriptionRequest.java | 5 ++++- .../{ => Inscription}/ScholarshipRequest.java | 4 +++- .../UninscriptionRequest.java | 3 ++- .../Apps/{ => Inscription}/AboutRequest.vue | 12 +++++------ .../Apps/{ => Inscription}/AboutStudent.vue | 2 +- .../src/Apps/{ => Inscription}/CourseList.vue | 0 .../ExternalCurriculumList.vue | 15 ------------- .../ManageRequests.vue} | 12 +---------- frontend/src/Apps/Profil.vue | 2 +- frontend/src/Apps/StudentsList.vue | 2 +- frontend/src/rest/apps.js | 9 ++++---- frontend/src/rest/externalCurriculum.js | 3 --- 37 files changed, 94 insertions(+), 122 deletions(-) rename backend/src/main/java/ovh/herisson/Clyde/EndPoints/{ => Inscription}/ExternalCurriculumController.java (70%) rename backend/src/main/java/ovh/herisson/Clyde/EndPoints/{ => Inscription}/InscriptionController.java (95%) rename backend/src/main/java/ovh/herisson/Clyde/EndPoints/{ => Inscription}/MinervalController.java (92%) rename backend/src/main/java/ovh/herisson/Clyde/EndPoints/{ => Inscription}/PaymentController.java (75%) rename backend/src/main/java/ovh/herisson/Clyde/EndPoints/{ => Inscription}/RequestsController.java (91%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/ExemptionsRequestRepository.java (57%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/ExternalCurriculumRepository.java (65%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/InscriptionRepository.java (62%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/MinervalRepository.java (73%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/PaymentRepository.java (68%) rename backend/src/main/java/ovh/herisson/Clyde/Repositories/{ => Inscription}/ScholarshipRequestRepository.java (57%) rename backend/src/main/java/ovh/herisson/Clyde/Services/{ => Inscription}/InscriptionService.java (91%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/ExemptionsRequest.java (90%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/ExternalCurriculum.java (86%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/InscriptionRequest.java (97%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/Minerval.java (96%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/Payment.java (97%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/ReInscriptionRequest.java (91%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/ScholarshipRequest.java (93%) rename backend/src/main/java/ovh/herisson/Clyde/Tables/{ => Inscription}/UninscriptionRequest.java (86%) rename frontend/src/Apps/{ => Inscription}/AboutRequest.vue (83%) rename frontend/src/Apps/{ => Inscription}/AboutStudent.vue (98%) rename frontend/src/Apps/{ => Inscription}/CourseList.vue (100%) rename frontend/src/Apps/{ => Inscription}/ExternalCurriculumList.vue (84%) rename frontend/src/Apps/{Inscription.vue => Inscription/ManageRequests.vue} (95%) diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java index 8d1f1ca..d4fdaa0 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ApplicationsController.java @@ -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)){ diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/CurriculumController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/CurriculumController.java index c9e78de..efe34e6 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/CurriculumController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/CurriculumController.java @@ -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.*; diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ExternalCurriculumController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/ExternalCurriculumController.java similarity index 70% rename from backend/src/main/java/ovh/herisson/Clyde/EndPoints/ExternalCurriculumController.java rename to backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/ExternalCurriculumController.java index 43daeb9..1067071 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/ExternalCurriculumController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/ExternalCurriculumController.java @@ -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 postExternalCurriculum(@RequestBody Map 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 toReturn = ecr.getExternalCurriculumByInscriptionRequest(ir); return new ResponseEntity<>(toReturn, HttpStatus.OK); } - - @PatchMapping("/externalcurriculum/{extcurrid}/{newstate}") - public ResponseEntity changeExternalCurrState(@PathVariable long extcurrid, @PathVariable RequestState newstate){ - ExternalCurriculum externalCurriculum = ecr.getExternalCurriculumById(extcurrid); - externalCurriculum.setState(newstate); - ecr.save(externalCurriculum); - return new ResponseEntity<>(HttpStatus.OK); - } } diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/InscriptionController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/InscriptionController.java similarity index 95% rename from backend/src/main/java/ovh/herisson/Clyde/EndPoints/InscriptionController.java rename to backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/InscriptionController.java index 9f47263..60f4585 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/InscriptionController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/InscriptionController.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MinervalController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/MinervalController.java similarity index 92% rename from backend/src/main/java/ovh/herisson/Clyde/EndPoints/MinervalController.java rename to backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/MinervalController.java index 27efc58..737f472 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MinervalController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/MinervalController.java @@ -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.*; diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/PaymentController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/PaymentController.java similarity index 75% rename from backend/src/main/java/ovh/herisson/Clyde/EndPoints/PaymentController.java rename to backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/PaymentController.java index b2bf755..b70ad59 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/PaymentController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/PaymentController.java @@ -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") diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/RequestsController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/RequestsController.java similarity index 91% rename from backend/src/main/java/ovh/herisson/Clyde/EndPoints/RequestsController.java rename to backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/RequestsController.java index 0d39bf7..e67f8ff 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/RequestsController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/Inscription/RequestsController.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/LoginController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/LoginController.java index 0b1d7c5..7ab988d 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/LoginController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/LoginController.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java index 0a80647..1e207e0 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -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); } } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ExemptionsRequestRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExemptionsRequestRepository.java similarity index 57% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/ExemptionsRequestRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExemptionsRequestRepository.java index 917af1e..3f66e80 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ExemptionsRequestRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExemptionsRequestRepository.java @@ -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 { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ExternalCurriculumRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExternalCurriculumRepository.java similarity index 65% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/ExternalCurriculumRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExternalCurriculumRepository.java index 6c39473..41ef507 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ExternalCurriculumRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ExternalCurriculumRepository.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/InscriptionRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/InscriptionRepository.java similarity index 62% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/InscriptionRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/InscriptionRepository.java index 0d83e6b..6564377 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/InscriptionRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/InscriptionRepository.java @@ -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 { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/MinervalRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/MinervalRepository.java similarity index 73% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/MinervalRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/MinervalRepository.java index 5af1cab..475ac3c 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/MinervalRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/MinervalRepository.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/PaymentRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/PaymentRepository.java similarity index 68% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/PaymentRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/PaymentRepository.java index 2e196f4..c479a4e 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/PaymentRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/PaymentRepository.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ScholarshipRequestRepository.java b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ScholarshipRequestRepository.java similarity index 57% rename from backend/src/main/java/ovh/herisson/Clyde/Repositories/ScholarshipRequestRepository.java rename to backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ScholarshipRequestRepository.java index 4404a11..5550937 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Repositories/ScholarshipRequestRepository.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Repositories/Inscription/ScholarshipRequestRepository.java @@ -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 { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java index 25c127f..9e517b7 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/AuthenticatorService.java @@ -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 diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/InscriptionService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java similarity index 91% rename from backend/src/main/java/ovh/herisson/Clyde/Services/InscriptionService.java rename to backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java index a645098..e897c7a 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/InscriptionService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/Inscription/InscriptionService.java @@ -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 { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java index 4a36b70..1c9b944 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/UserCurriculumService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/UserCurriculumService.java index 544307b..8b446df 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/UserCurriculumService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/UserCurriculumService.java @@ -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.*; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java index 3dadcec..5c39891 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Applications.java @@ -18,6 +18,6 @@ public enum Applications { UsersList, // InscriptionService authorization - Inscription, + Requests, StudentsList } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ExemptionsRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java similarity index 90% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/ExemptionsRequest.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java index c38e559..75ee926 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ExemptionsRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ExternalCurriculum.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExternalCurriculum.java similarity index 86% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/ExternalCurriculum.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExternalCurriculum.java index 534a108..09d59bb 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ExternalCurriculum.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExternalCurriculum.java @@ -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; - } } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/InscriptionRequest.java similarity index 97% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/InscriptionRequest.java index 35576c7..07c720f 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/InscriptionRequest.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Minerval.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Minerval.java similarity index 96% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/Minerval.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Minerval.java index b54e5db..dac5799 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Minerval.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Minerval.java @@ -1,4 +1,4 @@ -package ovh.herisson.Clyde.Tables; +package ovh.herisson.Clyde.Tables.Inscription; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Payment.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Payment.java similarity index 97% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/Payment.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Payment.java index ae4189e..48626e1 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Payment.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/Payment.java @@ -1,4 +1,4 @@ -package ovh.herisson.Clyde.Tables; +package ovh.herisson.Clyde.Tables.Inscription; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ReInscriptionRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ReInscriptionRequest.java similarity index 91% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/ReInscriptionRequest.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ReInscriptionRequest.java index b96ed42..cafffe6 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ReInscriptionRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ReInscriptionRequest.java @@ -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 { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScholarshipRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java similarity index 93% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/ScholarshipRequest.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java index 3de71ba..18ebee6 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/ScholarshipRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java @@ -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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/UninscriptionRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UninscriptionRequest.java similarity index 86% rename from backend/src/main/java/ovh/herisson/Clyde/Tables/UninscriptionRequest.java rename to backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UninscriptionRequest.java index d2cbf73..2264b67 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/UninscriptionRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UninscriptionRequest.java @@ -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 { diff --git a/frontend/src/Apps/AboutRequest.vue b/frontend/src/Apps/Inscription/AboutRequest.vue similarity index 83% rename from frontend/src/Apps/AboutRequest.vue rename to frontend/src/Apps/Inscription/AboutRequest.vue index 9ef8e57..15c72f5 100644 --- a/frontend/src/Apps/AboutRequest.vue +++ b/frontend/src/Apps/Inscription/AboutRequest.vue @@ -1,12 +1,12 @@