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.

41 lines
1.1 KiB
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';
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');
2023-03-04 22:38:38 +05:30
const {
fullPath,
hasIssueWeightsFeature,
issuesListPath,
2023-03-17 16:20:25 +05:30
registerPath,
signInPath,
2023-03-04 22:38:38 +05:30
hasIterationsFeature,
hasOkrsFeature,
hasIssuableHealthStatusFeature,
} = 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,
2023-03-04 22:38:38 +05:30
projectPath: fullPath,
2022-07-23 23:45:48 +05:30
hasIssueWeightsFeature: parseBoolean(hasIssueWeightsFeature),
2023-03-04 22:38:38 +05:30
hasOkrsFeature: parseBoolean(hasOkrsFeature),
2022-07-16 23:28:13 +05:30
issuesListPath,
2023-03-17 16:20:25 +05:30
registerPath,
signInPath,
2022-11-25 23:54:43 +05:30
hasIterationsFeature: parseBoolean(hasIterationsFeature),
2023-03-04 22:38:38 +05:30
hasIssuableHealthStatusFeature: parseBoolean(hasIssuableHealthStatusFeature),
2022-04-04 11:22:00 +05:30
},
2021-11-11 11:23:49 +05:30
render(createElement) {
return createElement(App);
},
});
};