Update frontend.

This commit is contained in:
James Cole
2021-02-15 20:32:29 +01:00
parent 0ac0dbc774
commit 5e7c57744c
42 changed files with 275 additions and 99 deletions

View File

@@ -20,7 +20,7 @@
<template>
<div class="form-group">
<div class="form-group" v-if="showField">
<div class="text-xs d-none d-lg-block d-xl-block">
{{ $t('firefly.notes') }}
</div>
@@ -41,11 +41,20 @@ import {createNamespacedHelpers} from "vuex";
const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('transactions/create')
export default {
props: ['index', 'value', 'errors'],
props: ['index', 'value', 'errors', 'customFields'],
name: "TransactionNotes",
data() {
return {
notes: this.value
notes: this.value,
availableFields: this.customFields
}
},
computed: {
showField: function () {
if ('notes' in this.availableFields) {
return this.availableFields.notes;
}
return false;
}
},
methods: {
@@ -56,6 +65,9 @@ export default {
),
},
watch: {
customFields: function (value) {
this.availableFields = value;
},
notes: function (value) {
this.updateField({field: 'notes', index: this.index, value: value});
}