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} |
}
}
}
templ account_summary_rows(accounts *[]types.TwoIntsItem){
for _, value := range *accounts {
Account: {strconv.Itoa(value.Item2)}
if value.Item1 > 0 {
-${strconv.Itoa(value.Item1)}
} else {
+${strconv.Itoa(value.Item1)}
}
}
}
templ transaction_quick_access() {
}
templ right_panel_quick_access() {
}