Constructor
new CustomersHelper()
This class contains the methods that are used in the backend customers page.
- Source:
Methods
bindEventHandlers()
Binds the default event handlers of the backend customers page.
- Source:
delete(id)
Delete a customer record from database.
Parameters:
Name | Type | Description |
---|---|---|
id |
numeric | Record id to be deleted. |
- Source:
display(customer)
Display a customer record into the form.
Parameters:
Name | Type | Description |
---|---|---|
customer |
object | Contains the customer record data. |
- Source:
displayAppointment(appointment)
Display appointment details on customers backend page.
Parameters:
Name | Type | Description |
---|---|---|
appointment |
object | Appointment data |
- Source:
filter(key, selectId, display)
Filter customer records.
Parameters:
Name | Type | Description |
---|---|---|
key |
string | This key string is used to filter the customer records. |
selectId |
numeric | (OPTIONAL = undefined) If set then after the filter operation the record with the given id will be selected (but not displayed). |
display |
bool | (OPTIONAL = false) If true then the selected record will be displayed on the form. |
- Source:
getFilterHtml(customer) → {string}
Get the filter results row html code.
Parameters:
Name | Type | Description |
---|---|---|
customer |
object | Contains the customer data. |
- Source:
Returns:
Returns the record html code.
- Type
- string
resetForm()
Bring the customer form back to its initial state.
- Source:
save(customer)
Save a customer record to the database (via ajax post).
Parameters:
Name | Type | Description |
---|---|---|
customer |
object | Contains the customer data. |
- Source:
select(id, display)
Select a specific record from the current filter results. If the customer id does not exist
in the list then no record will be selected.
Parameters:
Name | Type | Description |
---|---|---|
id |
numeric | The record id to be selected from the filter results. |
display |
bool | (OPTIONAL = false) If true then the method will display the record on the form. |
- Source:
validate(customer)
Validate customer data before save (insert or update).
Parameters:
Name | Type | Description |
---|---|---|
customer |
object | Contains the customer data. |
- Source: