Update transaction form

This commit is contained in:
James Cole
2020-03-13 06:22:50 +01:00
parent 72a4e86e2f
commit a2c0f0666f
37 changed files with 213 additions and 75 deletions

View File

@@ -62,6 +62,7 @@
</template>
<script>
import Autocomplete from '@trevoreyre/autocomplete-vue'
export default {
props: ['error', 'value', 'index'],
name: "TransactionDescription",
@@ -69,6 +70,9 @@
this.target = this.$refs.descr;
this.descriptionAutoCompleteURI = document.getElementsByTagName('base')[0].href + "json/transaction-journals/all?search=";
},
components: {
Autocomplete
},
data() {
return {
descriptionAutoCompleteURI: null,
@@ -78,14 +82,17 @@
}
},
methods: {
search: function(input) {
return ['ab','cd'];
},
hasError: function () {
return this.error.length > 0;
},
clearDescription: function () {
//props.value = '';
this.name = '';
this.$refs.input.value = '';
this.$emit('input', this.$refs.input.value);
this.description = '';
this.$refs.descr.value = '';
this.$emit('input', this.$refs.descr.value);
// some event?
this.$emit('clear:description')
},