Do not make a request to the server if there's no service or provider selection

This commit is contained in:
Alex Tselegidis 2020-11-16 10:16:48 +02:00
parent b3fbf60e29
commit 46804fab7b

View file

@ -229,6 +229,10 @@ window.FrontendBookApi = window.FrontendBookApi || {};
return; return;
} }
if (!providerId || !serviceId) {
return;
}
var appointmentId = FrontendBook.manageMode ? GlobalVariables.appointmentData.id : null; var appointmentId = FrontendBook.manageMode ? GlobalVariables.appointmentData.id : null;
var url = GlobalVariables.baseUrl + '/index.php/appointments/ajax_get_unavailable_dates'; var url = GlobalVariables.baseUrl + '/index.php/appointments/ajax_get_unavailable_dates';