Refactor ResetPassword, next step

This commit is contained in:
Wolfgang Huß 2022-05-02 10:29:19 +02:00
parent a6ec784596
commit acd4fbee40

View File

@ -48,10 +48,10 @@
</div>
<div v-else>
<message
:headline="$t('site.thx.errorTitle')"
:subtitle="errorMessage"
:buttonText="$t('settings.password.reset')"
linkTo="/forgot-password/resetPassword"
:headline="messageHeadline"
:subtitle="messageSubtitle"
:buttonText="messageButtonText"
:linkTo="messageButtonLinktTo"
/>
</div>
</div>
@ -96,7 +96,10 @@ export default {
},
displaySetup: {},
showPageMessage: false,
errorMessage: '',
messageHeadline: null,
messageSubtitle: null,
messageButtonText: null,
messageButtonLinktTo: null,
}
},
methods: {
@ -113,11 +116,14 @@ export default {
this.form.password = ''
if (this.$route.path.includes('checkEmail')) {
if (this.$route.params.code) {
// Wolle: refactor
this.$router.push('/thx/checkEmail/' + this.$route.params.code)
} else {
// Wolle: refactor
this.$router.push('/thx/checkEmail')
}
} else {
// Wolle: refactor
this.$router.push('/thx/resetPassword')
}
})
@ -135,8 +141,11 @@ export default {
errorMessage = error.message
}
this.showPageMessage = true
this.messageHeadline = this.$t('site.thx.errorTitle')
this.messageSubtitle = errorMessage
this.messageButtonText = this.$t('settings.password.reset')
this.messageButtonLinktTo = '/forgot-password/resetPassword'
this.toastError(errorMessage)
this.errorSubtitle = errorMessage
})
},
checkOptInCode() {