| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | /* | 
					
						
							| 
									
										
										
										
											2020-02-19 17:13:01 +01:00
										 |  |  |  * create_transactions.js | 
					
						
							| 
									
										
										
										
											2020-01-25 06:08:56 +01:00
										 |  |  |  * Copyright (c) 2019 james@firefly-iii.org | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  |  * | 
					
						
							|  |  |  |  * This file is part of Firefly III (https://github.com/firefly-iii).
 | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU Affero General Public License as | 
					
						
							|  |  |  |  * published by the Free Software Foundation, either version 3 of the | 
					
						
							|  |  |  |  * License, or (at your option) any later version. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  |  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  |  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  |  * GNU Affero General Public License for more details. | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * You should have received a copy of the GNU Affero General Public License | 
					
						
							|  |  |  |  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import CustomAttachments from "./components/transactions/CustomAttachments"; | 
					
						
							|  |  |  | import CreateTransaction from './components/transactions/CreateTransaction'; | 
					
						
							|  |  |  | import CustomDate from "./components/transactions/CustomDate"; | 
					
						
							|  |  |  | import CustomString from "./components/transactions/CustomString"; | 
					
						
							|  |  |  | import CustomTextarea from "./components/transactions/CustomTextarea"; | 
					
						
							|  |  |  | import StandardDate from "./components/transactions/StandardDate"; | 
					
						
							|  |  |  | import GroupDescription from "./components/transactions/GroupDescription"; | 
					
						
							|  |  |  | import TransactionDescription from "./components/transactions/TransactionDescription"; | 
					
						
							|  |  |  | import CustomTransactionFields from "./components/transactions/CustomTransactionFields"; | 
					
						
							|  |  |  | import PiggyBank from "./components/transactions/PiggyBank"; | 
					
						
							|  |  |  | import Tags from "./components/transactions/Tags"; | 
					
						
							|  |  |  | import Category from "./components/transactions/Category"; | 
					
						
							|  |  |  | import Amount from "./components/transactions/Amount"; | 
					
						
							|  |  |  | import ForeignAmountSelect from "./components/transactions/ForeignAmountSelect"; | 
					
						
							|  |  |  | import TransactionType from "./components/transactions/TransactionType"; | 
					
						
							|  |  |  | import AccountSelect from "./components/transactions/AccountSelect"; | 
					
						
							|  |  |  | import Budget from "./components/transactions/Budget"; | 
					
						
							| 
									
										
										
										
											2020-07-23 19:40:10 +02:00
										 |  |  | import CustomUri from "./components/transactions/CustomUri"; | 
					
						
							| 
									
										
										
										
											2020-08-01 15:31:11 +02:00
										 |  |  | import Bill from "./components/transactions/Bill"; | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | /** | 
					
						
							| 
									
										
										
										
											2020-02-19 17:13:01 +01:00
										 |  |  |  * 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 | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-14 15:51:20 +02:00
										 |  |  | require('./bootstrap'); | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | // components for create and edit transactions.
 | 
					
						
							|  |  |  | Vue.component('budget', Budget); | 
					
						
							| 
									
										
										
										
											2020-08-01 15:31:11 +02:00
										 |  |  | Vue.component('bill', Bill); | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | Vue.component('custom-date', CustomDate); | 
					
						
							|  |  |  | Vue.component('custom-string', CustomString); | 
					
						
							|  |  |  | Vue.component('custom-attachments', CustomAttachments); | 
					
						
							|  |  |  | Vue.component('custom-textarea', CustomTextarea); | 
					
						
							| 
									
										
										
										
											2020-07-23 19:40:10 +02:00
										 |  |  | Vue.component('custom-uri', CustomUri); | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | 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); | 
					
						
							|  |  |  | Vue.component('category', Category); | 
					
						
							|  |  |  | Vue.component('amount', Amount); | 
					
						
							|  |  |  | Vue.component('foreign-amount', ForeignAmountSelect); | 
					
						
							|  |  |  | Vue.component('transaction-type', TransactionType); | 
					
						
							|  |  |  | Vue.component('account-select', AccountSelect); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | Vue.component('create-transaction', CreateTransaction); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-06-14 15:51:20 +02:00
										 |  |  | const i18n = require('./i18n'); | 
					
						
							| 
									
										
										
										
											2020-01-04 07:24:43 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | let props = {}; | 
					
						
							| 
									
										
										
										
											2021-07-11 09:31:10 +02:00
										 |  |  | const app = new Vue({ | 
					
						
							| 
									
										
										
										
											2020-10-17 21:41:13 +02:00
										 |  |  |     i18n, | 
					
						
							|  |  |  |     el: "#create_transaction", | 
					
						
							|  |  |  |     render: (createElement) => { | 
					
						
							|  |  |  |         return createElement(CreateTransaction, {props: props}); | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  | }); |