bugfixes
This commit is contained in:
parent
c0845f835f
commit
3c884dcd90
@ -73,17 +73,9 @@
|
||||
user: {
|
||||
email: "",
|
||||
password: "",
|
||||
//token: "",
|
||||
// evalAuthentication: false
|
||||
},
|
||||
};
|
||||
},
|
||||
// beforeMount: {
|
||||
// init: function () {
|
||||
// this.evalAuthentication();
|
||||
// console.log("initiated");
|
||||
// }
|
||||
// },
|
||||
created() {
|
||||
this.evalAuthentication();
|
||||
console.log("created: initiated");
|
||||
|
||||
@ -6,15 +6,8 @@
|
||||
<div class="col">
|
||||
<div class="">
|
||||
<div class="" style="max-width: 440px">
|
||||
<q-input lazy-rules outlined filled stack-label v-model="user.name" type="text"
|
||||
label="Nutzername" :rules="[val=>val.length>=2||'Name muss mindestens 2 Zeichen lang sein!']"/>
|
||||
</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!']"/>
|
||||
<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>
|
||||
@ -22,7 +15,8 @@
|
||||
<div class="">
|
||||
<div class="" style="max-width: 440px">
|
||||
<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>
|
||||
@ -30,7 +24,8 @@
|
||||
<div class="">
|
||||
<div class="" style="max-width: 440px">
|
||||
<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>
|
||||
@ -38,7 +33,8 @@
|
||||
<div class="">
|
||||
<div class="" style="max-width: 440px">
|
||||
<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>
|
||||
@ -67,7 +63,6 @@
|
||||
data() {
|
||||
return {
|
||||
user: {
|
||||
name:"",
|
||||
email: "",
|
||||
checkemail: "",
|
||||
password: "",
|
||||
@ -77,8 +72,7 @@
|
||||
},
|
||||
computed: {
|
||||
validationSuccesful() {
|
||||
if(this.user.name.length>=2
|
||||
&&this.validateEmail(this.user.email)
|
||||
if (this.validateEmail(this.user.email)
|
||||
&& this.user.email === this.user.checkemail
|
||||
&& this.user.password.length >= 8
|
||||
&& this.user.password === this.user.checkpassword) {
|
||||
@ -99,7 +93,7 @@
|
||||
|
||||
if (this.user.email === this.user.checkemail && this.user.password === this.user.checkpassword) {
|
||||
const data = {
|
||||
name: this.user.name,
|
||||
name: this.user.email,
|
||||
password: this.user.password,
|
||||
email: this.user.email,
|
||||
roles: [
|
||||
@ -120,7 +114,11 @@
|
||||
.then((response) => {
|
||||
console.log(response.data);
|
||||
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")
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user