mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 19:01:39 +00:00
New and optimised Vue code, courtesy of @GaryQ
This commit is contained in:
28
resources/assets/js/create_transaction.js
vendored
28
resources/assets/js/create_transaction.js
vendored
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* app.js
|
||||
* create_transactions.js
|
||||
* Copyright (c) 2019 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -18,15 +18,8 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import * as uiv from 'uiv';
|
||||
import CustomAttachments from "./components/transactions/CustomAttachments";
|
||||
import CreateTransaction from './components/transactions/CreateTransaction';
|
||||
import EditTransaction from './components/transactions/EditTransaction';
|
||||
import Clients from './components/passport/Clients';
|
||||
import AuthorizedClients from "./components/passport/AuthorizedClients";
|
||||
import PersonalAccessTokens from "./components/passport/PersonalAccessTokens";
|
||||
import CustomDate from "./components/transactions/CustomDate";
|
||||
import CustomString from "./components/transactions/CustomString";
|
||||
import CustomTextarea from "./components/transactions/CustomTextarea";
|
||||
@@ -44,18 +37,12 @@ import AccountSelect from "./components/transactions/AccountSelect";
|
||||
import Budget from "./components/transactions/Budget";
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* First we will load Axios via bootstrap.js
|
||||
* jquery and bootstrap-sass preloaded in app.js
|
||||
* vue, uiv and vuei18n are in app_vue.js
|
||||
*/
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
Vue.use(VueI18n);
|
||||
window.Vue = Vue;
|
||||
|
||||
Vue.use(uiv);
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
// components for create and edit transactions.
|
||||
Vue.component('budget', Budget);
|
||||
@@ -66,7 +53,6 @@ Vue.component('custom-textarea', CustomTextarea);
|
||||
Vue.component('standard-date', StandardDate);
|
||||
Vue.component('group-description', GroupDescription);
|
||||
Vue.component('transaction-description', TransactionDescription);
|
||||
|
||||
Vue.component('custom-transaction-fields', CustomTransactionFields);
|
||||
Vue.component('piggy-bank', PiggyBank);
|
||||
Vue.component('tags', Tags);
|
||||
@@ -80,7 +66,7 @@ Vue.component('create-transaction', CreateTransaction);
|
||||
|
||||
|
||||
// Create VueI18n instance with options
|
||||
const i18n = new VueI18n({
|
||||
const i18n = new vuei18n({
|
||||
locale: document.documentElement.lang, // set locale
|
||||
fallbackLocale: 'en',
|
||||
messages: {
|
||||
@@ -111,6 +97,6 @@ new Vue({
|
||||
i18n,
|
||||
el: "#create_transaction",
|
||||
render: (createElement) => {
|
||||
return createElement(CreateTransaction, { props: props })
|
||||
return createElement(CreateTransaction, { props: props });
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user