Commit e16d443815c5da16ed57c78f1420a652b4062ce4
1 parent
c0a14a8438
Exists in
master
corrige errores menores de comprobación de adscripción para los servicios
Showing
6 changed files
with
28 additions
and
4 deletions
Show diff stats
.gitignore
app/Resources/views/cea/index.html.twig
| ... | ... | @@ -25,7 +25,7 @@ |
| 25 | 25 | Tan pronto sea activada, se le notificará por el correo institucional y podrá |
| 26 | 26 | disfrutar de los servicios que ofrecemos |
| 27 | 27 | </div> |
| 28 | - {%endif %} | |
| 28 | + {% else %} | |
| 29 | 29 | |
| 30 | 30 | <!-- Si no tiene una solicitud de ascenso activa --> |
| 31 | 31 | {% if ascenso %} |
| ... | ... | @@ -63,6 +63,7 @@ |
| 63 | 63 | </h4> |
| 64 | 64 | {% endif %} |
| 65 | 65 | {% endif %} |
| 66 | + {% endif %} | |
| 66 | 67 | <div class="col-md-2 col-sm-3 col-xs-4"> |
| 67 | 68 | <div class="panel panel-white"> |
| 68 | 69 | <div class="visitors-chart"> | ... | ... |
app/Resources/views/cea/servicios_mostar.html.twig
| ... | ... | @@ -208,7 +208,7 @@ |
| 208 | 208 | <hr /> |
| 209 | 209 | </div> |
| 210 | 210 | </div> |
| 211 | - {% if servicio.idServicioCe.id == 1 %} | |
| 211 | + {% if servicio.idServicioCe.id == 1 or servicio.idServicioCe.id == 2 %} | |
| 212 | 212 | <div class="col-md-5"> |
| 213 | 213 | <h3>Documentos Para confirmar</h3> |
| 214 | 214 | <div class="widget-content"> | ... | ... |
src/AppBundle/Controller/AppController.php
| ... | ... | @@ -79,7 +79,8 @@ class AppController extends Controller { |
| 79 | 79 | $vigente = $tiempo->invert ? false : true; |
| 80 | 80 | if($tiempo->format('%a%') <= 60 && $tiempo->format('%a%') >= 30){ |
| 81 | 81 | $suffix = ( $tiempo->invert ? ' venció hace' : 'estará viegene por' ); |
| 82 | - $this->addFlash('warning', 'Estimado docente su PIDA ' . $suffix . $tiempo->format('%a%') . ' días más' ); | |
| 82 | + $this->addFlash('warning', 'E12345 | |
| 83 | + stimado docente su PIDA ' . $suffix . $tiempo->format('%a%') . ' días más' ); | |
| 83 | 84 | }else if($tiempo->format('%a%') <= 29 && $vigente){ |
| 84 | 85 | $this->addFlash('danger', 'Estimado docente dentro de ' . $tiempo->format('%a%') . ' días su PIDA caducará y deberá crear uno nuevo'); |
| 85 | 86 | } | ... | ... |
src/AppBundle/Controller/AscensoController.php
| ... | ... | @@ -39,6 +39,17 @@ class AscensoController extends Controller |
| 39 | 39 | public function ascensoAction(Request $request) |
| 40 | 40 | { |
| 41 | 41 | $formalizarTiempo = false; |
| 42 | + | |
| 43 | + $adscrito = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( | |
| 44 | + array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 2, 'idEstatus' => 1), | |
| 45 | + array('id' => 'DESC') | |
| 46 | + ); | |
| 47 | + | |
| 48 | + if(!$adscrito){ | |
| 49 | + $this->addFlash('warning', 'Su Adscripción está en Espera, Al cambiar a aprobada se le notifcará por correo'); | |
| 50 | + return $this->redirect($this->generateUrl('servicios_index')); | |
| 51 | + } | |
| 52 | + | |
| 42 | 53 | //si ya tiene una solicitud en espera, enviarlo a la pagina de los servicios |
| 43 | 54 | $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( |
| 44 | 55 | array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 5), | ... | ... |
src/AppBundle/Controller/PermisosController.php
| ... | ... | @@ -39,6 +39,17 @@ class PermisosController extends Controller |
| 39 | 39 | { |
| 40 | 40 | $em = $this->getDoctrine()->getManager(); |
| 41 | 41 | $docente = $this->getUser()->getIdRolInstitucion(); |
| 42 | + | |
| 43 | + $adscrito = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( | |
| 44 | + array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 2, 'idEstatus' => 1), | |
| 45 | + array('id' => 'DESC') | |
| 46 | + ); | |
| 47 | + | |
| 48 | + if(!$adscrito){ | |
| 49 | + $this->addFlash('warning', 'Su Adscripción está en Espera, Al cambiar a aprobada se le notifcará por correo'); | |
| 50 | + return $this->redirect($this->generateUrl('servicios_index')); | |
| 51 | + } | |
| 52 | + | |
| 42 | 53 | $escalafones = $em->getRepository("AppBundle:DocenteEscala")->findOneBy(array( |
| 43 | 54 | 'idRolInstitucion' => $docente, |
| 44 | 55 | 'idEscala' => $em->getRepository("AppBundle:Escalafones")->findOneById(2) | ... | ... |