diff options
author | Brett Walker <bwalker@gitlab.com> | 2019-01-11 00:22:28 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-01-31 01:18:13 +0300 |
commit | 83306d249e0762d21b9ca128b9ebb57a0bef6f8b (patch) | |
tree | b2cd7dc17355ce61ac8eff4ae4f7abe0797ac7d7 /app/assets/javascripts/issue_show | |
parent | f1acd5051513ee815578f7311ca88ee54e79e323 (diff) |
Pass tasklist lock version
receive data on when there is a conflict
Diffstat (limited to 'app/assets/javascripts/issue_show')
-rw-r--r-- | app/assets/javascripts/issue_show/components/app.vue | 1 | ||||
-rw-r--r-- | app/assets/javascripts/issue_show/components/description.vue | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue index d65b44ca6f3..3e71c40e896 100644 --- a/app/assets/javascripts/issue_show/components/app.vue +++ b/app/assets/javascripts/issue_show/components/app.vue @@ -326,6 +326,7 @@ export default { :task-status="state.taskStatus" :issuable-type="issuableType" :update-url="updateEndpoint" + :lock-version="state.lock_version" /> <edited-component v-if="hasUpdated" diff --git a/app/assets/javascripts/issue_show/components/description.vue b/app/assets/javascripts/issue_show/components/description.vue index 5ca88d75063..4443d6c6760 100644 --- a/app/assets/javascripts/issue_show/components/description.vue +++ b/app/assets/javascripts/issue_show/components/description.vue @@ -35,6 +35,10 @@ export default { required: false, default: null, }, + lockVersion: { + type: Number, + required: false, + }, }, data() { return { @@ -67,8 +71,10 @@ export default { new TaskList({ dataType: this.issuableType, fieldName: 'description', + lockVersion: this.lockVersion, selector: '.detail-page-description', onSuccess: this.taskListUpdateSuccess.bind(this), + onError: this.taskListUpdateError.bind(this), }); } }, @@ -82,6 +88,10 @@ export default { } }, + taskListUpdateError(data) { + // stub for error handling + }, + updateTaskStatusText() { const taskRegexMatches = this.taskStatus.match(/(\d+) of ((?!0)\d+)/); const $issuableHeader = $('.issuable-meta'); |