diff --git a/frontend/package.json b/frontend/package.json
index cae7256744..467f5c0902 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -37,6 +37,7 @@
"v-calendar": "^2.1.5",
"vue-chartjs": "^3.5.1",
"vue-router": "^3.4.9",
+ "vue-typeahead-bootstrap": "^2.5.5",
"vuex": "^3.6.0"
}
}
diff --git a/frontend/src/bootstrap.js b/frontend/src/bootstrap.js
index 3c47f882b3..69b9af9bad 100644
--- a/frontend/src/bootstrap.js
+++ b/frontend/src/bootstrap.js
@@ -23,6 +23,7 @@ import Vue from 'vue';
import VueI18n from 'vue-i18n'
import * as uiv from 'uiv';
+Vue.config.productionTip = false;
// export jquery for others scripts to use
window.$ = window.jQuery = require('jquery');
diff --git a/frontend/src/components/dashboard/TopBoxes.vue b/frontend/src/components/dashboard/TopBoxes.vue
index df221163ad..f6ba5b2249 100644
--- a/frontend/src/components/dashboard/TopBoxes.vue
+++ b/frontend/src/components/dashboard/TopBoxes.vue
@@ -27,7 +27,7 @@
{{ $t("firefly.balance") }}
-
(x) {{ balance.value_parsed }}
+
{{ balance.value_parsed }}
@@ -35,7 +35,6 @@
- (y)
{{ balance.value_parsed }},
diff --git a/frontend/src/components/store/modules/transactions/create.js b/frontend/src/components/store/modules/transactions/create.js
index 32c2b3f9df..fb59ac23c8 100644
--- a/frontend/src/components/store/modules/transactions/create.js
+++ b/frontend/src/components/store/modules/transactions/create.js
@@ -18,12 +18,36 @@
* along with this program. If not, see .
*/
+let date = new Date;
// initial state
const state = () => ({
- transactionType: 'any',
- transactions: []
-})
+ transactionType: 'any',
+ transactions: [],
+ sourceAllowedTypes: ['Asset account', 'Revenue account', 'Loan', 'Debt', 'Mortgage'],
+ defaultTransaction: {
+ // basic
+ description: '',
+ date: date.toISOString().split('T')[0],
+ time: ('0' + date.getHours()).slice(-2) + ':' + ('0' + date.getMinutes()).slice(-2) + ':' + ('0' + date.getSeconds()).slice(-2),
+
+ // accounts:
+ source_account: {
+ id: 0,
+ name: "",
+ type: "",
+ currency_id: 0,
+ currency_name: '',
+ currency_code: '',
+ currency_decimal_places: 2
+ },
+ source_allowed_types: ['Asset account', 'Revenue account', 'Loan', 'Debt', 'Mortgage'],
+
+ // meta data
+ budget_id: 0
+ },
+ }
+)
// getters
@@ -33,7 +57,13 @@ const getters = {
},
transactionType: state => {
return state.transactionType;
- }
+ },
+ defaultTransaction: state => {
+ return state.defaultTransaction;
+ },
+ sourceAllowedTypes: state => {
+ return state.sourceAllowedTypes;
+ },
// // `getters` is localized to this module's getters
// // you can use rootGetters via 4th argument of getters
// someGetter (state, getters, rootState, rootGetters) {
@@ -50,12 +80,7 @@ const actions = {}
// mutations
const mutations = {
addTransaction(state) {
- state.transactions.push(
- {
- description: '',
- date: new Date
- }
- );
+ state.transactions.push(state.defaultTransaction);
},
deleteTransaction(state, index) {
this.state.transactions.splice(index, 1);
diff --git a/frontend/src/components/transactions/Create.vue b/frontend/src/components/transactions/Create.vue
index dd0673a62f..96cafb2738 100644
--- a/frontend/src/components/transactions/Create.vue
+++ b/frontend/src/components/transactions/Create.vue
@@ -25,125 +25,308 @@