mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Better event.
This commit is contained in:
parent
fb821ea63e
commit
419c1a75dd
@ -33,15 +33,14 @@
|
|||||||
:custom-fields="customFields"
|
:custom-fields="customFields"
|
||||||
:submitted-transaction="submittedTransaction"
|
:submitted-transaction="submittedTransaction"
|
||||||
v-on:uploaded-attachments="uploadedAttachment($event)"
|
v-on:uploaded-attachments="uploadedAttachment($event)"
|
||||||
v-on:set-description="storeField($event)"
|
|
||||||
v-on:set-marker-location="storeLocation($event)"
|
v-on:set-marker-location="storeLocation($event)"
|
||||||
v-on:set-account="storeAccountValue($event)"
|
v-on:set-account="storeAccountValue($event)"
|
||||||
v-on:switch-accounts="switchAccounts($event)"
|
v-on:switch-accounts="switchAccounts($event)"
|
||||||
v-on:set-amount="storeAmount(index, $event)"
|
|
||||||
v-on:set-foreign-currency-id="storeField($event)"
|
|
||||||
v-on:set-foreign-amount="storeField($event)"
|
|
||||||
v-on:set-date="storeDate($event)"
|
v-on:set-date="storeDate($event)"
|
||||||
v-on:set-time="storeTime($event)"
|
v-on:set-time="storeTime($event)"
|
||||||
|
v-on:set-amount="storeField($event)"
|
||||||
|
v-on:set-foreign-currency-id="storeField($event)"
|
||||||
|
v-on:set-foreign-amount="storeField($event)"
|
||||||
v-on:set-custom-date="storeField($event)"
|
v-on:set-custom-date="storeField($event)"
|
||||||
v-on:set-budget="storeField($event)"
|
v-on:set-budget="storeField($event)"
|
||||||
v-on:set-category="storeField($event)"
|
v-on:set-category="storeField($event)"
|
||||||
@ -50,8 +49,9 @@
|
|||||||
v-on:set-piggy-bank="storeField($event)"
|
v-on:set-piggy-bank="storeField($event)"
|
||||||
v-on:set-internal-reference="storeField($event)"
|
v-on:set-internal-reference="storeField($event)"
|
||||||
v-on:set-external-url="storeField($event)"
|
v-on:set-external-url="storeField($event)"
|
||||||
v-on:set-notes="storeNotes(index, $event)"
|
v-on:set-notes="storeField($event)"
|
||||||
v-on:set-links="storeLinks(index, $event)"
|
v-on:set-links="storeField($event)"
|
||||||
|
v-on:set-description="storeField($event)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -402,55 +402,12 @@ export default {
|
|||||||
storeField: function (payload) {
|
storeField: function (payload) {
|
||||||
this.updateField(payload);
|
this.updateField(payload);
|
||||||
},
|
},
|
||||||
storeDescription: function (index, value) {
|
|
||||||
this.updateField({field: 'description', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeForeignCurrencyId: function (index, value) {
|
|
||||||
console.log('storeForeignCurrencyId(' + index + ',' + value + ')');
|
|
||||||
this.updateField({field: 'foreign_currency_id', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeAmount: function (index, value) {
|
|
||||||
this.updateField({field: 'amount', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeForeignAmount: function (index, value) {
|
|
||||||
this.updateField({field: 'foreign_amount', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeDate: function (value) {
|
storeDate: function (value) {
|
||||||
this.setDate(value.date)
|
this.setDate(value.date)
|
||||||
},
|
},
|
||||||
storeTime: function (value) {
|
storeTime: function (value) {
|
||||||
this.setTime(value.time)
|
this.setTime(value.time)
|
||||||
},
|
},
|
||||||
storeCustomDate: function (index, payload) {
|
|
||||||
this.updateField({field: payload.field, index: index, value: payload.date});
|
|
||||||
},
|
|
||||||
storeBudget: function (index, value) {
|
|
||||||
this.updateField({field: 'budget_id', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeCategory: function (index, value) {
|
|
||||||
this.updateField({field: 'category', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeBill: function (index, value) {
|
|
||||||
this.updateField({field: 'bill_id', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeTags: function (index, value) {
|
|
||||||
this.updateField({field: 'tags', index: index, value: value});
|
|
||||||
},
|
|
||||||
storePiggyBank: function (index, value) {
|
|
||||||
this.updateField({field: 'piggy_bank_id', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeInternalReference: function (index, value) {
|
|
||||||
this.updateField({field: 'internal_reference', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeExternalUrl: function (index, value) {
|
|
||||||
this.updateField({field: 'external_url', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeNotes: function (index, value) {
|
|
||||||
this.updateField({field: 'notes', index: index, value: value});
|
|
||||||
},
|
|
||||||
storeLinks: function (index, value) {
|
|
||||||
this.updateField({field: 'links', index: index, value: value});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculate the transaction type based on what's currently in the store.
|
* Calculate the transaction type based on what's currently in the store.
|
||||||
|
@ -60,9 +60,9 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
transactionAmount: function (value) {
|
transactionAmount: function (value) {
|
||||||
this.$emit('set-amount', value);
|
this.$emit('set-amount', {field: 'amount', index: this.index, value: value});
|
||||||
},
|
},
|
||||||
amount: function(value) {
|
amount: function (value) {
|
||||||
this.transactionAmount = value;
|
this.transactionAmount = value;
|
||||||
},
|
},
|
||||||
sourceCurrencySymbol: function (value) {
|
sourceCurrencySymbol: function (value) {
|
||||||
@ -72,14 +72,14 @@ export default {
|
|||||||
this.dstCurrencySymbol = value;
|
this.dstCurrencySymbol = value;
|
||||||
},
|
},
|
||||||
|
|
||||||
transactionType: function(value) {
|
transactionType: function (value) {
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case 'Transfer':
|
case 'Transfer':
|
||||||
case 'Withdrawal':
|
case 'Withdrawal':
|
||||||
this.currencySymbol =this.srcCurrencySymbol;
|
this.currencySymbol = this.srcCurrencySymbol;
|
||||||
break;
|
break;
|
||||||
case 'Deposit':
|
case 'Deposit':
|
||||||
this.currencySymbol =this.dstCurrencySymbol;
|
this.currencySymbol = this.dstCurrencySymbol;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -216,9 +216,7 @@ export default {
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
links: function (value) {
|
links: function (value) {
|
||||||
// TODO
|
this.$emit('set-links', {index: this.index, field: 'links', value: lodashClonedeep(value)});
|
||||||
this.$emit('set-links', lodashClonedeep(value));
|
|
||||||
//this.updateField({index: this.index, field: 'links', value: lodashClonedeep(value)});
|
|
||||||
},
|
},
|
||||||
customFields: function (value) {
|
customFields: function (value) {
|
||||||
this.availableFields = value;
|
this.availableFields = value;
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
|||||||
this.availableFields = value;
|
this.availableFields = value;
|
||||||
},
|
},
|
||||||
notes: function (value) {
|
notes: function (value) {
|
||||||
this.$emit('set-notes', value);
|
this.$emit('set-notes', {field: 'notes', index: this.index, value: value});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user