Namespace: FrontendBook

FrontendBook

This namespace contains functions that implement the book appointment page functionality. Once the initialize() method is called the page is fully functional and can serve the appointment booking process.
Source:

Members

<static> manageMode :Boolean

Determines the functionality of the page.
Type:
  • Boolean
Source:

Methods

<static> applyAppointmentData(appointmentData, providerData, customerData) → {bool}

This method applies the appointment's data to the wizard so that the user can start making changes on an existing record.
Parameters:
Name Type Description
appointmentData object Selected appointment's data.
providerData object Selected provider's data.
customerData object Selected customer's data.
Source:
Returns:
Returns the operation result.
Type
bool

<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, manageMode)

This method initializes the book appointment page.
Parameters:
Name Type Description
bindEventHandlers bool (OPTIONAL) Determines whether the default event handlers will be binded to the dom elements.
manageMode bool (OPTIONAL) Determines whether the customer is going to make changes to an existing appointment rather than booking a new one.
Source:

<static> updateConfirmFrame()

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

<static> validateCustomerForm() → {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