aboutsummaryrefslogtreecommitdiff
path: root/src/components/announcements_page/announcements_page.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/announcements_page/announcements_page.js')
-rw-r--r--src/components/announcements_page/announcements_page.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/components/announcements_page/announcements_page.js b/src/components/announcements_page/announcements_page.js
index ec038361..30759533 100644
--- a/src/components/announcements_page/announcements_page.js
+++ b/src/components/announcements_page/announcements_page.js
@@ -1,14 +1,19 @@
import { mapState } from 'vuex'
import Announcement from '../announcement/announcement.vue'
+import Checkbox from '../checkbox/checkbox.vue'
const AnnouncementsPage = {
components: {
- Announcement
+ Announcement,
+ Checkbox
},
data () {
return {
newAnnouncement: {
- content: ''
+ content: '',
+ startsAt: undefined,
+ endsAt: undefined,
+ allDay: false
},
posting: false,
error: undefined
@@ -29,6 +34,11 @@ const AnnouncementsPage = {
postAnnouncement () {
this.posting = true
this.$store.dispatch('postAnnouncement', this.newAnnouncement)
+ .then(() => {
+ this.newAnnouncement.content = ''
+ this.startsAt = undefined
+ this.endsAt = undefined
+ })
.catch(error => {
this.error = error.error
})