@@ -26,7 +26,7 @@ doctrine: | |||
Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface: App\Entity\Credit\CreditHistory | |||
Lc\CaracoleBundle\Model\File\DocumentInterface: App\Entity\File\Document | |||
Lc\CaracoleBundle\Model\Merchant\MerchantInterface: App\Entity\Merchant\Merchant | |||
Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface: App\Entity\Newsletter\Newsletter | |||
Lc\SovBundle\Model\Newsletter\NewsletterInterface: App\Entity\Newsletter\Newsletter | |||
Lc\CaracoleBundle\Model\Order\OrderPaymentInterface: App\Entity\Order\OrderPayment | |||
Lc\CaracoleBundle\Model\Order\OrderProductInterface: App\Entity\Order\OrderProduct | |||
Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface: App\Entity\Order\OrderProductReductionCatalog | |||
@@ -47,8 +47,8 @@ doctrine: | |||
Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit | |||
Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section | |||
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site | |||
Lc\CaracoleBundle\Model\Site\NewsInterface: App\Entity\Site\News | |||
Lc\CaracoleBundle\Model\Site\PageInterface: App\Entity\Site\Page | |||
Lc\SovBundle\Model\Site\NewsInterface: App\Entity\Site\News | |||
Lc\SovBundle\Model\Site\PageInterface: App\Entity\Site\Page | |||
Lc\SovBundle\Model\Ticket\TicketInterface: App\Entity\Ticket\Ticket | |||
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage | |||
Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant |
@@ -5,7 +5,10 @@ namespace App\Controller\Dashboard; | |||
use App\Entity\Config\TaxRate; | |||
use App\Entity\Config\Unit; | |||
use App\Entity\Merchant\Merchant; | |||
use App\Entity\Newsletter\Newsletter; | |||
use App\Entity\PointSale\PointSale; | |||
use App\Entity\Section\Section; | |||
use App\Entity\Site\News; | |||
use App\Entity\Site\Page; | |||
use App\Entity\Ticket\Ticket; | |||
use App\Entity\User\GroupUser; | |||
@@ -23,7 +26,9 @@ class DashboardAdminController extends CaracDashboardController | |||
yield MenuItem::linkToDashboard('dashboard', 'far fa-circle'); | |||
yield MenuItem::linkToCrud('tickets', 'far fa-copy', Ticket::class); | |||
yield MenuItem::linkToCrud('pointsale', 'far fa-circle', PointSale::class); | |||
yield MenuItem::linkToCrud('page', 'far fa-copy', Page::class); | |||
yield MenuItem::linkToCrud('news', 'far fa-circle', News::class); | |||
yield MenuItem::subMenu('user', 'far fa-user')->setSubItems( | |||
[ | |||
MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class), | |||
@@ -43,6 +48,7 @@ class DashboardAdminController extends CaracDashboardController | |||
[ | |||
MenuItem::linkToCrud('admin_merchant', '', Merchant::class), | |||
MenuItem::linkToCrud('admin_section', '', Section::class), | |||
MenuItem::linkToCrud('newsletters', '', Newsletter::class), | |||
MenuItem::linkToCrud('admin_tva', '', TaxRate::class), | |||
MenuItem::linkToCrud('admin_unit', '', Unit::class), | |||
] |
@@ -0,0 +1,14 @@ | |||
<?php | |||
namespace App\Controller\Newsletter; | |||
use App\Entity\Newsletter\Newsletter; | |||
use Lc\CaracoleBundle\Controller\Newsletter\NewsletterAdminController as CaracNewsletterAdminController; | |||
class NewsletterAdminController extends CaracNewsletterAdminController | |||
{ | |||
public static function getEntityFqcn(): string | |||
{ | |||
return Newsletter::class; | |||
} | |||
} |
@@ -0,0 +1,15 @@ | |||
<?php | |||
namespace App\Controller\PointSale; | |||
use App\Entity\PointSale\PointSale; | |||
use Lc\CaracoleBundle\Controller\PointSale\PointSaleAdminController as CaracPointSaleAdminController; | |||
class PointSaleAdminController extends CaracPointSaleAdminController | |||
{ | |||
public static function getEntityFqcn(): string | |||
{ | |||
return PointSale::class; | |||
} | |||
} |
@@ -0,0 +1,14 @@ | |||
<?php | |||
namespace App\Controller\Site; | |||
use App\Entity\Site\News; | |||
use Lc\CaracoleBundle\Controller\Site\NewsAdminController as CaracNewsAdminController; | |||
class NewsAdminController extends CaracNewsAdminController | |||
{ | |||
public static function getEntityFqcn(): string | |||
{ | |||
return News::class; | |||
} | |||
} |
@@ -3,41 +3,12 @@ | |||
namespace App\Controller\Site; | |||
use App\Entity\Site\Page; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField; | |||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField; | |||
use Lc\CaracoleBundle\Controller\Site\PageAdminController as CaracPageAdminController; | |||
use Lc\CaracoleBundle\Controller\AdminControllerTrait; | |||
use Lc\SovBundle\Controller\AbstractAdminController; | |||
use Lc\SovBundle\Field\CKEditorField; | |||
use Lc\SovBundle\Field\ImageManagerField; | |||
use Lc\SovBundle\Field\StatusField; | |||
class PageAdminController extends AbstractAdminController | |||
class PageAdminController extends CaracPageAdminController | |||
{ | |||
use AdminControllerTrait; | |||
public static function getEntityFqcn(): string | |||
{ | |||
return Page::class; | |||
} | |||
public function configureFields(string $pageName): iterable | |||
{ | |||
$panel = parent::configureFields($pageName); | |||
return array_merge( | |||
[ | |||
FormField::addPanel('general'), | |||
TextField::new('title'), | |||
ImageManagerField::new('image'), | |||
NumberField::new('position')->hideOnForm(), | |||
StatusField::new('status'), | |||
CKEditorField::new('description'), | |||
], | |||
$panel | |||
); | |||
} | |||
} |
@@ -2,15 +2,14 @@ | |||
namespace App\Entity\Newsletter; | |||
use Lc\CaracoleBundle\Repository\Newsletter\NewsletterRepository; | |||
use Lc\SovBundle\Repository\Newsletter\NewsletterRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface; | |||
use Lc\CaracoleBundle\Model\Newsletter\NewsletterModel; | |||
/** | |||
* @ORM\Entity(repositoryClass=NewsletterRepository::class) | |||
*/ | |||
class Newsletter extends NewsletterModel implements NewsletterInterface | |||
class Newsletter extends NewsletterModel | |||
{ | |||
/** | |||
* @ORM\Id |
@@ -2,15 +2,14 @@ | |||
namespace App\Entity\Site; | |||
use Lc\CaracoleBundle\Repository\Site\NewsRepository; | |||
use Lc\SovBundle\Repository\Site\NewsRepository; | |||
use Doctrine\ORM\Mapping as ORM; | |||
use Lc\CaracoleBundle\Model\Site\NewsInterface; | |||
use Lc\CaracoleBundle\Model\Site\NewsModel; | |||
/** | |||
* @ORM\Entity(repositoryClass=NewsRepository::class) | |||
*/ | |||
class News extends NewsModel implements NewsInterface | |||
class News extends NewsModel | |||
{ | |||
/** | |||
* @ORM\Id |
@@ -3,7 +3,7 @@ | |||
namespace App\Entity\Site; | |||
use Lc\CaracoleBundle\Model\Site\PageModel; | |||
use Lc\CaracoleBundle\Repository\Site\PageRepository; | |||
use Lc\SovBundle\Repository\Site\PageRepository; | |||
use Doctrine\Common\Collections\ArrayCollection; | |||
use Doctrine\Common\Collections\Collection; | |||
use Doctrine\ORM\Mapping as ORM; |