diff --git a/pkg/booking/public.go b/pkg/booking/public.go index df286e2..3f0ee89 100644 --- a/pkg/booking/public.go +++ b/pkg/booking/public.go @@ -174,7 +174,7 @@ func newBookingForm(ctx context.Context, company *auth.Company, conn *database.C }, CampsiteType: &form.Select{ Name: "campsite_type", - Options: form.MustGetOptions(ctx, conn, "select type.slug, coalesce(i18n.name, type.name) as l10n_name from campsite_type as type left join campsite_type_i18n as i18n on type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1 where company_id = $2 order by position, l10n_name", l.Language, company.ID), + Options: form.MustGetOptions(ctx, conn, "select type.slug, coalesce(i18n.name, type.name) as l10n_name from campsite_type as type left join campsite_type_i18n as i18n on type.campsite_type_id = i18n.campsite_type_id and i18n.lang_tag = $1 where company_id = $2 and active order by position, l10n_name", l.Language, company.ID), }, CampsiteTypeOptions: make(map[string][]*campsiteTypeOption), ArrivalDate: &form.Input{ @@ -204,6 +204,7 @@ func newBookingForm(ctx context.Context, company *auth.Company, conn *database.C join campsite_type using (campsite_type_id) left join campsite_type_option_i18n as i18n on i18n.campsite_type_option_id = option.campsite_type_option_id and i18n.lang_tag = $1 where company_id = $2 + and campsite_type.active order by option.position, l10_name `, l.Language, company.ID) if err != nil {