feat: pay bills
This commit is contained in:
parent
d747454f4a
commit
8c681282ef
15 changed files with 607 additions and 65 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package pages
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/routeurl"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/layouts"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/components/card"
|
||||
import "git.juancwu.dev/juancwu/budgit/internal/ui/components/button"
|
||||
|
|
@ -8,12 +9,10 @@ import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon"
|
|||
import "git.juancwu.dev/juancwu/budgit/internal/ui/utils"
|
||||
|
||||
type SpaceAccountPageProps struct {
|
||||
SpaceID string
|
||||
AccountID string
|
||||
AccountName string
|
||||
AccountDescription string
|
||||
AccountNumber string
|
||||
AccountBalance decimal.Decimal
|
||||
SpaceID string
|
||||
AccountID string
|
||||
AccountName string
|
||||
AccountBalance decimal.Decimal
|
||||
}
|
||||
|
||||
templ SpaceAccountPage(props SpaceAccountPageProps) {
|
||||
|
|
@ -35,16 +34,10 @@ templ SpaceAccountPage(props SpaceAccountPageProps) {
|
|||
@card.Title() {
|
||||
{ props.AccountName }
|
||||
}
|
||||
@card.Description(card.DescriptionProps{Class: "text-sm"}) {
|
||||
{ props.AccountDescription }
|
||||
}
|
||||
}
|
||||
@card.Content() {
|
||||
<h1 class={ utils.TwMerge(balanceTextClasses...) }>${ utils.FormatDecimalWithThousands(props.AccountBalance.StringFixedBank(2)) }</h1>
|
||||
<p class="text-sm text-muted-foreground">Available Balance</p>
|
||||
<p class="mt-8 text-sm text-muted-foreground">
|
||||
Account <span>•••• { props.AccountNumber }</span>
|
||||
</p>
|
||||
}
|
||||
}
|
||||
@card.Card(card.Props{Class: "rounded-sm col-span-full md:col-span-4"}) {
|
||||
|
|
@ -57,6 +50,7 @@ templ SpaceAccountPage(props SpaceAccountPageProps) {
|
|||
@button.Button(button.Props{
|
||||
Class: "w-full flex gap-2 md:gap-4 items-center",
|
||||
Variant: button.VariantDefault,
|
||||
Href: routeurl.URL("page.app.spaces.space.accounts.account.bills.create", "spaceID", props.SpaceID, "accountID", props.AccountID),
|
||||
}) {
|
||||
Pay Bills
|
||||
@icon.HandCoins()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue