Welcome to mirror list, hosted at ThFree Co, Russian Federation.

work_items_hierarchy_bundle.js « work_items_hierarchy « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2258c725301338de6f15a3c8d1413572ef819502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import Vue from 'vue';
import { parseBoolean } from '~/lib/utils/common_utils';
import App from './components/app.vue';
import { inferLicensePlan } from './hierarchy_util';

export const initWorkItemsHierarchy = () => {
  const el = document.querySelector('#js-work-items-hierarchy');

  const { illustrationPath, hasEpics, hasSubEpics } = el.dataset;

  const licensePlan = inferLicensePlan({
    hasEpics: parseBoolean(hasEpics),
    hasSubEpics: parseBoolean(hasSubEpics),
  });

  return new Vue({
    el,
    provide: {
      illustrationPath,
      licensePlan,
    },
    render(createElement) {
      return createElement(App);
    },
  });
};