Commit 7dc2cfbc6472cf53e2559fba865bfad86e0baaa9
1 parent
2b0bf06fe5
Exists in
master
modificado el la pagina principal del sistema para solicitar el pida luego de la adscripcion
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
src/AppBundle/Controller/AppController.php
@@ -36,13 +36,24 @@ class AppController extends Controller { | @@ -36,13 +36,24 @@ class AppController extends Controller { | ||
36 | */ | 36 | */ |
37 | public function indexAction() | 37 | public function indexAction() |
38 | { | 38 | { |
39 | + //verificar en las solicitudes la adscripcion del docente | ||
39 | $adscripcion = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> | 40 | $adscripcion = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> |
40 | findOneBy(array( | 41 | findOneBy(array( |
41 | 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(), | 42 | 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(), |
42 | 'idServicioCe' => 2 | 43 | 'idServicioCe' => 2 |
43 | - )); | 44 | + )); |
44 | //si no ha solicitado adscripción regresa a la pagina de adscripcion | 45 | //si no ha solicitado adscripción regresa a la pagina de adscripcion |
45 | if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); | 46 | if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); |
47 | + | ||
48 | + $pida = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> | ||
49 | + findOneBy(array( | ||
50 | + 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(), | ||
51 | + 'idServicioCe' => 4 | ||
52 | + )); | ||
53 | + | ||
54 | + if(!$pida) return $this->redirect($this->generateUrl('solicitud_pida')); | ||
55 | + | ||
56 | + | ||
46 | //solicitud aprobada está en falso | 57 | //solicitud aprobada está en falso |
47 | $adscrito = false; | 58 | $adscrito = false; |
48 | if($adscripcion->getIdEstatus()->getId() == 1) $adscrito = true; | 59 | if($adscripcion->getIdEstatus()->getId() == 1) $adscrito = true; |