Skip the first booking step when only one service and one provider are available (#349).

This commit is contained in:
Alex Tselegidis 2022-01-24 23:53:06 +01:00
parent ccc503e618
commit 9097a968ca

View file

@ -202,7 +202,10 @@ App.Pages.Booking = (function () {
$selectProvider.val(selectedProviderId).trigger('change'); $selectProvider.val(selectedProviderId).trigger('change');
} }
if (selectedServiceId && selectedProviderId) { if (
(selectedServiceId && selectedProviderId) ||
(vars('available_services').length === 1 && vars('available_providers').length === 1)
) {
$selectService.closest('.wizard-frame').find('.button-next').trigger('click'); $selectService.closest('.wizard-frame').find('.button-next').trigger('click');
$(document).find('.book-step:first').hide(); $(document).find('.book-step:first').hide();