createTeam finished
This commit is contained in:
parent
caa5494840
commit
38e22fed9b
@ -35,7 +35,8 @@
|
|||||||
<div class="q-pa-md" align="center">
|
<div class="q-pa-md" align="center">
|
||||||
<q-btn-dropdown color="primary" :label="dropDownSelectedItem" size="20px">
|
<q-btn-dropdown color="primary" :label="dropDownSelectedItem" size="20px">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item :clickable="boolAlreadyInTeam" v-close-popup @click="dropDownSelectItem('team')" :disabled="!boolAlreadyInTeam">
|
<q-item :clickable="boolAlreadyInTeam" v-close-popup @click="dropDownSelectItem('team')"
|
||||||
|
:disabled="!boolAlreadyInTeam">
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label v-html="teamName"></q-item-label>
|
<q-item-label v-html="teamName"></q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
@ -319,16 +320,16 @@
|
|||||||
}
|
}
|
||||||
this.$axios.get('/api/getTeamOfUser', {params: {token}})
|
this.$axios.get('/api/getTeamOfUser', {params: {token}})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.data.trim() === '') {
|
if (response.data.name === '') {
|
||||||
this.boolAlreadyInTeam = false;
|
this.boolAlreadyInTeam = false;
|
||||||
this.teamName = "Aktuell in keinem Team";
|
this.teamName = "Aktuell in keinem Team";
|
||||||
this.currentTeamStatus = "";
|
this.currentTeamStatus = "";
|
||||||
this.teamRanking = "-";
|
this.teamRanking = "-";
|
||||||
} else {
|
} else {
|
||||||
this.boolAlreadyInTeam = true;
|
this.boolAlreadyInTeam = true;
|
||||||
this.teamName = response.data;
|
this.teamName = response.data.name;
|
||||||
this.currentTeamStatus = response.data.teamStatus;
|
this.currentTeamStatus = response.data.teamStatus;
|
||||||
this.teamRanking = response.data.teamRanking;
|
//this.teamRanking = response.data.teamRanking;
|
||||||
this.fetchTeamMembers();
|
this.fetchTeamMembers();
|
||||||
}
|
}
|
||||||
this.data[2].userData = this.teamName;
|
this.data[2].userData = this.teamName;
|
||||||
@ -366,8 +367,8 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.name = this.newTeamName;
|
params.name = this.newTeamName;
|
||||||
this.$axios.post('/api/createTeam', {params})
|
this.$axios.post('/api/createTeam', null, {params})
|
||||||
.then(response => {
|
.then((response) => {
|
||||||
console.log("createTeam: " + response);
|
console.log("createTeam: " + response);
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
message: "Das Team " + this.newTeamName + " wurde erfolgreich erstellt!",
|
message: "Das Team " + this.newTeamName + " wurde erfolgreich erstellt!",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user