Fix booking search, shrink time picker

This commit is contained in:
2026-01-17 19:59:03 +00:00
parent 3a77e582e3
commit 73610e5d8e
3 changed files with 29 additions and 35 deletions
+2 -2
View File
@@ -453,7 +453,7 @@ func GetAllAdminBookingsHandler(w http.ResponseWriter, r *http.Request) {
}
// Add ordering and pagination (NO GROUP BY needed here)
baseQuery += " ORDER BY b.start_time ASC"
baseQuery += " ORDER BY b.start_time DESC"
if req.PerPage > 0 {
baseQuery += fmt.Sprintf(" LIMIT $%d OFFSET $%d", paramCount, paramCount+1)
args = append(args, req.PerPage, (req.Page-1)*req.PerPage)
@@ -954,7 +954,7 @@ func SearchAdminBookingsHandler(w http.ResponseWriter, r *http.Request) {
JOIN services s ON bs.service_id = s.id
WHERE bs.booking_id = b.id AND s.name ILIKE $1 ESCAPE '\'
)
ORDER BY b.start_time ASC
ORDER BY b.start_time DESC
LIMIT $2 OFFSET $3
`