Commit ffd978bf4e50c0f5615bc8cfb0f03efb83815728

Authored by Wilmer
1 parent 9619db239a
Exists in master

no deja enviar la nueva escala hasta que primero suba la resolución de aprobació…

…n de jurados para la defensa
Showing 1 changed file with 11 additions and 0 deletions   Show diff stats
src/AppBundle/Controller/AscensoController.php
... ... @@ -369,6 +369,17 @@ class AscensoController extends Controller
369 369 $this->addFlash('danger', 'Debe tener una solicitud de Ascenso Activa para poder utilizar este servicio');
370 370 return $this->redirect($this->generateUrl('cea_index'));
371 371 }
  372 +
  373 + $acta = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array(
  374 + 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(),
  375 + 'idServicioCe' => 7,
  376 + 'idEstatus' => 1
  377 + ));
  378 +
  379 + if (!$acta){
  380 + $this->addFlash('danger', 'Debe enviar primero su acta de aprobación de jurados para poder defender y subir su nuevo escalafón');
  381 + return $this->redirect($this->generateUrl('cea_index'));
  382 + }
372 383  
373 384 $concurso = $this->getDoctrine()->getRepository('AppBundle:DocumentosVerificados')->findOneBy(array(
374 385 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(),
... ...