bugfixes
This commit is contained in:
parent
c0845f835f
commit
3c884dcd90
@ -73,17 +73,9 @@
|
|||||||
user: {
|
user: {
|
||||||
email: "",
|
email: "",
|
||||||
password: "",
|
password: "",
|
||||||
//token: "",
|
|
||||||
// evalAuthentication: false
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// beforeMount: {
|
|
||||||
// init: function () {
|
|
||||||
// this.evalAuthentication();
|
|
||||||
// console.log("initiated");
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
created() {
|
created() {
|
||||||
this.evalAuthentication();
|
this.evalAuthentication();
|
||||||
console.log("created: initiated");
|
console.log("created: initiated");
|
||||||
|
|||||||
@ -6,15 +6,8 @@
|
|||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input lazy-rules outlined filled stack-label v-model="user.name" type="text"
|
<q-input lazy-rules outlined filled stack-label v-model="user.email" type="text" label="E-Mail"
|
||||||
label="Nutzername" :rules="[val=>val.length>=2||'Name muss mindestens 2 Zeichen lang sein!']"/>
|
:rules="[val=>validateEmail(val)||'Bitte gültige E-Mail angeben!']"/>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<div class="">
|
|
||||||
<div class="" style="max-width: 440px">
|
|
||||||
<q-input lazy-rules outlined filled stack-label v-model="user.email" type="text" label="E-Mail" :rules="[val=>validateEmail(val)||'Bitte gültige E-Mail angeben!']"/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -22,7 +15,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input lazy-rules outlined filled stack-label v-model="user.checkemail" type="text"
|
<q-input lazy-rules outlined filled stack-label v-model="user.checkemail" type="text"
|
||||||
label="E-Mail erneut eingeben" placeholer="Email" :rules="[val=>val===user.email||'E-Mail stimmt nicht überein!']"/>
|
label="E-Mail erneut eingeben" placeholer="Email"
|
||||||
|
:rules="[val=>val===user.email||'E-Mail stimmt nicht überein!']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,7 +24,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input lazy-rules outlined filled stack-label v-model="user.password" type="password"
|
<q-input lazy-rules outlined filled stack-label v-model="user.password" type="password"
|
||||||
label="Passwort" :rules="[val=>val.length>=8||'Passwort muss mindestens 8 Zeichen lang sein!']"/>
|
label="Passwort"
|
||||||
|
:rules="[val=>val.length>=8||'Passwort muss mindestens 8 Zeichen lang sein!']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -38,7 +33,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input lazy-rules outlined filled stack-label v-model="user.checkpassword" type="password"
|
<q-input lazy-rules outlined filled stack-label v-model="user.checkpassword" type="password"
|
||||||
label="Passwort erneut eingeben" :rules="[val=>val===user.password||'Passwort stimmt nicht überein']"/>
|
label="Passwort erneut eingeben"
|
||||||
|
:rules="[val=>val===user.password||'Passwort stimmt nicht überein']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -67,7 +63,6 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
user: {
|
user: {
|
||||||
name:"",
|
|
||||||
email: "",
|
email: "",
|
||||||
checkemail: "",
|
checkemail: "",
|
||||||
password: "",
|
password: "",
|
||||||
@ -77,8 +72,7 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
validationSuccesful() {
|
validationSuccesful() {
|
||||||
if(this.user.name.length>=2
|
if (this.validateEmail(this.user.email)
|
||||||
&&this.validateEmail(this.user.email)
|
|
||||||
&& this.user.email === this.user.checkemail
|
&& this.user.email === this.user.checkemail
|
||||||
&& this.user.password.length >= 8
|
&& this.user.password.length >= 8
|
||||||
&& this.user.password === this.user.checkpassword) {
|
&& this.user.password === this.user.checkpassword) {
|
||||||
@ -99,7 +93,7 @@
|
|||||||
|
|
||||||
if (this.user.email === this.user.checkemail && this.user.password === this.user.checkpassword) {
|
if (this.user.email === this.user.checkemail && this.user.password === this.user.checkpassword) {
|
||||||
const data = {
|
const data = {
|
||||||
name: this.user.name,
|
name: this.user.email,
|
||||||
password: this.user.password,
|
password: this.user.password,
|
||||||
email: this.user.email,
|
email: this.user.email,
|
||||||
roles: [
|
roles: [
|
||||||
@ -120,7 +114,11 @@
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
if (response.status === 201) {
|
if (response.status === 201) {
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: "Deine Registrierung war erfolgreich! Du kannst dich jetzt einloggen.", title: "Registrierungsprozess", color: "blue"});
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
|
message: "Deine Registrierung war erfolgreich! Du kannst dich jetzt einloggen.",
|
||||||
|
title: "Registrierungsprozess",
|
||||||
|
color: "blue"
|
||||||
|
});
|
||||||
this.$router.push("/login")
|
this.$router.push("/login")
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user