瀏覽代碼

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Charly 3 年之前
父節點
當前提交
4e07d91994
共有 37 個文件被更改,包括 128 次插入46 次删除
  1. +5
    -6
      Controller/Config/TaxRateAdminController.php
  2. +0
    -1
      Controller/Config/UnitAdminController.php
  3. +10
    -3
      Controller/PointSale/PointSaleAdminController.php
  4. +3
    -3
      Controller/Section/SectionAdminController.php
  5. +19
    -1
      Model/Newsletter/NewsletterModel.php
  6. +3
    -1
      Repository/Address/AddressStore.php
  7. +3
    -1
      Repository/Config/TaxRateStore.php
  8. +3
    -1
      Repository/Config/UnitStore.php
  9. +3
    -1
      Repository/Credit/CreditHistoryStore.php
  10. +3
    -1
      Repository/File/DocumentStore.php
  11. +3
    -1
      Repository/Merchant/MerchantStore.php
  12. +3
    -1
      Repository/Order/OrderPaymentStore.php
  13. +3
    -1
      Repository/Order/OrderProductReductionCatalogStore.php
  14. +3
    -1
      Repository/Order/OrderProductRefundStore.php
  15. +3
    -1
      Repository/Order/OrderProductStore.php
  16. +3
    -1
      Repository/Order/OrderReductionCartStore.php
  17. +3
    -1
      Repository/Order/OrderReductionCreditStore.php
  18. +3
    -1
      Repository/Order/OrderRefundStore.php
  19. +3
    -1
      Repository/Order/OrderShopStore.php
  20. +3
    -1
      Repository/Order/OrderStatusHistoryStore.php
  21. +3
    -1
      Repository/Order/OrderStatusStore.php
  22. +1
    -1
      Repository/PointSale/PointSaleRepositoryQuery.php
  23. +3
    -1
      Repository/PointSale/PointSaleStore.php
  24. +3
    -1
      Repository/Product/ProductCategoryStore.php
  25. +3
    -1
      Repository/Product/ProductFamilyStore.php
  26. +3
    -1
      Repository/Product/ProductStore.php
  27. +3
    -1
      Repository/Reduction/ReductionCartStore.php
  28. +3
    -1
      Repository/Reduction/ReductionCatalogStore.php
  29. +3
    -1
      Repository/Reduction/ReductionCreditStore.php
  30. +3
    -1
      Repository/Section/OpeningStore.php
  31. +3
    -1
      Repository/Section/SectionStore.php
  32. +3
    -1
      Repository/Setting/MerchantSettingStore.php
  33. +3
    -1
      Repository/Setting/SectionSettingStore.php
  34. +3
    -1
      Repository/User/GroupUserStore.php
  35. +3
    -1
      Repository/User/UserMerchantStore.php
  36. +3
    -1
      Repository/User/VisitorStore.php
  37. +0
    -1
      Resources/assets/app/admin/switchmerchant/app.switchmerchant.js

+ 5
- 6
Controller/Config/TaxRateAdminController.php 查看文件

{ {
use AdminControllerTrait; use AdminControllerTrait;


public function configureCrud(Crud $crud): Crud
{
return $crud->setSearchFields(['id', 'title', 'value']);
}

public function configureFields(string $pageName): iterable public function configureFields(string $pageName): iterable
{ {
return [ return [
IntegerField::new('id', 'ID')->hideOnForm(),
TextField::new('title'), TextField::new('title'),
NumberField::new('value') NumberField::new('value')
]; ];
} }


public function configureCrud(Crud $crud): Crud
{
return $crud->setSearchFields(['id', 'title', 'value']);
}

public function createEntity(string $entityFqcn) public function createEntity(string $entityFqcn)
{ {
$factory = new TaxRateFactory(); $factory = new TaxRateFactory();

+ 0
- 1
Controller/Config/UnitAdminController.php 查看文件

public function configureFields(string $pageName): iterable public function configureFields(string $pageName): iterable
{ {
return [ return [
IntegerField::new('id', 'ID')->hideOnForm(),
TextField::new('unit'), TextField::new('unit'),
TextField::new('wording'), TextField::new('wording'),
TextField::new('wordingUnit'), TextField::new('wordingUnit'),

+ 10
- 3
Controller/PointSale/PointSaleAdminController.php 查看文件

use Lc\CaracoleBundle\Factory\PointSale\PointSaleFactory; use Lc\CaracoleBundle\Factory\PointSale\PointSaleFactory;
use Lc\CaracoleBundle\Field\Address\AddressField; use Lc\CaracoleBundle\Field\Address\AddressField;
use Lc\SovBundle\Controller\AbstractAdminController; use Lc\SovBundle\Controller\AbstractAdminController;
use Lc\SovBundle\Field\BooleanField;
use Lc\SovBundle\Field\StatusField; use Lc\SovBundle\Field\StatusField;


abstract class PointSaleAdminController extends AbstractAdminController abstract class PointSaleAdminController extends AbstractAdminController


public function configureFields(string $pageName): iterable public function configureFields(string $pageName): iterable
{ {
$panel = parent::configureFields($pageName);


return array_merge( return array_merge(
[ [
NumberField::new('orderAmountMin') NumberField::new('orderAmountMin')
->setCustomOption('appendHtml','€') ->setCustomOption('appendHtml','€')
->hideOnIndex(), ->hideOnIndex(),
StatusField::new('status'),
NumberField::new('deliveryPrice')
->setCustomOption('appendHtml','€')
->hideOnIndex(),
BooleanField::new('isPublic'),
BooleanField::new('isDepository'),
StatusField::new('status')
->hideOnIndex(),
FormField::addPanel('address'), FormField::addPanel('address'),
AddressField::new('address') AddressField::new('address')
->setRequired(true) ->setRequired(true)
], ],
$panel
$this->getSeoPanel(),
$this->getConfPanel(),
); );
} }



+ 3
- 3
Controller/Section/SectionAdminController.php 查看文件



public function configureFields(string $pageName): iterable public function configureFields(string $pageName): iterable
{ {
$panel = parent::configureFields($pageName);

return array_merge( return array_merge(
[ [
FormField::addPanel('general'), FormField::addPanel('general'),
TextField::new('title'), TextField::new('title'),
ChoiceField::new('cycle') ChoiceField::new('cycle')
->setRequired(true) ->setRequired(true)
->hideOnIndex()
->setChoices( ->setChoices(
[ [
'Jour' => SectionModel::CYCLE_DAY, 'Jour' => SectionModel::CYCLE_DAY,
BooleanField::new('isDefault', 'Section par défaut'), BooleanField::new('isDefault', 'Section par défaut'),
StatusField::new('status'), StatusField::new('status'),
], ],
$panel
$this->getSeoPanel(),
$this->getConfPanel(),
); );
} }



+ 19
- 1
Model/Newsletter/NewsletterModel.php 查看文件



use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface; use Lc\CaracoleBundle\Doctrine\Extension\FilterMerchantInterface;
use Lc\CaracoleBundle\Doctrine\Extension\FilterSectionInterface;
use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
use Lc\CaracoleBundle\Model\Section\SectionInterface;
use Lc\SovBundle\Model\Newsletter\NewsletterModel as SovNewsletterModel; use Lc\SovBundle\Model\Newsletter\NewsletterModel as SovNewsletterModel;


/** /**
* @ORM\MappedSuperclass() * @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") * @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Merchant\MerchantInterface", inversedBy="newsletters")
*/ */
protected $merchant; protected $merchant;


/**
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\Section\SectionInterface", inversedBy="newsletters")
*/
protected $section;


public function getMerchant(): ?MerchantInterface public function getMerchant(): ?MerchantInterface
{ {


return $this; return $this;
} }

public function getSection(): ?SectionInterface
{
return $this->section;
}

public function setSection(?SectionInterface $section): self
{
$this->section = $section;

return $this;
}
} }

+ 3
- 1
Repository/Address/AddressStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Address; namespace Lc\CaracoleBundle\Repository\Address;


class AddressStore
use Lc\SovBundle\Repository\AbstractStore;

class AddressStore extends AbstractStore
{ {
protected AddressRepositoryQuery $query; protected AddressRepositoryQuery $query;



+ 3
- 1
Repository/Config/TaxRateStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Config; namespace Lc\CaracoleBundle\Repository\Config;


class TaxRateStore
use Lc\SovBundle\Repository\AbstractStore;

class TaxRateStore extends AbstractStore
{ {
protected TaxRateRepositoryQuery $query; protected TaxRateRepositoryQuery $query;



+ 3
- 1
Repository/Config/UnitStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Config; namespace Lc\CaracoleBundle\Repository\Config;


class UnitStore
use Lc\SovBundle\Repository\AbstractStore;

class UnitStore extends AbstractStore
{ {
protected UnitRepositoryQuery $query; protected UnitRepositoryQuery $query;



+ 3
- 1
Repository/Credit/CreditHistoryStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Credit; namespace Lc\CaracoleBundle\Repository\Credit;


class CreditHistoryStore
use Lc\SovBundle\Repository\AbstractStore;

class CreditHistoryStore extends AbstractStore
{ {
protected CreditHistoryRepositoryQuery $query; protected CreditHistoryRepositoryQuery $query;



+ 3
- 1
Repository/File/DocumentStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\File; namespace Lc\CaracoleBundle\Repository\File;


class DocumentStore
use Lc\SovBundle\Repository\AbstractStore;

class DocumentStore extends AbstractStore
{ {
protected DocumentRepositoryQuery $query; protected DocumentRepositoryQuery $query;



+ 3
- 1
Repository/Merchant/MerchantStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Merchant; namespace Lc\CaracoleBundle\Repository\Merchant;


class MerchantStore
use Lc\SovBundle\Repository\AbstractStore;

class MerchantStore extends AbstractStore
{ {
protected MerchantRepositoryQuery $query; protected MerchantRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderPaymentStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderPaymentStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderPaymentStore extends AbstractStore
{ {
protected OrderPaymentRepositoryQuery $query; protected OrderPaymentRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderProductReductionCatalogStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderProductReductionCatalogStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderProductReductionCatalogStore extends AbstractStore
{ {
protected OrderProductReductionCatalogRepositoryQuery $query; protected OrderProductReductionCatalogRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderProductRefundStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderProductRefundStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderProductRefundStore extends AbstractStore
{ {
protected OrderProductRefundRepositoryQuery $query; protected OrderProductRefundRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderProductStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderProductStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderProductStore extends AbstractStore
{ {
protected OrderProductRepositoryQuery $query; protected OrderProductRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderReductionCartStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderReductionCartStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderReductionCartStore extends AbstractStore
{ {
protected OrderReductionCartRepositoryQuery $query; protected OrderReductionCartRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderReductionCreditStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderReductionCreditStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderReductionCreditStore extends AbstractStore
{ {
protected OrderReductionCreditRepositoryQuery $query; protected OrderReductionCreditRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderRefundStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderRefundStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderRefundStore extends AbstractStore
{ {
protected OrderRefundRepositoryQuery $query; protected OrderRefundRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderShopStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderShopStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderShopStore extends AbstractStore
{ {
protected OrderShopRepositoryQuery $query; protected OrderShopRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderStatusHistoryStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderStatusHistoryStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderStatusHistoryStore extends AbstractStore
{ {
protected OrderStatusHistoryRepositoryQuery $query; protected OrderStatusHistoryRepositoryQuery $query;



+ 3
- 1
Repository/Order/OrderStatusStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Order; namespace Lc\CaracoleBundle\Repository\Order;


class OrderStatusStore
use Lc\SovBundle\Repository\AbstractStore;

class OrderStatusStore extends AbstractStore
{ {
protected OrderStatusRepositoryQuery $query; protected OrderStatusRepositoryQuery $query;



+ 1
- 1
Repository/PointSale/PointSaleRepositoryQuery.php 查看文件

public function filterByMerchant(MerchantInterface $merchant) public function filterByMerchant(MerchantInterface $merchant)
{ {
return $this return $this
->andWhere(':merchant MEMBER OF .merchant')
->andWhere(':merchant MEMBER OF .merchants')
->setParameter(':merchant', $merchant); ->setParameter(':merchant', $merchant);
} }
} }

+ 3
- 1
Repository/PointSale/PointSaleStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\PointSale; namespace Lc\CaracoleBundle\Repository\PointSale;


class PointSaleStore
use Lc\SovBundle\Repository\AbstractStore;

class PointSaleStore extends AbstractStore
{ {
protected PointSaleRepositoryQuery $query; protected PointSaleRepositoryQuery $query;



+ 3
- 1
Repository/Product/ProductCategoryStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Product; namespace Lc\CaracoleBundle\Repository\Product;


class ProductCategoryStore
use Lc\SovBundle\Repository\AbstractStore;

class ProductCategoryStore extends AbstractStore
{ {
protected ProductCategoryRepositoryQuery $query; protected ProductCategoryRepositoryQuery $query;



+ 3
- 1
Repository/Product/ProductFamilyStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Product; namespace Lc\CaracoleBundle\Repository\Product;


class ProductFamilyStore
use Lc\SovBundle\Repository\AbstractStore;

class ProductFamilyStore extends AbstractStore
{ {
protected ProductFamilyRepositoryQuery $query; protected ProductFamilyRepositoryQuery $query;



+ 3
- 1
Repository/Product/ProductStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Product; namespace Lc\CaracoleBundle\Repository\Product;


class ProductStore
use Lc\SovBundle\Repository\AbstractStore;

class ProductStore extends AbstractStore
{ {
protected ProductRepositoryQuery $query; protected ProductRepositoryQuery $query;



+ 3
- 1
Repository/Reduction/ReductionCartStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Reduction; namespace Lc\CaracoleBundle\Repository\Reduction;


class ReductionCartStore
use Lc\SovBundle\Repository\AbstractStore;

class ReductionCartStore extends AbstractStore
{ {
protected ReductionCartRepositoryQuery $query; protected ReductionCartRepositoryQuery $query;



+ 3
- 1
Repository/Reduction/ReductionCatalogStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Reduction; namespace Lc\CaracoleBundle\Repository\Reduction;


class ReductionCatalogStore
use Lc\SovBundle\Repository\AbstractStore;

class ReductionCatalogStore extends AbstractStore
{ {
protected ReductionCatalogRepositoryQuery $query; protected ReductionCatalogRepositoryQuery $query;



+ 3
- 1
Repository/Reduction/ReductionCreditStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Reduction; namespace Lc\CaracoleBundle\Repository\Reduction;


class ReductionCreditStore
use Lc\SovBundle\Repository\AbstractStore;

class ReductionCreditStore extends AbstractStore
{ {
protected ReductionCreditRepositoryQuery $query; protected ReductionCreditRepositoryQuery $query;



+ 3
- 1
Repository/Section/OpeningStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Section; namespace Lc\CaracoleBundle\Repository\Section;


class OpeningStore
use Lc\SovBundle\Repository\AbstractStore;

class OpeningStore extends AbstractStore
{ {
protected OpeningRepositoryQuery $query; protected OpeningRepositoryQuery $query;



+ 3
- 1
Repository/Section/SectionStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Section; namespace Lc\CaracoleBundle\Repository\Section;


class SectionStore
use Lc\SovBundle\Repository\AbstractStore;

class SectionStore extends AbstractStore
{ {
protected SectionRepositoryQuery $query; protected SectionRepositoryQuery $query;



+ 3
- 1
Repository/Setting/MerchantSettingStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Setting; namespace Lc\CaracoleBundle\Repository\Setting;


class MerchantSettingStore
use Lc\SovBundle\Repository\AbstractStore;

class MerchantSettingStore extends AbstractStore
{ {
protected MerchantSettingRepositoryQuery $query; protected MerchantSettingRepositoryQuery $query;



+ 3
- 1
Repository/Setting/SectionSettingStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\Setting; namespace Lc\CaracoleBundle\Repository\Setting;


class SectionSettingStore
use Lc\SovBundle\Repository\AbstractStore;

class SectionSettingStore extends AbstractStore
{ {
protected SectionSettingRepositoryQuery $query; protected SectionSettingRepositoryQuery $query;



+ 3
- 1
Repository/User/GroupUserStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\User; namespace Lc\CaracoleBundle\Repository\User;


class GroupUserStore
use Lc\SovBundle\Repository\AbstractStore;

class GroupUserStore extends AbstractStore
{ {
protected GroupUserRepositoryQuery $query; protected GroupUserRepositoryQuery $query;



+ 3
- 1
Repository/User/UserMerchantStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\User; namespace Lc\CaracoleBundle\Repository\User;


class UserMerchantStore
use Lc\SovBundle\Repository\AbstractStore;

class UserMerchantStore extends AbstractStore
{ {
protected UserMerchantRepositoryQuery $query; protected UserMerchantRepositoryQuery $query;



+ 3
- 1
Repository/User/VisitorStore.php 查看文件



namespace Lc\CaracoleBundle\Repository\User; namespace Lc\CaracoleBundle\Repository\User;


class VisitorStore
use Lc\SovBundle\Repository\AbstractStore;

class VisitorStore extends AbstractStore
{ {
protected VisitorRepositoryQuery $query; protected VisitorRepositoryQuery $query;



+ 0
- 1
Resources/assets/app/admin/switchmerchant/app.switchmerchant.js 查看文件









Loading…
取消
儲存