diff --git a/assets/icons/stripe.png b/assets/icons/stripe.png new file mode 100644 index 0000000..0f10769 Binary files /dev/null and b/assets/icons/stripe.png differ diff --git a/assets/icons/whatsapp.png b/assets/icons/whatsapp.png new file mode 100644 index 0000000..26ad8c9 Binary files /dev/null and b/assets/icons/whatsapp.png differ diff --git a/internal/server/handler_booking.go b/internal/server/handler_booking.go index 9a675ae..47c96df 100644 --- a/internal/server/handler_booking.go +++ b/internal/server/handler_booking.go @@ -93,6 +93,7 @@ func handleBookingPage(bs *booking.Service) echo.HandlerFunc { Platform: b.Platform, PlatformFees: strconv.FormatFloat(b.PlatformFees, 'f', 2, 64), Url: templ.EscapeString(fmt.Sprintf("%s/%d/items", constants.RouteBooking, b.Id)), + PdfUrl: templ.SafeURL(fmt.Sprintf("%s/pdf/%d", constants.RouteBooking, b.Id)), Items: u.Map(b.Items, func(i booking.Item) views.ItemViewModel { return views.ItemViewModel{ Item: i.Item, diff --git a/internal/server/routes.go b/internal/server/routes.go index 9a7900a..59709e0 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -10,5 +10,5 @@ func (s Server) MountHandlers() { s.Router.POST("bookings/:id/items", handleCreateItem(s.bs)) s.Router.GET("/reports", handleReportsPage()) s.Router.GET("/reports/do", handleComputeReport(s.bs)) - s.Router.GET("/pdf", handleCreateInvoicePdf(s.ps)) + s.Router.GET("/pdf/:id", handleCreateInvoicePdf(s.bs, s.ps)) } diff --git a/internal/views/booking_by_id.templ b/internal/views/booking_by_id.templ index 528dbab..6fe3444 100644 --- a/internal/views/booking_by_id.templ +++ b/internal/views/booking_by_id.templ @@ -15,6 +15,7 @@ type BookingViewModel struct { ItemList []string PaymentMethods []string Url string + PdfUrl templ.SafeURL Total string } @@ -31,11 +32,13 @@ templ BookingById(booking *BookingViewModel) { @BaseLayout() {