From 9097a968cad769b0867256e5668b1327b3cc0013 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 24 Jan 2022 23:53:06 +0100 Subject: [PATCH] Skip the first booking step when only one service and one provider are available (#349). --- assets/js/pages/booking.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/assets/js/pages/booking.js b/assets/js/pages/booking.js index 83e962dd..3d60454f 100644 --- a/assets/js/pages/booking.js +++ b/assets/js/pages/booking.js @@ -202,7 +202,10 @@ App.Pages.Booking = (function () { $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'); $(document).find('.book-step:first').hide();