Created
January 13, 2017 00:42
-
-
Save afucher/b242bdafb0dd804ee3cb4fdd3241e02f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<form @submit.prevent="createGroup"> | |
<input type="text" v-model="start_date"></input> | |
<button type="submit">Nova Turma</button> | |
</form> | |
</div> | |
</template> | |
<script> | |
import { mapActions } from 'vuex' | |
export default { | |
data: function(){ | |
return { | |
start_date: '', | |
end_date: '', | |
start_hour: '', | |
end_hour: '' | |
} | |
}, | |
methods: { | |
createGroup(e) { | |
e.preventDefault(); | |
let course = { | |
start_date: this.start_date, | |
end_date: this.end_date, | |
start_hour: this.start_hour, | |
end_hour: this.end_hour | |
} | |
this.$store.dispatch('createGroup', course); | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment