From 34fafcafa3ada541ce841612b1d3bd1321cf29df Mon Sep 17 00:00:00 2001 From: Ruidy Date: Fri, 15 Nov 2024 16:50:22 +0100 Subject: [PATCH] line items --- internal/view/booking_by_id.templ | 121 +++++++++++++++++---------- internal/view/booking_by_id_templ.go | 24 +++--- 2 files changed, 89 insertions(+), 56 deletions(-) diff --git a/internal/view/booking_by_id.templ b/internal/view/booking_by_id.templ index 28430f3..d0a2366 100644 --- a/internal/view/booking_by_id.templ +++ b/internal/view/booking_by_id.templ @@ -30,19 +30,19 @@ templ BookingById(booking *BookingViewModel) {
@BookingForm(*booking)
-
-

Line Items

-
- +
+

Line Items

+
+
- - - - - - - + + + + + + + @@ -51,50 +51,83 @@ templ BookingById(booking *BookingViewModel) { } - - - - - - - - + + + +
ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)
{ booking.Total }
Total:{ booking.Total }
-
- Add line -
-
- - - -
-
+ +
+ +
+ +
} } diff --git a/internal/view/booking_by_id_templ.go b/internal/view/booking_by_id_templ.go index 6fbc520..237864f 100644 --- a/internal/view/booking_by_id_templ.go +++ b/internal/view/booking_by_id_templ.go @@ -117,7 +117,7 @@ func BookingById(booking *BookingViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Line Items

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Line Items

ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -127,33 +127,33 @@ func BookingById(booking *BookingViewModel) templ.Component { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Total:") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(booking.Total) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/view/booking_by_id.templ`, Line: 60, Col: 38} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/view/booking_by_id.templ`, Line: 56, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Add line
Add New Line Item
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err }