2020-08-25 02:10:18 -04:00
|
|
|
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-02-16 01:12:24 -05:00
|
|
|
name: 'RelatedIssuesRoot',
|
2020-08-25 02:10:18 -04:00
|
|
|
components: {
|
|
|
|
relatedIssuesRoot: RelatedIssuesRoot,
|
|
|
|
},
|
2020-12-23 19:10:25 -05:00
|
|
|
render: (createElement) =>
|
2020-08-25 02:10:18 -04:00
|
|
|
createElement('related-issues-root', {
|
|
|
|
props: {
|
|
|
|
endpoint: relatedIssuesRootElement.dataset.endpoint,
|
|
|
|
canAdmin: parseBoolean(relatedIssuesRootElement.dataset.canAddRelatedIssues),
|
|
|
|
helpPath: relatedIssuesRootElement.dataset.helpPath,
|
|
|
|
showCategorizedIssues: parseBoolean(
|
|
|
|
relatedIssuesRootElement.dataset.showCategorizedIssues,
|
|
|
|
),
|
2022-03-17 02:08:26 -04:00
|
|
|
autoCompleteEpics: false,
|
2020-08-25 02:10:18 -04:00
|
|
|
},
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|