diff --git a/client/src/apis/users/users.ts b/client/src/apis/users/users.ts index 839f24fb8..1fbdf1812 100644 --- a/client/src/apis/users/users.ts +++ b/client/src/apis/users/users.ts @@ -23,11 +23,11 @@ class Users { } } - public async getUserByID(id: number) { - // Request to get user based on his user id. + public async getUserByID(id: number): Promise { + // Request to get user based on his user id. try { return await ( - await http.get(`/users?id=${id}`) + await http.get(`/users/${id}`) ).data.results; } catch (error) { throw new Error(error.response.data.message); @@ -125,7 +125,7 @@ class Users { } } - async updateProfile(registerData: registeringData) { + async updateProfile(registerData: UserInterface) { // Update user profile try { return await ( diff --git a/client/src/componants/dashboard/GreatAndHint.svelte b/client/src/componants/dashboard/GreatAndHint.svelte index bdfead3fc..6f6e06da2 100644 --- a/client/src/componants/dashboard/GreatAndHint.svelte +++ b/client/src/componants/dashboard/GreatAndHint.svelte @@ -6,9 +6,9 @@ -Hello +Hey - {$UserStore.full_name}!, + {$UserStore.full_name.length > 2 ? $UserStore.full_name : 'There'}!, {header} diff --git a/client/src/componants/dashboard/Tabs.svelte b/client/src/componants/dashboard/Tabs.svelte index 94b691ae7..e2951f1da 100644 --- a/client/src/componants/dashboard/Tabs.svelte +++ b/client/src/componants/dashboard/Tabs.svelte @@ -7,6 +7,7 @@ import VacationBalance from "../vacations/VacationBalance.svelte" import UserVacationBalance from "../vacations/UserVacationBalance.svelte" import GreatAndHint from "./GreatAndHint.svelte" + import UpdateProfile from '../settings/UpdateProfile.svelte'; let date: Date = new Date(); @@ -38,7 +39,7 @@ aria-selected="false" >Update User Vacation Balance - Evaluation Form - --> + + Add new user + + Update user profile +
@@ -115,13 +127,13 @@ >
-
- -
--> + +
+
+
+ + +
+
diff --git a/client/src/componants/settings/ChangePassword.svelte b/client/src/componants/settings/ChangePassword.svelte index 83b34826d..8e0096d92 100644 --- a/client/src/componants/settings/ChangePassword.svelte +++ b/client/src/componants/settings/ChangePassword.svelte @@ -22,7 +22,7 @@
-
+
-
+
- +