|
|
|
@ -12,8 +12,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
sendResults: function () {
|
|
|
|
|
try{
|
|
|
|
|
|
|
|
|
|
fetch("http://www.post-result.com", {
|
|
|
|
|
method: "POST",
|
|
|
|
|
body: JSON.stringify({
|
|
|
|
@ -31,10 +29,10 @@ export default {
|
|
|
|
|
this.errorMessage=error
|
|
|
|
|
return null;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}catch (error) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
getTeam: function (team) {
|
|
|
|
|
this.allTeam.push(team);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
template: `
|
|
|
|
@ -45,8 +43,7 @@ export default {
|
|
|
|
|
<label for="home-team">Home team:</label>
|
|
|
|
|
<select id="home-team" v-model="homeTeam">
|
|
|
|
|
<option selected disabled >Select a Team</option>
|
|
|
|
|
<option v-for="team in allTeam"
|
|
|
|
|
:name="team.name">{{ name }}
|
|
|
|
|
<option v-for="team in allTeam">{{ team.name }}
|
|
|
|
|
</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
@ -58,8 +55,7 @@ export default {
|
|
|
|
|
<label for="away-team">Away team:</label>
|
|
|
|
|
<select id="away-team" v-model="awayTeam">
|
|
|
|
|
<option selected disabled>Select a Team</option>
|
|
|
|
|
<option v-for="team in allTeam"
|
|
|
|
|
:name="team.name">{{ name }}
|
|
|
|
|
<option v-for="team in allTeam">{{ team.name }}
|
|
|
|
|
</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|