Renamed further "unavailabilities" occurrences to "unavailability events"
This commit is contained in:
parent
f7ca104836
commit
1067a92a18
2 changed files with 19 additions and 19 deletions
|
@ -104,7 +104,7 @@ class Backend_api extends CI_Controller {
|
||||||
'start_datetime >=' => $startDate,
|
'start_datetime >=' => $startDate,
|
||||||
'end_datetime <=' => $endDate
|
'end_datetime <=' => $endDate
|
||||||
]),
|
]),
|
||||||
'unavailabilities' => $this->appointments_model->get_batch([
|
'unavailability_events' => $this->appointments_model->get_batch([
|
||||||
'is_unavailable' => TRUE,
|
'is_unavailable' => TRUE,
|
||||||
'start_datetime >=' => $startDate,
|
'start_datetime >=' => $startDate,
|
||||||
'end_datetime <=' => $endDate
|
'end_datetime <=' => $endDate
|
||||||
|
@ -132,11 +132,11 @@ class Backend_api extends CI_Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($response['unavailabilities'] as $index => $unavailability)
|
foreach ($response['unavailability_events'] as $index => $unavailability_event)
|
||||||
{
|
{
|
||||||
if ((int)$unavailability['id_users_provider'] !== (int)$userId)
|
if ((int)$unavailability_event['id_users_provider'] !== (int)$userId)
|
||||||
{
|
{
|
||||||
unset($response['unavailabilities'][$index]);
|
unset($response['unavailability_events'][$index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,11 +154,11 @@ class Backend_api extends CI_Controller {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($response['unavailabilities'] as $index => $unavailability)
|
foreach ($response['unavailability_events'] as $index => $unavailability_event)
|
||||||
{
|
{
|
||||||
if ( ! in_array((int)$unavailability['id_users_provider'], $providers))
|
if ( ! in_array((int)$unavailability_event['id_users_provider'], $providers))
|
||||||
{
|
{
|
||||||
unset($response['unavailabilities'][$index]);
|
unset($response['unavailability_events'][$index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,8 +96,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
// Add the appointments to the column.
|
// Add the appointments to the column.
|
||||||
createAppointments($providerColumn, response.appointments);
|
createAppointments($providerColumn, response.appointments);
|
||||||
|
|
||||||
// Add the unavailabilities to the column.
|
// Add the unavailability events to the column.
|
||||||
createUnavailabilities($providerColumn, response.unavailabilities);
|
createUnavailabilityEvents($providerColumn, response.unavailability_events);
|
||||||
|
|
||||||
// Add the provider breaks to the column.
|
// Add the provider breaks to the column.
|
||||||
var workingPlan = JSON.parse(provider.settings.working_plan);
|
var workingPlan = JSON.parse(provider.settings.working_plan);
|
||||||
|
@ -597,8 +597,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
// Add the appointments to the column.
|
// Add the appointments to the column.
|
||||||
createAppointments($providerColumn, events.appointments);
|
createAppointments($providerColumn, events.appointments);
|
||||||
|
|
||||||
// Add the unavailabilities to the column.
|
// Add the unavailability events to the column.
|
||||||
createUnavailabilities($providerColumn, events.unavailabilities);
|
createUnavailabilityEvents($providerColumn, events.unavailability_events);
|
||||||
|
|
||||||
Backend.placeFooterToBottom();
|
Backend.placeFooterToBottom();
|
||||||
}
|
}
|
||||||
|
@ -606,8 +606,8 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
/**
|
/**
|
||||||
* Get Calendar Component Height
|
* Get Calendar Component Height
|
||||||
*
|
*
|
||||||
* This method calculates the proper calendar height, in order to be displayed correctly, even when the
|
* This method calculates the proper calendar height, in order to be displayed correctly, even when the browser
|
||||||
* browser window is resizing.
|
* window is resizing.
|
||||||
*
|
*
|
||||||
* @return {Number} Returns the calendar element height in pixels.
|
* @return {Number} Returns the calendar element height in pixels.
|
||||||
*/
|
*/
|
||||||
|
@ -912,20 +912,20 @@ window.BackendCalendarTableView = window.BackendCalendarTableView || {};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Unavailabilities Events
|
* Create Unavailability Events
|
||||||
*
|
*
|
||||||
* This method will add the unavailability events on the table view.
|
* This method will add the unavailability events on the table view.
|
||||||
*
|
*
|
||||||
* @param {jQuery} $providerColumn The provider column container.
|
* @param {jQuery} $providerColumn The provider column container.
|
||||||
* @param {Object[]} unavailabilities Contains the unavailability events data.
|
* @param {Object[]} unavailabilityEvents Contains the unavailability events data.
|
||||||
*/
|
*/
|
||||||
function createUnavailabilities($providerColumn, unavailabilities) {
|
function createUnavailabilityEvents($providerColumn, unavailabilityEvents) {
|
||||||
if (unavailabilities.length === 0) {
|
if (unavailabilityEvents.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var index in unavailabilities) {
|
for (var index in unavailabilityEvents) {
|
||||||
var unavailability = unavailabilities[index];
|
var unavailability = unavailabilityEvents[index];
|
||||||
|
|
||||||
if (unavailability.id_users_provider !== $providerColumn.data('provider').id) {
|
if (unavailability.id_users_provider !== $providerColumn.data('provider').id) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue