mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix some tag related issues.
This commit is contained in:
parent
f67a9547cc
commit
788bde5562
2
public/v1/js/app.js
vendored
2
public/v1/js/app.js
vendored
File diff suppressed because one or more lines are too long
6
public/v1/js/ff/index.js
vendored
6
public/v1/js/ff/index.js
vendored
@ -106,7 +106,7 @@ function getBalanceBox() {
|
||||
// show balance in "sums", show single entry in list.
|
||||
for (x in data.sums) {
|
||||
$('#box-balance-sums').html(data.sums[x]);
|
||||
$('#box-balance-list').html(data.incomes[x] + ' / ' + data.expenses[x]);
|
||||
$('#box-balance-list').html(data.incomes[x] + ' + ' + data.expenses[x]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@ -120,7 +120,7 @@ function getBalanceBox() {
|
||||
sum = data.sums[x];
|
||||
expense = data.expenses[x];
|
||||
income = data.incomes[x];
|
||||
string = income + ' / ' + expense + ': ' + sum;
|
||||
string = income + ' + ' + expense + ': ' + sum;
|
||||
if (data.preferred == x) {
|
||||
$('#box-balance-list').html(current + '<span title="' + string + '">' + string + '</span>' + '<br>');
|
||||
}
|
||||
@ -136,7 +136,7 @@ function getBalanceBox() {
|
||||
sum = data.sums[x];
|
||||
expense = data.expenses[x];
|
||||
income = data.incomes[x];
|
||||
string = income + ' / ' + expense + ': ' + sum;
|
||||
string = income + ' + ' + expense + ': ' + sum;
|
||||
if (data.preferred != x) {
|
||||
$('#box-balance-list').html(current + '<span title="' + string + '">' + string + '</span>' + '<br>');
|
||||
}
|
||||
|
@ -297,7 +297,7 @@
|
||||
foreignCurrency = null;
|
||||
// loop tags
|
||||
for (let tagKey in row.tags) {
|
||||
if (row.tags.hasOwnProperty(tagKey) && /^0$|^[1-9]\d*$/.test(tagKey) && key <= 4294967294) {
|
||||
if (row.tags.hasOwnProperty(tagKey) && /^0$|^[1-9]\d*$/.test(tagKey) && tagKey <= 4294967294) {
|
||||
tagList.push(row.tags[tagKey].text);
|
||||
}
|
||||
}
|
||||
|
@ -155,6 +155,7 @@
|
||||
></piggy-bank>
|
||||
-->
|
||||
<tags
|
||||
:tags="transaction.tags"
|
||||
v-model="transaction.tags"
|
||||
:error="transaction.errors.tags"
|
||||
></tags>
|
||||
@ -355,6 +356,14 @@
|
||||
processIncomingGroupRow(transaction) {
|
||||
console.log(transaction);
|
||||
this.setTransactionType(transaction.type);
|
||||
|
||||
let newTags = [];
|
||||
for(let key in transaction.tags) {
|
||||
if (transaction.tags.hasOwnProperty(key) && /^0$|^[1-9]\d*$/.test(key) && key <= 4294967294) {
|
||||
newTags.push({text: transaction.tags[key], tiClasses: []});
|
||||
}
|
||||
}
|
||||
|
||||
this.transactions.push({
|
||||
description: transaction.description,
|
||||
date: transaction.date.substr(0, 10),
|
||||
@ -385,7 +394,8 @@
|
||||
},
|
||||
},
|
||||
budget: transaction.budget_id,
|
||||
tags: transaction.tags,
|
||||
tags: newTags,
|
||||
//tags: 'abc',
|
||||
custom_fields: {
|
||||
interest_date: transaction.interest_date,
|
||||
book_date: transaction.book_date,
|
||||
|
@ -52,9 +52,9 @@
|
||||
data() {
|
||||
return {
|
||||
tag: '',
|
||||
tags: [],
|
||||
autocompleteItems: [],
|
||||
debounce: null,
|
||||
tags: this.value,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -70,6 +70,7 @@
|
||||
return this.error.length > 0;
|
||||
},
|
||||
initItems() {
|
||||
console.log('Now in initItems');
|
||||
if (this.tag.length < 2) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user