Clean up code
This commit is contained in:
parent
685fa3ff34
commit
47129e81a6
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="check-email">
|
<div class="check-email">
|
||||||
<main class="check-email__content content" data-cy="email-check">
|
<main class="check-email__content content" data-cy="email-check">
|
||||||
<p class="content__instructions">Ein Email ist auf dem Weg, bitte überprüfen sie ihre E-mail Konto.</p>
|
<p class="content__instructions">Eine Email ist auf dem Weg, bitte überprüfen sie ihre E-mail Konto.</p>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
switch (data.registration.message) {
|
switch (data.registration.message) {
|
||||||
case 'invalid_key':
|
case 'invalid_key':
|
||||||
this.errorMessage = 'Der angegebene Verifizierungscode ist falsch oder abgelaufen.';
|
this.errorMessage = 'Der angegebene Verifizierungscode ist ungültig oder abgelaufen.';
|
||||||
break;
|
break;
|
||||||
case 'no_valid_license':
|
case 'no_valid_license':
|
||||||
this.$router.push({name: 'licenseActivation'});
|
this.$router.push({name: 'licenseActivation'});
|
||||||
|
|
@ -65,7 +65,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(() => this.errorMessage = 'Ein Fehler ist aufgetreten. Bitte kontaktieren Sie den Administrator.');
|
.catch(() => {
|
||||||
|
this.errorMessage = 'Ein Fehler ist aufgetreten. Bitte kontaktieren Sie den Administrator.'
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
</header>
|
</header>
|
||||||
<section class="forgot-password__section forgot-password__text">
|
<section class="forgot-password__section forgot-password__text">
|
||||||
<p class="forgot-info">Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslicht auf
|
<p class="forgot-info">Ihr Benutzerkonto wird durch den Hep Verlag verwaltet und deshalb können Sie das Passwort ausschliesslicht auf
|
||||||
<a class="noserif-link" href="https://www.hep-verlag.ch">www.hep-verlag.ch</a> verwaltet werden.</p>
|
<a class="hep-link" href="https://www.hep-verlag.ch">www.hep-verlag.ch</a> verwaltet werden.</p>
|
||||||
<p class="forgot-info">Melden Sie sich mit der gleichen E-Mail-Adresse und dem gleichen </p>
|
<p class="forgot-info">Melden Sie sich mit der gleichen E-Mail-Adresse und dem gleichen </p>
|
||||||
</section>
|
</section>
|
||||||
<section class="forgot-password__section forgot-password__link">
|
<section class="forgot-password__section forgot-password__link">
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@
|
||||||
<section class="get-license">
|
<section class="get-license">
|
||||||
<h2>Oder, kaufen Sie eine Lizenz</h2>
|
<h2>Oder, kaufen Sie eine Lizenz</h2>
|
||||||
<ul class="license-links">
|
<ul class="license-links">
|
||||||
<li class="license-links__item"><a :href="teacherEditionUrl" class="noserif-link">mySkillobx für Lehrpersonen</a></li>
|
<li class="license-links__item"><a :href="teacherEditionUrl" class="hep-link">mySkillobx für Lehrpersonen</a></li>
|
||||||
<li class="license-links__item"><a :href="studentEditionUrl" class="noserif-link">mySkillobx für Lernende</a></li>
|
<li class="license-links__item"><a :href="studentEditionUrl" class="hep-link">mySkillobx für Lernende</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -50,11 +50,12 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import me from '@/mixins/me';
|
||||||
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
import REDEEM_COUPON from '@/graphql/gql/mutations/redeemCoupon.gql';
|
||||||
import ME_QUERY from '@/graphql/gql/meQuery.gql';
|
import ME_QUERY from '@/graphql/gql/meQuery.gql';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [me],
|
||||||
methods: {
|
methods: {
|
||||||
validateBeforeSubmit() {
|
validateBeforeSubmit() {
|
||||||
this.$validator.validate().then(result => {
|
this.$validator.validate().then(result => {
|
||||||
|
|
@ -84,7 +85,7 @@ export default {
|
||||||
}
|
}
|
||||||
}).catch(({message}) => {
|
}).catch(({message}) => {
|
||||||
if (message.indexOf('invalid_coupon') > -1) {
|
if (message.indexOf('invalid_coupon') > -1) {
|
||||||
that.couponErrors = ['Der angegebene Coupon-Code ist falsch.'];
|
that.couponErrors = ['Der angegebene Coupon-Code ist ungültig.'];
|
||||||
} else {
|
} else {
|
||||||
that.couponErrors = ['Es ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmals oder kontaktieren Sie den Administrator.'];
|
that.couponErrors = ['Es ist ein Fehler aufgetreten. Bitte versuchen Sie es nochmals oder kontaktieren Sie den Administrator.'];
|
||||||
}
|
}
|
||||||
|
|
@ -112,12 +113,6 @@ export default {
|
||||||
studentEditionUrl: `${process.env.HEP_URL}/myskillbox-fur-lernende`
|
studentEditionUrl: `${process.env.HEP_URL}/myskillbox-fur-lernende`
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
|
||||||
me: {
|
|
||||||
query: ME_QUERY,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
|
|
||||||
import HELLO_EMAIL from '@/graphql/gql/local/helloEmail.gql';
|
import HELLO_EMAIL from '@/graphql/gql/local/helloEmail.gql';
|
||||||
import LOGIN_MUTATION from '@/graphql/gql/mutations/login.gql';
|
import LOGIN_MUTATION from '@/graphql/gql/mutations/login.gql';
|
||||||
import {login} from '../hep-client/index';
|
import {login} from '@/hep-client/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
|
|
@ -159,7 +159,7 @@ export default {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
line-height: 19px;;
|
line-height: 19px;;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 15px;
|
padding: $small-spacing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,29 @@
|
||||||
import {register} from '../hep-client/index'
|
import {register} from '../hep-client/index'
|
||||||
import HELLO_EMAIL from '@/graphql/gql/local/helloEmail.gql';
|
import HELLO_EMAIL from '@/graphql/gql/local/helloEmail.gql';
|
||||||
|
|
||||||
|
function initialData() {
|
||||||
|
return {
|
||||||
|
prefix: 'Herr',
|
||||||
|
lastname: '',
|
||||||
|
firstname: '',
|
||||||
|
password: '',
|
||||||
|
passwordConfirmation: '',
|
||||||
|
street: '',
|
||||||
|
postcode: '',
|
||||||
|
city: '',
|
||||||
|
firstnameErrors: '',
|
||||||
|
lastnameErrors: '',
|
||||||
|
emailErrors: '',
|
||||||
|
passwordsErrors: [],
|
||||||
|
passwordErrors: [],
|
||||||
|
streetErrors: [],
|
||||||
|
cityErrors: [],
|
||||||
|
postcodeErrors: [],
|
||||||
|
registrationError: '',
|
||||||
|
submitted: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
|
|
||||||
|
|
@ -256,50 +279,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
resetForm() {
|
resetForm() {
|
||||||
this.prefix = 'Herr';
|
Object.assign(this.$data, initialData());
|
||||||
this.lastname = '';
|
|
||||||
this.firstname = '';
|
|
||||||
this.street = '';
|
|
||||||
this.city = '';
|
|
||||||
this.postcode = '';
|
|
||||||
this.password = '';
|
|
||||||
this.passwordConfirmation = '';
|
|
||||||
this.firstnameErrors = [];
|
|
||||||
this.lastnameErrors = [];
|
|
||||||
this.emailErrors = [];
|
|
||||||
this.passwordsError = [];
|
|
||||||
this.passwordError = [];
|
|
||||||
this.streetErrors = [];
|
|
||||||
this.postcodeErrors = [];
|
|
||||||
this.cityErrors = [];
|
|
||||||
this.registrationError = [];
|
|
||||||
this.submitted = false;
|
|
||||||
this.$validator.reset();
|
this.$validator.reset();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return Object.assign(
|
||||||
prefix: 'Herr',
|
{
|
||||||
lastname: '',
|
helloEmail: ''
|
||||||
firstname: '',
|
},
|
||||||
password: '',
|
initialData()
|
||||||
passwordConfirmation: '',
|
);
|
||||||
street: '',
|
|
||||||
postcode: '',
|
|
||||||
city: '',
|
|
||||||
firstnameErrors: '',
|
|
||||||
lastnameErrors: '',
|
|
||||||
emailErrors: '',
|
|
||||||
passwordsErrors: [],
|
|
||||||
passwordErrors: [],
|
|
||||||
streetErrors: [],
|
|
||||||
cityErrors: [],
|
|
||||||
postcodeErrors: [],
|
|
||||||
registrationError: '',
|
|
||||||
submitted: false,
|
|
||||||
helloEmail: ''
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
apollo: {
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ input, textarea, select, button {
|
||||||
@include inline-title;
|
@include inline-title;
|
||||||
}
|
}
|
||||||
|
|
||||||
.noserif-link {
|
.hep-link {
|
||||||
font-family: $sans-serif-font-family;
|
font-family: $sans-serif-font-family;
|
||||||
color: $color-brand-dark;
|
color: $color-brand-dark;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
@import "public-page";
|
@import "public-page";
|
||||||
@import "student-submission";
|
@import "student-submission";
|
||||||
@import "module-activity";
|
@import "module-activity";
|
||||||
@import "info_header";
|
@import "info-header";
|
||||||
@import "book-subnavigation";
|
@import "book-subnavigation";
|
||||||
@import "simple-list";
|
@import "simple-list";
|
||||||
@import "widget-popover";
|
@import "widget-popover";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue