Bläddra i källkod

Merge branch 'develop'

master^2
Guillaume 3 år sedan
förälder
incheckning
14cb988525
1 ändrade filer med 12 tillägg och 3 borttagningar
  1. +12
    -3
      ShopBundle/Controller/Backend/AdminController.php

+ 12
- 3
ShopBundle/Controller/Backend/AdminController.php Visa fil

@@ -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;
}


Laddar…
Avbryt
Spara