This commit is contained in:
James Cole
2019-08-23 06:10:03 +02:00
parent 57b2a8d459
commit 3d444eb833
5 changed files with 59487 additions and 14 deletions

View File

@@ -24,9 +24,11 @@
v-bind:class="{ 'has-error': hasError()}"
v-if="typeof this.transactionType === 'undefined' || this.transactionType === 'withdrawal' || this.transactionType === 'Withdrawal' || this.transactionType === '' || null === this.transactionType">
<div class="col-sm-12">
<select name="budget[]" ref="budget" @input="handleInput" class="form-control"
<select name="budget[]" ref="budget" v-model="value" @input="handleInput" class="form-control"
v-if="this.budgets.length > 0">
<option v-for="budget in this.budgets" :label="budget.name" :value="budget.id">{{budget.name}}</option>
<option v-for="cBudget in this.budgets" :label="cBudget.name" :value="cBudget.id"
>{{cBudget.name}}</option>
</select>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
@@ -41,6 +43,8 @@
props: ['transactionType', 'value', 'error'],
mounted() {
this.loadBudgets();
console.log('budget value');
console.log(this.value);
},
data() {
return {

View File

@@ -369,9 +369,6 @@
submit(e) {
const uri = './api/v1/transactions?_token=' + document.head.querySelector('meta[name="csrf-token"]').content;
const data = this.convertData();
if (this.resetFormAfter) {
this.resetTransactions();
}
let button = $(e.currentTarget);
button.prop("disabled", true);

View File

@@ -147,13 +147,6 @@
v-model="transaction.category"
:error="transaction.errors.category"
></category>
<!--
<piggy-bank
:transactionType="transactionType"
v-model="transaction.piggy_bank"
:error="transaction.errors.piggy_bank"
></piggy-bank>
-->
<tags
:tags="transaction.tags"
v-model="transaction.tags"

View File

@@ -61,7 +61,6 @@
return {
descriptionAutoCompleteURI: null,
name: null,
value: null,
description: null,
target: null,
}