mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 10:02:33 +03:00
Added fix for endless loop issue during availabilities generation.
This commit is contained in:
parent
edbe78c6f4
commit
75b7fe69f6
1 changed files with 5 additions and 1 deletions
|
@ -903,7 +903,7 @@ class Appointments extends CI_Controller {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($appointment_start >= $period_start && $appointment_end <= $period_end)
|
if ($appointment_start >= $period_start && $appointment_end < $period_end)
|
||||||
{
|
{
|
||||||
// The appointment is inside the time period, so we will split the period into two new
|
// The appointment is inside the time period, so we will split the period into two new
|
||||||
// others.
|
// others.
|
||||||
|
@ -919,6 +919,10 @@ class Appointments extends CI_Controller {
|
||||||
'end' => $appointment_end->format('H:i')
|
'end' => $appointment_end->format('H:i')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
else if ($appointment_start == $period_start && $appointment_end == $period_end)
|
||||||
|
{
|
||||||
|
unset($periods[$index]); // The whole period is blocked so remove it from the available periods array.
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($appointment_start >= $period_start && $appointment_end >= $period_start && $appointment_start <= $period_end)
|
if ($appointment_start >= $period_start && $appointment_end >= $period_start && $appointment_start <= $period_end)
|
||||||
|
|
Loading…
Reference in a new issue