Commit 36e3cda0 authored by Eulyeon Ko's avatar Eulyeon Ko

Use scoped-labels-available over scoped-labels

Per BE reviewer suggestion.
parent f897db6b
......@@ -37,7 +37,7 @@ export default {
openedAgoJira: __('opened %{timeAgoString} by %{user} in Jira'),
},
inject: {
scopedLabels: ['scopedLabels'],
scopedLabelsAvailable: ['scopedLabelsAvailable'],
},
components: {
IssueAssignees,
......@@ -219,7 +219,7 @@ export default {
return mergeUrlParams(params, this.baseUrl);
},
isScoped({ name }) {
return isScopedLabel({ title: name }) && this.scopedLabels;
return isScopedLabel({ title: name }) && this.scopedLabelsAvailable;
},
labelHref({ name }) {
if (this.isJiraIssue) {
......
......@@ -41,12 +41,12 @@ function mountIssuablesListApp() {
}
document.querySelectorAll('.js-issuables-list').forEach(el => {
const { canBulkEdit, emptyStateMeta = {}, scopedLabels, ...data } = el.dataset;
const { canBulkEdit, emptyStateMeta = {}, scopedLabelsAvailable, ...data } = el.dataset;
return new Vue({
el,
provide: {
scopedLabels: parseBoolean(scopedLabels),
scopedLabelsAvailable: parseBoolean(scopedLabelsAvailable),
},
render(createElement) {
return createElement(IssuablesListApp, {
......
......@@ -31,6 +31,6 @@
'empty-state-meta': { svg_path: image_path('illustrations/issues.svg') },
'sort-key': @sort,
type: 'issues',
'scoped-labels': scoped_labels_available?(@group).to_json } }
'scoped-labels-available': scoped_labels_available?(@group).to_json } }
- else
= render 'shared/issues'
......@@ -12,7 +12,7 @@
'can-bulk-edit': @can_bulk_update.to_json,
'sort-key': @sort,
type: type,
'scoped-labels': scoped_labels_available?(@project).to_json } }
'scoped-labels-available': scoped_labels_available?(@project).to_json } }
- else
- empty_state_path = local_assigns.fetch(:empty_state_path, 'shared/empty_states/issues')
%ul.content-list.issues-list.issuable-list{ class: ("manual-ordering" if @sort == 'relative_position') }
......
......@@ -20,4 +20,4 @@
'sort-key': @sort,
type: 'jira',
'project-path': @project.full_path,
'scoped-labels': scoped_labels_available?(@project).to_json } }
'scoped-labels-available': scoped_labels_available?(@project).to_json } }
......@@ -38,7 +38,7 @@ describe('Issuable component', () => {
let DateOrig;
let wrapper;
const factory = (props = {}, scopedLabels = false) => {
const factory = (props = {}, scopedLabelsAvailable = false) => {
wrapper = shallowMount(Issuable, {
propsData: {
issuable: simpleIssue,
......@@ -46,7 +46,7 @@ describe('Issuable component', () => {
...props,
},
provide: {
scopedLabels,
scopedLabelsAvailable,
},
stubs: {
'gl-sprintf': GlSprintf,
......
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