Browse Source

Merge branch 'develop'

master
Guillaume 4 years ago
parent
commit
08caf83275
8 changed files with 33 additions and 7 deletions
  1. +8
    -0
      ShopBundle/Context/UserUtilsInterface.php
  2. +4
    -3
      ShopBundle/Repository/TicketRepository.php
  3. +1
    -0
      ShopBundle/Resources/public/sass/backend/custom.scss
  4. +1
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  5. +10
    -0
      ShopBundle/Resources/views/backend/merchant/panel_order.html.twig
  6. +2
    -1
      ShopBundle/Services/Order/OrderUtils.php
  7. +4
    -1
      ShopBundle/Services/UserUtils.php
  8. +3
    -2
      ShopBundle/Services/UtilsManager.php

+ 8
- 0
ShopBundle/Context/UserUtilsInterface.php View File

<?php

namespace Lc\ShopBundle\Context;

interface UserUtilsInterface
{

}

+ 4
- 3
ShopBundle/Repository/TicketRepository.php View File

return $query ; return $query ;
} }


public function findAllOpen()
public function findAllOpen($limit=0)
{ {
$query = $this->findByMerchantQuery() ; $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->addOrderBy('e.id', 'DESC') ;
$query->setMaxResults($limit);
return $query->getQuery()->getResult() ; return $query->getQuery()->getResult() ;
} }


{ {
$query = $this->findByMerchantQuery() ; $query = $this->findByMerchantQuery() ;
$query->select('count(e.id)'); $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() ; return $query->getQuery()->getSingleScalarResult() ;
} }
} }

+ 1
- 0
ShopBundle/Resources/public/sass/backend/custom.scss View File

#dashboard .btn-statistic{ width: 120px; height: 70px; text-align: center; border: 1px solid black; line-height: 1rem; } #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 small{margin-bottom: 10px; display: block;}
#dashboard .btn-statistic .value{display: block;} #dashboard .btn-statistic .value{display: block;}
#dashboard .btn-statistic.active{display: block;}




/* Tickets */ /* Tickets */

+ 1
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml View File

Ticket: Ticket:
listMessages: Liste des messages listMessages: Liste des messages
list: Tickets ouverts list: Tickets ouverts
listLast: Derniers tickets ouverts
PointSale: PointSale:
main: Général main: Général
Merchant: Merchant:

+ 10
- 0
ShopBundle/Resources/views/backend/merchant/panel_order.html.twig View File

<div class="col-6"> <div class="col-6">
{{ form_row(form.merchantConfigs['order-open-time']) }} {{ form_row(form.merchantConfigs['order-open-time']) }}
</div> </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"> <div class="col-6">
{{ form_row(form.merchantConfigs['order-close-day']) }} {{ form_row(form.merchantConfigs['order-close-day']) }}
</div> </div>

+ 2
- 1
ShopBundle/Services/Order/OrderUtils.php View File

use Lc\ShopBundle\Context\PriceUtilsInterface; use Lc\ShopBundle\Context\PriceUtilsInterface;
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; use Lc\ShopBundle\Context\ProductFamilyUtilsInterface;
use Lc\ShopBundle\Context\ReductionCreditInterface; use Lc\ShopBundle\Context\ReductionCreditInterface;
use Lc\ShopBundle\Context\UserUtilsInterface;
use Lc\ShopBundle\Model\ProductFamily; use Lc\ShopBundle\Model\ProductFamily;
use Lc\ShopBundle\Services\CreditUtils; use Lc\ShopBundle\Services\CreditUtils;
use Lc\ShopBundle\Services\DocumentUtils; use Lc\ShopBundle\Services\DocumentUtils;
protected $creditUtils; protected $creditUtils;
protected $router; 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, MerchantUtilsInterface $merchantUtils, PriceUtilsInterface $priceUtils, ProductFamilyUtilsInterface $productFamilyUtils,
DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils) DocumentUtils $documentUtils, Utils $utils, CreditUtils $creditUtils)
{ {

+ 4
- 1
ShopBundle/Services/UserUtils.php View File

use Lc\ShopBundle\Context\VisitorInterface; use Lc\ShopBundle\Context\VisitorInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Security;


class UserUtils class UserUtils
{ {
protected $cookieChecker ; protected $cookieChecker ;


public function __construct(ParameterBagInterface $parameterBag, EntityManagerInterface $em, Utils $utils, 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->em = $em ;
$this->parameterBag = $parameterBag ; $this->parameterBag = $parameterBag ;
$this->visitorRepository = $this->em->getRepository($this->em->getClassMetadata(VisitorInterface::class)->getName()) ; $this->visitorRepository = $this->em->getRepository($this->em->getClassMetadata(VisitorInterface::class)->getName()) ;
$this->merchantUtils = $merchantUtils ; $this->merchantUtils = $merchantUtils ;
$this->cookieChecker = $cookieChecker ; $this->cookieChecker = $cookieChecker ;
$this->security = $security ;
} }


public function getCookieNameVisitor() public function getCookieNameVisitor()

+ 3
- 2
ShopBundle/Services/UtilsManager.php View File

use Lc\ShopBundle\Context\PriceUtilsInterface; use Lc\ShopBundle\Context\PriceUtilsInterface;
use Lc\ShopBundle\Context\ProductFamilyUtilsInterface; use Lc\ShopBundle\Context\ProductFamilyUtilsInterface;
use Lc\ShopBundle\Context\Services\StatisticsUtilsInterface; use Lc\ShopBundle\Context\Services\StatisticsUtilsInterface;
use Lc\ShopBundle\Context\UserUtilsInterface;
use League\Flysystem\Util; use League\Flysystem\Util;


class UtilsManager class UtilsManager


public function __construct( public function __construct(
Utils $utils, Utils $utils,
UserUtils $userUtils,
UserUtilsInterface $userUtils,
MerchantUtilsInterface $merchantUtils, MerchantUtilsInterface $merchantUtils,
ProductFamilyUtilsInterface $productFamilyUtils, ProductFamilyUtilsInterface $productFamilyUtils,
OrderUtilsInterface $orderUtils, OrderUtilsInterface $orderUtils,
return $this->utils ; return $this->utils ;
} }


public function getUserUtils(): UserUtils
public function getUserUtils(): UserUtilsInterface
{ {
return $this->userUtils ; return $this->userUtils ;
} }

Loading…
Cancel
Save