This commit is contained in:
James Cole 2021-03-29 06:53:30 +02:00
parent a243f3d7c2
commit c32e09a2b3
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
2 changed files with 34 additions and 2 deletions

View File

@ -730,7 +730,6 @@ export default {
// meta data // meta data
budget_id: array.budget_id, budget_id: array.budget_id,
category_name: array.category, category_name: array.category,
tags: array.tags,
// optional date fields (6x): // optional date fields (6x):
interest_date: array.interest_date, interest_date: array.interest_date,
@ -750,11 +749,28 @@ export default {
zoom_level: array.zoom_level, zoom_level: array.zoom_level,
longitude: array.longitude, longitude: array.longitude,
latitude: array.latitude, latitude: array.latitude,
tags: [],
// from thing: // from thing:
order: 0, order: 0,
reconciled: false, reconciled: false,
}; };
if (0 !== array.tags.length) {
for (let i in array.tags) {
if (array.tags.hasOwnProperty(i) && /^0$|^[1-9]\d*$/.test(i) && i <= 4294967294) {
// array.tags
let current = array.tags[i];
if(typeof current === 'object' && null !== current) {
currentSplit.tags.push(current.text);
}
if(typeof current === 'string') {
currentSplit.tags.push(current);
}
}
}
}
// bills and piggy banks // bills and piggy banks
if (0 !== array.piggy_bank_id) { if (0 !== array.piggy_bank_id) {
currentSplit.piggy_bank_id = array.piggy_bank_id; currentSplit.piggy_bank_id = array.piggy_bank_id;

View File

@ -500,7 +500,23 @@ export default {
// console.log('tags are different'); // console.log('tags are different');
// console.log(currentTransaction.tags); // console.log(currentTransaction.tags);
// console.log(originalTransaction.tags); // console.log(originalTransaction.tags);
diff.tags = currentTransaction.tags; diff.tags = [];//currentTransaction.tags;
if (0 !== currentTransaction.tags.length) {
for (let ii in currentTransaction.tags) {
if (currentTransaction.tags.hasOwnProperty(ii) && /^0$|^[1-9]\d*$/.test(ii) && ii <= 4294967294) {
// array.tags
let currentTag = currentTransaction.tags[ii];
if(typeof currentTag === 'object' && null !== currentTag) {
diff.tags.push(currentTag.text);
}
if(typeof currentTag === 'string') {
diff.tags.push(currentTag);
}
}
}
}
shouldSubmit = true; shouldSubmit = true;
} }