mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Storing email in the store in case email not validated and no password set now. Taking email from store on forgotpassword.
This commit is contained in:
parent
0ca8e702d7
commit
8b60ba623a
@ -19,7 +19,7 @@
|
||||
<b-card-body class="p-4">
|
||||
<validation-observer ref="observer" v-slot="{ handleSubmit }">
|
||||
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
|
||||
<input-email v-model="form.email"></input-email>
|
||||
<input-email v-model="form.email" :defaultValue="defaultEmail"></input-email>
|
||||
<div class="text-center">
|
||||
<b-button type="submit" variant="primary">
|
||||
{{ $t(displaySetup.button) }}
|
||||
@ -68,6 +68,7 @@ export default {
|
||||
email: '',
|
||||
},
|
||||
displaySetup: {},
|
||||
defaultEmail: this.$store.state.email,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -107,8 +107,10 @@ export default {
|
||||
.catch((error) => {
|
||||
this.$toasted.global.error(this.$t('error.no-account'))
|
||||
if (error.message.includes('User email not validated')) {
|
||||
this.$store.commit('email', this.form.email)
|
||||
this.$router.push('/thx/login')
|
||||
} else if (error.message.includes('User has no password set yet')) {
|
||||
this.$store.commit('email', this.form.email)
|
||||
this.$router.push('/reset/login')
|
||||
}
|
||||
loader.hide()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user