Commit 26322309430f2e4a0233500a29f69a2ab1e27047
1 parent
a02d21a82f
Exists in
master
actulizado la aprobacion o rechazo de los documentos de ascenso así como su estatus
Showing
2 changed files
with
46 additions
and
32 deletions
Show diff stats
app/Resources/views/cea/ascenso_mostar.html.twig
| @@ -113,13 +113,13 @@ | @@ -113,13 +113,13 @@ | ||
| 113 | </div> | 113 | </div> |
| 114 | <div class="col-md-3"> | 114 | <div class="col-md-3"> |
| 115 | {% if servicio.idEstatus.id == 1 %} | 115 | {% if servicio.idEstatus.id == 1 %} |
| 116 | - <h4 class="alert alert-success">Estatus <strong>{{servicio.idEstatus}}</strong> | 116 | + <h4 class="alert alert-success">Estatus <strong>{{servicio.idEstatus}}</strong></h4> |
| 117 | {% elseif servicio.idEstatus.id == 3 %} | 117 | {% elseif servicio.idEstatus.id == 3 %} |
| 118 | - <h4 class="alert alert-danger">Estatus <strong>{{servicio.idEstatus}}</strong> | 118 | + <h4 class="alert alert-danger">Estatus <strong>{{servicio.idEstatus}}</strong> </h4> |
| 119 | {% else %} | 119 | {% else %} |
| 120 | - <h4 class="alert alert-warning">Estatus <strong>{{servicio.idEstatus}}</strong> | 120 | + <h4 class="alert alert-warning">Estatus <strong>{{servicio.idEstatus}}</strong></h4> |
| 121 | {% endif %} | 121 | {% endif %} |
| 122 | - </h4> | 122 | + |
| 123 | </div> | 123 | </div> |
| 124 | </div> | 124 | </div> |
| 125 | <div class="row"> | 125 | <div class="row"> |
| @@ -179,7 +179,7 @@ | @@ -179,7 +179,7 @@ | ||
| 179 | </ul> | 179 | </ul> |
| 180 | </div> | 180 | </div> |
| 181 | {% endif %} | 181 | {% endif %} |
| 182 | - {% if añadirJurado %} | 182 | + {% if añadirJurado and ascenso.idEstatus.id == 2 %} |
| 183 | <p id="falta" class="label label-danger" data-faltaid = '{{cantidadJurado}}'> | 183 | <p id="falta" class="label label-danger" data-faltaid = '{{cantidadJurado}}'> |
| 184 | El docente no tiene o le faltó completar posibles jurados | 184 | El docente no tiene o le faltó completar posibles jurados |
| 185 | </p> | 185 | </p> |
| @@ -225,7 +225,7 @@ | @@ -225,7 +225,7 @@ | ||
| 225 | 225 | ||
| 226 | </div> | 226 | </div> |
| 227 | </div> | 227 | </div> |
| 228 | - <form action="{{ path('cea_ascenso_actualizar', { 'id': ascenso.id, 'estatus' : 'false' }) }}" method="POST" name="rechazar"> | 228 | + <form action="{{ path('cea_ascenso_actualizar', { 'id': ascenso.id }) }}" method="POST"> |
| 229 | <div class="col-md-5"> | 229 | <div class="col-md-5"> |
| 230 | <h3>Documentos Consignados</h3> | 230 | <h3>Documentos Consignados</h3> |
| 231 | <div class="widget-content"> | 231 | <div class="widget-content"> |
| @@ -268,18 +268,6 @@ | @@ -268,18 +268,6 @@ | ||
| 268 | {% endif %} | 268 | {% endif %} |
| 269 | {% endfor %} | 269 | {% endfor %} |
| 270 | 270 | ||
| 271 | - | ||
| 272 | - | ||
| 273 | - | ||
| 274 | - | ||
| 275 | - | ||
| 276 | - | ||
| 277 | - | ||
| 278 | - | ||
| 279 | - | ||
| 280 | - | ||
| 281 | - | ||
| 282 | - | ||
| 283 | </div> | 271 | </div> |
| 284 | </div> | 272 | </div> |
| 285 | 273 | ||
| @@ -308,8 +296,9 @@ | @@ -308,8 +296,9 @@ | ||
| 308 | 296 | ||
| 309 | </div> | 297 | </div> |
| 310 | </div> | 298 | </div> |
| 299 | + <button class="btn btn-success btn-sm" type="submit" name="aprobado" id="aprobado" ><span class="fa fa-check" ></span> Aprobar</button> | ||
| 300 | + <a class="btn btn-danger btn-sm" data-toggle="modal" data-target="#motivo_rechazo" ><span class="fa fa-close"></span> Rechazar</a> | ||
| 311 | </form> | 301 | </form> |
| 312 | - | ||
| 313 | </div> | 302 | </div> |
| 314 | <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE --> | 303 | <!-- MOSTRAR ACTIVIDAD PIDA DEL DOCENTE --> |
| 315 | {% if not pida %} | 304 | {% if not pida %} |
| @@ -327,8 +316,7 @@ | @@ -327,8 +316,7 @@ | ||
| 327 | </ul> | 316 | </ul> |
| 328 | </div> | 317 | </div> |
| 329 | {% endif %} | 318 | {% endif %} |
| 330 | - <button class="btn btn-success btn-sm" type="submit" ><span class="fa fa-check" name="aprobar" id="aprobar"></span> Aprobar</button> | ||
| 331 | - <a class="btn btn-danger btn-sm" data-toggle="modal" data-target="#motivo_rechazo" ><span class="fa fa-close"></span> Rechazar</a> | 319 | + |
| 332 | 320 | ||
| 333 | 321 | ||
| 334 | <!-- Modal --> | 322 | <!-- Modal --> |
src/AppBundle/Controller/AscensoController.php
| @@ -536,11 +536,11 @@ class AscensoController extends Controller | @@ -536,11 +536,11 @@ class AscensoController extends Controller | ||
| 536 | /** | 536 | /** |
| 537 | * Encuentra y muestra una entidad de tipo Adscripción. | 537 | * Encuentra y muestra una entidad de tipo Adscripción. |
| 538 | * | 538 | * |
| 539 | - * @Route("/solicitudes/ascenso/{id}/{estatus}", name="cea_ascenso_actualizar") | 539 | + * @Route("/solicitudes/ascenso/{id}", name="cea_ascenso_actualizar") |
| 540 | * @Method({"GET", "POST"}) | 540 | * @Method({"GET", "POST"}) |
| 541 | * @Security("has_role('ROLE_COORDINADOR_REGIONAL')") | 541 | * @Security("has_role('ROLE_COORDINADOR_REGIONAL')") |
| 542 | */ | 542 | */ |
| 543 | - public function solicitudesAscensoEditAction(Ascenso $ascenso, $estatus, Request $request) | 543 | + public function solicitudesAscensoEditAction(Ascenso $ascenso, Request $request) |
| 544 | { | 544 | { |
| 545 | $mensaje = ""; | 545 | $mensaje = ""; |
| 546 | //$adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneById($adscripcion->getId()); | 546 | //$adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneById($adscripcion->getId()); |
| @@ -549,19 +549,44 @@ class AscensoController extends Controller | @@ -549,19 +549,44 @@ class AscensoController extends Controller | ||
| 549 | 'idServicioCe' => 5, | 549 | 'idServicioCe' => 5, |
| 550 | 'idEstatus' => 2 | 550 | 'idEstatus' => 2 |
| 551 | )); | 551 | )); |
| 552 | - | ||
| 553 | - | ||
| 554 | - | ||
| 555 | - $user = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByIdRolInstitucion($ascenso->getIdRolInstitucion()); | ||
| 556 | - if($estatus == "true") { | ||
| 557 | - $serviciosAscenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(1)); | ||
| 558 | - | 552 | + |
| 553 | + $parametros = $request->request->all(); | ||
| 554 | + $user = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByIdRolInstitucion($ascenso->getIdRolInstitucion()); | ||
| 555 | + | ||
| 556 | + if(isset($parametros['aprobado'])) { | ||
| 557 | + $serviciosAscenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(1)); | ||
| 558 | + | ||
| 559 | }else{ | 559 | }else{ |
| 560 | $mensaje = $request->request->get('message-text'); | 560 | $mensaje = $request->request->get('message-text'); |
| 561 | $serviciosAscenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(3)); | 561 | $serviciosAscenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(3)); |
| 562 | } | 562 | } |
| 563 | 563 | ||
| 564 | $ascenso->setIdEstatus($serviciosAscenso->getIdEstatus()); | 564 | $ascenso->setIdEstatus($serviciosAscenso->getIdEstatus()); |
| 565 | + $em = $this->getDoctrine()->getManager(); | ||
| 566 | + | ||
| 567 | + | ||
| 568 | + //Guardar el resultado de la verificación de Documentos | ||
| 569 | + foreach ($parametros as $key => $value){ | ||
| 570 | + if($key === 'trabajo') { | ||
| 571 | + verificar_documentos2($user->getIdRolInstitucion(), 1, $value, $em, "", $serviciosAscenso); | ||
| 572 | + }else if($key === 'pida') { | ||
| 573 | + verificar_documentos2($user->getIdRolInstitucion(), 9, $value, $em, "", $serviciosAscenso); | ||
| 574 | + }else if($key === 'nai') { | ||
| 575 | + verificar_documentos2($user->getIdRolInstitucion(), 12, $value, $em, "", $serviciosAscenso); | ||
| 576 | + }else if($key === 'tesis') { | ||
| 577 | + verificar_documentos2($user->getIdRolInstitucion(), 13, $value, $em, "", $serviciosAscenso); | ||
| 578 | + }else if($key === 'actividades') { | ||
| 579 | + verificar_documentos2($user->getIdRolInstitucion(), 10, $value, $em, "", $serviciosAscenso); | ||
| 580 | + }else if($key === 'cath') { | ||
| 581 | + verificar_documentos2($user->getIdRolInstitucion(), 11, $value, $em, "", $serviciosAscenso); | ||
| 582 | + }else if($key === 'investigacion') { | ||
| 583 | + verificar_documentos2($user->getIdRolInstitucion(), 15, $value, $em, "", $serviciosAscenso); | ||
| 584 | + }else if($key === 'curriculo') { | ||
| 585 | + verificar_documentos2($user->getIdRolInstitucion(), 16, $value, $em, "", $serviciosAscenso); | ||
| 586 | + }else if($key === 'pertinencia') { | ||
| 587 | + verificar_documentos2($user->getIdRolInstitucion(), 14, $value, $em, "", $serviciosAscenso); | ||
| 588 | + } | ||
| 589 | + } | ||
| 565 | 590 | ||
| 566 | $em = $this->getDoctrine()->getManager(); | 591 | $em = $this->getDoctrine()->getManager(); |
| 567 | $em->persist($serviciosAscenso); | 592 | $em->persist($serviciosAscenso); |
| @@ -599,13 +624,14 @@ class AscensoController extends Controller | @@ -599,13 +624,14 @@ class AscensoController extends Controller | ||
| 599 | )); | 624 | )); |
| 600 | 625 | ||
| 601 | $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($serviciosAscenso->getIdRolInstitucion()); | 626 | $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($serviciosAscenso->getIdRolInstitucion()); |
| 602 | - | 627 | + $docente = $this->getDoctrine()->getRepository("AppBundle:RolInstitucion")->findOneById($ascenso->getIdRolInstitucion()->getId()); |
| 603 | return $this->render('cea/ascenso_mostar.html.twig', array( | 628 | return $this->render('cea/ascenso_mostar.html.twig', array( |
| 604 | 'ascenso' => $ascenso, | 629 | 'ascenso' => $ascenso, |
| 605 | 'servicio' => $serviciosAscenso, | 630 | 'servicio' => $serviciosAscenso, |
| 606 | 'escalas' => $escala, | 631 | 'escalas' => $escala, |
| 607 | 'pida' => $pida, | 632 | 'pida' => $pida, |
| 608 | - 'antiguedad' => $antiguedad | 633 | + 'antiguedad' => $antiguedad, |
| 634 | + 'docente' => $docente | ||
| 609 | )); | 635 | )); |
| 610 | 636 | ||
| 611 | } | 637 | } |