package web
import (
"nickiel.net/recount_server/types"
"strconv"
)
templ transaction_rows(transactions *[]types.HumanLegibleTransaction) {
for i, value := range *transactions {
|
{strconv.Itoa(value.Id)} |
if value.AccountName.Valid {
{value.AccountName.String} |
} else {
{strconv.Itoa(value.Account)} |
}
{value.Date.Format("01/02/2006")} |
$ |
if (len(value.Amount) > 0 && value.Amount[0] == '-') {
{value.Amount} |
} else {
+{value.Amount} |
}
}
}