Commit f50fb3e76f527d763178288c799ca221b4258f63
1 parent
2784f4d935
Exists in
master
botones para añadir concurso si no lo tiene y ascenso si tiene una solicitud aprobada
Showing
3 changed files
with
22 additions
and
7 deletions
Show diff stats
app/Resources/views/cea/solicitudes_mostar.html.twig
... | ... | @@ -32,11 +32,7 @@ |
32 | 32 | |
33 | 33 | </div> |
34 | 34 | <div class="row"> |
35 | - {% if adscripcion.oposicion is null %} | |
36 | - <div class="form-group"> | |
37 | - <h4 class="alert alert-warning">El Docente al momento de la solicitud informa no haber realizado Concurso de oposición</h4> | |
38 | - </div> | |
39 | - {% endif %} | |
35 | + | |
40 | 36 | <div class="col-md-6"> |
41 | 37 | |
42 | 38 | <div class="col-md-4"> |
... | ... | @@ -67,8 +63,18 @@ |
67 | 63 | </tr> |
68 | 64 | {%endfor %} |
69 | 65 | </table> |
66 | + {% if adscripcion.oposicion is null %} | |
67 | + <div class="form-group"> | |
68 | + <h6 class="alert alert-warning">El Docente al momento de la solicitud informa no haber realizado Concurso de oposición</h6> | |
69 | + </div> | |
70 | + <button class="btn btn-success btn-sm">Añadir Concurso de Oposición</button> | |
71 | + {% endif %} | |
72 | + {% if ascenso is not null %} | |
73 | + <button class="alert alert-info ">Debido a que tiene una solicitud activa de ascenso, ud puede</button> | |
74 | + <button class="btn btn-success btn-sm">Añadir Ascenso {{ ascenso.idEscalafones.nombre }} </button> | |
75 | + {% endif %} | |
70 | 76 | |
71 | - </div> | |
77 | + </div> | |
72 | 78 | {% endif %} |
73 | 79 | |
74 | 80 | ... | ... |
src/AppBundle/Controller/AdscripcionController.php
... | ... | @@ -360,13 +360,18 @@ class AdscripcionController extends Controller |
360 | 360 | |
361 | 361 | $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); |
362 | 362 | $pida = $this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($servicio->getIdRolInstitucion()); |
363 | + $ascenso = $this->getDoctrine()->getRepository('AppBundle:Ascenso')->findOneBy(array( | |
364 | + 'idRolInstitucion' => $servicio->getIdRolInstitucion(), | |
365 | + | |
366 | + )); | |
363 | 367 | |
364 | 368 | return $this->render('cea/solicitudes_mostar.html.twig', array( |
365 | 369 | 'adscripcion' => $adscripcion, |
366 | 370 | 'servicio' => $servicio, |
367 | 371 | 'escalas' => $escala, |
368 | 372 | 'servicio' => $servicio, |
369 | - 'pida' => $pida | |
373 | + 'pida' => $pida, | |
374 | + 'ascenso' => $ascenso | |
370 | 375 | )); |
371 | 376 | } |
372 | 377 | ... | ... |
src/AppBundle/Controller/AscensoController.php
... | ... | @@ -229,6 +229,7 @@ class AscensoController extends Controller |
229 | 229 | 'idServicioCe' => 5 |
230 | 230 | )); |
231 | 231 | |
232 | + | |
232 | 233 | |
233 | 234 | $user = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByIdRolInstitucion($ascenso->getIdRolInstitucion()); |
234 | 235 | if($estatus == "true") { |
... | ... | @@ -237,9 +238,12 @@ class AscensoController extends Controller |
237 | 238 | }else{ |
238 | 239 | $serviciosAscenso->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(3)); |
239 | 240 | } |
241 | + | |
242 | + $ascenso->setIdEstatus($serviciosAscenso->getIdEstatus()); | |
240 | 243 | |
241 | 244 | $em = $this->getDoctrine()->getManager(); |
242 | 245 | $em->persist($serviciosAscenso); |
246 | + $em->persist($ascenso); | |
243 | 247 | $em->flush(); |
244 | 248 | |
245 | 249 | $message = \Swift_Message::newInstance() | ... | ... |