diff --git a/http/account.go b/http/account.go index ecfc409..3951868 100644 --- a/http/account.go +++ b/http/account.go @@ -13,6 +13,7 @@ type AccountData struct { Account *postgres.Account Categories []postgres.GetCategoriesRow Transactions []postgres.GetTransactionsForAccountRow + Payees []postgres.Payee } func (h *Handler) account(c *gin.Context) { @@ -43,11 +44,18 @@ func (h *Handler) account(c *gin.Context) { return } + payees, err := h.Service.GetPayees(c.Request.Context(), data.Budget.ID) + if err != nil { + c.AbortWithError(http.StatusNotFound, err) + return + } + d := AccountData{ data, &account, categories, transactions, + payees, } c.HTML(http.StatusOK, "account.html", d) diff --git a/web/account.html b/web/account.html index b3af46f..da2755d 100644 --- a/web/account.html +++ b/web/account.html @@ -12,6 +12,41 @@
{{.Date.Format "02.01.2006"}} |