bug fixing
This commit is contained in:
parent
9e93416011
commit
98c5cf86be
@ -117,13 +117,18 @@ class EventController extends CustomerApiController
|
|||||||
*/
|
*/
|
||||||
private function buildEventQuery($query, $interval)
|
private function buildEventQuery($query, $interval)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$paramEventStartMax = (clone $interval->lastActiveDate);
|
||||||
|
$paramEventStartMax = $paramEventStartMax->modify('+1 day');
|
||||||
|
$paramEventStartMax = $paramEventStartMax->getTimestamp();
|
||||||
|
|
||||||
return $query
|
return $query
|
||||||
->innerJoinWith('trainer')
|
->innerJoinWith('trainer')
|
||||||
->innerJoinWith('eventType')
|
->innerJoinWith('eventType')
|
||||||
->innerJoinWith('room')
|
->innerJoinWith('room')
|
||||||
->joinWith('activeEventRegistrations','event.id = activeEventRegistrations.id_event')
|
->joinWith('activeEventRegistrations','event.id = activeEventRegistrations.id_event')
|
||||||
->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']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user