@@ -0,0 +1,40 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Controller\Common; | |||
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||
use Lc\ShopBundle\Context\TaxRateInterface; | |||
use Lc\SovBundle\Controller\Admin\AbstractCrudController; | |||
class TaxRateCrudController extends AbstractCrudController | |||
{ | |||
public static function getEntityFqcn(): string | |||
{ | |||
return TaxRateInterface::class; | |||
} | |||
public function configureCrud(Crud $crud): Crud | |||
{ | |||
return $crud->setSearchFields(['id', 'title', 'value']); | |||
} | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
$id = IntegerField::new('id', 'ID'); | |||
$title = TextField::new('title'); | |||
$value = NumberField::new('value'); | |||
if (Crud::PAGE_INDEX === $pageName) { | |||
return [$id, $title, $value]; | |||
} elseif (Crud::PAGE_DETAIL === $pageName) { | |||
return [$id, $title, $value]; | |||
} elseif (Crud::PAGE_NEW === $pageName) { | |||
return [$title, $value]; | |||
} elseif (Crud::PAGE_EDIT === $pageName) { | |||
return [$title, $value]; | |||
} | |||
} | |||
} |
@@ -49,14 +49,14 @@ abstract class CreditHistoryModel extends AbstractLightEntity implements PayoffI | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -90,14 +90,14 @@ abstract class DocumentModel extends AbstractFullEntity implements FilterMerchan | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -21,7 +21,7 @@ abstract class NewsletterModel extends AbstractFullEntity implements FilterMerch | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", mappedBy="newsletters") | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface", mappedBy="newsletters") | |||
*/ | |||
protected $users; | |||
@@ -30,7 +30,7 @@ abstract class OrderShopModel extends AbstractLightEntity implements FilterMerch | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="orders", fetch="EAGER") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="orders", fetch="EAGER") | |||
*/ | |||
protected $user; | |||
@@ -112,14 +112,14 @@ abstract class OrderShopModel extends AbstractLightEntity implements FilterMerch | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -31,14 +31,14 @@ abstract class OrderStatusHistoryModel extends AbstractLightEntity | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -64,14 +64,14 @@ abstract class ProductFamilyModel extends AbstractFullEntity implements ProductP | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -25,14 +25,14 @@ abstract class ProductModel extends AbstractLightEntity implements SortableInter | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -34,7 +34,7 @@ abstract class ReductionCreditModel extends AbstractLightEntity implements Reduc | |||
protected $title; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="reductionCredits") | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="reductionCredits") | |||
*/ | |||
protected $users; | |||
@@ -56,7 +56,7 @@ abstract class ReductionCreditModel extends AbstractLightEntity implements Reduc | |||
protected $sended; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
*/ | |||
protected $owner; | |||
@@ -49,7 +49,7 @@ abstract class ReminderModel extends AbstractLightEntity implements FilterMercha | |||
protected $entityAction; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
*/ | |||
protected $users; | |||
@@ -17,14 +17,14 @@ abstract class TicketMessageModel extends AbstractLightEntity implements StatusI | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; |
@@ -31,14 +31,14 @@ abstract class TicketModel extends AbstractLightEntity implements FilterMerchant | |||
/** | |||
* @Gedmo\Blameable(on="create") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $createdBy; | |||
/** | |||
* @Gedmo\Blameable(on="update") | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface") | |||
* @ORM\JoinColumn(nullable=true) | |||
*/ | |||
protected $updatedBy; | |||
@@ -101,7 +101,7 @@ abstract class TicketModel extends AbstractLightEntity implements FilterMerchant | |||
protected $ticketMessages; | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="tickets") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="tickets") | |||
*/ | |||
protected $user; | |||
@@ -24,7 +24,7 @@ abstract class GroupUserModel extends AbstractFullEntity implements FilterMercha | |||
protected $merchant; | |||
/** | |||
* @ORM\ManyToMany(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", mappedBy="groupUsers") | |||
* @ORM\ManyToMany(targetEntity="Lc\SovBundle\Model\User\UserInterface", mappedBy="groupUsers") | |||
*/ | |||
protected $users; | |||
@@ -16,7 +16,7 @@ use Lc\CaracoleBundle\Model\Merchant\MerchantInterface; | |||
abstract class UserMerchantModel implements FilterMerchantInterface | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="userMerchants") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="userMerchants") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $user; |
@@ -12,7 +12,7 @@ use Lc\SovBundle\Model\User\UserInterface; | |||
abstract class UserPointSaleModel | |||
{ | |||
/** | |||
* @ORM\ManyToOne(targetEntity="Lc\CaracoleBundle\Model\User\UserInterface", inversedBy="userPointSales") | |||
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\User\UserInterface", inversedBy="userPointSales") | |||
* @ORM\JoinColumn(nullable=false) | |||
*/ | |||
protected $user; |