Commit d06da0183429ac136b22fc117156f3a71b809c4b

Authored by Wilmer Ramones
1 parent 0220c98356
Exists in master

no muestra el mensaje del tiempo que se adeuda o que le falta para ascender si t…

…iene una solicitud de ascenso en espera o activa
app/Resources/views/cea/index.html.twig
... ... @@ -27,20 +27,23 @@
27 27 </div>
28 28 {%endif %}
29 29 <div class="row">
30   - {% if tiempoProxEscalafon %}
31   - {% if suffix == '' %}
32   - <h4 class="alert alert-info">
33   - Estimado docente, le recordamos que para solicitar ascenso aun le faltan:
34   - {% else %}
35   - <h4 class="alert alert-warning">
36   - Estimado docente ya tiene el tiempo para solicitar ascenso desde hace:
37   - {% endif %}
38   - <strong>
39   - {% if tiempoProxEscalafon.y > 0 %} {{ tiempoProxEscalafon.y }} año/s {% endif %}
40   - {% if tiempoProxEscalafon.m > 0 %} {{ tiempoProxEscalafon.m }} mes/es y {% endif %}
41   - {% if tiempoProxEscalafon.d > 0 %} {{ tiempoProxEscalafon.d }} día/s {% endif %}
42   - </strong>
43   - </h4>
  30 + <!-- Si no tiene una solicitud de ascenso activa -->
  31 + {% if ascenso.idEstatus.id > 2 %}
  32 + {% if tiempoProxEscalafon %}
  33 + {% if suffix == '' %}
  34 + <h4 class="alert alert-info">
  35 + Estimado docente, le recordamos que para solicitar ascenso aun le faltan:
  36 + {% else %}
  37 + <h4 class="alert alert-warning">
  38 + Estimado docente ya tiene el tiempo para solicitar ascenso desde hace:
  39 + {% endif %}
  40 + <strong>
  41 + {% if tiempoProxEscalafon.y > 0 %} {{ tiempoProxEscalafon.y }} año/s {% endif %}
  42 + {% if tiempoProxEscalafon.m > 0 %} {{ tiempoProxEscalafon.m }} mes/es y {% endif %}
  43 + {% if tiempoProxEscalafon.d > 0 %} {{ tiempoProxEscalafon.d }} día/s {% endif %}
  44 + </strong>
  45 + </h4>
  46 + {% endif %}
44 47 {% endif %}
45 48 <div class="col-md-6">
46 49 <div class="widget widget-nopad">
... ...
src/AppBundle/Controller/AppController.php
... ... @@ -42,6 +42,14 @@ class AppController extends Controller {
42 42 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(),
43 43 'idServicioCe' => 2
44 44 ));
  45 +
  46 + $ascenso = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->
  47 + findOneBy(array(
  48 + 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(),
  49 + 'idServicioCe' => 5),
  50 + array('id' => 'DESC')
  51 + );
  52 +
45 53 //si no ha solicitado adscripción regresa a la pagina de adscripcion
46 54 if(!$adscripcion){ return $this->redirect($this->generateUrl('solicitud_adscripcion')); }
47 55  
... ... @@ -78,6 +86,7 @@ class AppController extends Controller {
78 86  
79 87 return $this->render('cea/index.html.twig', array (
80 88 'adscrito' => $adscrito,
  89 + 'ascenso' => $ascenso,
81 90 'tiempoProxEscalafon' => $tiempoTranscurrido,
82 91 'suffix' => $suffix
83 92 ));
... ...