Small Changes:

- Config Vars - Added config variable "CompanyLogoSize" to set the logo size in the frontend.
- API - Prices - Fixed returned string for invalid date periods.
This commit is contained in:
2025-10-13 14:39:01 +02:00
parent 0b36c1fd87
commit 1051921a20
2 changed files with 7 additions and 2 deletions
+5 -2
View File
@@ -8,6 +8,7 @@ use App\Repository\FareTableRepository;
use App\Repository\RoomFareRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Psr\Log\LoggerInterface;
/**
* Servicio para calcular los precios de las estancias.
@@ -18,7 +19,8 @@ class PricesService
public function __construct(
private FareTableRepository $repoFareTable,
private RoomFareRepository $repoRoomFares
private RoomFareRepository $repoRoomFares,
private LoggerInterface $logger
) {
}
@@ -34,7 +36,8 @@ class PricesService
{
$daysDiff = $startDate->diff($endDate)->days;
if (!$daysDiff) {
return "Invalid date period :( ";
$this->logger->warning("PricesService.getFinalPricesForSearch - Invalid search period");
return [];
}
$fareTablesForPeriod = $this->repoFareTable->findFareTable($category->getId(), $startDate, $endDate);