Mostrar reservas

This commit is contained in:
Juan Pablo Vial
2025-07-22 18:21:05 -04:00
parent 39bc190775
commit 909bb2b879
3 changed files with 311 additions and 1 deletions

View File

@ -0,0 +1,22 @@
<?php
namespace Incoviba\Controller\Ventas;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Common\Alias\View;
use Incoviba\Common\Implement\Exception\EmptyResult;
use Incoviba\Repository;
use Incoviba\Service;
class Reservations
{
public function __invoke(ServerRequestInterface $request, ResponseInterface $response,
Service\Proyecto $proyectoService, View $view): ResponseInterface
{
$projects = [];
try {
$projects = $proyectoService->getVendibles('descripcion');
} catch (EmptyResult) {}
return $view->render($response, 'ventas.reservations', compact('projects'));
}
}