Implemented entities for new RoomCategory BedType system.

This commit is contained in:
2024-09-10 18:08:40 +02:00
parent 09f384fce0
commit 975d0495a8
12 changed files with 469 additions and 57 deletions
@@ -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);
}
}