Fix booking search, shrink time picker
This commit is contained in:
@@ -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
|
||||
`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user