@@ -0,0 +1,20 @@ | |||
<?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 ; | |||
} | |||
} |
@@ -92,6 +92,11 @@ abstract class MerchantModel extends AbstractFullEntity | |||
$this->newsletters = new ArrayCollection(); | |||
} | |||
public function __toString() | |||
{ | |||
return $this->getTitle() ; | |||
} | |||
public function getCreditConfig(): ?CreditConfigInterface | |||
{ | |||
return $this->creditConfig; |
@@ -31,10 +31,15 @@ abstract class SectionModel extends AbstractFullEntity implements FilterMerchant | |||
*/ | |||
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") | |||
@@ -80,6 +85,18 @@ abstract class SectionModel extends AbstractFullEntity implements FilterMerchant | |||
return $this; | |||
} | |||
public function getColor(): ?string | |||
{ | |||
return $this->color; | |||
} | |||
public function setColor(string $color): self | |||
{ | |||
$this->color = $color; | |||
return $this; | |||
} | |||
public function getCycle(): ?string | |||
{ | |||
return $this->cycle; |
@@ -2,9 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Repository\Common; | |||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
use Lc\CaracoleBundle\Model\Common\TaxRateInterface; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
/** | |||
* @method TaxRateInterface|null find($id, $lockMode = null, $lockVersion = null) | |||
@@ -12,10 +11,12 @@ use Lc\CaracoleBundle\Model\Common\TaxRateInterface; | |||
* @method TaxRateInterface[] findAll() | |||
* @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; | |||
} | |||
} |
@@ -2,9 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Repository\Merchant; | |||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
/** | |||
* @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null) | |||
@@ -12,10 +11,11 @@ use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
* @method MerchantInterface[] findAll() | |||
* @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; | |||
} | |||
} |
@@ -2,9 +2,8 @@ | |||
namespace Lc\CaracoleBundle\Repository\Section; | |||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |||
use Doctrine\Persistence\ManagerRegistry; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Repository\AbstractRepository; | |||
/** | |||
* @method SectionInterface|null find($id, $lockMode = null, $lockVersion = null) | |||
@@ -12,10 +11,11 @@ use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
* @method SectionInterface[] findAll() | |||
* @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; | |||
} | |||
} |
@@ -0,0 +1,24 @@ | |||
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 | |||
@@ -0,0 +1,24 @@ | |||
{% 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 %} |