diff --git a/app/assets/javascripts/boards/components/modal/filters.js.es6 b/app/assets/javascripts/boards/components/modal/filters.js.es6 index 206948b70f4..c6c22dd24c9 100644 --- a/app/assets/javascripts/boards/components/modal/filters.js.es6 +++ b/app/assets/javascripts/boards/components/modal/filters.js.es6 @@ -1,15 +1,19 @@ /* global Vue */ -/* global MilestoneSelect */ //= require_tree ./filters (() => { const ModalStore = gl.issueBoards.ModalStore; gl.issueBoards.ModalFilters = Vue.extend({ - mounted() { - new MilestoneSelect(); + props: { + projectId: { + type: Number, + required: true, + }, }, components: { 'user-filter': gl.issueBoards.ModalFilterUser, + 'milestone-filter': gl.issueBoards.ModalFilterMilestone, + 'label-filter': gl.issueBoards.ModalLabelFilter, }, template: ` `, }); diff --git a/app/assets/javascripts/boards/components/modal/filters/label.js.es6 b/app/assets/javascripts/boards/components/modal/filters/label.js.es6 new file mode 100644 index 00000000000..cfea0780983 --- /dev/null +++ b/app/assets/javascripts/boards/components/modal/filters/label.js.es6 @@ -0,0 +1,48 @@ +/* global Vue */ +/* global LabelSelect */ +(() => { + gl.issueBoards.ModalLabelFilter = Vue.extend({ + mounted() { + new LabelsSelect(this.$refs.dropdown); + }, + template: ` + + `, + }); +})(); diff --git a/app/assets/javascripts/boards/components/modal/filters/milestone.js.es6 b/app/assets/javascripts/boards/components/modal/filters/milestone.js.es6 new file mode 100644 index 00000000000..14c95cb2dae --- /dev/null +++ b/app/assets/javascripts/boards/components/modal/filters/milestone.js.es6 @@ -0,0 +1,49 @@ +/* global Vue */ +/* global MilestoneSelect */ +(() => { + gl.issueBoards.ModalFilterMilestone = Vue.extend({ + mounted() { + new MilestoneSelect(null, this.$refs.dropdown); + }, + template: ` + + `, + }); +})(); diff --git a/app/assets/javascripts/boards/components/modal/filters/user.js.es6 b/app/assets/javascripts/boards/components/modal/filters/user.js.es6 index b440abf84e9..d45649af4cd 100644 --- a/app/assets/javascripts/boards/components/modal/filters/user.js.es6 +++ b/app/assets/javascripts/boards/components/modal/filters/user.js.es6 @@ -25,9 +25,13 @@ required: false, default: false, }, + projectId: { + type: Number, + required: true, + }, }, mounted() { - new UsersSelect(); + new UsersSelect(null, this.$refs.dropdown); }, computed: { currentUsername() { @@ -51,9 +55,12 @@ :data-any-user="'Any ' + toggleLabel" :data-null-user="nullUser" :data-field-name="fieldName" - :data-project-id="12" - :data-first-user="currentUsername"> - {{ toggleLabel }} + :data-project-id="projectId" + :data-first-user="currentUsername" + ref="dropdown"> + + {{ toggleLabel }} +
@@ -50,7 +57,9 @@