Implemented entities for new RoomCategory BedType system.
This commit is contained in:
@@ -20,7 +20,6 @@ use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||
#[IsGranted("ROLE_ADMIN")]
|
||||
class RoomAvailabilityAdminController extends AbstractController
|
||||
{
|
||||
|
||||
private $adminUrlGenerator;
|
||||
private EntityManagerInterface $entityManager;
|
||||
|
||||
@@ -129,19 +128,4 @@ class RoomAvailabilityAdminController extends AbstractController
|
||||
'categoryId' => $categoryId,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/admin/roomAvailabilityTEST/', name: 'admin_roomAvailability_test')]
|
||||
public function availabilityTest(EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$avl = new RoomAvailability();
|
||||
|
||||
$avl->setDay(new \DateTime("2024-04-24"));
|
||||
$avl->setRoomCategory($entityManager->find(RoomCategory::class, 4));
|
||||
$avl->setNumAvailable(2);
|
||||
|
||||
$entityManager->persist($avl);
|
||||
$entityManager->flush();
|
||||
|
||||
return $this->json($avl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user