Fix #4864 and relatred issues.

This commit is contained in:
James Cole 2021-06-20 18:39:15 +02:00
parent c9eeaf7e95
commit 2fa927266f
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
6 changed files with 14 additions and 25 deletions

View File

@ -195,7 +195,7 @@ export default {
/**
* Grabbed from the store.
*/
...mapGetters('transactions/create', ['transactionType', 'transactions', 'groupTitle','defaultErrors']),
...mapGetters('transactions/create', ['transactionType', 'transactions', 'groupTitle', 'defaultErrors']),
...mapGetters('root', ['listPageSize'])
},
watch: {
@ -713,13 +713,20 @@ export default {
let current = array.tags[i];
if (typeof current === 'object' && null !== current) {
currentSplit.tags.push(current.text);
console.log('Add tag "' + current.text + '" from object.');
continue;
}
if (typeof current === 'string') {
currentSplit.tags.push(current);
console.log('Add tag "' + current + '" from string.');
continue;
}
console.log('Is neither.');
}
}
}
console.log('Current split tags is now: ');
console.log(currentSplit.tags);
// bills and piggy banks
if (0 !== array.piggy_bank_id) {

View File

@ -50,10 +50,10 @@
</div>
</div>
<div class="row">
<div class="col-lg-8 col-md-12 col-sm-12 col-xs-12">
<div class="col-lg-10 col-md-8 col-sm-12 col-xs-12">
<div class="card">
<div class="card-body p-0">
<b-table id="my-table" striped hover responsive="md" primary-key="key" :no-local-sorting="false"
<b-table id="my-table" small striped hover responsive="md" primary-key="key" :no-local-sorting="false"
:items="transactionRows"
:fields="fields"
:per-page="perPage"
@ -75,7 +75,7 @@
</span>
</template>
<template #cell(description)="data">
<span><span class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></span></span>
<span class="fas fa-angle-right" v-if="data.item.split && data.item.split_parent !== null"></span>
<a :class="false === data.item.active ? 'text-muted' : ''" :href="'./transactions/show/' + data.item.id" :title="data.value">{{
data.value
}}</a>
@ -139,7 +139,7 @@
</div>
</div>
</div>
<div class="col-lg-4">
<div class="col-lg-2 col-md-4">
<div class="card">
<div class="card-body">
Box previous periods

View File

@ -50,7 +50,6 @@ export default {
return {
billList: [],
bill: this.value,
emitEvent: true
}
},
created() {
@ -93,10 +92,7 @@ export default {
this.bill = value;
},
bill: function (value) {
if (true === this.emitEvent) {
this.$emit('set-field', {field: 'bill_id', index: this.index, value: value});
}
this.emitEvent = true;
}
},
}

View File

@ -43,7 +43,6 @@ export default {
return {
notes: this.value,
availableFields: this.customFields,
emitEvent: true
}
},
computed: {
@ -56,17 +55,13 @@ export default {
},
watch: {
value: function (value) {
this.emitEvent = false;
this.notes = value;
},
customFields: function (value) {
this.availableFields = value;
},
notes: function (value) {
if (true === this.emitEvent) {
this.$emit('set-field', {field: 'notes', index: this.index, value: value});
}
this.emitEvent = true;
this.$emit('set-field', {field: 'notes', index: this.index, value: value});
}
}
}

View File

@ -51,7 +51,6 @@ export default {
return {
piggyList: [],
piggy_bank_id: this.value,
emitEvent: true
}
},
created() {
@ -90,13 +89,10 @@ export default {
},
watch: {
value: function (value) {
this.emitEvent = false;
this.piggy_bank_id = value;
},
piggy_bank_id: function (value) {
if (true === this.emitEvent) {
this.$emit('set-field', {field: 'piggy_bank_id', index: this.index, value: value});
}
this.$emit('set-field', {field: 'piggy_bank_id', index: this.index, value: value});
this.emitEvent = true;
}
}

View File

@ -58,7 +58,6 @@ export default {
currentTag: '',
updateTags: true, // the idea is that this is always true, except when the tags-function sets the value.
tagList: this.value,
emitEvent: true
};
},
created() {
@ -74,15 +73,11 @@ export default {
watch: {
'currentTag': 'initItems',
value: function (value) {
this.emitEvent = false;
this.tagList = value;
},
tagList: function (value) {
// console.log('watch tagList');
if (true === this.emitEvent) {
this.$emit('set-field', {field: 'tags', index: this.index, value: value});
}
this.emitEvent = true;
this.updateTags = false;
this.tags = value;
},