diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 2e4d7dc304..172fe1bfe3 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -7,61 +7,12 @@ require('./bootstrap'); window.Vue = require('vue'); -import moment from 'moment'; -import accounting from 'accounting'; -import Lang from './lang.js'; - -Vue.filter('trans', (...args) => { - return Lang.get(...args); -}); - -Vue.filter('formatDate', function (value) { - - if (value) { - moment.locale(window.language); - return moment(String(value)).format(window.month_and_day_js); - } -}); - -Vue.filter('formatAmount', function (value) { - if (value) { - value = parseFloat(value); - let parsed = accounting.formatMoney(value, window.currencySymbol, window.frac_digits, window.mon_thousands_sep, window.mon_decimal_point, accountingConfig); - if (value < 0) { - return '' + parsed + ''; - } - if (value > 0) { - return '' + parsed + ''; - } - return '' + parsed + ''; - } -}); - - /** - * 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. + * Components for OAuth2 tokens. */ - -Vue.component('example-component', require('./components/ExampleComponent.vue')); - -Vue.component('bills-index', require('./components/bills/Index.vue')); - -Vue.component( - 'passport-clients', - require('./components/passport/Clients.vue') -); - -Vue.component( - 'passport-authorized-clients', - require('./components/passport/AuthorizedClients.vue') -); - -Vue.component( - 'passport-personal-access-tokens', - require('./components/passport/PersonalAccessTokens.vue') -); +Vue.component('passport-clients', require('./components/passport/Clients.vue')); +Vue.component('passport-authorized-clients', require('./components/passport/AuthorizedClients.vue')); +Vue.component('passport-personal-access-tokens', require('./components/passport/PersonalAccessTokens.vue')); const app = new Vue({