feat: sort rooms in price tables by availability

This commit is contained in:
Björn Fromme
2025-02-26 08:40:48 +01:00
parent 35bce31922
commit c05cf50e6b
@@ -207,6 +207,7 @@ class ProductRepository extends AbstractRepository
) )
->from('tx_epproducts_domain_model_date', 'date') ->from('tx_epproducts_domain_model_date', 'date')
->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'date.uid = room.date') ->innerJoin('date', 'tx_epproducts_domain_model_room', 'room', 'date.uid = room.date')
->orderBy('room.available', 'DESC')
; ;
if (true === $sortByRoom) { if (true === $sortByRoom) {
@@ -375,6 +376,8 @@ class ProductRepository extends AbstractRepository
'date.product', 'date.product',
$qb->createNamedParameter($product->getUid(), Connection::PARAM_INT)) $qb->createNamedParameter($product->getUid(), Connection::PARAM_INT))
) )
->orderBy('room.available', 'DESC')
->addOrderBy('room.name', 'ASC')
; ;
return $qb return $qb