Add email verifcation page

This commit is contained in:
Christian Cueni 2020-02-10 10:59:09 +01:00
parent a0eeec4e18
commit b36ba5f9a1
6 changed files with 70 additions and 3 deletions

View File

@ -1,6 +1,7 @@
mutation Registration($input: RegistrationInput!){
mutation Registration($input: RegistrationInput!) {
registration(input: $input) {
success
message
errors {
field
}

View File

View File

@ -0,0 +1,56 @@
<template>
<div class="emailconfirmation public-page">
<h1 class="emailconfirmation__title public-page__title">Überprüfung</h1>
</div>
</template>
<script>
import REGISTRATION_MUTATION from '@/graphql/gql/mutations/registration.gql';
export default {
components: {},
methods: {
},
data() {
return {
loading: true,
keyValid: false
};
},
mounted() {
console.log('register')
this.$apollo.mutate({
mutation: REGISTRATION_MUTATION,
variables: {
input: {
confirmationKeyInput: this.$route.query.confirmation || ''
}
},
fetchPolicy: 'no-cache'
}).then(result => console.log(result))
},
};
</script>
<style scoped lang="scss">
@import "@/styles/_variables.scss";
@import "@/styles/_mixins.scss";
.text-link {
font-family: $sans-serif-font-family;
color: $color-brand;
}
.actions {
&__reset {
display: inline-block;
margin-left: $large-spacing;
}
}
</style>

View File

@ -66,7 +66,7 @@ export default {
this.$router.push({name: redirectRouteName});
})
.catch(() => {
this.registrationError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.';
this.registrationError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmals.';
});
}
});

View File

@ -64,7 +64,7 @@ export default {
})
.catch((error) => {
console.log(error)
this.registrationError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie nochmals.';
this.registrationError = 'Es ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmals.';
});
// this.$apollo.mutate({

View File

@ -33,6 +33,7 @@ import hello from '@/pages/hello'
import registration from '@/pages/registration'
import waitForClass from '@/pages/waitForClass'
import checkEmail from '@/pages/check-email'
import emailVerification from '@/pages/email-verification'
import store from '@/store/index';
@ -164,6 +165,15 @@ const routes = [
layout: 'public'
}
},
{
path: '/verify-email',
component: emailVerification,
name: 'emailVerification',
meta: {
public: true,
layout: 'public'
}
},
{path: '/styleguide', component: styleGuidePage},
{path: '*', component: p404}
];