diff --git a/app/assets/javascripts/boards/components/board_form.vue b/app/assets/javascripts/boards/components/board_form.vue index 8722f66a822e07567ef5ac7cf14ce5cd0ed2efe2..b6e64827013ea356ea6622033c0eb49a680030d6 100644 --- a/app/assets/javascripts/boards/components/board_form.vue +++ b/app/assets/javascripts/boards/components/board_form.vue @@ -1,7 +1,7 @@ <script> /* global BoardService */ +/* global Flash */ -import Vue from 'vue'; import PopupDialog from '~/vue_shared/components/popup_dialog.vue'; import BoardMilestoneSelect from './milestone_select.vue'; import BoardWeightSelect from './weight_select.vue'; @@ -120,7 +120,7 @@ export default { }, weightsArray() { return JSON.parse(this.weights); - } + }, }, methods: { submit() { @@ -131,7 +131,7 @@ export default { gl.utils.visitUrl(Store.rootPath); }) .catch(() => { - Flash('Failed to delete board. Please try again.') + Flash('Failed to delete board. Please try again.'); this.submitDisabled = false; }); } else { @@ -141,7 +141,7 @@ export default { gl.utils.visitUrl(`${Store.rootPath}/${data.id}`); }) .catch(() => { - Flash('Unable to save your changes. Please try again.') + Flash('Unable to save your changes. Please try again.'); }); } }, diff --git a/app/assets/javascripts/boards/components/labels_select.vue b/app/assets/javascripts/boards/components/labels_select.vue index 98b319a2e4b15f272434c0b2639753b673376884..bd177d5aa680c03c634a675ab13533b60694b9a9 100644 --- a/app/assets/javascripts/boards/components/labels_select.vue +++ b/app/assets/javascripts/boards/components/labels_select.vue @@ -1,8 +1,8 @@ <script> /* global LabelsSelect */ +/* global ListLabel */ import loadingIcon from '~/vue_shared/components/loading_icon.vue'; -import eventHub from '../eventhub'; export default { props: { @@ -32,7 +32,7 @@ export default { }, }, mounted() { - new LabelsSelect(this.$refs.dropdownButton, { + this.labelsDropdown = new LabelsSelect(this.$refs.dropdownButton, { handleClick: this.handleClick, }); }, @@ -58,7 +58,7 @@ export default { labels = labels.filter(selected => selected.id !== label.id); this.board.labels = labels; } - } + }, }, }; </script> diff --git a/app/assets/javascripts/boards/components/milestone_select.vue b/app/assets/javascripts/boards/components/milestone_select.vue index 0e7f5af4c35b338d465f9f2978241beaab3cab73..5d39590c0d4520fc7800c1a1bd5902a2ea5b5926 100644 --- a/app/assets/javascripts/boards/components/milestone_select.vue +++ b/app/assets/javascripts/boards/components/milestone_select.vue @@ -37,12 +37,12 @@ export default { return this.board.milestone_id; }, milestoneTitleClass() { - return this.milestoneTitle === ANY_MILESTONE ? 'text-secondary': 'bold'; + return this.milestoneTitle === ANY_MILESTONE ? 'text-secondary' : 'bold'; }, selected() { if (this.noMilestone) return NO_MILESTONE; return this.board.milestone ? this.board.milestone.name : ''; - } + }, }, methods: { selectMilestone(milestone) { @@ -60,7 +60,7 @@ export default { }, }, mounted() { - new MilestoneSelect(null, this.$refs.dropdownButton, { + this.milestoneDropdown = new MilestoneSelect(null, this.$refs.dropdownButton, { handleClick: this.selectMilestone, }); }, diff --git a/app/assets/javascripts/boards/components/user_select.vue b/app/assets/javascripts/boards/components/user_select.vue index 851103657b363b8e42c9e4136bb3d6e14f69344e..fb7cc13d72ee17a98c22eb3cc11d049ebfd6b4b7 100644 --- a/app/assets/javascripts/boards/components/user_select.vue +++ b/app/assets/javascripts/boards/components/user_select.vue @@ -69,7 +69,7 @@ export default { }, methods: { initSelect() { - new UsersSelect(null, this.$refs.dropdown, { + this.userDropdown = new UsersSelect(null, this.$refs.dropdown, { handleClick: this.selectUser, }); }, diff --git a/app/assets/javascripts/boards/components/weight_select.vue b/app/assets/javascripts/boards/components/weight_select.vue index 49e8f9d7f0a6a446db29a31fb654e1e0f8fee051..1afbc046d1ca96952173c836d6f8277df4a14668 100644 --- a/app/assets/javascripts/boards/components/weight_select.vue +++ b/app/assets/javascripts/boards/components/weight_select.vue @@ -3,7 +3,6 @@ import '~/weight_select'; import loadingIcon from '~/vue_shared/components/loading_icon.vue'; -import eventHub from '../eventhub'; const ANY_WEIGHT = 'Any Weight'; const NO_WEIGHT = 'No Weight'; @@ -45,9 +44,9 @@ export default { }, valueText() { if (this.value > 0) return this.value; - if (this.value == 0) return NO_WEIGHT; + if (this.value === 0) return NO_WEIGHT; return ANY_WEIGHT; - } + }, }, methods: { selectWeight(weight) { @@ -61,15 +60,15 @@ export default { return 0; } return -1; - } + }, }, mounted() { - new WeightSelect(this.$refs.dropdownButton, { + this.weightDropdown = new WeightSelect(this.$refs.dropdownButton, { handleClick: this.selectWeight, selected: this.value, fieldName: this.fieldName, }); - } + }, }; </script>