Commit aaa12b90f5518a24fba7ab2af421ebd129efaebd
1 parent
cb50e57168
Exists in
master
mejorado el servicio de solicitud de antiguedad.
Showing
6 changed files
with
23 additions
and
242 deletions
Show diff stats
app/Resources/views/base_memo.html.twig
@@ -70,7 +70,7 @@ | @@ -70,7 +70,7 @@ | ||
70 | 70 | ||
71 | <div class="row"> | 71 | <div class="row"> |
72 | <div class="text-right"> | 72 | <div class="text-right"> |
73 | - <p><strong>{%block numero %}CEA-N°-019-2016 {% endblock %}</strong></p> | 73 | + <p><strong>CEA@UBV-N°-00{%block numero %} {% endblock %}</strong></p> |
74 | </div> | 74 | </div> |
75 | </div> | 75 | </div> |
76 | 76 | ||
@@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
142 | <br> En tal sentido, tomando la información | 142 | <br> En tal sentido, tomando la información |
143 | suministrada por Usted se tiene que: </p> | 143 | suministrada por Usted se tiene que: </p> |
144 | 144 | ||
145 | - <table class="table table-bordered"> | 145 | + <table class="table table-bordered table-condensed"> |
146 | <tr> | 146 | <tr> |
147 | <td> | 147 | <td> |
148 | Fecha Primera Contratatación UBV | 148 | Fecha Primera Contratatación UBV |
@@ -189,7 +189,7 @@ | @@ -189,7 +189,7 @@ | ||
189 | <p class="text-center">"Sembramos Saberes Cosechamos Patria"</p> | 189 | <p class="text-center">"Sembramos Saberes Cosechamos Patria"</p> |
190 | </div> | 190 | </div> |
191 | <div class="col-xs-2 push-left"> | 191 | <div class="col-xs-2 push-left"> |
192 | - <img width="10%" src="{{ asset('bundles/framework/images/portal/logo_ubv.png')}}" /> | 192 | + <img width="80%" src="{{ asset('bundles/framework/images/memorando/logoJuventud.jpg')}}" /> |
193 | </div> | 193 | </div> |
194 | 194 | ||
195 | 195 |
app/Resources/views/cea/servicios.html.twig
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | </td> | 38 | </td> |
39 | <td>{{servicio.idRolInstitucion.idInstitucion.idEjeParroquia.idParroquia.idMunicipio.idEstado}} </td> | 39 | <td>{{servicio.idRolInstitucion.idInstitucion.idEjeParroquia.idParroquia.idMunicipio.idEstado}} </td> |
40 | <td> | 40 | <td> |
41 | - <a href="{{ path('cea_servicio_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> | 41 | + <a href="{{ path('cea_servicio_show', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> |
42 | <a href="javascript:;" class="btn btn-xs btn-success"><i class="fa fa-check"> </i></a> | 42 | <a href="javascript:;" class="btn btn-xs btn-success"><i class="fa fa-check"> </i></a> |
43 | <a href="javascript:;" class="btn btn-danger btn-xs"><i class="fa fa-times"> </i></a></td> | 43 | <a href="javascript:;" class="btn btn-danger btn-xs"><i class="fa fa-times"> </i></a></td> |
44 | </td> | 44 | </td> |
app/Resources/views/memorando/antiguedad.html.twig
@@ -9,6 +9,8 @@ | @@ -9,6 +9,8 @@ | ||
9 | <br>Trabajador Académico adscrito al Centro de Estudios Ambientales | 9 | <br>Trabajador Académico adscrito al Centro de Estudios Ambientales |
10 | {%endblock %} | 10 | {%endblock %} |
11 | 11 | ||
12 | +{% block numero %}{{ correlativo }}{% endblock %} | ||
13 | + | ||
12 | {% block coordinador %} | 14 | {% block coordinador %} |
13 | Prof. Alexis Lozada | 15 | Prof. Alexis Lozada |
14 | <br>Director (E) Del Centro de Estudios Ambientales. | 16 | <br>Director (E) Del Centro de Estudios Ambientales. |
@@ -41,3 +43,14 @@ | @@ -41,3 +43,14 @@ | ||
41 | {%block antiguedad %} | 43 | {%block antiguedad %} |
42 | {{ diferencia }} | 44 | {{ diferencia }} |
43 | {%endblock%} | 45 | {%endblock%} |
46 | + | ||
47 | + {%block javascripts %} | ||
48 | + {{ parent() }} | ||
49 | + <script type="text/javascript"> | ||
50 | + | ||
51 | + window.onload = function () { | ||
52 | + window.print(); //invoca la impresora tan pronto se carga el documento | ||
53 | + setTimeout(function () { window.close(); }, 100); //cierra la venta si cierra el dialog de imprimir | ||
54 | + } | ||
55 | +</script> | ||
56 | + {% endblock %} |
app/Resources/views/portal/index.html.twig
@@ -102,8 +102,10 @@ | @@ -102,8 +102,10 @@ | ||
102 | <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> | 102 | <div class="col-lg-4 col-md-4 col-sm-4 col-xs-12"> |
103 | <div class="service-item"> | 103 | <div class="service-item"> |
104 | <img src="{{ asset('bundles/framework/images/portal/registro.png') }}" alt=""> | 104 | <img src="{{ asset('bundles/framework/images/portal/registro.png') }}" alt=""> |
105 | - <h3>Registro Académico</h3> | ||
106 | - <p>A través del sistema del Centro de Estudios Ambienales CEA@UBV podrás tener un control de las actividades académicas que lleves a cabo dentro del mismo (diplomados, cursos, maestrías, doctorados, etc.)</p> | 105 | + <h3>Reconocimiento de Antiguedad</h3> |
106 | + <p>El Centro Estudios Ambienales CEA@UBV reconoce tu antigüedad con fines de ascenso | ||
107 | + en escalafones de la carrera univesitaria entre el primer contrato y el concurso de | ||
108 | + oposición.</p> | ||
107 | </div> | 109 | </div> |
108 | </div> | 110 | </div> |
109 | 111 |
app/Resources/views/solicitudes/index.html.twig
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | <td>{{servicio.fechaSolicitud | date('Y-m-d')}}</td> | 37 | <td>{{servicio.fechaSolicitud | date('Y-m-d')}}</td> |
38 | <td>{{servicio.idEstatus}}</td> | 38 | <td>{{servicio.idEstatus}}</td> |
39 | <td> | 39 | <td> |
40 | - <a href="{{ path('servicio_antiguedad_imprimir', { 'id': servicio.id }) }}" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> | 40 | + <a href="{{ path('servicio_antiguedad_imprimir', { 'id': servicio.id }) }}" target="_blank" class="btn btn-xs btn-info"><i class="fa fa-eye"> </i></a> |
41 | <a href="javascript:;" class="btn btn-xs btn-success"><i class="fa fa-check"> </i></a> | 41 | <a href="javascript:;" class="btn btn-xs btn-success"><i class="fa fa-check"> </i></a> |
42 | <a href="javascript:;" class="btn btn-danger btn-xs"><i class="fa fa-times"> </i></a> | 42 | <a href="javascript:;" class="btn btn-danger btn-xs"><i class="fa fa-times"> </i></a> |
43 | </td> | 43 | </td> |
src/AppBundle/Controller/AppController.php
@@ -49,140 +49,8 @@ class AppController extends Controller { | @@ -49,140 +49,8 @@ class AppController extends Controller { | ||
49 | )); | 49 | )); |
50 | } | 50 | } |
51 | 51 | ||
52 | - /** | ||
53 | - * Muestra las Solicitudes de Adscripción. Por defecto las creadas (estatus = 2) | ||
54 | - * | ||
55 | - * @Route("/solicitudes/adscripcion/{estatus}", name="cea_adscripciones") | ||
56 | - * @Method({"GET", "POST"}) | ||
57 | - * @Security("has_role('ROLE_COORDINADOR_NACIONAL')") | ||
58 | - */ | ||
59 | - public function verSolicitudesAdscripcionAction($estatus = 2, Request $request) | ||
60 | - { | ||
61 | - | ||
62 | - if ($request->getMethod() != 'POST') { | ||
63 | - $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findBy(array('idEstatus' => $estatus)); | ||
64 | - switch ($estatus){ | ||
65 | - case 1: | ||
66 | - $mensaje = "activas"; | ||
67 | - break; | ||
68 | - case 2: | ||
69 | - $mensaje = "en espera"; | ||
70 | - break; | ||
71 | - case 3: | ||
72 | - $mensaje = "rechazadas"; | ||
73 | - break; | ||
74 | - } | ||
75 | - }else{ | ||
76 | - | ||
77 | - $persona = $this->getDoctrine()->getRepository('AppBundle:Persona') | ||
78 | - ->findOneByCedulaPasaporte($request->get('docente')); | ||
79 | - | ||
80 | - if (!$persona) { | ||
81 | - $this->addFlash('danger', 'Docente ' . $request->get('docente') . ' no Registrado en la Base de Datos del Centro de Estudios.'); | ||
82 | - return $this->render('cea/index.html.twig', array ( | ||
83 | - 'adscrito' => true | ||
84 | - )); | ||
85 | - } | ||
86 | - | ||
87 | - //1. obtener el rol-institucion-persona | ||
88 | - $rol = $this->getDoctrine()->getRepository( | ||
89 | - 'AppBundle:RolInstitucion')->findOneByIdRol( | ||
90 | - $this->getDoctrine()->getRepository( | ||
91 | - 'AppBundle:Rol')->findOneByIdPersona($persona)); | ||
92 | - | ||
93 | - //si no existe el rol del docente, enviar correo al encargado de la región para verificar. | ||
94 | - if (!$rol) { | ||
95 | - $this->addFlash('danger', 'Docente no Registrado en la Base de Datos del Centro de Estudios. Por Favor'); | ||
96 | - return $this->render('cea/index.html.twig'); | ||
97 | - } | ||
98 | - | ||
99 | - | ||
100 | - $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findByIdRolInstitucion($rol->getId()); | ||
101 | - $mensaje = "Busqueda : " . $request->get('docente'); | ||
102 | - } | ||
103 | - return $this->render('cea/solicitudes.html.twig', array( | ||
104 | - 'adscripciones' => $adscripciones, | ||
105 | - 'estatus_adscripciones' => $mensaje | ||
106 | - )); | ||
107 | - } | ||
108 | - | ||
109 | - /** | ||
110 | - * Encuentra y muestra una entidad de tipo Adscripción. | ||
111 | - * | ||
112 | - * @Route("/solicitudes/{id}", name="cea_solicitudes_show") | ||
113 | - * @Method("GET") | ||
114 | - */ | ||
115 | - public function solicitudesAdscripcionShowAction(Adscripcion $adscripcion) | ||
116 | - { | ||
117 | - //$deleteForm = $this->createDeleteForm($usuario); | ||
118 | - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( | ||
119 | - 'idRolInstitucion' => $adscripcion->getIdRolInstitucion()->getId() | ||
120 | - )); | ||
121 | - | ||
122 | - return $this->render('cea/solicitudes_mostar.html.twig', array( | ||
123 | - 'adscripcion' => $adscripcion, | ||
124 | - 'escalas' => $escala | ||
125 | - )); | ||
126 | - } | ||
127 | 52 | ||
128 | 53 | ||
129 | - /** | ||
130 | - * Encuentra y muestra una entidad de tipo Adscripción. | ||
131 | - * | ||
132 | - * @Route("/solicitudes/actualizar/{id}/{estatus}", name="cea_solicitudes_actualizar") | ||
133 | - * @Method({"GET", "POST"}) | ||
134 | - */ | ||
135 | - public function solicitudesAdscripcionEditAction(Adscripcion $adscripcion, $estatus) | ||
136 | - { | ||
137 | - | ||
138 | - $adscripciones = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneById($adscripcion->getId()); | ||
139 | - | ||
140 | - if($estatus == "true") { | ||
141 | - $adscripciones->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(1)); | ||
142 | - $user = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByIdRolInstitucion($adscripcion->getIdRolInstitucion()); | ||
143 | - $user->addRol($this->getDoctrine()->getRepository('AppBundle:Role')->findOneByName("ROLE_ADSCRITO")); | ||
144 | - | ||
145 | - }else{ | ||
146 | - $adscripciones->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:Estatus')->findOneById(3)); | ||
147 | - $user = $this->getDoctrine()->getRepository('AppBundle:Usuarios')->findOneByIdRolInstitucion($adscripcion->getIdRolInstitucion()); | ||
148 | - $user->removeRol($this->getDoctrine()->getRepository('AppBundle:Role')->findOneByName("ROLE_ADSCRITO")); | ||
149 | - } | ||
150 | - | ||
151 | - $em = $this->getDoctrine()->getManager(); | ||
152 | - $em->persist($adscripciones); | ||
153 | - $em->persist($user); | ||
154 | - $em->flush(); | ||
155 | - | ||
156 | - $message = \Swift_Message::newInstance() | ||
157 | - ->setSubject('Resultado Adscripcion CEA@UBV') | ||
158 | - ->setFrom('wilmer.ramones@gmail.com') | ||
159 | - ->setTo($user->getEmail()) | ||
160 | - ->setBody( | ||
161 | - $this->renderView( | ||
162 | - 'correos/actualizar_adscripcion.html.twig', | ||
163 | - array( | ||
164 | - 'nombres' => $user->getUsername(), | ||
165 | - 'estatus' => $adscripciones->getIdEstatus() | ||
166 | - ) | ||
167 | - ), | ||
168 | - 'text/html' | ||
169 | - ) | ||
170 | - ; | ||
171 | - $this->get('mailer')->send($message); | ||
172 | - | ||
173 | - $this->addFlash('notice', 'Solicitud Actualizada Correctamente, hemos enviado un correo al docente notificandole los cambios.'); | ||
174 | - | ||
175 | - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findBy(array( | ||
176 | - 'idRolInstitucion' => $adscripciones->getIdRolInstitucion()->getId() | ||
177 | - )); | ||
178 | - | ||
179 | - return $this->render('cea/solicitudes_mostar.html.twig', array( | ||
180 | - 'adscripcion' => $adscripciones, | ||
181 | - 'escalas' => $escala | ||
182 | - )); | ||
183 | - | ||
184 | - } | ||
185 | - | ||
186 | 54 | ||
187 | /** | 55 | /** |
188 | * Muestra la página Puede ver los estatus de las solicitudes realizadas | 56 | * Muestra la página Puede ver los estatus de las solicitudes realizadas |
@@ -347,109 +215,7 @@ class AppController extends Controller { | @@ -347,109 +215,7 @@ class AppController extends Controller { | ||
347 | } | 215 | } |
348 | 216 | ||
349 | 217 | ||
350 | - /** | ||
351 | - * Muestra la página donde explica brevemente el reconocimiento de Antiguedad | ||
352 | - * y permite realizar la solicitud | ||
353 | - * | ||
354 | - * @Route("/solicitudes/antiguedad/", name="cea_solicitudes_recocimiento_antiguedad") | ||
355 | - * @Method({"GET", "POST"}) | ||
356 | - */ | ||
357 | - public function solicitudesAntiguedadIndexAction(){ | ||
358 | - | ||
359 | - $servicio = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
360 | - | ||
361 | - if(!$servicio){ | ||
362 | - return $this->render('solicitudes/reconocimiento_antiguedad.html.twig'); | ||
363 | - }else{ | ||
364 | - $this->addFlash('notice', 'Ya usted ha realizado la solicitud de reconocimiento de antiguedad.'); | ||
365 | - return $this->redirect($this->generateUrl('servicios_index')); | ||
366 | - } | ||
367 | - | ||
368 | - | ||
369 | - | ||
370 | - } | ||
371 | - | ||
372 | - | ||
373 | - /** | ||
374 | - * Muestra la página donde explica brevemente el reconocimiento de Antiguedad | ||
375 | - * y permite realizar la solicitud | ||
376 | - * | ||
377 | - * @Route("/mis_servicios/antiguedad/imprimir/{id}", name="servicio_antiguedad_imprimir") | ||
378 | - * @Method({"GET", "POST"}) | ||
379 | - */ | ||
380 | - public function solicitudesAntiguedadImprimirAction(){ | ||
381 | - | ||
382 | - $antiguedad = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
383 | - | ||
384 | - if($antiguedad->getIdEstatus()->getId() == 1){ | ||
385 | - $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findOneByIdRolInstitucion($antiguedad->getIdRolInstitucion()); | ||
386 | - $escala = $this->getDoctrine()->getRepository('AppBundle:DocenteEscala')->findOneByIdRolInstitucion($antiguedad->getIdRolInstitucion()); | ||
387 | - $idRol = $escala->getIdRolInstitucion()->getId(); | ||
388 | - $stmt = $this->getDoctrine()->getManager() | ||
389 | - ->getConnection() | ||
390 | - ->prepare("select age(e.fecha_escala, a.fecha_ingreso), | ||
391 | - date_part('year',age(e.fecha_escala, a.fecha_ingreso)) as anos, | ||
392 | - date_part('month',age(e.fecha_escala, a.fecha_ingreso)) as meses, | ||
393 | - date_part('day',age(e.fecha_escala, a.fecha_ingreso)) as dias | ||
394 | - FROM docente_escala as e | ||
395 | - INNER JOIN solicitud_adscripcion as a | ||
396 | - ON a.id_rol_institucion = e.id_rol_institucion | ||
397 | - WHERE e.id_tipo_escala = '1' AND a.id_rol_institucion = $idRol"); | ||
398 | - $stmt->execute(); | ||
399 | - $result = $stmt->fetchAll(); | ||
400 | - $recon = $result[0]['anos'] . " años " . $result[0]['meses'] . " meses y " . $result[0]['dias'] . " días."; | ||
401 | - | ||
402 | - | ||
403 | - return $this->render('memorando/antiguedad.html.twig', array( | ||
404 | - 'antiguedad' => $antiguedad, | ||
405 | - 'adscripcion' => $adscripcion, | ||
406 | - 'escala' => $escala, | ||
407 | - 'diferencia' => $recon | ||
408 | - )); | ||
409 | - }else{ | ||
410 | - | ||
411 | - } | ||
412 | - | ||
413 | - $this->addFlash('danger', 'No Puede Imprimir el reconocimiento de Antiguedad hasta que esté aprobado por el coordinador del CEA.'); | ||
414 | - | ||
415 | - $servicios = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')->findByIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
416 | - $adscripcion = $this->getDoctrine()->getRepository('AppBundle:Adscripcion')->findByIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
417 | - | ||
418 | - | ||
419 | - return $this->render('solicitudes/index.html.twig', array( | ||
420 | - 'servicios' => $servicios, | ||
421 | - 'adscripcion' => $adscripcion | ||
422 | - )); | ||
423 | - | ||
424 | - } | ||
425 | - | ||
426 | - | ||
427 | - | ||
428 | - | ||
429 | - /** | ||
430 | - * Muestra la página donde explica brevemente el reconocimiento de Antiguedad | ||
431 | - * y permite realizar la solicitud | ||
432 | - * | ||
433 | - * @Route("/solicitudes/antiguedad/crear/", name="cea_crear_servicio_antiguedad") | ||
434 | - * @Method({"GET", "POST"}) | ||
435 | - */ | ||
436 | - public function solicitudesAntiguedadCrearAction(){ | ||
437 | - | ||
438 | - $servicios = new DocenteServicio(); | ||
439 | - | ||
440 | - $servicios->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); | ||
441 | - $servicios->setIdServicioCe($this->getDoctrine()->getRepository('AppBundle:ServiciosCe')->findOneById(1)); | ||
442 | - $servicios->setIdEstatus($this->getDoctrine()->getRepository('AppBundle:estatus')->findOneById(2)); | ||
443 | - | ||
444 | - $em = $this->getDoctrine()->getManager(); | ||
445 | - $em->persist($servicios); | ||
446 | - $em->flush(); | ||
447 | - | ||
448 | - $this->addFlash('notice', 'Solicitud Creada Correctamente, en lo que la solicitud sea aprobada, se le notificará por correo.'); | ||
449 | - | ||
450 | - return $this->render('solicitudes/reconocimiento_antiguedad.html.twig'); | ||
451 | - | ||
452 | - } | 218 | + |
453 | 219 | ||
454 | 220 | ||
455 | 221 |