Class: bookAppointment

bookAppointment

Implelements the js part of the appointment booking page.

new bookAppointment()

This class implements the book appointment page functionality. Once the initialize() method is called the page is fully functional and can serve the appointment booking process.
Source:

Methods

<static> bindEventHandlers()

This method binds the necessary event handlers for the book appointments page.
Source:

<static> calcEndDatetime() → {string}

This method calculates the end datetime of the current appointment. End datetime is depending on the service and start datetime fieldss.
Source:
Returns:
Returns the end datetime in string format.
Type
string

<static> getAvailableHours(selDate)

This function makes an ajax call and returns the available hours for the selected service, provider and date.
Parameters:
Name Type Description
selDate string The selected date of which the available hours we need to receive.
Source:

<static> initialize(bindEventHandlers)

This method initializes the book appointment page.
Parameters:
Name Type Description
bindEventHandlers bool (OPTIONAL) Determines wether the default event handlers will be binded to the dom elements.
Source:

<static> updateConfirmData()

Every time this function is executed, it updates the confirmation page with the latest customer settigns and input for the appointment booking.
Source:

<static> validateCustomerDataForm() → {bool}

This function validates the customer's data input. It only checks for empty fields by the time.
Source:
Returns:
Returns the validation result.
Type
bool