feat: add currency to accounts
This commit is contained in:
parent
4be5385db7
commit
ca0fec563e
21 changed files with 627 additions and 63 deletions
|
|
@ -6,10 +6,11 @@ import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon"
|
|||
import "git.juancwu.dev/juancwu/budgit/internal/routeurl"
|
||||
|
||||
type AccountCardInfo struct {
|
||||
SpaceID string
|
||||
ID string
|
||||
Name string
|
||||
Balance decimal.Decimal
|
||||
SpaceID string
|
||||
ID string
|
||||
Name string
|
||||
Balance decimal.Decimal
|
||||
Currency string
|
||||
}
|
||||
|
||||
templ AccountCard(info AccountCardInfo) {
|
||||
|
|
@ -22,7 +23,7 @@ templ AccountCard(info AccountCardInfo) {
|
|||
<div>
|
||||
<p class="font-semibold">{ info.Name }</p>
|
||||
<p class="text-xs text-muted-foreground">
|
||||
${ info.Balance.StringFixedBank(2) }
|
||||
${ info.Balance.StringFixedBank(2) } { info.Currency }
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue