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