@@ -14,20 +14,19 @@ abstract class TaxRateAdminController extends AbstractAdminController | |||
{ | |||
use AdminControllerTrait; | |||
public function configureCrud(Crud $crud): Crud | |||
{ | |||
return $crud->setSearchFields(['id', 'title', 'value']); | |||
} | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
return [ | |||
IntegerField::new('id', 'ID')->hideOnForm(), | |||
TextField::new('title'), | |||
NumberField::new('value') | |||
]; | |||
} | |||
public function configureCrud(Crud $crud): Crud | |||
{ | |||
return $crud->setSearchFields(['id', 'title', 'value']); | |||
} | |||
public function createEntity(string $entityFqcn) | |||
{ | |||
$factory = new TaxRateFactory(); |
@@ -18,7 +18,6 @@ abstract class UnitAdminController extends AbstractAdminController | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
return [ | |||
IntegerField::new('id', 'ID')->hideOnForm(), | |||
TextField::new('unit'), | |||
TextField::new('wording'), | |||
TextField::new('wordingUnit'), |
@@ -9,6 +9,7 @@ use Lc\CaracoleBundle\Controller\AdminControllerTrait; | |||
use Lc\CaracoleBundle\Factory\PointSale\PointSaleFactory; | |||
use Lc\CaracoleBundle\Field\Address\AddressField; | |||
use Lc\SovBundle\Controller\AbstractAdminController; | |||
use Lc\SovBundle\Field\BooleanField; | |||
use Lc\SovBundle\Field\StatusField; | |||
abstract class PointSaleAdminController extends AbstractAdminController | |||
@@ -17,7 +18,6 @@ abstract class PointSaleAdminController extends AbstractAdminController | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
$panel = parent::configureFields($pageName); | |||
return array_merge( | |||
[ | |||
@@ -26,12 +26,19 @@ abstract class PointSaleAdminController extends AbstractAdminController | |||
NumberField::new('orderAmountMin') | |||
->setCustomOption('appendHtml','€') | |||
->hideOnIndex(), | |||
StatusField::new('status'), | |||
NumberField::new('deliveryPrice') | |||
->setCustomOption('appendHtml','€') | |||
->hideOnIndex(), | |||
BooleanField::new('isPublic'), | |||
BooleanField::new('isDepository'), | |||
StatusField::new('status') | |||
->hideOnIndex(), | |||
FormField::addPanel('address'), | |||
AddressField::new('address') | |||
->setRequired(true) | |||
], | |||
$panel | |||
$this->getSeoPanel(), | |||
$this->getConfPanel(), | |||
); | |||
} | |||
@@ -23,14 +23,13 @@ abstract class SectionAdminController extends AbstractAdminController | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
$panel = parent::configureFields($pageName); | |||
return array_merge( | |||
[ | |||
FormField::addPanel('general'), | |||
TextField::new('title'), | |||
ChoiceField::new('cycle') | |||
->setRequired(true) | |||
->hideOnIndex() | |||
->setChoices( | |||
[ | |||
'Jour' => SectionModel::CYCLE_DAY, | |||
@@ -50,7 +49,8 @@ abstract class SectionAdminController extends AbstractAdminController | |||
BooleanField::new('isDefault', 'Section par défaut'), | |||
StatusField::new('status'), | |||
], | |||
$panel | |||
$this->getSeoPanel(), | |||
$this->getConfPanel(), | |||
); | |||
} | |||
@@ -4,19 +4,25 @@ namespace Lc\CaracoleBundle\Model\Newsletter; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; | |||
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface; | |||
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
use Lc\CaracoleBundle\Model\Section\SectionInterface; | |||
use Lc\SovBundle\Model\Newsletter\NewsletterModel as SovNewsletterModel; | |||
/** | |||
* @ORM\MappedSuperclass() | |||
*/ | |||
abstract class NewsletterModel extends SovNewsletterModel implements FilterMerchantInterface | |||
abstract class NewsletterModel extends SovNewsletterModel implements FilterMerchantInterface, FilterSectionInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="newsletters") | |||
*/ | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="newsletters") | |||
*/ | |||
protected $section; | |||
public function getMerchant(): ?MerchantInterface | |||
{ | |||
@@ -29,4 +35,16 @@ abstract class NewsletterModel extends SovNewsletterModel implements FilterMerch | |||
return $this; | |||
} | |||
public function getSection(): ?SectionInterface | |||
{ | |||
return $this->section; | |||
} | |||
public function setSection(?SectionInterface $section): self | |||
{ | |||
$this->section = $section; | |||
return $this; | |||
} | |||
} |
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Address; | |||
class AddressStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class AddressStore extends AbstractStore | |||
{ | |||
protected AddressRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Config; | |||
class TaxRateStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class TaxRateStore extends AbstractStore | |||
{ | |||
protected TaxRateRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Config; | |||
class UnitStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class UnitStore extends AbstractStore | |||
{ | |||
protected UnitRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Credit; | |||
class CreditHistoryStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class CreditHistoryStore extends AbstractStore | |||
{ | |||
protected CreditHistoryRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\File; | |||
class DocumentStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class DocumentStore extends AbstractStore | |||
{ | |||
protected DocumentRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Merchant; | |||
class MerchantStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class MerchantStore extends AbstractStore | |||
{ | |||
protected MerchantRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderPaymentStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderPaymentStore extends AbstractStore | |||
{ | |||
protected OrderPaymentRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderProductReductionCatalogStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderProductReductionCatalogStore extends AbstractStore | |||
{ | |||
protected OrderProductReductionCatalogRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderProductRefundStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderProductRefundStore extends AbstractStore | |||
{ | |||
protected OrderProductRefundRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderProductStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderProductStore extends AbstractStore | |||
{ | |||
protected OrderProductRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderReductionCartStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderReductionCartStore extends AbstractStore | |||
{ | |||
protected OrderReductionCartRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderReductionCreditStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderReductionCreditStore extends AbstractStore | |||
{ | |||
protected OrderReductionCreditRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderRefundStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderRefundStore extends AbstractStore | |||
{ | |||
protected OrderRefundRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderShopStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderShopStore extends AbstractStore | |||
{ | |||
protected OrderShopRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderStatusHistoryStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderStatusHistoryStore extends AbstractStore | |||
{ | |||
protected OrderStatusHistoryRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Order; | |||
class OrderStatusStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OrderStatusStore extends AbstractStore | |||
{ | |||
protected OrderStatusRepositoryQuery $query; | |||
@@ -18,7 +18,7 @@ class PointSaleRepositoryQuery extends AbstractRepositoryQuery | |||
public function filterByMerchant(MerchantInterface $merchant) | |||
{ | |||
return $this | |||
->andWhere(':merchant MEMBER OF .merchant') | |||
->andWhere(':merchant MEMBER OF .merchants') | |||
->setParameter(':merchant', $merchant); | |||
} | |||
} |
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\PointSale; | |||
class PointSaleStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class PointSaleStore extends AbstractStore | |||
{ | |||
protected PointSaleRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Product; | |||
class ProductCategoryStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ProductCategoryStore extends AbstractStore | |||
{ | |||
protected ProductCategoryRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Product; | |||
class ProductFamilyStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ProductFamilyStore extends AbstractStore | |||
{ | |||
protected ProductFamilyRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Product; | |||
class ProductStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ProductStore extends AbstractStore | |||
{ | |||
protected ProductRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Reduction; | |||
class ReductionCartStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ReductionCartStore extends AbstractStore | |||
{ | |||
protected ReductionCartRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Reduction; | |||
class ReductionCatalogStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ReductionCatalogStore extends AbstractStore | |||
{ | |||
protected ReductionCatalogRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Reduction; | |||
class ReductionCreditStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class ReductionCreditStore extends AbstractStore | |||
{ | |||
protected ReductionCreditRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Section; | |||
class OpeningStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class OpeningStore extends AbstractStore | |||
{ | |||
protected OpeningRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Section; | |||
class SectionStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class SectionStore extends AbstractStore | |||
{ | |||
protected SectionRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Setting; | |||
class MerchantSettingStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class MerchantSettingStore extends AbstractStore | |||
{ | |||
protected MerchantSettingRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\Setting; | |||
class SectionSettingStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class SectionSettingStore extends AbstractStore | |||
{ | |||
protected SectionSettingRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
class GroupUserStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class GroupUserStore extends AbstractStore | |||
{ | |||
protected GroupUserRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
class UserMerchantStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class UserMerchantStore extends AbstractStore | |||
{ | |||
protected UserMerchantRepositoryQuery $query; | |||
@@ -2,7 +2,9 @@ | |||
namespace Lc\CaracoleBundle\Repository\User; | |||
class VisitorStore | |||
use Lc\SovBundle\Repository\AbstractStore; | |||
class VisitorStore extends AbstractStore | |||
{ | |||
protected VisitorRepositoryQuery $query; | |||