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