bug fixing

This commit is contained in:
Roland Schneider 2021-09-28 19:15:27 +02:00
parent 9fd7862d58
commit 9e93416011

View File

@ -66,13 +66,16 @@ class EventController extends CustomerApiController
// 'COUNT({{event_registration}}.id) AS reservationCount'
]);
$paramEventStartMax = clone $interval->lastActiveDate;
$paramEventStartMax = $paramEventStartMax->modify('+1 day');
$paramEventStartMax = $paramEventStartMax->getTimestamp();
$events = $query
->innerJoinWith('trainer')
->innerJoinWith('eventType')
->innerJoinWith('room')
// ->leftJoin('activeEventRegistrationsForCustomer')
->andWhere(['>=', 'event.start', $interval->firstActiveDate->getTimestamp()])
->andWhere(['<', 'event.start', (clone $interval->lastActiveDate)->modify('+1 day')->getTimestamp()])
->andWhere(['<', 'event.start', $paramEventStartMax])
->andWhere(['event.active' => '1'])
->all();