diff --git a/internal/server/handlers.go b/internal/server/handlers.go
index cfb653d..9b2777e 100644
--- a/internal/server/handlers.go
+++ b/internal/server/handlers.go
@@ -30,7 +30,7 @@ func (s Server) handleHomePage() echo.HandlerFunc {
func (s Server) handleListBookingPage() echo.HandlerFunc {
return func(c echo.Context) error {
bookings := make([]*booking.Booking, 0)
- _ = s.db.Find(&bookings)
+ _ = s.db.Order("id desc").Find(&bookings)
bvm := u.Map(bookings, func(b *booking.Booking) *views.ListBookingsViewModel {
return &views.ListBookingsViewModel{
diff --git a/internal/views/base_templ.go b/internal/views/base_templ.go
index 1fa5427..854b5ff 100644
--- a/internal/views/base_templ.go
+++ b/internal/views/base_templ.go
@@ -23,7 +23,7 @@ func BaseLayout() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
RentEase | Your Property Management System")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("RentEase | Your Property Management System")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/internal/views/bookings_list.templ b/internal/views/bookings_list.templ
index 52bed17..b2b965d 100644
--- a/internal/views/bookings_list.templ
+++ b/internal/views/bookings_list.templ
@@ -11,6 +11,10 @@ type ListBookingsViewModel struct {
templ ListBookings(bookings []*ListBookingsViewModel) {
@BaseLayout() {
+
+ Bookings
+ Overview of the activity
+
diff --git a/internal/views/bookings_list_templ.go b/internal/views/bookings_list_templ.go
index bc8f702..178a973 100644
--- a/internal/views/bookings_list_templ.go
+++ b/internal/views/bookings_list_templ.go
@@ -38,7 +38,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
templ_7745c5c3_Buffer = templ.GetBuffer()
defer templ.ReleaseBuffer(templ_7745c5c3_Buffer)
}
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("| ID | Name | Total (€) | From | To | Platform |
")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Bookings
Overview of the activity
| ID | Name | Total (€) | From | To | Platform |
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -59,7 +59,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(b.Id)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 30, Col: 15}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 34, Col: 15}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -72,7 +72,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(b.Name)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 33, Col: 19}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 37, Col: 19}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -85,7 +85,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(b.From)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 35, Col: 19}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 39, Col: 19}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -98,7 +98,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(b.To)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 36, Col: 17}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 40, Col: 17}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -111,7 +111,7 @@ func ListBookings(bookings []*ListBookingsViewModel) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(b.Platform)
if templ_7745c5c3_Err != nil {
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 37, Col: 23}
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/views/bookings_list.templ`, Line: 41, Col: 23}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {