diff --git a/gymboard-app/src/api/main/auth.ts b/gymboard-app/src/api/main/auth.ts index 713542f..1e7ff48 100644 --- a/gymboard-app/src/api/main/auth.ts +++ b/gymboard-app/src/api/main/auth.ts @@ -127,10 +127,20 @@ class AuthModule { return response.data; } + public async updateMyPersonalDetails(authStore: AuthStoreType, newPersonalDetails: UserPersonalDetails): Promise { + const response = await api.post('/auth/me/personal-details', newPersonalDetails, authStore.axiosConfig); + return response.data; + } + public async getMyPreferences(authStore: AuthStoreType): Promise { const response = await api.get('/auth/me/preferences', authStore.axiosConfig); return response.data; } + + public async updateMyPreferences(authStore: AuthStoreType, newPreferences: UserPreferences): Promise { + const response = await api.post('/auth/me/preferences', newPreferences, authStore.axiosConfig); + return response.data; + } } export default AuthModule; diff --git a/gymboard-app/src/components/EditablePropertyRow.vue b/gymboard-app/src/components/EditablePropertyRow.vue new file mode 100644 index 0000000..4d3ea99 --- /dev/null +++ b/gymboard-app/src/components/EditablePropertyRow.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/gymboard-app/src/i18n/en-US/index.ts b/gymboard-app/src/i18n/en-US/index.ts index 9edaf94..8e9b72b 100644 --- a/gymboard-app/src/i18n/en-US/index.ts +++ b/gymboard-app/src/i18n/en-US/index.ts @@ -47,7 +47,15 @@ export default { } }, userSettingsPage: { - title: 'Account Settings' + title: 'Account Settings', + personalDetails: { + birthDate: 'Date of Birth' + }, + preferences: { + accountPrivate: 'Private Account' + }, + save: 'Save', + undo: 'Undo' }, accountMenuItem: { logIn: 'Login', diff --git a/gymboard-app/src/pages/auth/UserSettingsPage.vue b/gymboard-app/src/pages/auth/UserSettingsPage.vue index 863afed..eed636b 100644 --- a/gymboard-app/src/pages/auth/UserSettingsPage.vue +++ b/gymboard-app/src/pages/auth/UserSettingsPage.vue @@ -3,33 +3,105 @@

{{ $t('userSettingsPage.title') }}


- - - +
+

Personal Information

+ + +
+ + +
+ +
+ +
+

Preferences

+ + + +
+ + +
+
+
\ No newline at end of file + +