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 af837bf..611ad82 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/MockController.java @@ -49,7 +49,7 @@ public class MockController { User herobrine = new User("brine","hero","admin@admin.com","in your WalLs","ShadowsLand",new Date(0), null,Role.Admin,passwordEncoder.encode("admin")); User joe = new User("Mama","Joe","student@student.com","roundabout","DaWarudo",new Date(0), null,Role.Student,passwordEncoder.encode("student")); - User meh = new User("Inspiration","lackOf","secretary@secretary.com","a Box","the street",new Date(0), null,Role.Teacher,passwordEncoder.encode("secretary")); + User meh = new User("Inspiration","lackOf","secretary@secretary.com","a Box","the street",new Date(0), null,Role.Secretary,passwordEncoder.encode("secretary")); User joke = new User("CthemBalls","Lemme","teacher@teacher.com","lab","faculty",new Date(0), null,Role.Teacher,passwordEncoder.encode("teacher")); mockUsers = new ArrayList<>(Arrays.asList(herobrine,joe,meh,joke)); diff --git a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java index d936b47..0fc894c 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java +++ b/backend/src/main/java/ovh/herisson/Clyde/EndPoints/UserController.java @@ -86,6 +86,7 @@ public class UserController { toReturn.put("country",user.getCountry()); toReturn.put("address",user.getAddress()); toReturn.put("role",user.getRole()); + toReturn.put("email",user.getEmail()); return toReturn; } diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 51ca585..42f1b38 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -119,7 +119,10 @@
+ + +
diff --git a/frontend/src/Apps/Profil.vue b/frontend/src/Apps/Profil.vue index 6857cc8..1a9ce93 100644 --- a/frontend/src/Apps/Profil.vue +++ b/frontend/src/Apps/Profil.vue @@ -3,7 +3,8 @@ import {getSelf} from '../rest/Users.js' import i18n from "@/i18n.js" import { uploadProfilePicture } from '@/rest/uploads.js' - const user = getSelf(); + const user = await getSelf(); + console.log(user) console.log(user.role) console.log("test") /* @@ -62,17 +63,16 @@ function getPP(){
E-mail: {{user.email}}
-
- {{user.option}} {{i18n(user.role)}} +
+ {{user.option}} {{i18n(user.role.toLowerCase())}}
- {{i18n("faculty")}}: {{user.faculty}} - Role: {{i18n(user.role)}} + Role: {{i18n((user.role).toLowerCase())}}
-
+
@@ -108,7 +108,7 @@ function getPP(){
-
+
{{i18n("profile.course.list")}}