Commit e16d443815c5da16ed57c78f1420a652b4062ce4

Authored by Wilmer
1 parent c0a14a8438
Exists in master

corrige errores menores de comprobación de adscripción para los servicios

@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 /bin/ 12 /bin/
13 /composer.phar 13 /composer.phar
14 /nbproject/private/ 14 /nbproject/private/
15 - 15 +!AppController.php
16 # Linux 16 # Linux
17 .* 17 .*
18 !.gitignore 18 !.gitignore
app/Resources/views/cea/index.html.twig
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 Tan pronto sea activada, se le notificará por el correo institucional y podrá 25 Tan pronto sea activada, se le notificará por el correo institucional y podrá
26 disfrutar de los servicios que ofrecemos 26 disfrutar de los servicios que ofrecemos
27 </div> 27 </div>
28 - {%endif %} 28 + {% else %}
29 29
30 <!-- Si no tiene una solicitud de ascenso activa --> 30 <!-- Si no tiene una solicitud de ascenso activa -->
31 {% if ascenso %} 31 {% if ascenso %}
@@ -63,6 +63,7 @@ @@ -63,6 +63,7 @@
63 </h4> 63 </h4>
64 {% endif %} 64 {% endif %}
65 {% endif %} 65 {% endif %}
  66 + {% endif %}
66 <div class="col-md-2 col-sm-3 col-xs-4"> 67 <div class="col-md-2 col-sm-3 col-xs-4">
67 <div class="panel panel-white"> 68 <div class="panel panel-white">
68 <div class="visitors-chart"> 69 <div class="visitors-chart">
app/Resources/views/cea/servicios_mostar.html.twig
@@ -208,7 +208,7 @@ @@ -208,7 +208,7 @@
208 <hr /> 208 <hr />
209 </div> 209 </div>
210 </div> 210 </div>
211 - {% if servicio.idServicioCe.id == 1 %} 211 + {% if servicio.idServicioCe.id == 1 or servicio.idServicioCe.id == 2 %}
212 <div class="col-md-5"> 212 <div class="col-md-5">
213 <h3>Documentos Para confirmar</h3> 213 <h3>Documentos Para confirmar</h3>
214 <div class="widget-content"> 214 <div class="widget-content">
src/AppBundle/Controller/AppController.php
@@ -79,7 +79,8 @@ class AppController extends Controller { @@ -79,7 +79,8 @@ class AppController extends Controller {
79 $vigente = $tiempo->invert ? false : true; 79 $vigente = $tiempo->invert ? false : true;
80 if($tiempo->format('%a%') <= 60 && $tiempo->format('%a%') >= 30){ 80 if($tiempo->format('%a%') <= 60 && $tiempo->format('%a%') >= 30){
81 $suffix = ( $tiempo->invert ? ' venció hace' : 'estará viegene por' ); 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 }else if($tiempo->format('%a%') <= 29 && $vigente){ 84 }else if($tiempo->format('%a%') <= 29 && $vigente){
84 $this->addFlash('danger', 'Estimado docente dentro de ' . $tiempo->format('%a%') . ' días su PIDA caducará y deberá crear uno nuevo'); 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,6 +39,17 @@ class AscensoController extends Controller
39 public function ascensoAction(Request $request) 39 public function ascensoAction(Request $request)
40 { 40 {
41 $formalizarTiempo = false; 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 //si ya tiene una solicitud en espera, enviarlo a la pagina de los servicios 53 //si ya tiene una solicitud en espera, enviarlo a la pagina de los servicios
43 $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy( 54 $solicitud = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(
44 array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 5), 55 array('idRolInstitucion' => $this->getUser()->getIdRolInstitucion(), 'idServicioCe' => 5),
src/AppBundle/Controller/PermisosController.php
@@ -39,6 +39,17 @@ class PermisosController extends Controller @@ -39,6 +39,17 @@ class PermisosController extends Controller
39 { 39 {
40 $em = $this->getDoctrine()->getManager(); 40 $em = $this->getDoctrine()->getManager();
41 $docente = $this->getUser()->getIdRolInstitucion(); 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 $escalafones = $em->getRepository("AppBundle:DocenteEscala")->findOneBy(array( 53 $escalafones = $em->getRepository("AppBundle:DocenteEscala")->findOneBy(array(
43 'idRolInstitucion' => $docente, 54 'idRolInstitucion' => $docente,
44 'idEscala' => $em->getRepository("AppBundle:Escalafones")->findOneById(2) 55 'idEscala' => $em->getRepository("AppBundle:Escalafones")->findOneById(2)