some changes at createTeam
This commit is contained in:
parent
4774b6d111
commit
59dd4b8b2b
@ -293,6 +293,7 @@
|
|||||||
this.data[0].userData = this.email;
|
this.data[0].userData = this.email;
|
||||||
this.getPersonalRanking();
|
this.getPersonalRanking();
|
||||||
this.getTeamData();
|
this.getTeamData();
|
||||||
|
this.fetchTeamInvites();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validateEmail(email) {
|
validateEmail(email) {
|
||||||
@ -328,6 +329,7 @@
|
|||||||
this.teamName = response.data;
|
this.teamName = response.data;
|
||||||
this.currentTeamStatus = response.data.teamStatus;
|
this.currentTeamStatus = response.data.teamStatus;
|
||||||
this.teamRanking = response.data.teamRanking;
|
this.teamRanking = response.data.teamRanking;
|
||||||
|
this.fetchTeamMembers();
|
||||||
}
|
}
|
||||||
this.data[2].userData = this.teamName;
|
this.data[2].userData = this.teamName;
|
||||||
this.dropDownSelectedItem = this.teamName;
|
this.dropDownSelectedItem = this.teamName;
|
||||||
@ -364,7 +366,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.name = this.newTeamName;
|
params.name = this.newTeamName;
|
||||||
this.$axios.post('/api/createTeam', {params: {params}})
|
this.$axios.post('/api/createTeam', {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', {
|
||||||
@ -378,7 +380,7 @@
|
|||||||
},
|
},
|
||||||
fetchTeamMembers() {
|
fetchTeamMembers() {
|
||||||
let name = this.teamName;
|
let name = this.teamName;
|
||||||
this.$axios.get('/api/getTeamMembers', {name})
|
this.$axios.get('/api/getTeamMembers', {params: {name}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.teamMembers = response.data;
|
this.teamMembers = response.data;
|
||||||
@ -393,7 +395,7 @@
|
|||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$axios.get('/api/getMyTeamInvites', {token})
|
this.$axios.get('/api/getMyTeamInvites', {params: {token}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.teamInvites = response.data;
|
this.teamInvites = response.data;
|
||||||
@ -409,7 +411,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.teamID = inviteId;
|
params.teamID = inviteId;
|
||||||
this.$axios.put('/api/joinTeam', {params})
|
this.$axios.put('/api/joinTeam', {params: {params}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
@ -429,7 +431,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.teamInviteID = inviteId;
|
params.teamInviteID = inviteId;
|
||||||
this.$axios.delete('/api/deleteTeamInvite', {params})
|
this.$axios.delete('/api/deleteTeamInvite', {params: {params}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
this.$store.commit('dialog/NEW_MESSAGE_DIALOG', {
|
||||||
@ -449,7 +451,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.invitedUserEmail = this.inviteMail;
|
params.invitedUserEmail = this.inviteMail;
|
||||||
this.$axios.post('/api/sendTeamInvite', {params})
|
this.$axios.post('/api/sendTeamInvite', {params: {params}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
@ -464,7 +466,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.teamStatus = this.teamStatus;
|
params.teamStatus = this.teamStatus;
|
||||||
this.$axios.put('/api/setTeamStatus', {params})
|
this.$axios.put('/api/setTeamStatus', {params: {params}})
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response.data);
|
console.log(response.data);
|
||||||
this.getTeamData();
|
this.getTeamData();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user