From eafcf6b26584c062bce75bbc10d24b12cfac187f Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Mon, 22 Apr 2024 13:06:33 +0200 Subject: [PATCH 1/2] Cleaning backend --- .../herisson/Clyde/Tables/Inscription/ExemptionsRequest.java | 2 -- .../herisson/Clyde/Tables/Inscription/ScholarshipRequest.java | 1 - .../herisson/Clyde/Tables/Inscription/UnregisterRequest.java | 1 - 3 files changed, 4 deletions(-) diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java index 8942bb6..78d73b2 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ExemptionsRequest.java @@ -2,8 +2,6 @@ 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; diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java index 842bf90..919fc4e 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/ScholarshipRequest.java @@ -7,7 +7,6 @@ import ovh.herisson.Clyde.Tables.RequestState; import ovh.herisson.Clyde.Tables.User; import java.util.Date; -import java.util.Map; @Entity public class ScholarshipRequest { diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UnregisterRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UnregisterRequest.java index 9127ecb..61bec20 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UnregisterRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Inscription/UnregisterRequest.java @@ -3,7 +3,6 @@ package ovh.herisson.Clyde.Tables.Inscription; import jakarta.persistence.*; import ovh.herisson.Clyde.Tables.Curriculum; import ovh.herisson.Clyde.Tables.RequestState; -import ovh.herisson.Clyde.Tables.User; import java.util.Date; From 2917d645faecca8b768255fe0410d5347cfd3329 Mon Sep 17 00:00:00 2001 From: Wawilski Date: Mon, 22 Apr 2024 13:29:59 +0200 Subject: [PATCH 2/2] post Mock and corrections --- .../java/ovh/herisson/Clyde/EndPoints/MockController.java | 6 +++++- frontend/public/i18n/EN.txt | 1 + frontend/public/i18n/FR.txt | 3 ++- frontend/src/App.vue | 7 +++---- frontend/src/Apps/LessonRequests.vue | 3 ++- frontend/src/Apps/ManageCourses.vue | 8 +++----- frontend/src/Apps/ManageSchedule.vue | 2 ++ frontend/src/rest/restConsumer.js | 3 +++ 8 files changed, 21 insertions(+), 12 deletions(-) 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 b61ff6e..f98a7ee 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -42,6 +42,7 @@ public class MockController { public final LessonRequestService lessonRequestService; ArrayList mockUsers; + public static boolean isMocked = false; public final ResearchesService researchesService; public final UserCurriculumRepository ucr; public final MinervalRepository minervalRepository; @@ -78,7 +79,7 @@ public class MockController { @PostMapping("/mock") public void postMock() { - + if(!isMocked){ // user part User herobrine = new User("brine","hero","admin@admin.com","behind","ShadowsLand",new Date(0), null,Role.Admin,"admin"); User joe = new User("Piplo","Joe","student@student.com","roundabout","England",new Date(0), null,Role.Student,"student"); @@ -230,6 +231,9 @@ public class MockController { externalCurriculum = new ExternalCurriculum(inscriptionRequest, "HEH", "Bachelier en informatique", "Completed", 2015, 2018, null, null); externalCurriculumRepository.save(externalCurriculum); + + isMocked = true; + } } } diff --git a/frontend/public/i18n/EN.txt b/frontend/public/i18n/EN.txt index 6710080..dadb561 100644 --- a/frontend/public/i18n/EN.txt +++ b/frontend/public/i18n/EN.txt @@ -50,6 +50,7 @@ Delete=Delete Modify=Modify Create=Créer requestType=Request Type +lessonType=Course Type day=Day start=Start end=End diff --git a/frontend/public/i18n/FR.txt b/frontend/public/i18n/FR.txt index 547bbe5..f2485cc 100644 --- a/frontend/public/i18n/FR.txt +++ b/frontend/public/i18n/FR.txt @@ -50,6 +50,7 @@ Delete=Supprimer Modify=Modifier Create=Créer requestType=Type de Requête +lessonType=Type de cours day=Jour start=Début end=Fin @@ -287,4 +288,4 @@ cursusprereq=Le cursus que vous avez selectionné a des prérequis assurez vous imposecurriculum=Imposer un cursusgotimposed impose=Imposer gotimposed=Le cursus selectionné a été imposé -DifferentLanguage=Langues différentes \ No newline at end of file +DifferentLanguage=Langues différentes diff --git a/frontend/src/App.vue b/frontend/src/App.vue index c79cfae..9d2312b 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,14 +1,13 @@