From 8d1d0638269c2ddd62d746554421fb0ebce3be9e Mon Sep 17 00:00:00 2001 From: Wilmer Date: Mon, 27 Mar 2017 14:11:18 -0400 Subject: [PATCH] arreglado algunos fallos y bugs --- app/config/config.yml | 2 +- src/AppBundle/Controller/AdscripcionController.php | 3 ++- src/AppBundle/Controller/AjaxController.php | 3 +++ src/AppBundle/Controller/AppController.php | 2 +- src/AppBundle/Controller/AscensoController.php | 20 +++++--------------- .../Controller/EstadoAcademicoController.php | 1 + 6 files changed, 13 insertions(+), 18 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 3afc2d2..53fa592 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -64,4 +64,4 @@ swiftmailer: #host: "%mailer_host%" username: wilmer.ramones@gmail.com password: 07102009RR - #spool: { type: memory } + spool: { type: memory } diff --git a/src/AppBundle/Controller/AdscripcionController.php b/src/AppBundle/Controller/AdscripcionController.php index 43a3ec3..6fbba3b 100644 --- a/src/AppBundle/Controller/AdscripcionController.php +++ b/src/AppBundle/Controller/AdscripcionController.php @@ -460,6 +460,7 @@ class AdscripcionController extends Controller 'idServicioCe' => 4), array('id' => 'DESC') ); + $pid = false; if($serv) { //si el servicio está cadudado, debe solicitar uno nuevo if ($serv->getIdEstatus()->getId() == 5) { @@ -878,7 +879,7 @@ class AdscripcionController extends Controller 'idRolInstitucion' => $adscripcion->getIdRolInstitucion()->getId() )); - return $this->redirect($this->generateUrl('cea_adscripcion_show', array('id' => $serviciosAdscripcion->getId()))); + return $this->redirect($this->generateUrl('aja', array('id' => $serviciosAdscripcion->getId()))); } diff --git a/src/AppBundle/Controller/AjaxController.php b/src/AppBundle/Controller/AjaxController.php index efbb386..8956a89 100644 --- a/src/AppBundle/Controller/AjaxController.php +++ b/src/AppBundle/Controller/AjaxController.php @@ -350,6 +350,9 @@ class AjaxController extends Controller { } + + + /** diff --git a/src/AppBundle/Controller/AppController.php b/src/AppBundle/Controller/AppController.php index cb09d43..51f6167 100644 --- a/src/AppBundle/Controller/AppController.php +++ b/src/AppBundle/Controller/AppController.php @@ -64,7 +64,7 @@ class AppController extends Controller { ); $em = $this->getDoctrine()->getManager(); if(!$pida){ - $this->addFlash('danger', 'Estimado Docente Mientras se verifica su adscripción, le solicitamos que por favor cree su PIDA.'); + $this->addFlash('warning', 'Estimado Docente Mientras se verifica su adscripción, le solicitamos que por favor cree su PIDA.'); return $this->redirect($this->generateUrl('solicitud_pida')); }else{ $caducidad = $this->getDoctrine()->getRepository("AppBundle:PidaCaducidad")->findOneByIdDocenteServicio($pida); diff --git a/src/AppBundle/Controller/AscensoController.php b/src/AppBundle/Controller/AscensoController.php index 156723d..86cb9a0 100644 --- a/src/AppBundle/Controller/AscensoController.php +++ b/src/AppBundle/Controller/AscensoController.php @@ -708,7 +708,7 @@ class AscensoController extends Controller $em->persist($serviciosAscenso); $em->persist($ascenso); $em->flush(); - + $message = \Swift_Message::newInstance() ->setSubject('Resultado Ascenso CEA@UBV') ->setFrom('wilmer.ramones@gmail.com') @@ -724,23 +724,13 @@ class AscensoController extends Controller ) ), 'text/html' - ) + ) ; $this->get('mailer')->send($message); - + $this->addFlash('notice', 'Solicitud Actualizada Correctamente, hemos enviado un correo al docente notificandole los cambios.'); - - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( - 'idRolInstitucion' => $ascenso->getIdRolInstitucion()->getId() - )); - - $antiguedad = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array( - 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), - 'idServicioCe' => 1 - )); - - $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($serviciosAscenso->getIdRolInstitucion()); - $docente = $this->getDoctrine()->getRepository("AppBundle:RolInstitucion")->findOneById($ascenso->getIdRolInstitucion()->getId()); + + return $this->redirect($this->generateUrl('cea_ascenso_show', array('id' => $ascenso->getId()))); } diff --git a/src/AppBundle/Controller/EstadoAcademicoController.php b/src/AppBundle/Controller/EstadoAcademicoController.php index 6a230b6..e2244fe 100644 --- a/src/AppBundle/Controller/EstadoAcademicoController.php +++ b/src/AppBundle/Controller/EstadoAcademicoController.php @@ -117,6 +117,7 @@ class EstadoAcademicoController extends Controller { $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); return $this->render('cea/servicios_mostar.html.twig', array( + 'docente' => $servicio->getIdRolInstitucion(), 'estado_academico' => $ea, 'servicio' => $servicio, )); -- 2.0.0