feat: add space account page

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
juancwu 2026-04-22 03:44:04 +00:00
commit d747454f4a
8 changed files with 169 additions and 2 deletions

View file

@ -146,6 +146,7 @@ func (h *spaceHandler) SpaceOverviewPage(w http.ResponseWriter, r *http.Request)
accountCards := make([]blocks.AccountCardInfo, 0, len(accounts))
for _, a := range accounts {
accountCards = append(accountCards, blocks.AccountCardInfo{
SpaceID: space.ID,
ID: a.ID,
Name: a.Name,
Balance: a.Balance,
@ -158,3 +159,17 @@ func (h *spaceHandler) SpaceOverviewPage(w http.ResponseWriter, r *http.Request)
Accounts: accountCards,
}))
}
func (h *spaceHandler) SpaceAccountPage(w http.ResponseWriter, r *http.Request) {
spaceID := r.PathValue("spaceID")
accountID := r.PathValue("accountID")
ui.Render(w, r, pages.SpaceAccountPage(pages.SpaceAccountPageProps{
SpaceID: spaceID,
AccountID: accountID,
AccountName: "Money Account",
AccountDescription: "Vault Infinite Priority",
AccountNumber: "4492",
AccountBalance: decimal.NewFromFloat(32093.11),
}))
}