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 :bool
Determines the functionality of the page.
Type:
- bool
- Source:
Methods
(static) applyAppointmentData(appointment, provider, customer) → {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 |
---|---|---|
appointment |
object | Selected appointment's data. |
provider |
object | Selected provider's data. |
customer |
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) updateServiceDescription(serviceId, $div)
This method updates a div's html content with a brief description of the
user selected service (only if available in db). This is usefull for the
customers upon selecting the correct service.
Parameters:
Name | Type | Description |
---|---|---|
serviceId |
int | The selected service record id. |
$div |
object | The destination div jquery object (e.g. provide $('#div-id') object as value). |
- Source:
(static) validateCustomerForm() → {bool}
This function validates the customer's data input. The user cannot contiue
without passing all the validation checks.
- Source:
Returns:
Returns the validation result.
- Type
- bool