some work at profile component
This commit is contained in:
parent
e76581f128
commit
52b04a90a2
@ -61,6 +61,7 @@
|
|||||||
</q-list>
|
</q-list>
|
||||||
</q-btn-dropdown>
|
</q-btn-dropdown>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-show="boolMyTeam">
|
||||||
<p class="text-h5"> Teammitglieder </p>
|
<p class="text-h5"> Teammitglieder </p>
|
||||||
<q-table
|
<q-table
|
||||||
:data="teamData"
|
:data="teamData"
|
||||||
@ -91,6 +92,15 @@
|
|||||||
color="primary"
|
color="primary"
|
||||||
type="submit"/>
|
type="submit"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-show="boolInvites">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div v-show="boolCreateTeam">
|
||||||
|
<q-input outlined filled stack-label v-model="newTeamName" type="text"
|
||||||
|
label="Teamname eingeben"
|
||||||
|
:rules="[val=>val.length>=2||'Name muss mindestens 5 Zeichen lang sein!']"/>
|
||||||
|
</div>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
@ -119,7 +129,6 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tab: 'profile',
|
tab: 'profile',
|
||||||
startedCaches: [],
|
|
||||||
inviteMail: "",
|
inviteMail: "",
|
||||||
currentTeamStatus: "Dienstag 15:00 Treffen zum Blumencache",
|
currentTeamStatus: "Dienstag 15:00 Treffen zum Blumencache",
|
||||||
teamStatus: "",
|
teamStatus: "",
|
||||||
@ -129,6 +138,10 @@
|
|||||||
teamName: null,
|
teamName: null,
|
||||||
teamRanking: null,
|
teamRanking: null,
|
||||||
dropDownSelectedItem: null,
|
dropDownSelectedItem: null,
|
||||||
|
boolMyTeam: true,
|
||||||
|
boolInvites: false,
|
||||||
|
boolCreateTeam: false,
|
||||||
|
newTeamName: "",
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
name: 'desc',
|
name: 'desc',
|
||||||
@ -233,12 +246,12 @@
|
|||||||
this.data[0].userData = this.userName;
|
this.data[0].userData = this.userName;
|
||||||
this.email = JSON.parse(localStorage.getItem('userMail'));
|
this.email = JSON.parse(localStorage.getItem('userMail'));
|
||||||
this.data[1].userData = this.email;
|
this.data[1].userData = this.email;
|
||||||
this.getPersonalRanking();
|
this.userRanking = 1234;
|
||||||
this.data[2].userData = this.userRanking;
|
this.data[2].userData = this.userRanking;
|
||||||
this.teamName = "BuGa19Community";
|
this.teamName = "BuGa19Community";
|
||||||
this.data[3].userData = this.teamName;
|
this.data[3].userData = this.teamName;
|
||||||
this.dropDownSelectedItem = this.teamName;
|
this.dropDownSelectedItem = this.teamName;
|
||||||
this.teamRanking = "2019";
|
this.teamRanking = 2019;
|
||||||
this.data[4].userData = this.teamRanking;
|
this.data[4].userData = this.teamRanking;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -248,7 +261,7 @@
|
|||||||
},
|
},
|
||||||
getPersonalRanking() {
|
getPersonalRanking() {
|
||||||
const token = JSON.parse(localStorage.getItem('userToken')).token;
|
const token = JSON.parse(localStorage.getItem('userToken')).token;
|
||||||
this.$axios.get('/api/getRankingPlace', {params: {token}})
|
this.$axios.get('/api/getRankingPlace', {token})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.userRanking = response.data;
|
this.userRanking = response.data;
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
@ -308,8 +321,19 @@
|
|||||||
dropDownSelectItem(item) {
|
dropDownSelectItem(item) {
|
||||||
if (item === 'team') {
|
if (item === 'team') {
|
||||||
this.dropDownSelectedItem = this.teamName;
|
this.dropDownSelectedItem = this.teamName;
|
||||||
|
this.boolMyTeam = true;
|
||||||
|
this.boolInvites = false;
|
||||||
|
this.boolCreateTeam = false;
|
||||||
|
} else if (item === 'Offene Teameinladungen') {
|
||||||
|
this.dropDownSelectedItem = item;
|
||||||
|
this.boolMyTeam = false;
|
||||||
|
this.boolInvites = true;
|
||||||
|
this.boolCreateTeam = false;
|
||||||
} else {
|
} else {
|
||||||
this.dropDownSelectedItem = item;
|
this.dropDownSelectedItem = item;
|
||||||
|
this.boolMyTeam = false;
|
||||||
|
this.boolInvites = false;
|
||||||
|
this.boolCreateTeam = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,14 +7,16 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input outlined filled stack-label v-model="user.name" type="text"
|
<q-input outlined filled stack-label v-model="user.name" type="text"
|
||||||
label="Nutzername eingeben" :rules="[val=>val.length>=2||'Name muss mindestens 2 Zeichen lang sein!']"/>
|
label="Nutzername eingeben"
|
||||||
|
:rules="[val=>val.length>=2||'Name muss mindestens 2 Zeichen lang sein!']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input outlined filled stack-label v-model="user.email" type="text" label="Email eingeben" :rules="[val=>validateEmail(val)||'Email muss valide sein']"/>
|
<q-input outlined filled stack-label v-model="user.email" type="text" label="Email eingeben"
|
||||||
|
:rules="[val=>validateEmail(val)||'Email muss valide sein']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -22,7 +24,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input outlined filled stack-label v-model="user.checkemail" type="text"
|
<q-input outlined filled stack-label v-model="user.checkemail" type="text"
|
||||||
label="Email erneut eingeben" placeholer="Email" :rules="[val=>val===user.email||'Email stimmt nicht überein']"/>
|
label="Email erneut eingeben" placeholer="Email"
|
||||||
|
:rules="[val=>val===user.email||'Email stimmt nicht überein']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -30,7 +33,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input outlined filled stack-label v-model="user.password" type="password"
|
<q-input outlined filled stack-label v-model="user.password" type="password"
|
||||||
label="Passwort eingeben" :rules="[val=>val.length>=8||'Passwort muss mindestens 8 Zeichen lang sein!']"/>
|
label="Passwort eingeben"
|
||||||
|
:rules="[val=>val.length>=8||'Passwort muss mindestens 8 Zeichen lang sein!']"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -38,7 +42,8 @@
|
|||||||
<div class="">
|
<div class="">
|
||||||
<div class="" style="max-width: 440px">
|
<div class="" style="max-width: 440px">
|
||||||
<q-input outlined filled stack-label v-model="user.checkpassword" type="password"
|
<q-input 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>
|
||||||
@ -109,8 +114,6 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log("POST /api/register/ - json: " + JSON.stringify(data));
|
|
||||||
const token = JSON.parse(localStorage.getItem('registerToken')).token;
|
const token = JSON.parse(localStorage.getItem('registerToken')).token;
|
||||||
this.$axios.post(process.env.USER_API + '/account/register', data, {
|
this.$axios.post(process.env.USER_API + '/account/register', data, {
|
||||||
headers: {
|
headers: {
|
||||||
@ -118,9 +121,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
|
||||||
if (response.status === 201) {
|
if (response.status === 201) {
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', { message: "Deine Registrierung war erfolgreich!", title: "Registrierungsprozess", color: "blue"});
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
|
message: "Deine Registrierung war erfolgreich!",
|
||||||
|
title: "Registrierungsprozess",
|
||||||
|
color: "blue"
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user