From b4ffff3c67a74026a0f77515e211a73d0eaef55d Mon Sep 17 00:00:00 2001 From: Ruidy Date: Wed, 8 Jan 2025 13:52:35 +0100 Subject: [PATCH] improve header layout --- internal/view/booking_by_id_templ.go | 46 +++++++++++++-------------- internal/view/booking_form_templ.go | 36 ++++++++++----------- internal/view/booking_lines_templ.go | 28 ++++++++-------- internal/view/bookings_list_templ.go | 10 +++--- internal/view/bookings_new_templ.go | 16 +++++----- internal/view/layout/base.templ | 2 +- internal/view/layout/base_templ.go | 30 ++++++++--------- internal/view/line_item_templ.go | 44 ++++++++++++------------- internal/view/login_form_templ.go | 24 +++++++------- internal/view/login_templ.go | 10 +++--- internal/view/report_section_templ.go | 44 ++++++++++++------------- internal/view/reports_templ.go | 22 ++++++------- internal/view/success_templ.go | 6 ++-- 13 files changed, 159 insertions(+), 159 deletions(-) diff --git a/internal/view/booking_by_id_templ.go b/internal/view/booking_by_id_templ.go index 8970c4f..c1b91b1 100644 --- a/internal/view/booking_by_id_templ.go +++ b/internal/view/booking_by_id_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package view //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -46,7 +46,7 @@ func BookingById(booking *BookingViewModel) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -59,7 +59,7 @@ func BookingById(booking *BookingViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -72,7 +72,7 @@ func BookingById(booking *BookingViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Create PDF ") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "\" target=\"_blank\">Create PDF ") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } if booking.Canceled { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Canceled") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "Canceled") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } else { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "\" hx-swap=\"outerHTML\">Cancel") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -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 = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "

Line Items

ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -127,7 +127,7 @@ func BookingById(booking *BookingViewModel) templ.Component { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
ItemQuantityPrice (€)Payment MethodPayment StatusSub-total (€)
Total:") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "
Total:") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -140,7 +140,7 @@ func BookingById(booking *BookingViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Add New Line Item
Add New Line Item
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, item := range booking.ItemList { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = layout.BaseLayout().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/internal/view/booking_form_templ.go b/internal/view/booking_form_templ.go index 60f9c11..f9d56bc 100644 --- a/internal/view/booking_form_templ.go +++ b/internal/view/booking_form_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package view //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -29,7 +29,7 @@ func BookingForm(booking BookingViewModel) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/internal/view/booking_lines_templ.go b/internal/view/booking_lines_templ.go index 3dbfffa..1affa46 100644 --- a/internal/view/booking_lines_templ.go +++ b/internal/view/booking_lines_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package view //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -31,12 +31,12 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, b := range bookings { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -58,17 +58,17 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, ">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -81,7 +81,7 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -94,7 +94,7 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -107,7 +107,7 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -120,7 +120,7 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -133,16 +133,16 @@ func BookingLines(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/internal/view/bookings_list_templ.go b/internal/view/bookings_list_templ.go index 1c55a2d..4cbdb42 100644 --- a/internal/view/bookings_list_templ.go +++ b/internal/view/bookings_list_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package view //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -43,7 +43,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Bookings

Overview of the activity

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "

Bookings

Overview of the activity

IDNameTotal (€)FromToPlatform
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -51,17 +51,17 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
IDNameTotal (€)FromToPlatform
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = layout.BaseLayout().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/internal/view/bookings_new_templ.go b/internal/view/bookings_new_templ.go index 193ce28..5f27351 100644 --- a/internal/view/bookings_new_templ.go +++ b/internal/view/bookings_new_templ.go @@ -1,6 +1,6 @@ // Code generated by templ - DO NOT EDIT. -// templ: version: v0.2.793 +// templ: version: v0.3.819 package view //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -43,12 +43,12 @@ func NewBooking(platforms []string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

New Booking

Create a new booking

") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) templ_7745c5c3_Err = layout.BaseLayout().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - return templ_7745c5c3_Err + return nil }) } diff --git a/internal/view/layout/base.templ b/internal/view/layout/base.templ index 4f4955b..cf1decd 100644 --- a/internal/view/layout/base.templ +++ b/internal/view/layout/base.templ @@ -43,7 +43,7 @@ templ head() { } templ navbar() { -