James Cole
2021-12-10 16:27:12 +01:00
parent 9731503826
commit 04f5098d06

View File

@@ -23,7 +23,7 @@
<alert :message="errorMessage" type="danger"/> <alert :message="errorMessage" type="danger"/>
<alert :message="successMessage" type="success"/> <alert :message="successMessage" type="success"/>
<form @submit="submitTransaction" autocomplete="off"> <form @submit="submitTransaction" autocomplete="off">
<SplitPills :transactions="transactions" :count="transactions.length"/> <SplitPills ref="pills" :transactions="transactions" :count="transactions.length"/>
<div class="tab-content"> <div class="tab-content">
<SplitForm <SplitForm
v-for="(transaction, index) in this.transactions" v-for="(transaction, index) in this.transactions"
@@ -71,7 +71,7 @@
&nbsp; &nbsp;
</div> </div>
<button type="button" class="btn btn-outline-primary btn-block" @click="addTransactionArray"><span class="far fa-clone"></span> {{ <button type="button" class="btn btn-outline-primary btn-block" @click="addTransactionArray"><span class="far fa-clone"></span> {{
$t('firefly.add_another_split') $t('firefly.add_another_split')
}} }}
</button> </button>
</div> </div>
@@ -221,6 +221,7 @@ export default {
] ]
), ),
addTransactionArray: function (event) { addTransactionArray: function (event) {
console.log('Record call to addTransactionArray');
event.preventDefault(); event.preventDefault();
this.addTransaction(); this.addTransaction();
}, },
@@ -228,7 +229,9 @@ export default {
* Removes a split from the array. * Removes a split from the array.
*/ */
removeTransaction: function (payload) { removeTransaction: function (payload) {
// console.log('Triggered to remove transaction ' + payload.index); console.log('Record call to removeTransaction');
console.log('Triggered to remove transaction ' + payload.index);
window.$('#tab_split_' + (payload.index - 1)).click();
this.$store.commit('transactions/create/deleteTransaction', payload); this.$store.commit('transactions/create/deleteTransaction', payload);
}, },
submitData: function (url, data) { submitData: function (url, data) {