package transaction import ( "fmt" "github.com/google/uuid" "spend-sparrow/internal/account" "spend-sparrow/internal/template/svg" "spend-sparrow/internal/treasure_chest_types" "spend-sparrow/internal/types" "time" ) templ Transaction(items templ.Component, filter types.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 { }
{ types.FormatEuros(transaction.Value) }
} else {{ types.FormatEuros(transaction.Value) }
}