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 6, 2024
1 parent 0a37437 commit c7aa94a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion module/ShiftBundle/Entity/Shift.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public function canHaveAsVolunteer(EntityManager $entityManager, Person $person)
return false;
}

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

0 comments on commit c7aa94a

Please sign in to comment.