@@ -0,0 +1,8 @@ | |||
<?php | |||
namespace Lc\ShopBundle\Context; | |||
interface UserUtilsInterface | |||
{ | |||
} |
@@ -29,11 +29,12 @@ class TicketRepository extends BaseRepository implements DefaultRepositoryInterf | |||
return $query ; | |||
} | |||
public function findAllOpen() | |||
public function findAllOpen($limit=0) | |||
{ | |||
$query = $this->findByMerchantQuery() ; | |||
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ; | |||
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN]) ; | |||
$query->addOrderBy('e.id', 'DESC') ; | |||
$query->setMaxResults($limit); | |||
return $query->getQuery()->getResult() ; | |||
} | |||
@@ -41,7 +42,7 @@ class TicketRepository extends BaseRepository implements DefaultRepositoryInterf | |||
{ | |||
$query = $this->findByMerchantQuery() ; | |||
$query->select('count(e.id)'); | |||
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ; | |||
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN]) ; | |||
return $query->getQuery()->getSingleScalarResult() ; | |||
} | |||
} |
@@ -288,6 +288,7 @@ table.products-collection-table tr.disabled{opacity: 0.5} | |||
#dashboard .btn-statistic{ width: 120px; height: 70px; text-align: center; border: 1px solid black; line-height: 1rem; } | |||
#dashboard .btn-statistic small{margin-bottom: 10px; display: block;} | |||
#dashboard .btn-statistic .value{display: block;} | |||
#dashboard .btn-statistic.active{display: block;} | |||
/* Tickets */ |
@@ -70,6 +70,7 @@ group: | |||
Ticket: | |||
listMessages: Liste des messages | |||
list: Tickets ouverts | |||
listLast: Derniers tickets ouverts | |||
PointSale: | |||
main: Général | |||
Merchant: |
@@ -17,6 +17,16 @@ | |||
<div class="col-6"> | |||
{{ form_row(form.merchantConfigs['order-open-time']) }} | |||
</div> | |||
{% if form.merchantConfigs['order-open-day-vip'] is defined %} | |||
<div class="col-6"> | |||
{{ form_row(form.merchantConfigs['order-open-day-vip']) }} | |||
</div> | |||
{% endif %} | |||
{% if form.merchantConfigs['order-open-time-vip'] is defined %} | |||
<div class="col-6"> | |||
{{ form_row(form.merchantConfigs['order-open-time-vip']) }} | |||
</div> | |||
{% endif %} | |||
<div class="col-6"> | |||
{{ form_row(form.merchantConfigs['order-close-day']) }} | |||
</div> |
@@ -13,6 +13,7 @@ use Lc\ShopBundle\Context\OrderStatusHistoryInterface; | |||
use Lc\ShopBundle\Context\PriceUtilsInterface; | |||
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; | |||
use Lc\ShopBundle\Context\ReductionCreditInterface; | |||
use Lc\ShopBundle\Context\UserUtilsInterface; | |||
use Lc\ShopBundle\Model\ProductFamily; | |||
use Lc\ShopBundle\Services\CreditUtils; | |||
use Lc\ShopBundle\Services\DocumentUtils; | |||
@@ -45,7 +46,7 @@ class OrderUtils | |||
protected $creditUtils; | |||
protected $router; | |||
public function __construct(EntityManagerInterface $em, Security $security, RouterInterface $router, UserUtils $userUtils, | |||
public function __construct(EntityManagerInterface $em, Security $security, RouterInterface $router, UserUtilsInterface $userUtils, | |||
MerchantUtilsInterface $merchantUtils, PriceUtilsInterface $priceUtils, ProductFamilyUtilsInterface $productFamilyUtils, | |||
DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils) | |||
{ |
@@ -9,6 +9,7 @@ use Symfony\Component\HttpFoundation\Cookie ; | |||
use Lc\ShopBundle\Context\VisitorInterface; | |||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | |||
use Symfony\Component\HttpFoundation\RequestStack; | |||
use Symfony\Component\Security\Core\Security; | |||
class UserUtils | |||
{ | |||
@@ -21,7 +22,8 @@ class UserUtils | |||
protected $cookieChecker ; | |||
public function __construct(ParameterBagInterface $parameterBag, EntityManagerInterface $em, Utils $utils, | |||
RequestStack $requestStack, MerchantUtilsInterface $merchantUtils, CookieChecker $cookieChecker) | |||
RequestStack $requestStack, MerchantUtilsInterface $merchantUtils, CookieChecker $cookieChecker, | |||
Security $security) | |||
{ | |||
$this->em = $em ; | |||
$this->parameterBag = $parameterBag ; | |||
@@ -30,6 +32,7 @@ class UserUtils | |||
$this->visitorRepository = $this->em->getRepository($this->em->getClassMetadata(VisitorInterface::class)->getName()) ; | |||
$this->merchantUtils = $merchantUtils ; | |||
$this->cookieChecker = $cookieChecker ; | |||
$this->security = $security ; | |||
} | |||
public function getCookieNameVisitor() |
@@ -9,6 +9,7 @@ use Lc\ShopBundle\Context\OrderUtilsInterface; | |||
use Lc\ShopBundle\Context\PriceUtilsInterface; | |||
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; | |||
use Lc\ShopBundle\Context\Services\StatisticsUtilsInterface; | |||
use Lc\ShopBundle\Context\UserUtilsInterface; | |||
use League\Flysystem\Util; | |||
class UtilsManager | |||
@@ -29,7 +30,7 @@ class UtilsManager | |||
public function __construct( | |||
Utils $utils, | |||
UserUtils $userUtils, | |||
UserUtilsInterface $userUtils, | |||
MerchantUtilsInterface $merchantUtils, | |||
ProductFamilyUtilsInterface $productFamilyUtils, | |||
OrderUtilsInterface $orderUtils, | |||
@@ -63,7 +64,7 @@ class UtilsManager | |||
return $this->utils ; | |||
} | |||
public function getUserUtils(): UserUtils | |||
public function getUserUtils(): UserUtilsInterface | |||
{ | |||
return $this->userUtils ; | |||
} |