From f52cb3118902c9d5c77d5f9327d45c876f1dbfa1 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Wed, 13 Mar 2024 09:54:56 +0100 Subject: [PATCH 1/3] Adding info about self (#88) Reviewed-on: https://git.herisson.ovh/PGL/Clyde/pulls/88 Reviewed-by: Wal Reviewed-by: Maxime <231026@umons.ac.be> Reviewed-by: LeoMoulin Co-authored-by: Anthony Debucquoy Co-committed-by: Anthony Debucquoy --- frontend/src/rest/Users.js | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/frontend/src/rest/Users.js b/frontend/src/rest/Users.js index cca662d..f15dac5 100644 --- a/frontend/src/rest/Users.js +++ b/frontend/src/rest/Users.js @@ -18,6 +18,25 @@ export async function getUser(id){ return restGet(endpoint); } +/** + * Alterable datas of user. + * usage by secretary + * + * @param id regno of the user + * @param data data to change + * + * - lastName + * - firstName + * - birthDate + * - role + * - email + * - photo + * - Adress + */ +export async function alterUser(id, data){ + return restPatch("/user/" + id, data); +} + /** * Reserved for secretary roles. Allow to list all user on the plateform */ @@ -25,3 +44,27 @@ export async function getAllUsers(){ return restGet("/users"); } + +/** + * Get informations about yourself + * - RegNo + * - FirstName / LastName + * - email + * - adressId (?) + * - birthDate + * - role + */ +export async function getSelf(){ + return restGet("/user"); +} + +/** + * Alterable datas are + * - email + * - photo + * - Adress + * - Password + */ +export async function alterSelf(data){ + return restPatch("/user", data); +} From 58a4c87661d0ad394fa250d6e4b2986720a3cd29 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Wed, 13 Mar 2024 14:39:34 +0100 Subject: [PATCH 2/3] Removing test gradle --- frontend/build.gradle.kts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/frontend/build.gradle.kts b/frontend/build.gradle.kts index 0d3dcd1..0726d4b 100644 --- a/frontend/build.gradle.kts +++ b/frontend/build.gradle.kts @@ -18,8 +18,3 @@ var dev = tasks.register("dev") { tasks.register("run") { dependsOn(dev) } - -tasks.register("test") { - dependsOn(tasks.npmInstall) - args.set(listOf("run", "test:unit")) -} From 62f64eed602f523630c183d6e575a92847514ed4 Mon Sep 17 00:00:00 2001 From: Bartha Maxime <231026@umons.ac.be> Date: Wed, 13 Mar 2024 15:36:13 +0100 Subject: [PATCH 3/3] HUUUUGE CHANGE --- backend/src/main/java/ovh/herisson/Clyde/Tables/Role.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/java/ovh/herisson/Clyde/Tables/Role.java b/backend/src/main/java/ovh/herisson/Clyde/Tables/Role.java index bb14f3f..4e4469b 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Tables/Role.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Tables/Role.java @@ -4,5 +4,6 @@ public enum Role { Teacher, Student, Admin, + InscriptionService, Secretary; }