Commit d2819ea4 authored by Justin Ho's avatar Justin Ho

Pass labels path and feature flag to frontend

Allow labels to be edited when feature flag is enabled
parent 07c08220
......@@ -19,6 +19,9 @@ export default {
},
mixins: [glFeatureFlagsMixin()],
inject: {
issueLabelsPath: {
default: null,
},
issuesListPath: {
default: null,
},
......@@ -56,6 +59,9 @@ export default {
reference() {
return this.issue.references?.relative;
},
canUpdateLabels() {
return this.glFeatures.jiraIssueDetailsEditLabels;
},
canUpdateStatus() {
return this.glFeatures.jiraIssueDetailsEditStatus;
},
......@@ -122,7 +128,10 @@ export default {
@issue-field-updated="onIssueStatusUpdated"
/>
<labels-select
:allow-label-edit="canUpdateLabels"
:allow-multiselect="true"
:selected-labels="issue.labels"
:labels-fetch-path="issueLabelsPath"
:labels-filter-base-path="issuesListPath"
:labels-filter-param="$options.labelsFilterParam"
variant="sidebar"
......
......@@ -9,11 +9,12 @@ export default function initJiraIssueShow({ mountPointSelector }) {
return null;
}
const { issuesShowPath, issuesListPath } = mountPointEl.dataset;
const { issueLabelsPath, issuesShowPath, issuesListPath } = mountPointEl.dataset;
return new Vue({
el: mountPointEl,
provide: {
issueLabelsPath,
issuesShowPath,
issuesListPath,
},
......
......@@ -53,6 +53,7 @@ module EE
def jira_issues_show_data
{
issue_labels_path: labels_project_integrations_jira_issue_path(@project, params[:id]),
issues_show_path: project_integrations_jira_issue_path(@project, params[:id], format: :json),
issues_list_path: project_integrations_jira_issues_path(@project)
}
......
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