Commit 10f805c2 authored by Phil Hughes's avatar Phil Hughes

Passes through the correct endpoints

parent b934a123
...@@ -9,6 +9,14 @@ ...@@ -9,6 +9,14 @@
type: Number, type: Number,
required: true, required: true,
}, },
milestonePath: {
type: String,
required: true,
},
labelPath: {
type: String,
required: true,
},
}, },
components: { components: {
'user-filter': gl.issueBoards.ModalFilterUser, 'user-filter': gl.issueBoards.ModalFilterUser,
...@@ -30,8 +38,8 @@ ...@@ -30,8 +38,8 @@
field-name="assignee_id" field-name="assignee_id"
:null-user="true" :null-user="true"
:project-id="projectId"></user-filter> :project-id="projectId"></user-filter>
<milestone-filter></milestone-filter> <milestone-filter :milestone-path="milestonePath"></milestone-filter>
<label-filter></label-filter> <label-filter :label-path="labelPath"></label-filter>
</div> </div>
`, `,
}); });
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
/* global LabelSelect */ /* global LabelSelect */
(() => { (() => {
gl.issueBoards.ModalLabelFilter = Vue.extend({ gl.issueBoards.ModalLabelFilter = Vue.extend({
props: {
labelPath: {
type: String,
required: true,
},
},
mounted() { mounted() {
new LabelsSelect(this.$refs.dropdown); new LabelsSelect(this.$refs.dropdown);
}, },
...@@ -11,9 +17,9 @@ ...@@ -11,9 +17,9 @@
class="dropdown-menu-toggle js-label-select js-multiselect js-extra-options" class="dropdown-menu-toggle js-label-select js-multiselect js-extra-options"
type="button" type="button"
data-toggle="dropdown" data-toggle="dropdown"
data-labels="/root/test/labels.json"
data-show-any="true" data-show-any="true"
data-show-no="true" data-show-no="true"
:data-labels="labelPath"
ref="dropdown"> ref="dropdown">
<span class="dropdown-toggle-text"> <span class="dropdown-toggle-text">
Label Label
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
/* global MilestoneSelect */ /* global MilestoneSelect */
(() => { (() => {
gl.issueBoards.ModalFilterMilestone = Vue.extend({ gl.issueBoards.ModalFilterMilestone = Vue.extend({
props: {
milestonePath: {
type: String,
required: true,
},
},
mounted() { mounted() {
new MilestoneSelect(null, this.$refs.dropdown); new MilestoneSelect(null, this.$refs.dropdown);
}, },
...@@ -14,7 +20,7 @@ ...@@ -14,7 +20,7 @@
data-show-any="true" data-show-any="true"
data-show-upcoming="true" data-show-upcoming="true"
data-field-name="milestone_title" data-field-name="milestone_title"
:data-milestones="'/root/test/milestones.json'" :data-milestones="milestonePath"
ref="dropdown"> ref="dropdown">
<span class="dropdown-toggle-text"> <span class="dropdown-toggle-text">
Milestone Milestone
......
...@@ -11,6 +11,14 @@ ...@@ -11,6 +11,14 @@
type: Number, type: Number,
required: true, required: true,
}, },
milestonePath: {
type: String,
required: true,
},
labelPath: {
type: String,
required: true,
},
}, },
data() { data() {
return ModalStore.store; return ModalStore.store;
...@@ -58,7 +66,9 @@ ...@@ -58,7 +66,9 @@
class="add-issues-search append-bottom-10" class="add-issues-search append-bottom-10"
v-if="showSearch"> v-if="showSearch">
<modal-filters <modal-filters
:project-id="projectId"> :project-id="projectId"
:milestone-path="milestonePath"
:label-path="labelPath">
</modal-filters> </modal-filters>
<input <input
placeholder="Search issues..." placeholder="Search issues..."
......
...@@ -29,6 +29,14 @@ ...@@ -29,6 +29,14 @@
type: Number, type: Number,
required: true, required: true,
}, },
milestonePath: {
type: String,
required: true,
},
labelPath: {
type: String,
required: true,
},
}, },
data() { data() {
return ModalStore.store; return ModalStore.store;
...@@ -123,7 +131,9 @@ ...@@ -123,7 +131,9 @@
v-if="showAddIssuesModal"> v-if="showAddIssuesModal">
<div class="add-issues-container"> <div class="add-issues-container">
<modal-header <modal-header
:project-id="projectId"> :project-id="projectId"
:milestone-path="milestonePath"
:label-path="labelPath">
</modal-header> </modal-header>
<modal-list <modal-list
:issue-link-base="issueLinkBase" :issue-link-base="issueLinkBase"
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
= render "projects/boards/components/sidebar" = render "projects/boards/components/sidebar"
%board-add-issues-modal{ "blank-state-image" => render('shared/empty_states/icons/issues.svg'), %board-add-issues-modal{ "blank-state-image" => render('shared/empty_states/icons/issues.svg'),
"new-issue-path" => new_namespace_project_issue_path(@project.namespace, @project), "new-issue-path" => new_namespace_project_issue_path(@project.namespace, @project),
"milestone-path" => milestones_filter_dropdown_path,
"label-path" => labels_filter_path,
":issue-link-base" => "issueLinkBase", ":issue-link-base" => "issueLinkBase",
":root-path" => "rootPath", ":root-path" => "rootPath",
":project-id" => @project.try(:id) } ":project-id" => @project.try(:id) }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment