DB changed.
- Removed RoomCategoryDetails. - Updated some constraints and fields.
This commit is contained in:
@@ -33,7 +33,6 @@ class RoomCategoryCrudController extends AbstractCrudController
|
||||
TextField::new('description'),
|
||||
TextField::new('bedType'),
|
||||
IntegerField::new('maxGuestNum'),
|
||||
CollectionField::new('roomCategoryDetails')->useEntryCrudForm(),
|
||||
CollectionField::new('roomCategoryPhotos')->useEntryCrudForm()
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller\Admin;
|
||||
|
||||
use App\Entity\RoomCategoryDetails;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
|
||||
|
||||
class RoomCategoryDetailsCrudController extends AbstractCrudController
|
||||
{
|
||||
public static function getEntityFqcn(): string
|
||||
{
|
||||
return RoomCategoryDetails::class;
|
||||
}
|
||||
|
||||
|
||||
public function configureFields(string $pageName): iterable
|
||||
{
|
||||
return [
|
||||
TextField::new('detailsSection'),
|
||||
TextField::new('detailValue'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ namespace App\Controller\Admin;
|
||||
use App\Entity\RoomCategoryPhoto;
|
||||
use App\Entity\RoomCategoryPhotoKinds;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\{TextField, ChoiceField};
|
||||
use EasyCorp\Bundle\EasyAdminBundle\Field\{TextField, IntegerField};
|
||||
|
||||
class RoomCategoryPhotoCrudController extends AbstractCrudController
|
||||
{
|
||||
@@ -18,7 +18,7 @@ class RoomCategoryPhotoCrudController extends AbstractCrudController
|
||||
{
|
||||
yield TextField::new('path');
|
||||
yield TextField::new('altText');
|
||||
yield ChoiceField::new('kind')->setChoices(['Main' => 'main', 'Bathroom' => 'bathroom', 'Other' => 'other']);
|
||||
yield IntegerField::new('order');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,6 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use App\Repository\RoomCategoryRepository;
|
||||
use App\Entity\RoomCategory;
|
||||
use App\Entity\RoomCategoryDetails;
|
||||
use App\Entity\RoomCategoryPhoto;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
|
||||
Reference in New Issue
Block a user