debian-mirror-gitlab/app/assets/javascripts/related_issues/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
1 KiB
JavaScript
Raw Normal View History

2020-11-24 15:15:51 +05:30
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import RelatedIssuesRoot from './components/related_issues_root.vue';
export default function initRelatedIssues() {
const relatedIssuesRootElement = document.querySelector('.js-related-issues-root');
if (relatedIssuesRootElement) {
// eslint-disable-next-line no-new
new Vue({
el: relatedIssuesRootElement,
2022-04-04 11:22:00 +05:30
name: 'RelatedIssuesRoot',
2020-11-24 15:15:51 +05:30
components: {
relatedIssuesRoot: RelatedIssuesRoot,
},
2021-03-08 18:12:59 +05:30
render: (createElement) =>
2020-11-24 15:15:51 +05:30
createElement('related-issues-root', {
props: {
endpoint: relatedIssuesRootElement.dataset.endpoint,
canAdmin: parseBoolean(relatedIssuesRootElement.dataset.canAddRelatedIssues),
helpPath: relatedIssuesRootElement.dataset.helpPath,
showCategorizedIssues: parseBoolean(
relatedIssuesRootElement.dataset.showCategorizedIssues,
),
2022-05-07 20:08:51 +05:30
autoCompleteEpics: false,
2020-11-24 15:15:51 +05:30
},
}),
});
}
}