feat: sort rooms in price tables by availability
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user