2021-02-22 17:27:13 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import { convertObjectPropsToCamelCase } from '~/lib/utils/common_utils';
|
|
|
|
import AdminUsersApp from './components/app.vue';
|
|
|
|
|
2021-03-08 18:12:59 +05:30
|
|
|
export default function (el = document.querySelector('#js-admin-users-app')) {
|
2021-02-22 17:27:13 +05:30
|
|
|
if (!el) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
const { users, paths } = el.dataset;
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
2021-03-08 18:12:59 +05:30
|
|
|
render: (createElement) =>
|
2021-02-22 17:27:13 +05:30
|
|
|
createElement(AdminUsersApp, {
|
|
|
|
props: {
|
|
|
|
users: convertObjectPropsToCamelCase(JSON.parse(users), { deep: true }),
|
|
|
|
paths: convertObjectPropsToCamelCase(JSON.parse(paths)),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
}
|