115
window._=require('lodash');
window.Popper=require('popper.js').default;
try{
window.$=window.jQuery=require('jquery');
require('bootstrap');
}catch(e){}
window.axios=require('axios');
window.axios.defaults.headers.common['X-Requested-With']='XMLHttpRequest';
lettoken=document.head.querySelector('meta[name="csrf-token"]');
if(token){
window.axios.defaults.headers.common['X-CSRF-TOKEN']=token.content;
}else{
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-
token');
}
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
require('air-datepicker');
require('select2');
window.Vue=require('vue');
letVeeValidate=require('vee-validate');
window.VueValidateDictionaryRu=require('vee-validate/dist/locale/ru');
Vue.use(VeeValidate,{
locale:'ru',
dictionary:{
ru:{
messages:VueValidateDictionaryRu
}
}
});
/**
* Next, we will create a fresh Vue application instance and attach it to
* the page. Then, you may begin adding components to this application
* or customize the JavaScript scaffolding to fit your unique needs.
*/
//Vue.component('example-component', require('./components/ExampleComponent.vue'));
Vue.component('lister-component',require('./components/ListerComponent.vue'));
Vue.component('clients-list',require('./components/ClientsList.vue'));
Vue.component('clients-add',require('./components/ClientsAdd.vue'));
Vue.component('order-add',require('./components/OrderAdd.vue'));
Vue.component('order-list',require('./components/OrderList.vue'));
Vue.component('building-add',require('./components/BuildingAdd.vue'));
Vue.component('building-list',require('./components/BuildingList.vue'));
if($("#lister").length>0){
constlister=newVue({
el:'#lister',
data:{
listData:phpToVueData.listData,
model:phpToVueData.model,
name:phpToVueData.name
},