mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-20 10:11:21 +00:00
Update frontend.
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user