package view import ( "fmt" "github.com/rjNemo/rentease/internal/view/layout" ) type BookingViewModel struct { Id string Name string PhoneNumber string CustomerNumber string Email string From string To string Platform string Platforms []string PlatformFees string Items []ItemViewModel ItemList []string PaymentMethods []string Url string PdfUrl templ.SafeURL Total string } type ItemViewModel struct { Id string Item string Quantity string Price string SubTotal string PaymentMethod string PaymentStatus string ItemUrl string } templ BookingById(booking *BookingViewModel) { @layout.BaseLayout() {

{ booking.Name }

{ booking.Id }

Create PDF

Line Items

for _, item := range booking.Items { @LineItem(&item) }
Item Quantity Price (€) Payment Method Payment Status Sub-total (€)
{ booking.Total }
Add line
} }