|
|
@@ -136,11 +136,15 @@ class AdminController extends EasyAdminController |
|
|
|
$dqlFilter = sprintf(str_replace('currentMerchant', $this->getUser()->getMerchant()->getId(), $dqlFilter)); |
|
|
|
} |
|
|
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'NOW()')) { |
|
|
|
if ($pos = strpos($dqlFilter, 'TODAYSTART')) { |
|
|
|
$date = new \DateTime(); |
|
|
|
$dqlFilter = sprintf(str_replace('NOW()', $date->format('Y-m-d H:i:s'), $dqlFilter)); |
|
|
|
|
|
|
|
$dqlFilter = sprintf(str_replace('TODAYSTART', $date->format('Y-m-d').' 00:00:00', $dqlFilter)); |
|
|
|
} |
|
|
|
if ($pos = strpos($dqlFilter, 'TODAYEND')) { |
|
|
|
$date = new \DateTime(); |
|
|
|
$dqlFilter = sprintf(str_replace('TODAYEND', $date->format('Y-m-d').' 23:59:59', $dqlFilter)); |
|
|
|
} |
|
|
|
|
|
|
|
if ($pos = strpos($dqlFilter, 'sectionLunch')) { |
|
|
|
$dqlFilter = sprintf(str_replace('sectionLunch', $this->sectionUtils->getSection('lunch')->getId(), $dqlFilter)); |
|
|
|
} else if ($pos = strpos($dqlFilter, 'sectionMarket')) { |
|
|
@@ -238,6 +242,11 @@ class AdminController extends EasyAdminController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//TODO déplacer dans LC |
|
|
|
if($this->entity['name']== 'OrderShopLunch' || $this->entity['name']== 'OrderShopLunchDay'){ |
|
|
|
$queryBuilder->addOrderBy('entity.user', 'asc'); |
|
|
|
} |
|
|
|
|
|
|
|
return $queryBuilder; |
|
|
|
} |
|
|
|
|