Fixed any-provider use case in booking page.

This commit is contained in:
Alex Tselegidis 2020-04-08 10:57:18 +02:00
parent cf581e08e6
commit c99694b520

View file

@ -70,6 +70,10 @@ window.FrontendBookApi = window.FrontendBookApi || {};
if (response.length > 0) { if (response.length > 0) {
var providerId = $('#select-provider').val(); var providerId = $('#select-provider').val();
if (providerId === 'any-provider') {
providerId = GlobalVariables.availableProviders[0].id; // Use first available provider.
}
var provider = GlobalVariables.availableProviders.filter(function(availableProvider) { var provider = GlobalVariables.availableProviders.filter(function(availableProvider) {
return providerId == availableProvider.id; return providerId == availableProvider.id;
}).shift(); }).shift();