package treasurechest import "spend-sparrow/internal/template/svg" import "spend-sparrow/internal/types" import "github.com/google/uuid" templ TreasureChest(treasureChests []*types.TreasureChest, monthlySums map[uuid.UUID]int64) {
{ treasureChest.Name }
if treasureChest.ParentId != nil { + { types.FormatEuros(monthlySums[treasureChest.Id]) } per month }
if treasureChest.ParentId != nil { if treasureChest.CurrentBalance < 0 {{ types.FormatEuros(treasureChest.CurrentBalance) }
} else {{ types.FormatEuros(treasureChest.CurrentBalance) }
} } @svg.Eye() View