2021-06-08 01:23:25 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2018-03-17 18:26:18 +05:30
|
|
|
import initProjectVisibilitySelector from '../../../project_visibility';
|
|
|
|
import initProjectNew from '../../../projects/project_new';
|
2021-06-08 01:23:25 +05:30
|
|
|
import NewProjectCreationApp from './components/app.vue';
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
initProjectVisibilitySelector();
|
|
|
|
initProjectNew.bindEvents();
|
2020-06-23 00:09:42 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
function initNewProjectCreation(el) {
|
|
|
|
const {
|
|
|
|
pushToCreateProjectCommand,
|
|
|
|
workingWithProjectsHelpPath,
|
|
|
|
newProjectGuidelines,
|
|
|
|
hasErrors,
|
|
|
|
isCiCdAvailable,
|
|
|
|
} = el.dataset;
|
2020-06-23 00:09:42 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
const props = {
|
|
|
|
hasErrors: parseBoolean(hasErrors),
|
|
|
|
isCiCdAvailable: parseBoolean(isCiCdAvailable),
|
|
|
|
newProjectGuidelines,
|
|
|
|
};
|
2020-06-23 00:09:42 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
const provide = {
|
|
|
|
workingWithProjectsHelpPath,
|
|
|
|
pushToCreateProjectCommand,
|
|
|
|
};
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
components: {
|
|
|
|
NewProjectCreationApp,
|
|
|
|
},
|
|
|
|
provide,
|
|
|
|
render(h) {
|
|
|
|
return h(NewProjectCreationApp, { props });
|
|
|
|
},
|
2021-04-17 20:07:23 +05:30
|
|
|
});
|
2021-06-08 01:23:25 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
const el = document.querySelector('.js-new-project-creation');
|
|
|
|
|
|
|
|
initNewProjectCreation(el);
|