Handle tasklist update failed in app component
This commit is contained in:
parent
b72f52f123
commit
7ad76a5418
2 changed files with 13 additions and 2 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue