bug fixing

This commit is contained in:
Roland Schneider 2021-09-28 19:17:53 +02:00
parent 9e93416011
commit 98c5cf86be

View File

@ -117,13 +117,18 @@ class EventController extends CustomerApiController
*/
private function buildEventQuery($query, $interval)
{
$paramEventStartMax = (clone $interval->lastActiveDate);
$paramEventStartMax = $paramEventStartMax->modify('+1 day');
$paramEventStartMax = $paramEventStartMax->getTimestamp();
return $query
->innerJoinWith('trainer')
->innerJoinWith('eventType')
->innerJoinWith('room')
->joinWith('activeEventRegistrations','event.id = activeEventRegistrations.id_event')
->andWhere(['>=', 'event.start', $interval->firstActiveDate->getTimestamp()])
->andWhere(['<', 'event.start', (clone $interval->lastActiveDate)->modify('+1 day')->getTimestamp()])
->andWhere(['<', 'event.start', $paramEventStartMax])
->andWhere(['event.active' => '1']);
}