Fix booking list to use stay instead of arrival_date and departure_date
This commit is contained in:
parent
cdd91c815e
commit
cba892c4c0
|
@ -57,15 +57,15 @@ func collectBookingEntries(ctx context.Context, conn *database.Conn, lang langua
|
||||||
rows, err := conn.Query(ctx, `
|
rows, err := conn.Query(ctx, `
|
||||||
select left(slug::text, 10)
|
select left(slug::text, 10)
|
||||||
, '/admin/booking/' || slug
|
, '/admin/booking/' || slug
|
||||||
, arrival_date
|
, lower(stay)
|
||||||
, departure_date
|
, upper(stay)
|
||||||
, holder_name
|
, holder_name
|
||||||
, booking.booking_status
|
, booking.booking_status
|
||||||
, coalesce(i18n.name, status.name)
|
, coalesce(i18n.name, status.name)
|
||||||
from booking
|
from booking
|
||||||
join booking_status as status using (booking_status)
|
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
|
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)
|
`, lang)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in New Issue