|
|
@ -66,15 +66,17 @@ export default{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
addTeam: function(){
|
|
|
|
addTeam: function(){
|
|
|
|
|
|
|
|
if(!this.edit){//adding a team
|
|
|
|
let team = new Team(this.id, this.name, this.description);
|
|
|
|
let team = new Team(this.id, this.name, this.description);
|
|
|
|
console.log(team);
|
|
|
|
console.log(team);
|
|
|
|
if(!this.edit){//adding a team
|
|
|
|
|
|
|
|
this.teams.push(team);
|
|
|
|
this.teams.push(team);
|
|
|
|
this.name='';
|
|
|
|
this.name='';
|
|
|
|
this.description='';
|
|
|
|
this.description='';
|
|
|
|
this.id=this.id+1
|
|
|
|
this.id=this.id+1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{//editing a team
|
|
|
|
else{//editing a team
|
|
|
|
|
|
|
|
let team = new Team(this.teams[this.idxEdit].id, this.name, this.description);
|
|
|
|
|
|
|
|
console.log(team);
|
|
|
|
this.teams[this.idxEdit]=team;
|
|
|
|
this.teams[this.idxEdit]=team;
|
|
|
|
this.name='';
|
|
|
|
this.name='';
|
|
|
|
this.description='';
|
|
|
|
this.description='';
|
|
|
|