Estado Recepcion Final en Proyecto

This commit is contained in:
2023-10-19 22:43:21 -03:00
parent 54ac535a49
commit 4734417fe2
5 changed files with 75 additions and 63 deletions

View File

@ -50,4 +50,17 @@ class EstadosProyectos
}
return $this->withJson($response, $output);
}
public function recepcionByProyecto(ServerRequestInterface $request, ResponseInterface $response, Repository\Proyecto\EstadoProyecto $estadoProyectoRepository, int $proyecto_id): ResponseInterface
{
$output = [
'proyecto_id' => $proyecto_id,
'estado' => null
];
try {
$output['estado'] = $estadoProyectoRepository->fetchRecepcionByProyecto($proyecto_id);
} catch (EmptyResult) {
return $this->emptyBody($response);
}
return $this->withJson($response, $output);
}
}