1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/resources/js/app.js
David Bomba b989cf82b7
Client CRUD with VueJS (#2497)
*  working on js localizations

* remove dependencies

* Pad Hashes to at least 10 characters in length

* Inject JS translations into front end dynamically

* Implement VueJS for Client Edit Page with reactivity

* Conditionally hide rows if not enabled (custom_value)

* Split client template into smaller components

* implementing ui buttons

* CRUD cycles of a client

* Working on Client CRUD - Integrity constraint issues
2018-11-11 00:24:36 +11:00

41 lines
1.3 KiB
JavaScript
Vendored

/**
* 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');
window.Vue = require('vue');
/* Development only*/
Vue.config.devtools = true;
window.axios = require('axios');
window.axios.defaults.headers.common = {
'X-Requested-With': 'XMLHttpRequest',
'X-CSRF-TOKEN' : document.querySelector('meta[name="csrf-token"]').getAttribute('content')
};
/* Allows us to use our native translation easily using {{ trans() }} syntax */
const _ = require('lodash');
Vue.prototype.trans = string => _.get(window.i18n, string);
/**
* 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('client-edit', require('./components/client/ClientEdit.vue'));
Vue.component('client-edit-form', require('./components/client/ClientEditForm.vue'));
Vue.component('contact-edit', require('./components/client/ClientContactEdit.vue'));
window.onload = function () {
const app = new Vue({
el: '#app'
});
}