bug fixing
This commit is contained in:
parent
9fd7862d58
commit
9e93416011
@ -66,13 +66,16 @@ class EventController extends CustomerApiController
|
|||||||
// 'COUNT({{event_registration}}.id) AS reservationCount'
|
// 'COUNT({{event_registration}}.id) AS reservationCount'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$paramEventStartMax = clone $interval->lastActiveDate;
|
||||||
|
$paramEventStartMax = $paramEventStartMax->modify('+1 day');
|
||||||
|
$paramEventStartMax = $paramEventStartMax->getTimestamp();
|
||||||
|
|
||||||
$events = $query
|
$events = $query
|
||||||
->innerJoinWith('trainer')
|
->innerJoinWith('trainer')
|
||||||
->innerJoinWith('eventType')
|
->innerJoinWith('eventType')
|
||||||
->innerJoinWith('room')
|
->innerJoinWith('room')
|
||||||
// ->leftJoin('activeEventRegistrationsForCustomer')
|
|
||||||
->andWhere(['>=', 'event.start', $interval->firstActiveDate->getTimestamp()])
|
->andWhere(['>=', 'event.start', $interval->firstActiveDate->getTimestamp()])
|
||||||
->andWhere(['<', 'event.start', (clone $interval->lastActiveDate)->modify('+1 day')->getTimestamp()])
|
->andWhere(['<', 'event.start', $paramEventStartMax])
|
||||||
->andWhere(['event.active' => '1'])
|
->andWhere(['event.active' => '1'])
|
||||||
->all();
|
->all();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user