fix: find destinations by hotel code in favor of ids
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
namespace App\Controller\HouseManager;
|
||||
|
||||
use App\BusProNet\DataProvider\HotelDataProvider;
|
||||
use App\BusProNet\Model\Hotel;
|
||||
use App\Entity\User;
|
||||
use App\Repository\DispositionRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
@@ -31,18 +30,14 @@ class IndexController extends AbstractController
|
||||
->findByCode($user->getHotelCode())
|
||||
;
|
||||
|
||||
$hotelBusProIds = array_map(function (Hotel $hotel) {
|
||||
return $hotel->getBusProId();
|
||||
}, $hotels);
|
||||
|
||||
$newDispositions = $this
|
||||
->dispositionRepository
|
||||
->findNewDispositionsByHotelBusProIds($hotelBusProIds)
|
||||
->findNewDispositionsByHotelCode($user->getHotelCode())
|
||||
;
|
||||
|
||||
$pendingFeedbacks = $this
|
||||
->dispositionRepository
|
||||
->findDispositionsWithPendingFeedbackByHotelBusProIds($hotelBusProIds)
|
||||
->findDispositionsWithPendingFeedbackByHotelCode($user->getHotelCode())
|
||||
;
|
||||
|
||||
return $this->render('house_manager/index.html.twig', [
|
||||
|
||||
Reference in New Issue
Block a user