iflrandevu/doc/code/js/FrontendBook.html

969 lines
13 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Namespace: FrontendBook</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Namespace: FrontendBook</h1>
<section>
<header>
<h2>
FrontendBook
</h2>
</header>
<article>
<div class="container-overview">
<div class="description">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.</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="manageMode"><span class="type-signature">&lt;static> </span>manageMode<span class="type-signature"> :Boolean</span></h4>
</dt>
<dd>
<div class="description">
Determines the functionality of the page.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Boolean</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line14">line 14</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="applyAppointmentData"><span class="type-signature">&lt;static> </span>applyAppointmentData<span class="signature">(appointmentData, providerData, customerData)</span><span class="type-signature"> &rarr; {bool}</span></h4>
</dt>
<dd>
<div class="description">
This method applies the appointment's data to the wizard so
that the user can start making changes on an existing record.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>appointmentData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">Selected appointment's data.</td>
</tr>
<tr>
<td class="name"><code>providerData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">Selected provider's data.</td>
</tr>
<tr>
<td class="name"><code>customerData</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last">Selected customer's data.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line425">line 425</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Returns the operation result.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">bool</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="bindEventHandlers"><span class="type-signature">&lt;static> </span>bindEventHandlers<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
This method binds the necessary event handlers for the book
appointments page.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line77">line 77</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="calcEndDatetime"><span class="type-signature">&lt;static> </span>calcEndDatetime<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
</dt>
<dd>
<div class="description">
This method calculates the end datetime of the current appointment.
End datetime is depending on the service and start datetime fieldss.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line390">line 390</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Returns the end datetime in string format.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getAvailableHours"><span class="type-signature">&lt;static> </span>getAvailableHours<span class="signature">(selDate)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
This function makes an ajax call and returns the available
hours for the selected service, provider and date.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>selDate</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">The selected date of which the available
hours we need to receive.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line221">line 221</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="initialize"><span class="type-signature">&lt;static> </span>initialize<span class="signature">(bindEventHandlers, manageMode)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
This method initializes the book appointment page.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>bindEventHandlers</code></td>
<td class="type">
<span class="param-type">bool</span>
</td>
<td class="description last">(OPTIONAL) Determines whether
the default event handlers will be binded to the dom elements.</td>
</tr>
<tr>
<td class="name"><code>manageMode</code></td>
<td class="type">
<span class="param-type">bool</span>
</td>
<td class="description last">(OPTIONAL) Determines whether the customer
is going to make changes to an existing appointment rather than
booking a new one.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line25">line 25</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="updateConfirmFrame"><span class="type-signature">&lt;static> </span>updateConfirmFrame<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Every time this function is executed, it updates the confirmation
page with the latest customer settigns and input for the appointment
booking.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line328">line 328</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="validateCustomerForm"><span class="type-signature">&lt;static> </span>validateCustomerForm<span class="signature">()</span><span class="type-signature"> &rarr; {bool}</span></h4>
</dt>
<dd>
<div class="description">
This function validates the customer's data input.
It only checks for empty fields by the time.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="frontend_book.js.html">frontend_book.js</a>, <a href="frontend_book.js.html#line309">line 309</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Returns the validation result.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">bool</span>
</dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Namespaces</h3><ul><li><a href="Backend.html">Backend</a></li><li><a href="BackendCalendar.html">BackendCalendar</a></li><li><a href="FrontendBook.html">FrontendBook</a></li><li><a href="GeneralFunctions.html">GeneralFunctions</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0-dev</a> on Thu Jun 13 2013 16:52:48 GMT+0300 (EEST)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>