diff --git a/internal/ui/pages/space_account.templ b/internal/ui/pages/space_account.templ index feaf30c..91e3ffb 100644 --- a/internal/ui/pages/space_account.templ +++ b/internal/ui/pages/space_account.templ @@ -27,7 +27,7 @@ templ SpaceAccountPage(props SpaceAccountPageProps) { balanceTextClasses = append(balanceTextClasses, "text-red-600 dark:text-red-400") } }} - @layouts.App("Space Account", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID)) { + @layouts.App("Space Account", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID), spaceAccountSidebarContent(props.SpaceID, props.AccountID, props.AccountName)) {
@card.Card(card.Props{ diff --git a/internal/ui/pages/space_account_transactions.templ b/internal/ui/pages/space_account_transactions.templ index 5489f6b..e153e84 100644 --- a/internal/ui/pages/space_account_transactions.templ +++ b/internal/ui/pages/space_account_transactions.templ @@ -22,7 +22,7 @@ type SpaceAccountTransactionsPageProps struct { } templ SpaceAccountTransactionsPage(props SpaceAccountTransactionsPageProps) { - @layouts.App("Transactions", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID)) { + @layouts.App("Transactions", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID), spaceAccountSidebarContent(props.SpaceID, props.AccountID, props.AccountName)) {
diff --git a/internal/ui/pages/space_create_bill.templ b/internal/ui/pages/space_create_bill.templ index d412ea2..eb3f699 100644 --- a/internal/ui/pages/space_create_bill.templ +++ b/internal/ui/pages/space_create_bill.templ @@ -11,7 +11,7 @@ type SpaceCreateBillPageProps struct { } templ SpaceCreateBillPage(props SpaceCreateBillPageProps) { - @layouts.App("Pay Bills", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID)) { + @layouts.App("Pay Bills", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID), spaceAccountSidebarContent(props.SpaceID, props.AccountID, props.AccountName)) {

Pay Bills

diff --git a/internal/ui/pages/space_create_deposit.templ b/internal/ui/pages/space_create_deposit.templ index 24eb76c..20c4a73 100644 --- a/internal/ui/pages/space_create_deposit.templ +++ b/internal/ui/pages/space_create_deposit.templ @@ -11,7 +11,7 @@ type SpaceCreateDepositPageProps struct { } templ SpaceCreateDepositPage(props SpaceCreateDepositPageProps) { - @layouts.App("Deposit Funds", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID)) { + @layouts.App("Deposit Funds", spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID), spaceAccountSidebarContent(props.SpaceID, props.AccountID, props.AccountName)) {

Deposit Funds

diff --git a/internal/ui/pages/space_overview.templ b/internal/ui/pages/space_overview.templ index c89be11..d7d2072 100644 --- a/internal/ui/pages/space_overview.templ +++ b/internal/ui/pages/space_overview.templ @@ -56,3 +56,53 @@ templ spaceSpecificSidebarContent(spaceID string) { } } } + +templ spaceAccountSidebarContent(spaceID, accountID, accountName string) { + @sidebar.Group() { + @sidebar.GroupLabel() { + { accountName } + } + @sidebar.Menu() { + @sidebar.MenuItem() { + @sidebar.MenuButton(sidebar.MenuButtonProps{ + Href: routeurl.URL("page.app.spaces.space.accounts.account.overview", "spaceID", spaceID, "accountID", accountID), + IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces.space.accounts.account.overview", "spaceID", spaceID, "accountID", accountID), + Tooltip: "Account Overview", + }) { + @icon.Wallet() + Overview + } + } + @sidebar.MenuItem() { + @sidebar.MenuButton(sidebar.MenuButtonProps{ + Href: routeurl.URL("page.app.spaces.space.accounts.account.transactions", "spaceID", spaceID, "accountID", accountID), + IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces.space.accounts.account.transactions", "spaceID", spaceID, "accountID", accountID), + Tooltip: "Transactions", + }) { + @icon.ReceiptText() + Transactions + } + } + @sidebar.MenuItem() { + @sidebar.MenuButton(sidebar.MenuButtonProps{ + Href: routeurl.URL("page.app.spaces.space.accounts.account.bills.create", "spaceID", spaceID, "accountID", accountID), + IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces.space.accounts.account.bills.create", "spaceID", spaceID, "accountID", accountID), + Tooltip: "Pay Bills", + }) { + @icon.HandCoins() + Pay Bills + } + } + @sidebar.MenuItem() { + @sidebar.MenuButton(sidebar.MenuButtonProps{ + Href: routeurl.URL("page.app.spaces.space.accounts.account.deposits.create", "spaceID", spaceID, "accountID", accountID), + IsActive: ctxkeys.URLPath(ctx) == routeurl.URL("page.app.spaces.space.accounts.account.deposits.create", "spaceID", spaceID, "accountID", accountID), + Tooltip: "Deposit Funds", + }) { + @icon.BanknoteArrowDown() + Deposit Funds + } + } + } + } +}