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

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

26 lines
743 B
JavaScript
Raw Normal View History

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';
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';
import { createApolloProvider } from './graphql/provider';
2021-11-11 11:23:49 +05:30
export const initWorkItemsRoot = () => {
const el = document.querySelector('#js-work-items');
2022-07-23 23:45:48 +05:30
const { fullPath, hasIssueWeightsFeature, issuesListPath } = 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),
apolloProvider: createApolloProvider(),
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-04-04 11:22:00 +05:30
},
2021-11-11 11:23:49 +05:30
render(createElement) {
return createElement(App);
},
});
};