From 94f12f0a8605c31b9cb8c6d63c8dae5ccf6e1e8b Mon Sep 17 00:00:00 2001 From: LeoMoulin Date: Wed, 27 Mar 2024 16:04:55 +0100 Subject: [PATCH] Add the date and identitycard feature to inscriptionRequest --- .../Clyde/EndPoints/MockController.java | 3 +- .../Clyde/Services/ProtectionService.java | 3 +- .../Clyde/Tables/InscriptionRequest.java | 24 ++++++++++++++-- frontend/src/Apps/Inscription.vue | 28 +++++++++++-------- frontend/src/Apps/Login.vue | 13 ++++++--- 5 files changed, 51 insertions(+), 20 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 76414ed..df79ede 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -101,10 +101,9 @@ public class MockController { CurriculumCourseService.save(new CurriculumCourse(chemistryBab1,chemistry1)); - InscriptionRequest inscriptionRequest = new InscriptionRequest("helen","prenom","non","helen@gmail.com","america",new Date(),(long) 1,RequestState.Pending,"yes.png","password"); + InscriptionRequest inscriptionRequest = new InscriptionRequest("helen","prenom","non","helen@gmail.com","america",new Date(),(long) 1,RequestState.Pending,"yes.png","password", null, new Date()); inscriptionService.save(inscriptionRequest); - } } 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 44e53a7..43b6ce9 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/ProtectionService.java @@ -87,7 +87,8 @@ public class ProtectionService { toReturn.put("curriculum", inscriptionRequest.getCurriculumId()); toReturn.put("state", inscriptionRequest.getState()); toReturn.put("profilePictureUrl", inscriptionRequest.getProfilePicture()); - + toReturn.put("identityCard", inscriptionRequest.getIdentityCard()); + toReturn.put("submissionDate", inscriptionRequest.getSubmissionDate()); return toReturn; } diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java index 18e20d0..b01644e 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/InscriptionRequest.java @@ -19,10 +19,12 @@ public class InscriptionRequest { private Long curriculumId; private RequestState state; private String profilePicture; - private String password; + private String identityCard; + private Date submissionDate; public InscriptionRequest(){} - public InscriptionRequest(String lastName, String firstName, String address, String email, String country, Date birthDate,Long curriculumId, RequestState state, String profilePicture, String password){ + + public InscriptionRequest(String lastName, String firstName, String address, String email, String country, Date birthDate,Long curriculumId, RequestState state, String profilePicture, String password, String identityCard, Date submissionDate){ this.lastName = lastName; this.firstName = firstName; this.address = address; @@ -33,6 +35,8 @@ public class InscriptionRequest { this.state = state; this.profilePicture = profilePicture; this.password = password; + this.identityCard = identityCard; + this.submissionDate = submissionDate; } public int getId() { @@ -118,4 +122,20 @@ public class InscriptionRequest { public void setPassword(String password) { this.password = password; } + + public String getIdentityCard() { + return identityCard; + } + + public void setIdentityCard(String identityCard) { + this.identityCard = identityCard; + } + + public Date getSubmissionDate() { + return submissionDate; + } + + public void setSubmissionDate(Date submissionDate) { + this.submissionDate = submissionDate; + } } diff --git a/frontend/src/Apps/Inscription.vue b/frontend/src/Apps/Inscription.vue index b5a5333..6f79966 100644 --- a/frontend/src/Apps/Inscription.vue +++ b/frontend/src/Apps/Inscription.vue @@ -26,14 +26,15 @@
-
+
- - - +
{{item.submissionDate.slice(0, 10)}}
+
{{item.state}}
+
{{item.lastName}}
+
{{item.firstName}}
+
+
-
-
@@ -51,11 +52,10 @@ height:100px; font-size:20px; display:grid; - grid-template-columns:[firstCol-start]100px[firstCol-end secondCol-start]150px[secondCol-end thirdCol-start]200px[thirdCol-end fourthCol-start]150px[fourthCol-end]150px[fifthCol-end]150px[sixthCol-end]150px[endCol]; + grid-template-columns:[firstCol-start]150px[firstCol-end secondCol-start]200px[secondCol-end thirdCol-start]200px[thirdCol-end fourthCol-start]150px[fourthCol-end]150px[fifthCol-end]150px[sixthCol-end]150px[endCol]; grid-template-areas: - "id type surname firstname infos accept refuse"; + "date state surname firstname accept refuse infos"; column-gap:10px; - } .infos { @@ -77,8 +77,14 @@ grid-area:titles; background-color:rgb(215,215,215); } - .id{ - grid-area:id; + .date{ + grid-area:date; + margin-left:40px; + align-self:center; + } + + .state{ + grid-area:state; margin-left:40px; align-self:center; } diff --git a/frontend/src/Apps/Login.vue b/frontend/src/Apps/Login.vue index b43b152..cf68d13 100644 --- a/frontend/src/Apps/Login.vue +++ b/frontend/src/Apps/Login.vue @@ -115,7 +115,7 @@ {{i18n("login.guest.alregister")}}
-
+

{{i18n("login.guest.email")}}

@@ -136,12 +136,11 @@

{{i18n("Curriculum").toUpperCase()}}

-
@@ -151,6 +150,12 @@ {{i18n("login.guest.alregister")}}
+
+
+ Carte d'identité : + +
+