mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
profil: review changes incorporated from Moritz
This commit is contained in:
parent
75df0ad4ea
commit
2250fea339
@ -99,26 +99,6 @@ const loginAPI = {
|
||||
return apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload)
|
||||
},
|
||||
|
||||
// `POST http://localhost/login_api/getUserInfos`
|
||||
//
|
||||
// with:
|
||||
//
|
||||
// ```json
|
||||
// {
|
||||
// "session_id": -127182,
|
||||
// "email": "max.musterman@gmail.de",
|
||||
// "ask": [
|
||||
// "EmailVerificationCode.Register",
|
||||
// "loginServer.path",
|
||||
// "user.pubkeyhex",
|
||||
// "user.first_name",
|
||||
// "user.last_name",
|
||||
// "user.disabled",
|
||||
// "user.email_checked",
|
||||
// "user.language"
|
||||
// ]
|
||||
// }
|
||||
|
||||
changePassword: async (sessionId, email, password) => {
|
||||
const payload = {
|
||||
session_id: sessionId,
|
||||
@ -129,7 +109,7 @@ const loginAPI = {
|
||||
}
|
||||
return apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload)
|
||||
},
|
||||
changePasswordProfil: async (sessionId, email, password, passwordNew) => {
|
||||
changePasswordProfile: async (sessionId, email, password, passwordNew) => {
|
||||
const payload = {
|
||||
session_id: sessionId,
|
||||
email,
|
||||
@ -140,7 +120,7 @@ const loginAPI = {
|
||||
}
|
||||
return apiPost(CONFIG.LOGIN_API_URL + 'updateUserInfos', payload)
|
||||
},
|
||||
changeUsernameProfil: async (sessionId, email, usernameNew) => {
|
||||
changeUsernameProfile: async (sessionId, email, usernameNew) => {
|
||||
const payload = {
|
||||
session_id: sessionId,
|
||||
email,
|
||||
|
||||
@ -105,9 +105,6 @@
|
||||
"add_work":"neuer Gemeinschaftsbeitrag"
|
||||
},
|
||||
"profil": {
|
||||
"edit": {
|
||||
|
||||
},
|
||||
"activity": {
|
||||
"chart":"Gemeinschaftsstunden Chart",
|
||||
"new":"Neue Gemeinschaftsstunden eintragen",
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
{{ userdata.first_name }}
|
||||
</b-col>
|
||||
<b-col v-else class="col-md-9 col-sm-10">
|
||||
<b-input type="text" v-model="form.first_name"></b-input>
|
||||
<b-input type="text" v-model="form.firstName"></b-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="mb-3">
|
||||
@ -39,7 +39,7 @@
|
||||
{{ userdata.last_name }}
|
||||
</b-col>
|
||||
<b-col v-else class="col-md-9 col-sm-10">
|
||||
<b-input type="text" v-model="form.last_name"></b-input>
|
||||
<b-input type="text" v-model="form.lastName"></b-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
<b-row class="mb-3">
|
||||
@ -67,11 +67,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
edit_userdata: true,
|
||||
sessionId: null,
|
||||
sessionId: this.$store.state.sessionId,
|
||||
email: null,
|
||||
form: {
|
||||
first_name: this.userdata.first_name,
|
||||
last_name: this.userdata.last_name,
|
||||
firstName: this.userdata.first_name,
|
||||
lastName: this.userdata.last_name,
|
||||
desc: this.UserProfileTestData.desc,
|
||||
},
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</b-col>
|
||||
<b-col v-if="edit_email" class="col-md-9 col-sm-10">{{ $store.state.email }}</b-col>
|
||||
<b-col v-else class="col-md-9 col-sm-10">
|
||||
<b-input type="text" v-model="$store.state.email"></b-input>
|
||||
<b-input type="text" v-model="newEmail"></b-input>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
@ -39,16 +39,16 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
edit_email: true,
|
||||
newEmail: '',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
// console.log(this.data)
|
||||
const result = await loginAPI.changeEmailProfil(
|
||||
this.sessionId,
|
||||
this.$store.state.sessionId,
|
||||
this.email,
|
||||
this.password,
|
||||
this.passwordNew,
|
||||
this.newEmail,
|
||||
)
|
||||
if (result.success) {
|
||||
alert('changePassword success')
|
||||
|
||||
@ -68,7 +68,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
edit_pwd: true,
|
||||
sessionId: null,
|
||||
email: null,
|
||||
password: '',
|
||||
passwordNew: '',
|
||||
@ -78,8 +77,8 @@ export default {
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
// console.log(this.data)
|
||||
const result = await loginAPI.changePasswordProfil(
|
||||
this.sessionId,
|
||||
const result = await loginAPI.changePasswordProfile(
|
||||
this.$store.state.sessionId,
|
||||
this.email,
|
||||
this.password,
|
||||
this.passwordNew,
|
||||
|
||||
@ -54,7 +54,7 @@ export default {
|
||||
methods: {
|
||||
async onSubmit() {
|
||||
// console.log(this.data)
|
||||
const result = await loginAPI.changeUsernameProfil(this.username)
|
||||
const result = await loginAPI.changeUsernameProfile(this.username)
|
||||
if (result.success) {
|
||||
alert('changeUsername success')
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user