Commit 45c274da authored by Phil Hughes's avatar Phil Hughes

Fixed form not sending correct data

[ci skip]
parent e61ce83b
...@@ -52,7 +52,6 @@ export default { ...@@ -52,7 +52,6 @@ export default {
return { return {
store, store,
state: store.state, state: store.state,
formState: store.formState,
showForm: false, showForm: false,
}; };
}, },
...@@ -73,8 +72,11 @@ export default { ...@@ -73,8 +72,11 @@ export default {
title: this.state.titleText, title: this.state.titleText,
}; };
}, },
closeForm() {
this.showForm = false;
},
updateIssuable() { updateIssuable() {
this.service.updateIssuable(this.formState) this.service.updateIssuable(this.store.formState)
.then(() => { .then(() => {
eventHub.$emit('close.form'); eventHub.$emit('close.form');
}) })
...@@ -125,12 +127,13 @@ export default { ...@@ -125,12 +127,13 @@ export default {
eventHub.$on('delete.issuable', this.deleteIssuable); eventHub.$on('delete.issuable', this.deleteIssuable);
eventHub.$on('update.issuable', this.updateIssuable); eventHub.$on('update.issuable', this.updateIssuable);
eventHub.$on('close.form', this.closeForm);
eventHub.$on('open.form', this.openForm); eventHub.$on('open.form', this.openForm);
}, },
beforeDestroy() { beforeDestroy() {
eventHub.$off('delete.issuable', this.deleteIssuable); eventHub.$off('delete.issuable', this.deleteIssuable);
eventHub.$off('update.issuable', this.updateIssuable); eventHub.$off('update.issuable', this.updateIssuable);
eventHub.$off('open.form', this.openForm); eventHub.$off('close.form', this.closeForm);
}, },
}; };
</script> </script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment