summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/AccountModule.vue
diff options
context:
space:
mode:
authorJannik Schönartz2019-02-26 10:00:29 +0100
committerJannik Schönartz2019-02-26 10:00:29 +0100
commitf4d4c1ee3725bbae32199fba99106fbd4d39d31b (patch)
treeda8b2db3afc36500afd7be327cb396916f487eb4 /webapp/src/components/AccountModule.vue
parent[permissionmanager] Fix security bug: Code was executed weather the user had ... (diff)
downloadbas-f4d4c1ee3725bbae32199fba99106fbd4d39d31b.tar.gz
bas-f4d4c1ee3725bbae32199fba99106fbd4d39d31b.tar.xz
bas-f4d4c1ee3725bbae32199fba99106fbd4d39d31b.zip
[webapp/dashboard] User data now stores in the global storage & [usermanagement] fix 'username already exist' error not workling properly
Diffstat (limited to 'webapp/src/components/AccountModule.vue')
-rw-r--r--webapp/src/components/AccountModule.vue17
1 files changed, 3 insertions, 14 deletions
diff --git a/webapp/src/components/AccountModule.vue b/webapp/src/components/AccountModule.vue
index f24da2c..11395cb 100644
--- a/webapp/src/components/AccountModule.vue
+++ b/webapp/src/components/AccountModule.vue
@@ -251,7 +251,7 @@
</template>
<script>
-import { mapGetters, mapMutations } from 'vuex'
+import { mapGetters } from 'vuex'
export default {
name: 'AccountPage',
data () {
@@ -259,7 +259,6 @@ export default {
tab: 0,
dialog: false,
valid: true,
- user: '',
editInfoMode: false,
infoName: '',
infoEmail: '',
@@ -287,10 +286,9 @@ export default {
}
},
computed: {
- ...mapGetters(['tabsDark', 'tabsColor', 'tabsSliderColor'])
+ ...mapGetters(['tabsDark', 'tabsColor', 'tabsSliderColor', 'user'])
},
methods: {
- ...mapMutations(['setUserFullName']),
deleteAccount () {
this.dialog = false
this.$http.delete('/api/users/current').then(response => {
@@ -309,7 +307,7 @@ export default {
// Axios request to submit info (username, name, email)
this.$http.post('/api/users/current', { name: this.infoName, email: this.infoEmail }).then(response => {
this.editInfoMode = false
- this.getUserData()
+ this.$store.dispatch('loadUser')
this.$snackbar({ color: 'success', text: this.$t('userInfoChanged') })
})
},
@@ -345,19 +343,10 @@ export default {
this.passwordNew = ''
this.passwordConfirm = ''
},
- getUserData () {
- this.$http('/api/users/current').then(response => {
- this.user = response.data
- this.setUserFullName(this.user.name)
- })
- },
newAlert () {
this.$alert({ type: 'success', text: 'aaaaaaaaaaaaaaaaaaaaaaaaaas das dsad asdpioipoidijoijoawiojdiojijowaijo d o wiadijo oiawio jdi aaaaaaaaaaaaaaaaaaaaaa uo iashdoiuas dhuas hduioash diuash diuash diuash diuh test ' + this.testId })
this.testId++
}
- },
- created () {
- this.getUserData()
}
}
</script>