Skip to content

Commit

Permalink
adjust parser
Browse files Browse the repository at this point in the history
  • Loading branch information
carkom committed Jan 7, 2024
1 parent 433390e commit 2701d06
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ function parseAmountFields(

function parseCategoryFields(trans, categories) {
let match = null;
for (category of categories) {
categories.forEach(category => {
if (category.id === trans.category) {
return null;
}
if (category.name === trans.category) {
match = category.id;
}
}
});
return match;
}

Expand Down Expand Up @@ -374,7 +374,12 @@ function Transaction({
<Field width="flex" title={transaction.notes}>
{transaction.notes}
</Field>
<Field width="flex" title={categoryList.includes(transaction.category) && transaction.category}>
<Field
width="flex"
title={
categoryList.includes(transaction.category) && transaction.category
}
>
{categoryList.includes(transaction.category) && transaction.category}
</Field>
{splitMode ? (
Expand Down

0 comments on commit 2701d06

Please sign in to comment.