2021-11-11 11:23:49 +05:30
|
|
|
import Vue from 'vue';
|
2022-07-23 23:45:48 +05:30
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2022-10-11 01:57:18 +05:30
|
|
|
import { apolloProvider } from '~/graphql_shared/issuable_client';
|
2021-11-11 11:23:49 +05:30
|
|
|
import App from './components/app.vue';
|
2021-12-11 22:18:48 +05:30
|
|
|
import { createRouter } from './router';
|
2021-11-11 11:23:49 +05:30
|
|
|
|
|
|
|
export const initWorkItemsRoot = () => {
|
|
|
|
const el = document.querySelector('#js-work-items');
|
2022-11-25 23:54:43 +05:30
|
|
|
const {
|
|
|
|
fullPath,
|
|
|
|
hasIssueWeightsFeature,
|
|
|
|
issuesListPath,
|
|
|
|
projectNamespace,
|
|
|
|
hasIterationsFeature,
|
|
|
|
} = el.dataset;
|
2021-11-11 11:23:49 +05:30
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2022-08-13 15:12:31 +05:30
|
|
|
name: 'WorkItemsRoot',
|
2021-12-11 22:18:48 +05:30
|
|
|
router: createRouter(el.dataset.fullPath),
|
2022-10-11 01:57:18 +05:30
|
|
|
apolloProvider,
|
2022-04-04 11:22:00 +05:30
|
|
|
provide: {
|
|
|
|
fullPath,
|
2022-07-23 23:45:48 +05:30
|
|
|
hasIssueWeightsFeature: parseBoolean(hasIssueWeightsFeature),
|
2022-07-16 23:28:13 +05:30
|
|
|
issuesListPath,
|
2022-11-25 23:54:43 +05:30
|
|
|
projectNamespace,
|
|
|
|
hasIterationsFeature: parseBoolean(hasIterationsFeature),
|
2022-04-04 11:22:00 +05:30
|
|
|
},
|
2021-11-11 11:23:49 +05:30
|
|
|
render(createElement) {
|
|
|
|
return createElement(App);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|