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
27
28
29
|
import Vue from 'vue';
import ImportProjectMembersModal from '~/invite_members/components/import_project_members_modal.vue';
import { parseBoolean, convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
export default function initImportProjectMembersModal() {
const el = document.querySelector('.js-import-project-members-modal');
if (!el) {
return false;
}
const { projectId, projectName, reloadPageOnSubmit, usersLimitDataset } = el.dataset;
return new Vue({
el,
provide: {
name: projectName,
},
render: (createElement) =>
createElement(ImportProjectMembersModal, {
props: {
projectId,
projectName,
reloadPageOnSubmit: parseBoolean(reloadPageOnSubmit),
usersLimitDataset: convertObjectPropsToCamelCase(JSON.parse(usersLimitDataset || '{}')),
},
}),
});
}
|