Commit 7ad76a54 authored by Fatih Acet's avatar Fatih Acet

Handle tasklist update failed in app component

parent b72f52f1
...@@ -213,6 +213,14 @@ export default { ...@@ -213,6 +213,14 @@ export default {
return undefined; return undefined;
}, },
updateStoreState() {
this.service.getData()
.then(res => res.data)
.then(data => {
this.store.updateState(data);
});
},
openForm() { openForm() {
if (!this.showForm) { if (!this.showForm) {
this.showForm = true; this.showForm = true;
...@@ -327,6 +335,7 @@ export default { ...@@ -327,6 +335,7 @@ export default {
:issuable-type="issuableType" :issuable-type="issuableType"
:update-url="updateEndpoint" :update-url="updateEndpoint"
:lock-version="state.lock_version" :lock-version="state.lock_version"
@taskListUpdateFailed="updateStoreState"
/> />
<edited-component <edited-component
v-if="hasUpdated" v-if="hasUpdated"
......
...@@ -89,8 +89,10 @@ export default { ...@@ -89,8 +89,10 @@ export default {
} }
}, },
taskListUpdateError(data) { taskListUpdateError({ errors, data }) {
createFlash(data.errors[0]); createFlash('Someone edited this issue at the same time you did and we updated the issue description.');
this.$emit('taskListUpdateFailed');
}, },
updateTaskStatusText() { updateTaskStatusText() {
......
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