Split components for future recycling.

This commit is contained in:
James Cole
2021-02-14 19:13:42 +01:00
parent bfd925fbfe
commit e51f593a2d
37 changed files with 687 additions and 430 deletions

View File

@@ -27,7 +27,7 @@
<input
type="text"
name="internal_reference[]"
v-model="value"
v-model="reference"
:placeholder="$t('firefly.internal_reference')"
:class="errors.length > 0 ? 'form-control is-invalid' : 'form-control'"
/>
@@ -46,6 +46,11 @@ const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers
export default {
props: ['index', 'value', 'errors'],
name: "TransactionInternalReference",
data() {
return {
reference: this.value
}
},
methods: {
...mapMutations(
[
@@ -54,13 +59,9 @@ export default {
),
},
watch: {
value: function (value) {
reference: function (value) {
this.updateField({field: 'internal_reference', index: this.index, value: value});
}
}
}
</script>
<style scoped>
</style>