Single event

This commit is contained in:
James Cole
2021-02-23 06:45:09 +01:00
parent 419c1a75dd
commit 09d751076e
15 changed files with 15 additions and 28 deletions

View File

@@ -38,20 +38,7 @@
v-on:switch-accounts="switchAccounts($event)" v-on:switch-accounts="switchAccounts($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-field="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-budget="storeField($event)"
v-on:set-category="storeField($event)"
v-on:set-bill="storeField($event)"
v-on:set-tags="storeField($event)"
v-on:set-piggy-bank="storeField($event)"
v-on:set-internal-reference="storeField($event)"
v-on:set-external-url="storeField($event)"
v-on:set-notes="storeField($event)"
v-on:set-links="storeField($event)"
v-on:set-description="storeField($event)"
/> />
</div> </div>

View File

@@ -60,7 +60,7 @@ export default {
}, },
watch: { watch: {
transactionAmount: function (value) { transactionAmount: function (value) {
this.$emit('set-amount', {field: 'amount', index: this.index, value: value}); this.$emit('set-field', {field: 'amount', index: this.index, value: value});
}, },
amount: function (value) { amount: function (value) {
this.transactionAmount = value; this.transactionAmount = value;

View File

@@ -89,7 +89,7 @@ export default {
}, },
watch: { watch: {
bill: function (value) { bill: function (value) {
this.$emit('set-bill', {field: 'bill_id', index: this.index, value: value}); this.$emit('set-field', {field: 'bill_id', index: this.index, value: value});
} }
}, },
} }

View File

@@ -88,7 +88,7 @@ export default {
}, },
watch: { watch: {
budget: function (value) { budget: function (value) {
this.$emit('set-budget', {field: 'budget_id', index: this.index, value: value}); this.$emit('set-field', {field: 'budget_id', index: this.index, value: value});
} }
}, },
} }

View File

@@ -93,7 +93,7 @@ export default {
}, },
watch: { watch: {
category: function (value) { category: function (value) {
this.$emit('set-category', {field: 'category', index: this.index, value: value}); this.$emit('set-field', {field: 'category', index: this.index, value: value});
} }
}, },
computed: { computed: {

View File

@@ -84,7 +84,7 @@ export default {
return this.dates[field] ?? ''; return this.dates[field] ?? '';
}, },
setFieldValue(event, field) { setFieldValue(event, field) {
this.$emit('set-custom-date', {field: field, index: this.index, value: event.target.value}); this.$emit('set-field', {field: field, index: this.index, value: event.target.value});
}, },
} }
} }

View File

@@ -86,7 +86,7 @@ export default {
}, },
watch: { watch: {
description: function (value) { description: function (value) {
this.$emit('set-description', {field: 'description', index: this.index, value: value}); this.$emit('set-field', {field: 'description', index: this.index, value: value});
// //
} }
}, },

View File

@@ -62,7 +62,7 @@ export default {
this.availableFields = value; this.availableFields = value;
}, },
url: function (value) { url: function (value) {
this.$emit('set-external-url', {field: 'external_url', index: index, value: value}); this.$emit('set-field', {field: 'external_url', index: index, value: value});
} }
} }
} }

View File

@@ -59,7 +59,7 @@ export default {
}, },
watch: { watch: {
amount: function(value) { amount: function(value) {
this.$emit('set-foreign-amount', {field: 'foreign_amount', index: this.index, value: value}); this.$emit('set-field', {field: 'foreign_amount', index: this.index, value: value});
} }
}, },
computed: { computed: {

View File

@@ -58,7 +58,7 @@ export default {
this.dstCurrencyId = value; this.dstCurrencyId = value;
}, },
selectedCurrency: function(value) { selectedCurrency: function(value) {
this.$emit('set-foreign-currency-id',{field: 'foreign_currency_id', index: this.index, value: value}); this.$emit('set-field',{field: 'foreign_currency_id', index: this.index, value: value});
}, },
transactionType: function (value) { transactionType: function (value) {
this.lockedCurrency = 0; this.lockedCurrency = 0;

View File

@@ -63,7 +63,7 @@ export default {
this.availableFields = value; this.availableFields = value;
}, },
reference: function (value) { reference: function (value) {
this.$emit('set-internal-reference', {field: 'internal_reference', index: this.index, value: value}); this.$emit('set-field', {field: 'internal_reference', index: this.index, value: value});
} }
} }
} }

View File

@@ -216,7 +216,7 @@ export default {
}, },
watch: { watch: {
links: function (value) { links: function (value) {
this.$emit('set-links', {index: this.index, field: 'links', value: lodashClonedeep(value)}); this.$emit('set-field', {index: this.index, field: 'links', value: lodashClonedeep(value)});
}, },
customFields: function (value) { customFields: function (value) {
this.availableFields = value; this.availableFields = value;

View File

@@ -58,7 +58,7 @@ export default {
this.availableFields = value; this.availableFields = value;
}, },
notes: function (value) { notes: function (value) {
this.$emit('set-notes', {field: 'notes', index: this.index, value: value}); this.$emit('set-field', {field: 'notes', index: this.index, value: value});
} }
} }
} }

View File

@@ -90,7 +90,7 @@ export default {
}, },
watch: { watch: {
piggy_bank_id: function (value) { piggy_bank_id: function (value) {
this.$emit('set-piggy-bank', {field: 'piggy_bank_id', index: this.index, value: value}); this.$emit('set-field', {field: 'piggy_bank_id', index: this.index, value: value});
} }
} }
} }

View File

@@ -63,7 +63,7 @@ export default {
watch: { watch: {
'currentTag': 'initItems', 'currentTag': 'initItems',
tagList: function (value) { tagList: function (value) {
this.$emit('set-tags', {field: 'tags', index: this.index, value: value}); this.$emit('set-field', {field: 'tags', index: this.index, value: value});
this.updateTags = false; this.updateTags = false;
this.tags = value; this.tags = value;
}, },