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