Fix booking list to use stay instead of arrival_date and departure_date

This commit is contained in:
jordi fita mas 2024-04-19 21:29:36 +02:00
parent cdd91c815e
commit cba892c4c0
1 changed files with 3 additions and 3 deletions

View File

@ -57,15 +57,15 @@ func collectBookingEntries(ctx context.Context, conn *database.Conn, lang langua
rows, err := conn.Query(ctx, `
select left(slug::text, 10)
, '/admin/booking/' || slug
, arrival_date
, departure_date
, lower(stay)
, upper(stay)
, holder_name
, booking.booking_status
, coalesce(i18n.name, status.name)
from booking
join booking_status as status using (booking_status)
left join booking_status_i18n as i18n on status.booking_status = i18n.booking_status and i18n.lang_tag = $1
order by arrival_date desc
order by stay desc
`, lang)
if err != nil {
return nil, err