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 @@

- {{ $t('firefly.new_transaction')}} - ({{ $t('firefly.single_split') }} {{ index + 1}} / {{ transactions.length }}) + {{ $t('firefly.create_new_transaction') }} + {{ $t('firefly.single_split') }} {{ index + 1 }} / {{ transactions.length }}

-
+
-
- -
- -
-
-
-
-

- Source -

-
-
-

- Amount -
- foreign amount -

-
-
-

- Destination -

-
-
-
-
- -
-
-
-
- - Date and time. -
-
- Other date -
-
- Other date -
-
-
-
-
-
- -
-
-
-
- Budget
- Cat
-
-
- Bill
- Tags
- Piggy
-
-
-
-
-
-
- -
-
-
-
- Internal ref
- External URL
- Notes -
-
- Transaction links
- Attachments -
+

{{ $t('firefly.basic_journal_information') }}

-
+ +
+
+ +
+
+ +
+
+

XS

+

SM

+

MD

+

LG

+

XL

+
+
+ + +
+
+ + +
+ +
+ +
+ + +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ +
+
+ other dates +
+
+ +
+
+
+
+ other dates +
+
+
+ + + +
+
+ + +
+
+ +
+
+ + +

{{ $t('firefly.transaction_journal_meta') }}

+ + +
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +

{{ $t('firefly.transaction_journal_extra') }}

+ +
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
@@ -177,14 +360,17 @@ + + \ No newline at end of file diff --git a/frontend/src/components/transactions/TransactionBudget.vue b/frontend/src/components/transactions/TransactionBudget.vue new file mode 100644 index 0000000000..b1b53b218b --- /dev/null +++ b/frontend/src/components/transactions/TransactionBudget.vue @@ -0,0 +1,115 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/src/components/transactions/TransactionDate.vue b/frontend/src/components/transactions/TransactionDate.vue new file mode 100644 index 0000000000..ed5be152b4 --- /dev/null +++ b/frontend/src/components/transactions/TransactionDate.vue @@ -0,0 +1,100 @@ + + + + + + + \ No newline at end of file diff --git a/frontend/src/components/transactions/TransactionDescription.vue b/frontend/src/components/transactions/TransactionDescription.vue index 26c2e11e0c..6f55bdab19 100644 --- a/frontend/src/components/transactions/TransactionDescription.vue +++ b/frontend/src/components/transactions/TransactionDescription.vue @@ -20,23 +20,24 @@