Waiting list: Allow to set auto-disable date (Z#23141338) (#4004)

* Waiting list: Allow to set auto-disable date (Z#23141338)

* ADd warning on non-esries events
This commit is contained in:
Raphael Michel
2024-03-22 11:17:02 +01:00
committed by GitHub
parent a946c10ab4
commit 273c1ae0a6
19 changed files with 109 additions and 14 deletions

View File

@@ -390,7 +390,7 @@ class WidgetAPIProductList(EventListMixin, View):
else:
availability['text'] = gettext('Book now')
availability['reason'] = 'ok'
elif event.settings.waiting_list_enabled and (ev.best_availability_state is not None and ev.best_availability_state >= 0):
elif event.waiting_list_active and (ev.best_availability_state is not None and ev.best_availability_state >= 0):
availability['color'] = 'orange'
availability['text'] = gettext('Waiting list')
availability['reason'] = 'waitinglist'
@@ -690,7 +690,7 @@ class WidgetAPIProductList(EventListMixin, View):
'display_net_prices': request.event.settings.display_net_prices,
'use_native_spinners': request.event.settings.widget_use_native_spinners,
'show_variations_expanded': request.event.settings.show_variations_expanded,
'waiting_list_enabled': request.event.settings.waiting_list_enabled,
'waiting_list_enabled': request.event.waiting_list_active,
'voucher_explanation_text': str(rich_text(request.event.settings.voucher_explanation_text, safelinks=False)),
'error': None,
'cart_exists': False
@@ -775,7 +775,7 @@ class WidgetAPIProductList(EventListMixin, View):
data['has_seating_plan'] = ev.seating_plan is not None
data['has_seating_plan_waitinglist'] = False
if request.event.settings.waiting_list_enabled and ev.presale_is_running:
if ev.waiting_list_active and ev.presale_is_running:
for i in items:
if not i.allow_waitinglist or not i.requires_seat:
continue