<?php | |||||
namespace Lc\CaracoleBundle\Controller\Admin; | |||||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |||||
use Lc\SovBundle\Controller\Admin\DashboardController as SovDashboardController ; | |||||
class DashboardController extends SovDashboardController | |||||
{ | |||||
public function configureCrud(): Crud | |||||
{ | |||||
$crud = parent::configureCrud(); | |||||
$crud | |||||
->overrideTemplate('layout', '@LcCaracole/adminlte/layout.html.twig'); | |||||
return $crud ; | |||||
} | |||||
} |
$this->newsletters = new ArrayCollection(); | $this->newsletters = new ArrayCollection(); | ||||
} | } | ||||
public function __toString() | |||||
{ | |||||
return $this->getTitle() ; | |||||
} | |||||
public function getCreditConfig(): ?CreditConfigInterface | public function getCreditConfig(): ?CreditConfigInterface | ||||
{ | { | ||||
return $this->creditConfig; | return $this->creditConfig; |
*/ | */ | ||||
protected $cycle; | protected $cycle; | ||||
const SECTION_CYCLE_DAY = 'day'; | |||||
const SECTION_CYCLE_WEEK = 'week'; | |||||
const SECTION_CYCLE_MONTH = 'month'; | |||||
const SECTION_CYCLE_YEAR = 'year'; | |||||
const CYCLE_DAY = 'day'; | |||||
const CYCLE_WEEK = 'week'; | |||||
const CYCLE_MONTH = 'month'; | |||||
const CYCLE_YEAR = 'year'; | |||||
/** | |||||
* @ORM\Column(type="string", length=32) | |||||
*/ | |||||
protected $color; | |||||
/** | /** | ||||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", mappedBy="sections") | * @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\Product\ProductFamilyInterface", mappedBy="sections") | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getColor(): ?string | |||||
{ | |||||
return $this->color; | |||||
} | |||||
public function setColor(string $color): self | |||||
{ | |||||
$this->color = $color; | |||||
return $this; | |||||
} | |||||
public function getCycle(): ?string | public function getCycle(): ?string | ||||
{ | { | ||||
return $this->cycle; | return $this->cycle; |
namespace Lc\CaracoleBundle\Repository\Common; | namespace Lc\CaracoleBundle\Repository\Common; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
use Lc\CaracoleBundle\Model\Common\TaxRateInterface; | use Lc\CaracoleBundle\Model\Common\TaxRateInterface; | ||||
use Lc\SovBundle\Repository\AbstractRepository; | |||||
/** | /** | ||||
* @method TaxRateInterface|null find($id, $lockMode = null, $lockVersion = null) | * @method TaxRateInterface|null find($id, $lockMode = null, $lockVersion = null) | ||||
* @method TaxRateInterface[] findAll() | * @method TaxRateInterface[] findAll() | ||||
* @method TaxRateInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | * @method TaxRateInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | ||||
*/ | */ | ||||
class TaxRateRepository extends ServiceEntityRepository | |||||
class TaxRateRepository extends AbstractRepository | |||||
{ | { | ||||
public function __construct(ManagerRegistry $registry) | |||||
public function getInterfaceClass() | |||||
{ | { | ||||
parent::__construct($registry, TaxRateInterface::class); | |||||
return TaxRateInterface::class; | |||||
} | } | ||||
} | } |
namespace Lc\CaracoleBundle\Repository\Merchant; | namespace Lc\CaracoleBundle\Repository\Merchant; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | ||||
use Lc\SovBundle\Repository\AbstractRepository; | |||||
/** | /** | ||||
* @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null) | * @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null) | ||||
* @method MerchantInterface[] findAll() | * @method MerchantInterface[] findAll() | ||||
* @method MerchantInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | * @method MerchantInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | ||||
*/ | */ | ||||
class MerchantRepository extends ServiceEntityRepository | |||||
class MerchantRepository extends AbstractRepository | |||||
{ | { | ||||
public function __construct(ManagerRegistry $registry) | |||||
public function getInterfaceClass() | |||||
{ | { | ||||
parent::__construct($registry, MerchantInterface::class); | |||||
return MerchantInterface::class; | |||||
} | } | ||||
} | } |
namespace Lc\CaracoleBundle\Repository\Section; | namespace Lc\CaracoleBundle\Repository\Section; | ||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||||
use Doctrine\Persistence\ManagerRegistry; | |||||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | use Lc\CaracoleBundle\Model\Section\SectionInterface; | ||||
use Lc\SovBundle\Repository\AbstractRepository; | |||||
/** | /** | ||||
* @method SectionInterface|null find($id, $lockMode = null, $lockVersion = null) | * @method SectionInterface|null find($id, $lockMode = null, $lockVersion = null) | ||||
* @method SectionInterface[] findAll() | * @method SectionInterface[] findAll() | ||||
* @method SectionInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | * @method SectionInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | ||||
*/ | */ | ||||
class SectionRepository extends ServiceEntityRepository | |||||
class SectionRepository extends AbstractRepository | |||||
{ | { | ||||
public function __construct(ManagerRegistry $registry) | |||||
public function getInterfaceClass() | |||||
{ | { | ||||
parent::__construct($registry, SectionInterface::class); | |||||
return SectionInterface::class; | |||||
} | } | ||||
} | } |
menu: | |||||
admin: Administration | |||||
admin_merchant: Marchands | |||||
admin_section: Sections | |||||
admin_tva: TVA | |||||
entity: | |||||
default: | |||||
fields: | |||||
merchant: Marchand | |||||
taxRate: Règle de taxe | |||||
Merchant: | |||||
label: Marchand | |||||
label_plurial: Marchands | |||||
Section: | |||||
label: Section | |||||
label_plurial: Sections | |||||
fields: | |||||
cycle: Cycle de vente | |||||
TaxRate: | |||||
label: Règle de taxe | |||||
label_plurial: Règles de taxes | |||||
{% extends '@LcSov/adminlte/layout.html.twig' %} | |||||
{% block navbar_header %} | |||||
{{ parent() }} | |||||
<nav class="navbar navbar-expand navbar-light main-header"> | |||||
<ul class="navbar-nav"> | |||||
<li class="nav-item d-none d-sm-inline-block"> | |||||
<a href="#" class="nav-link">Marché</a> | |||||
</li> | |||||
<li class="nav-item d-none d-sm-inline-block"> | |||||
<a href="#" class="nav-link">Repas du midi</a> | |||||
</li> | |||||
<li class="nav-item d-none d-sm-inline-block"> | |||||
<a href="#" class="nav-link">Retrait journée</a> | |||||
</li> | |||||
</ul> | |||||
<ul class="navbar-nav ml-auto"> | |||||
<li class="nav-item"> | |||||
Switch merchant | |||||
</li> | |||||
</ul> | |||||
</nav> | |||||
{% endblock %} |