From 19461020efe5deb6b73781c2b8c36acdef913f2c Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 19 Dec 2021 06:56:11 +0100 Subject: [PATCH] Various layout fixes. --- .github/mergify.yml | 6 ++++++ frontend/src/components/accounts/Show.vue | 7 ++++++- frontend/src/components/transactions/Create.vue | 2 +- frontend/src/components/transactions/Edit.vue | 10 ++++++---- frontend/src/components/transactions/SplitForm.vue | 6 +++--- frontend/src/components/transactions/SplitPills.vue | 2 -- .../src/components/transactions/TransactionAccount.vue | 4 +--- .../src/components/transactions/TransactionAmount.vue | 2 -- .../src/components/transactions/TransactionDate.vue | 10 ++++------ .../components/transactions/TransactionDescription.vue | 5 +---- .../components/transactions/TransactionListLarge.vue | 7 +++++++ 11 files changed, 35 insertions(+), 26 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index ed89260108..782fc7c022 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -5,3 +5,9 @@ pull_request_rules: actions: merge: method: merge + - name: Close all on main + conditions: + - base=main + actions: + close: + message: Please do not open PR's on the `main` branch, but on the `develop` branch only. Thank you! diff --git a/frontend/src/components/accounts/Show.vue b/frontend/src/components/accounts/Show.vue index d7ff2eb0dc..835567534c 100644 --- a/frontend/src/components/accounts/Show.vue +++ b/frontend/src/components/accounts/Show.vue @@ -28,6 +28,7 @@ { // console.log('Now getTransactions() DONE!'); this.total = parseInt(response.data.meta.pagination.total); + if (0 === this.total) { + this.isEmpty = true; + } // let transactions = response.data.data; // console.log('Have downloaded ' + transactions.length + ' transactions'); // console.log(response.data); diff --git a/frontend/src/components/transactions/Create.vue b/frontend/src/components/transactions/Create.vue index 25fca03e49..7dfd65342f 100644 --- a/frontend/src/components/transactions/Create.vue +++ b/frontend/src/components/transactions/Create.vue @@ -448,7 +448,7 @@ export default { this.updateField(payload); if('description' === payload.field) { // jump to account - this.$refs.splitForms[payload.index].$refs.sourceAccount.giveFocus(); + //this.$refs.splitForms[payload.index].$refs.sourceAccount.giveFocus(); } }, storeDate: function (payload) { diff --git a/frontend/src/components/transactions/Edit.vue b/frontend/src/components/transactions/Edit.vue index 949b101d00..77a670274b 100644 --- a/frontend/src/components/transactions/Edit.vue +++ b/frontend/src/components/transactions/Edit.vue @@ -239,7 +239,7 @@ export default { submittedAttachments: function () { this.finaliseSubmission(); }, - transactionType: function() { + transactionType: function () { this.getExpectedSourceTypes(); } }, @@ -320,9 +320,11 @@ export default { result.source_account_name = array.source_name; result.source_account_type = array.source_type; - result.destination_account_id = array.destination_id; - result.destination_account_name = array.destination_name; - result.destination_account_type = array.destination_type; + if (array.destination_type !== 'Cash account') { + result.destination_account_id = array.destination_id; + result.destination_account_name = array.destination_name; + result.destination_account_type = array.destination_type; + } // amount: result.amount = array.amount; diff --git a/frontend/src/components/transactions/SplitForm.vue b/frontend/src/components/transactions/SplitForm.vue index 7ea30c6bbd..b4a4dca460 100644 --- a/frontend/src/components/transactions/SplitForm.vue +++ b/frontend/src/components/transactions/SplitForm.vue @@ -385,13 +385,13 @@ export default { this.$emit('remove-transaction', {index: this.index}); }, - triggerNextAccount: function(e) { + triggerNextAccount: function (e) { //alert(e); - if('source' === e) { + if ('source' === e) { // console.log('Jump to destination!'); this.$refs.destinationAccount.giveFocus(); } - } + }, }, computed: { splitDate: function () { diff --git a/frontend/src/components/transactions/SplitPills.vue b/frontend/src/components/transactions/SplitPills.vue index 64b622fc66..cf9f535bbf 100644 --- a/frontend/src/components/transactions/SplitPills.vue +++ b/frontend/src/components/transactions/SplitPills.vue @@ -20,8 +20,6 @@