Commit 68e1a5ef7c6425ea7cc176753d49b00bd71e81c1

Authored by Wilmer
1 parent 834f3b6622
Exists in master

corregida las vistas de la adscripcion en los demas modulos

app/Resources/views/cea/ascenso_mostar.html.twig
@@ -316,7 +316,7 @@ @@ -316,7 +316,7 @@
316 <div class="col-md-12"> 316 <div class="col-md-12">
317 <div class="account-container full register"> 317 <div class="account-container full register">
318 <div class="content clearfix"> 318 <div class="content clearfix">
319 - <h2>PIDA <span class="small" style="float: right;"> Estatus: {{ servicio.idEstatus }}</span></h2> 319 + <h2>PIDA <span class="small" style="float: right;"> Estatus: {{ servicioPida.idEstatus }}</span></h2>
320 <table class="table table-bordered"> 320 <table class="table table-bordered">
321 <th>Objetivo Histórico</th> 321 <th>Objetivo Histórico</th>
322 <th>Actividad Docente</th> 322 <th>Actividad Docente</th>
@@ -324,6 +324,8 @@ @@ -324,6 +324,8 @@
324 <th>Plazo</th> 324 <th>Plazo</th>
325 <th>Estatus</th> 325 <th>Estatus</th>
326 {% for pid in docente.pida | sort %} 326 {% for pid in docente.pida | sort %}
  327 + {#solo muestre la vigente #}
  328 + {% if pid.idDocenteServicio.id == servicioPida.id %}
327 <tr> 329 <tr>
328 <td rowspan="{{ pid.pidaTareaEspecifico | length }}"> 330 <td rowspan="{{ pid.pidaTareaEspecifico | length }}">
329 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }} 331 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }}
@@ -344,6 +346,7 @@ @@ -344,6 +346,7 @@
344 {% endfor %} 346 {% endfor %}
345 347
346 </tr> 348 </tr>
  349 + {% endif %}
347 {% endfor %} 350 {% endfor %}
348 </table> 351 </table>
349 </div> 352 </div>
app/Resources/views/cea/solicitudes_mostar.html.twig
@@ -269,7 +269,7 @@ @@ -269,7 +269,7 @@
269 </div> 269 </div>
270 270
271 <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE --> 271 <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE -->
272 - {% if not todo.pida %} 272 + {% if not servicioPida %}
273 <p class="alert alert-warning">El Docente no ha registrado todavía su actividad PIDA</p> 273 <p class="alert alert-warning">El Docente no ha registrado todavía su actividad PIDA</p>
274 {% else %} 274 {% else %}
275 275
@@ -290,7 +290,7 @@ @@ -290,7 +290,7 @@
290 <th>Tarea Específica</th> 290 <th>Tarea Específica</th>
291 <th>Plazo</th> 291 <th>Plazo</th>
292 <th>Estatus</th> 292 <th>Estatus</th>
293 - {% for pid in todo.pida | sort %} 293 + {% for pid in pida | sort %}
294 <tr> 294 <tr>
295 <td rowspan="{{ pid.pidaTareaEspecifico | length }}"> 295 <td rowspan="{{ pid.pidaTareaEspecifico | length }}">
296 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }} 296 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }}
app/Resources/views/solicitudes/adscripcion_show.twig
@@ -266,6 +266,8 @@ @@ -266,6 +266,8 @@
266 <th>Plazo</th> 266 <th>Plazo</th>
267 <th>Estatus</th> 267 <th>Estatus</th>
268 {% for pid in todo.pida | sort %} 268 {% for pid in todo.pida | sort %}
  269 + {#solo muestre la vigente #}
  270 + {% if pid.idDocenteServicio.id == servicioPida.id %}
269 <tr> 271 <tr>
270 <td rowspan="{{ pid.pidaTareaEspecifico | length }}"> 272 <td rowspan="{{ pid.pidaTareaEspecifico | length }}">
271 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }} 273 {{ pid.idPlanHistoricoNacionalEstrategico.nombre }}
@@ -289,6 +291,7 @@ @@ -289,6 +291,7 @@
289 {% endfor %} 291 {% endfor %}
290 292
291 </tr> 293 </tr>
  294 + {% endif %}
292 {% endfor %} 295 {% endfor %}
293 </table> 296 </table>
294 </div> 297 </div>
src/AppBundle/Controller/AdscripcionController.php
@@ -676,14 +676,26 @@ class AdscripcionController extends Controller @@ -676,14 +676,26 @@ class AdscripcionController extends Controller
676 $todo = $em->getRepository("AppBundle:RolInstitucion")->findOneById($servicio->getIdRolInstitucion()); 676 $todo = $em->getRepository("AppBundle:RolInstitucion")->findOneById($servicio->getIdRolInstitucion());
677 $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array( 677 $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array(
678 'idRolInstitucion' => $todo, 678 'idRolInstitucion' => $todo,
679 - 'idServicioCe' => 4  
680 - )); 679 + 'idServicioCe' => 4),
  680 + array ('id' => 'DESC')
  681 + );
  682 + $pida = false;
  683 +
  684 + if($servicioPida){
  685 + $pida = $this->getDoctrine()->getRepository("AppBundle:AdscripcionPida")->findBy(array(
  686 + 'idRolInstitucion' => $servicio->getIdRolInstitucion(),
  687 + 'idDocenteServicio' => $servicioPida
  688 + ));
  689 + }
  690 +
  691 +
681 692
682 693
683 return $this->render('cea/solicitudes_mostar.html.twig', array( 694 return $this->render('cea/solicitudes_mostar.html.twig', array(
684 'servicio' => $servicio, 695 'servicio' => $servicio,
685 'servicioPida' => $servicioPida, 696 'servicioPida' => $servicioPida,
686 - 'todo' => $todo 697 + 'todo' => $todo,
  698 + 'pida' => $pida
687 )); 699 ));
688 } 700 }
689 701
@@ -702,8 +714,9 @@ class AdscripcionController extends Controller @@ -702,8 +714,9 @@ class AdscripcionController extends Controller
702 $todo = $servicio->getIdRolInstitucion(); 714 $todo = $servicio->getIdRolInstitucion();
703 $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array( 715 $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array(
704 'idRolInstitucion' => $todo, 716 'idRolInstitucion' => $todo,
705 - 'idServicioCe' => 4  
706 - )); 717 + 'idServicioCe' => 4),
  718 + array('id' => 'DESC')
  719 + );
707 720
708 $form = $this->createForm('AppBundle\Form\AdscripcionEditType'); 721 $form = $this->createForm('AppBundle\Form\AdscripcionEditType');
709 722
src/AppBundle/Controller/AscensoController.php
@@ -501,9 +501,13 @@ class AscensoController extends Controller @@ -501,9 +501,13 @@ class AscensoController extends Controller
501 array('id' => 'DESC') 501 array('id' => 'DESC')
502 ); 502 );
503 } 503 }
504 -  
505 -  
506 - $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); 504 +
  505 + $servicioPida = $this->getDoctrine()->getRepository("AppBundle:DocenteServicio")->findOneBy(array(
  506 + 'idRolInstitucion' => $docente,
  507 + 'idServicioCe' => 4),
  508 + array('id' => 'DESC')
  509 + );
  510 + //$pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion());
507 $antiguedad = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array( 511 $antiguedad = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneBy(array(
508 'idRolInstitucion' => $servicio->getIdRolInstitucion(), 512 'idRolInstitucion' => $servicio->getIdRolInstitucion(),
509 'idServicioCe' => 1 513 'idServicioCe' => 1
@@ -515,7 +519,7 @@ class AscensoController extends Controller @@ -515,7 +519,7 @@ class AscensoController extends Controller
515 'ascenso' => $ascenso, 519 'ascenso' => $ascenso,
516 'servicio' => $servicio, 520 'servicio' => $servicio,
517 'escalas' => $escala, 521 'escalas' => $escala,
518 - 'pida' => $pida, 522 + 'servicioPida' => $servicioPida,
519 'antiguedad' => $antiguedad, 523 'antiguedad' => $antiguedad,
520 'form' => $form->createView(), 524 'form' => $form->createView(),
521 'docente' => $docente 525 'docente' => $docente
@@ -737,14 +741,7 @@ class AscensoController extends Controller @@ -737,14 +741,7 @@ class AscensoController extends Controller
737 741
738 $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($serviciosAscenso->getIdRolInstitucion()); 742 $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($serviciosAscenso->getIdRolInstitucion());
739 $docente = $this->getDoctrine()->getRepository("AppBundle:RolInstitucion")->findOneById($ascenso->getIdRolInstitucion()->getId()); 743 $docente = $this->getDoctrine()->getRepository("AppBundle:RolInstitucion")->findOneById($ascenso->getIdRolInstitucion()->getId());
740 - return $this->render('cea/ascenso_mostar.html.twig', array(  
741 - 'ascenso' => $ascenso,  
742 - 'servicio' => $serviciosAscenso,  
743 - 'escalas' => $escala,  
744 - 'pida' => $pida,  
745 - 'antiguedad' => $antiguedad,  
746 - 'docente' => $docente  
747 - )); 744 + return $this->redirect($this->generateUrl('cea_ascenso_show', array('id' => $ascenso->getId())));
748 745
749 } 746 }
750 747