New sessions should not be accepted

This commit is contained in:
Oliver Davies 2019-08-30 19:38:20 +01:00
parent 24a0ed9cb8
commit 6725c58b80
2 changed files with 2 additions and 8 deletions

View file

@ -2,7 +2,7 @@
<div id="app" class="antialiased min-h-screen font-sans bg-gray-100 text-black p-12"> <div id="app" class="antialiased min-h-screen font-sans bg-gray-100 text-black p-12">
<div class="w-full max-w-2xl mx-auto"> <div class="w-full max-w-2xl mx-auto">
<accepted-sessions-list :sessions="sessions" /> <accepted-sessions-list :sessions="sessions" />
<session-form @submitted="addSession($event)" /> <session-form />
</div> </div>
</div> </div>
</template> </template>
@ -46,10 +46,6 @@ export default {
}, },
methods: { methods: {
addSession (session) {
this.sessions.push(session)
},
getSaveStateConfig () { getSaveStateConfig () {
return { return {
cacheKey: 'app' cacheKey: 'app'

View file

@ -37,7 +37,7 @@ export default {
errors: [], errors: [],
form: { form: {
body: '', body: '',
field_session_status: 'accepted', field_session_status: 'submitted',
field_session_type: 'full', field_session_type: 'full',
title: '' title: ''
}, },
@ -87,8 +87,6 @@ export default {
const title = data.data.attributes.title const title = data.data.attributes.title
this.messages.push(`Session ${title} has been created.`) this.messages.push(`Session ${title} has been created.`)
this.$emit('submitted', data.data)
this.form.body = '' this.form.body = ''
this.form.title = '' this.form.title = ''
}).catch(({ response: { data } }) => { }).catch(({ response: { data } }) => {