Add ability to edit payees
This commit is contained in:
@ -13,6 +13,7 @@ type TransactionData struct {
|
||||
Transaction *postgres.Transaction
|
||||
Account *postgres.Account
|
||||
Categories []postgres.GetCategoriesRow
|
||||
Payees []postgres.Payee
|
||||
}
|
||||
|
||||
func (h *Handler) transaction(c *gin.Context) {
|
||||
@ -43,11 +44,18 @@ func (h *Handler) transaction(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 := TransactionData{
|
||||
data,
|
||||
&transaction,
|
||||
&account,
|
||||
categories,
|
||||
payees,
|
||||
}
|
||||
|
||||
c.HTML(http.StatusOK, "transaction.html", d)
|
||||
|
Reference in New Issue
Block a user