budgit/internal/ui/pages/space_edit_transaction.templ
2026-05-03 23:16:08 +00:00

33 lines
1.2 KiB
Text

package pages
import "git.juancwu.dev/juancwu/budgit/internal/model"
import "git.juancwu.dev/juancwu/budgit/internal/ui/forms"
import "git.juancwu.dev/juancwu/budgit/internal/ui/layouts"
type SpaceEditTransactionPageProps struct {
SpaceID string
SpaceName string
AccountID string
AccountName string
TransactionType model.TransactionType
BillForm forms.EditBillProps
DepositForm forms.EditDepositProps
}
templ SpaceEditTransactionPage(props SpaceEditTransactionPageProps) {
@layouts.AppWithBreadcrumb("Edit Transaction", accountChildBreadcrumb(props.SpaceID, props.SpaceName, props.AccountID, props.AccountName, "Edit Transaction"), spaceOverviewSidebarContent(), spaceSpecificSidebarContent(props.SpaceID), spaceAccountSidebarContent(props.SpaceID, props.AccountID)) {
<div class="container max-w-3xl px-6 py-8 mx-auto space-y-8">
<div>
<h1 class="text-3xl font-bold">Edit Transaction</h1>
<p class="text-muted-foreground mt-2">
Update the details of this transaction in { props.AccountName }.
</p>
</div>
if props.TransactionType == model.TransactionTypeDeposit {
@forms.EditDeposit(props.DepositForm)
} else {
@forms.EditBill(props.BillForm)
}
</div>
}
}