Browse Source

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

ideas
Charly 3 years ago
parent
commit
f1148bcc33
9 changed files with 59 additions and 41 deletions
  1. +3
    -3
      config/packages/doctrine.yaml
  2. +6
    -0
      src/Controller/Dashboard/DashboardAdminController.php
  3. +14
    -0
      src/Controller/Newsletter/NewsletterAdminController.php
  4. +15
    -0
      src/Controller/PointSale/PointSaleAdminController.php
  5. +14
    -0
      src/Controller/Site/NewsAdminController.php
  6. +2
    -31
      src/Controller/Site/PageAdminController.php
  7. +2
    -3
      src/Entity/Newsletter/Newsletter.php
  8. +2
    -3
      src/Entity/Site/News.php
  9. +1
    -1
      src/Entity/Site/Page.php

+ 3
- 3
config/packages/doctrine.yaml View File

Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface: App\Entity\Credit\CreditHistory Lc\CaracoleBundle\Model\Credit\CreditHistoryInterface: App\Entity\Credit\CreditHistory
Lc\CaracoleBundle\Model\File\DocumentInterface: App\Entity\File\Document Lc\CaracoleBundle\Model\File\DocumentInterface: App\Entity\File\Document
Lc\CaracoleBundle\Model\Merchant\MerchantInterface: App\Entity\Merchant\Merchant 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\OrderPaymentInterface: App\Entity\Order\OrderPayment
Lc\CaracoleBundle\Model\Order\OrderProductInterface: App\Entity\Order\OrderProduct Lc\CaracoleBundle\Model\Order\OrderProductInterface: App\Entity\Order\OrderProduct
Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface: App\Entity\Order\OrderProductReductionCatalog Lc\CaracoleBundle\Model\Order\OrderProductReductionCatalogInterface: App\Entity\Order\OrderProductReductionCatalog
Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit Lc\CaracoleBundle\Model\Reduction\ReductionCreditInterface: App\Entity\Reduction\ReductionCredit
Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section Lc\CaracoleBundle\Model\Section\SectionInterface: App\Entity\Section\Section
Lc\SovBundle\Model\Site\SiteInterface: App\Entity\Site\Site 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\TicketInterface: App\Entity\Ticket\Ticket
Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage Lc\SovBundle\Model\Ticket\TicketMessageInterface: App\Entity\Ticket\TicketMessage
Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant Lc\CaracoleBundle\Model\User\UserMerchantInterface: App\Entity\User\UserMerchant

+ 6
- 0
src/Controller/Dashboard/DashboardAdminController.php View File

use App\Entity\Config\TaxRate; use App\Entity\Config\TaxRate;
use App\Entity\Config\Unit; use App\Entity\Config\Unit;
use App\Entity\Merchant\Merchant; use App\Entity\Merchant\Merchant;
use App\Entity\Newsletter\Newsletter;
use App\Entity\PointSale\PointSale;
use App\Entity\Section\Section; use App\Entity\Section\Section;
use App\Entity\Site\News;
use App\Entity\Site\Page; use App\Entity\Site\Page;
use App\Entity\Ticket\Ticket; use App\Entity\Ticket\Ticket;
use App\Entity\User\GroupUser; use App\Entity\User\GroupUser;
yield MenuItem::linkToDashboard('dashboard', 'far fa-circle'); yield MenuItem::linkToDashboard('dashboard', 'far fa-circle');


yield MenuItem::linkToCrud('tickets', 'far fa-copy', Ticket::class); 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('page', 'far fa-copy', Page::class);
yield MenuItem::linkToCrud('news', 'far fa-circle', News::class);
yield MenuItem::subMenu('user', 'far fa-user')->setSubItems( yield MenuItem::subMenu('user', 'far fa-user')->setSubItems(
[ [
MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class), MenuItem::linkToCrud('user_merchant_index', '', UserMerchant::class),
[ [
MenuItem::linkToCrud('admin_merchant', '', Merchant::class), MenuItem::linkToCrud('admin_merchant', '', Merchant::class),
MenuItem::linkToCrud('admin_section', '', Section::class), MenuItem::linkToCrud('admin_section', '', Section::class),
MenuItem::linkToCrud('newsletters', '', Newsletter::class),
MenuItem::linkToCrud('admin_tva', '', TaxRate::class), MenuItem::linkToCrud('admin_tva', '', TaxRate::class),
MenuItem::linkToCrud('admin_unit', '', Unit::class), MenuItem::linkToCrud('admin_unit', '', Unit::class),
] ]

+ 14
- 0
src/Controller/Newsletter/NewsletterAdminController.php View File

<?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;
}
}

+ 15
- 0
src/Controller/PointSale/PointSaleAdminController.php View File

<?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;
}

}

+ 14
- 0
src/Controller/Site/NewsAdminController.php View File

<?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;
}
}

+ 2
- 31
src/Controller/Site/PageAdminController.php View File

namespace App\Controller\Site; namespace App\Controller\Site;


use App\Entity\Site\Page; 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 public static function getEntityFqcn(): string
{ {
return Page::class; 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
- 3
src/Entity/Newsletter/Newsletter.php View File



namespace App\Entity\Newsletter; namespace App\Entity\Newsletter;


use Lc\CaracoleBundle\Repository\Newsletter\NewsletterRepository;
use Lc\SovBundle\Repository\Newsletter\NewsletterRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Newsletter\NewsletterInterface;
use Lc\CaracoleBundle\Model\Newsletter\NewsletterModel; use Lc\CaracoleBundle\Model\Newsletter\NewsletterModel;


/** /**
* @ORM\Entity(repositoryClass=NewsletterRepository::class) * @ORM\Entity(repositoryClass=NewsletterRepository::class)
*/ */
class Newsletter extends NewsletterModel implements NewsletterInterface
class Newsletter extends NewsletterModel
{ {
/** /**
* @ORM\Id * @ORM\Id

+ 2
- 3
src/Entity/Site/News.php View File



namespace App\Entity\Site; namespace App\Entity\Site;


use Lc\CaracoleBundle\Repository\Site\NewsRepository;
use Lc\SovBundle\Repository\Site\NewsRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\CaracoleBundle\Model\Site\NewsInterface;
use Lc\CaracoleBundle\Model\Site\NewsModel; use Lc\CaracoleBundle\Model\Site\NewsModel;


/** /**
* @ORM\Entity(repositoryClass=NewsRepository::class) * @ORM\Entity(repositoryClass=NewsRepository::class)
*/ */
class News extends NewsModel implements NewsInterface
class News extends NewsModel
{ {
/** /**
* @ORM\Id * @ORM\Id

+ 1
- 1
src/Entity/Site/Page.php View File

namespace App\Entity\Site; namespace App\Entity\Site;


use Lc\CaracoleBundle\Model\Site\PageModel; 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\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;

Loading…
Cancel
Save