Skip to content

Commit

Permalink
Fix shift overlap bug: update logic to handle shifts starting and end…
Browse files Browse the repository at this point in the history
…ing at the same time
  • Loading branch information
Michiel-Vanzeir committed Dec 1, 2024
1 parent 0a37437 commit 89b70e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/ShiftBundle/Entity/RegistrationShift.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ public function canHaveAsRegistered(EntityManager $entityManager, Person $regist
return false;
}

if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate()) {
if ($this->getStartDate() < $shift->getEndDate() && $shift->getStartDate() < $this->getEndDate() || $this->getStartDate() === $shift->getStartDate()) {
return false;
}

Expand Down

0 comments on commit 89b70e4

Please sign in to comment.