diff options
author | Fatih Acet <acetfatih@gmail.com> | 2019-01-29 16:50:22 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-01-31 01:18:20 +0300 |
commit | a3a847f8624b5f5b10d5665725df2090a1f631ba (patch) | |
tree | 834d9ee06381ba88f29531c52566268743360315 /app/assets/javascripts/issue_show/stores | |
parent | c352e7e1621dfb3de97518eb46ca513503995ccf (diff) |
Address review comments and fix commented spec
Diffstat (limited to 'app/assets/javascripts/issue_show/stores')
-rw-r--r-- | app/assets/javascripts/issue_show/stores/index.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/assets/javascripts/issue_show/stores/index.js b/app/assets/javascripts/issue_show/stores/index.js index 2b3903def6b..3c17e73ccec 100644 --- a/app/assets/javascripts/issue_show/stores/index.js +++ b/app/assets/javascripts/issue_show/stores/index.js @@ -1,3 +1,5 @@ +import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils'; + export default class Store { constructor(initialState) { this.state = initialState; @@ -15,14 +17,9 @@ export default class Store { this.formState.lockedWarningVisible = true; } + Object.assign(this.state, convertObjectPropsToCamelCase(data)); this.state.titleHtml = data.title; - this.state.titleText = data.title_text; this.state.descriptionHtml = data.description; - this.state.descriptionText = data.description_text; - this.state.taskStatus = data.task_status; - this.state.updatedAt = data.updated_at; - this.state.updatedByName = data.updated_by_name; - this.state.updatedByPath = data.updated_by_path; this.state.lock_version = data.lock_version; } |