package transaction import ( "fmt" "github.com/google/uuid" "spend-sparrow/internal/account" "spend-sparrow/internal/core" "spend-sparrow/internal/template/svg" "spend-sparrow/internal/treasure_chest_types" "time" ) templ TransactionComp(items templ.Component, filter TransactionItemsFilter, accounts []*account.Account, treasureChests []*treasure_chest_types.TreasureChest) {
{ transaction.Timestamp.String() }
if transaction.AccountId != nil { { accounts[*transaction.AccountId] } } else { }
if transaction.TreasureChestId != nil { { treasureChests[*transaction.TreasureChestId] } } else { }
if transaction.Party != "" { { transaction.Party } } else { }
if transaction.Description != "" { { transaction.Description } } else { }
{ core.FormatEuros(transaction.Value) }
} else {{ core.FormatEuros(transaction.Value) }
}