Commit 117cb5c424b74d242dc997e501244501980487ed
1 parent
261ba21510
Exists in
master
creada la pregunta de que si ya esta adscrito entonces solicitar PIDA y comenzando a crear la vista
Showing
5 changed files
with
324 additions
and
7 deletions
Show diff stats
app/Resources/views/solicitudes/pida.html.twig
@@ -26,16 +26,14 @@ | @@ -26,16 +26,14 @@ | ||
26 | Estimado (a) Docente | 26 | Estimado (a) Docente |
27 | <strong>{{app.user.idRolInstitucion.idRol.idPersona.primerNombre}} | 27 | <strong>{{app.user.idRolInstitucion.idRol.idPersona.primerNombre}} |
28 | {{app.user.idRolInstitucion.idRol.idPersona.primerApellido}}</strong>, | 28 | {{app.user.idRolInstitucion.idRol.idPersona.primerApellido}}</strong>, |
29 | - para poder gozar de los beneficios del sistema cea@ubv, primero debe | ||
30 | - formalizar su adscripción ante este centro de estudios, llenando los datos que a continuación | ||
31 | - se solicitan. Recuerde que debe tener a su alcance los digitales de los | ||
32 | - documentos descritos en el correo enviado. | 29 | + Mientras se verifican sus datos de adscripción, lo invitamos a registrar el PIDA rellenando |
30 | + los datos que solicitamos a continuación | ||
33 | 31 | ||
34 | </h4> | 32 | </h4> |
35 | </div> | 33 | </div> |
36 | <div class="account-container register"> | 34 | <div class="account-container register"> |
37 | <div class="content clearfix"> | 35 | <div class="content clearfix"> |
38 | - <h1>Formalización Adscripción</h1> | 36 | + <h1>PIDA</h1> |
39 | {% form_theme form 'bootstrap_3_layout.html.twig' %} | 37 | {% form_theme form 'bootstrap_3_layout.html.twig' %} |
40 | {{ form_start(form) }} | 38 | {{ form_start(form) }} |
41 | {{ form_widget(form) }} | 39 | {{ form_widget(form) }} |
src/AppBundle/Controller/AdscripcionController.php
@@ -223,6 +223,38 @@ class AdscripcionController extends Controller | @@ -223,6 +223,38 @@ class AdscripcionController extends Controller | ||
223 | 223 | ||
224 | 224 | ||
225 | /** | 225 | /** |
226 | + * Solicita información al docente sobre su PIDA | ||
227 | + * | ||
228 | + * @Route("/solicitud/pida", name="solicitud_pida") | ||
229 | + */ | ||
230 | + public function pidaAction(Request $request) | ||
231 | + { | ||
232 | + | ||
233 | + //verificar en las solicitudes la adscripcion del docente | ||
234 | + $adscripcion = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> | ||
235 | + findOneBy(array( | ||
236 | + 'idRolInstitucion' => $this->getUser()->getIdRolInstitucion()->getId(), | ||
237 | + 'idServicioCe' => 2 | ||
238 | + )); | ||
239 | + //si no ha solicitado adscripción regresa a la pagina de adscripcion | ||
240 | + if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); | ||
241 | + | ||
242 | + //si ya se tiene PIDA | ||
243 | + if($this->getDoctrine()->getRepository('AppBundle:AdscripcionPida')->findOneByIdRolInstitucion($this->getUser()->getIdRolInstitucion()->getId())){ | ||
244 | + return $this->redirect($this->generateUrl('cea_index')); | ||
245 | + } | ||
246 | + | ||
247 | + | ||
248 | + return $this->render( | ||
249 | + 'solicitudes/pida.html.twig', | ||
250 | + array('form' => $form->createView()) | ||
251 | + ); | ||
252 | + | ||
253 | + | ||
254 | + } | ||
255 | + | ||
256 | + | ||
257 | + /** | ||
226 | * Muestra las Solicitudes de Adscripción. Por defecto las creadas (estatus = 2) | 258 | * Muestra las Solicitudes de Adscripción. Por defecto las creadas (estatus = 2) |
227 | * | 259 | * |
228 | * @Route("/solicitudes/adscripcion/{estatus}", name="cea_adscripciones") | 260 | * @Route("/solicitudes/adscripcion/{estatus}", name="cea_adscripciones") |
src/AppBundle/Controller/AppController.php
@@ -43,7 +43,7 @@ class AppController extends Controller { | @@ -43,7 +43,7 @@ class AppController extends Controller { | ||
43 | 'idServicioCe' => 2 | 43 | 'idServicioCe' => 2 |
44 | )); | 44 | )); |
45 | //si no ha solicitado adscripción regresa a la pagina de adscripcion | 45 | //si no ha solicitado adscripción regresa a la pagina de adscripcion |
46 | - if(!$adscripcion) return $this->redirect($this->generateUrl('solicitud_adscripcion')); | 46 | + if(!$adscripcion){ return $this->redirect($this->generateUrl('solicitud_adscripcion')); } |
47 | 47 | ||
48 | $pida = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> | 48 | $pida = $this->getDoctrine()->getRepository('AppBundle:DocenteServicio')-> |
49 | findOneBy(array( | 49 | findOneBy(array( |
@@ -51,7 +51,7 @@ class AppController extends Controller { | @@ -51,7 +51,7 @@ class AppController extends Controller { | ||
51 | 'idServicioCe' => 4 | 51 | 'idServicioCe' => 4 |
52 | )); | 52 | )); |
53 | 53 | ||
54 | - if(!$pida) return $this->redirect($this->generateUrl('solicitud_pida')); | 54 | + if(!$pida){ return $this->redirect($this->generateUrl('solicitud_pida')); } |
55 | 55 | ||
56 | 56 | ||
57 | //solicitud aprobada está en falso | 57 | //solicitud aprobada está en falso |
src/AppBundle/Entity/ActividadDocente.php~
@@ -0,0 +1,111 @@ | @@ -0,0 +1,111 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +namespace AppBundle\Entity; | ||
4 | + | ||
5 | +use Doctrine\ORM\Mapping as ORM; | ||
6 | + | ||
7 | +/** | ||
8 | + * ActividadDocente | ||
9 | + * | ||
10 | + * @ORM\Table(name="actividad_docente", uniqueConstraints={@ORM\UniqueConstraint(name="uq_actividad_docente", columns={"nombre"})}, indexes={@ORM\Index(name="IDX_C4F229CA50BDD1F3", columns={"id_estatus"})}) | ||
11 | + * @ORM\Entity | ||
12 | + */ | ||
13 | +class ActividadDocente | ||
14 | +{ | ||
15 | + /** | ||
16 | + * @var string | ||
17 | + * | ||
18 | + * @ORM\Column(name="nombre", type="string", nullable=false, options={"comment" = "Nombre de la actividad_docente"}) | ||
19 | + */ | ||
20 | + private $nombre; | ||
21 | + | ||
22 | + /** | ||
23 | + * @var integer | ||
24 | + * | ||
25 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "identificador de la actividad_docente"}) | ||
26 | + * @ORM\Id | ||
27 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
28 | + * @ORM\SequenceGenerator(sequenceName="escala_id_seq", allocationSize=1, initialValue=1) | ||
29 | + */ | ||
30 | + private $id; | ||
31 | + | ||
32 | + /** | ||
33 | + * @var \AppBundle\Entity\Estatus | ||
34 | + * | ||
35 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Estatus") | ||
36 | + * @ORM\JoinColumns({ | ||
37 | + * @ORM\JoinColumn(name="id_estatus", referencedColumnName="id", nullable=false) | ||
38 | + * }) | ||
39 | + */ | ||
40 | + private $idEstatus; | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
46 | + /** | ||
47 | + * Set nombre | ||
48 | + * | ||
49 | + * @param string $nombre | ||
50 | + * @return ActividadDocente | ||
51 | + */ | ||
52 | + public function setNombre($nombre) | ||
53 | + { | ||
54 | + $this->nombre = $nombre; | ||
55 | + | ||
56 | + return $this; | ||
57 | + } | ||
58 | + | ||
59 | + /** | ||
60 | + * Get nombre | ||
61 | + * | ||
62 | + * @return string | ||
63 | + */ | ||
64 | + public function getNombre() | ||
65 | + { | ||
66 | + return $this->nombre; | ||
67 | + } | ||
68 | + | ||
69 | + /** | ||
70 | + * Get id | ||
71 | + * | ||
72 | + * @return integer | ||
73 | + */ | ||
74 | + public function getId() | ||
75 | + { | ||
76 | + return $this->id; | ||
77 | + } | ||
78 | + | ||
79 | + /** | ||
80 | + * Set idEstatus | ||
81 | + * | ||
82 | + * @param \AppBundle\Entity\Estatus $idEstatus | ||
83 | + * @return ActividadDocente | ||
84 | + */ | ||
85 | + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus) | ||
86 | + { | ||
87 | + $this->idEstatus = $idEstatus; | ||
88 | + | ||
89 | + return $this; | ||
90 | + } | ||
91 | + | ||
92 | + /** | ||
93 | + * Get idEstatus | ||
94 | + * | ||
95 | + * @return \AppBundle\Entity\Estatus | ||
96 | + */ | ||
97 | + public function getIdEstatus() | ||
98 | + { | ||
99 | + return $this->idEstatus; | ||
100 | + } | ||
101 | + | ||
102 | + | ||
103 | + /** | ||
104 | + * Get toString | ||
105 | + * | ||
106 | + * @return string | ||
107 | + */ | ||
108 | + public function __toString() { | ||
109 | + return $this->getNombre(); | ||
110 | + } | ||
111 | +} |
src/AppBundle/Entity/AdscripcionPida.php~
@@ -0,0 +1,176 @@ | @@ -0,0 +1,176 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | + | ||
4 | +namespace AppBundle\Entity; | ||
5 | + | ||
6 | +use Doctrine\ORM\Mapping as ORM; | ||
7 | + | ||
8 | + | ||
9 | +/** | ||
10 | + * AdscripcionPida | ||
11 | + * | ||
12 | + * @ORM\Table(name="solicitud_pida", uniqueConstraints={@ORM\UniqueConstraint(name="pida_id_rol_institucion_key", columns={"id_rol_institucion"})}) | ||
13 | + * @ORM\Entity | ||
14 | + * @ORM\HasLifecycleCallbacks() | ||
15 | + */ | ||
16 | +class AdscripcionPida | ||
17 | +{ | ||
18 | + | ||
19 | + /** | ||
20 | + * @var integer | ||
21 | + * | ||
22 | + * @ORM\Column(name="id", type="integer", nullable=false, options={"comment" = "Identificador de la AdscripcionPida"}) | ||
23 | + * @ORM\Id | ||
24 | + * @ORM\GeneratedValue(strategy="IDENTITY") | ||
25 | + * @ORM\SequenceGenerator(sequenceName="adscripcion_id_seq", allocationSize=1, initialValue=1) | ||
26 | + */ | ||
27 | + private $id; | ||
28 | + | ||
29 | + | ||
30 | + | ||
31 | + /** | ||
32 | + * @var \AppBundle\Entity\RolInstitucion | ||
33 | + * | ||
34 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\RolInstitucion") | ||
35 | + * @ORM\JoinColumns({ | ||
36 | + * @ORM\JoinColumn(name="id_rol_institucion", referencedColumnName="id", nullable=false) | ||
37 | + * }) | ||
38 | + */ | ||
39 | + protected $idRolInstitucion; | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + /** | ||
44 | + * @var \AppBundle\Entity\PlanHistoricoNacionalEstrategico | ||
45 | + * | ||
46 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\PlanHistoricoNacionalEstrategico") | ||
47 | + * @ORM\JoinColumns({ | ||
48 | + * @ORM\JoinColumn(name="id_plan_historico_nacional_estrategico", referencedColumnName="id", nullable=true) | ||
49 | + * }) | ||
50 | + */ | ||
51 | + protected $idPlanHistoricoNacionalEstrategico; | ||
52 | + | ||
53 | + | ||
54 | + /** | ||
55 | + * @var \AppBundle\Entity\ActividadDocente | ||
56 | + * | ||
57 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\ActividadDocente") | ||
58 | + * @ORM\JoinColumns({ | ||
59 | + * @ORM\JoinColumn(name="id_actividad_docente", referencedColumnName="id", nullable=true) | ||
60 | + * }) | ||
61 | + */ | ||
62 | + protected $idActividadDocente; | ||
63 | + | ||
64 | + | ||
65 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de creación de la solicitud"}) | ||
66 | + | ||
67 | + */ | ||
68 | + | ||
69 | + private $fecha_creacion; | ||
70 | + | ||
71 | + | ||
72 | + /** @ORM\Column(type="datetime", nullable=false, options={"comment" = "Fecha de actualizacion de la solicitud"}) | ||
73 | + | ||
74 | + */ | ||
75 | + | ||
76 | + private $fecha_ultima_actualizacion; | ||
77 | + | ||
78 | + /** | ||
79 | + * @var \AppBundle\Entity\Estatus | ||
80 | + * | ||
81 | + * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Estatus") | ||
82 | + * @ORM\JoinColumns({ | ||
83 | + * @ORM\JoinColumn(name="id_estatus", referencedColumnName="id", nullable=false) | ||
84 | + * }) | ||
85 | + */ | ||
86 | + protected $idEstatus; | ||
87 | + | ||
88 | + | ||
89 | + /** | ||
90 | + * Get id | ||
91 | + * | ||
92 | + * @return integer | ||
93 | + */ | ||
94 | + public function getId() | ||
95 | + { | ||
96 | + return $this->id; | ||
97 | + } | ||
98 | + | ||
99 | + | ||
100 | + /** | ||
101 | + * Set idRolInstitucion | ||
102 | + * | ||
103 | + * @param \AppBundle\Entity\RolInstitucion $idRolInstitucion | ||
104 | + * @return Usuarios | ||
105 | + */ | ||
106 | + public function setIdRolInstitucion(\AppBundle\Entity\RolInstitucion $idRolInstitucion = null) | ||
107 | + { | ||
108 | + $this->idRolInstitucion = $idRolInstitucion; | ||
109 | + | ||
110 | + return $this; | ||
111 | + } | ||
112 | + | ||
113 | + /** | ||
114 | + * Get idRolInstitucion | ||
115 | + * | ||
116 | + * @return \AppBundle\Entity\RolInstitucion | ||
117 | + */ | ||
118 | + public function getIdRolInstitucion() | ||
119 | + { | ||
120 | + return $this->idRolInstitucion; | ||
121 | + } | ||
122 | + | ||
123 | + | ||
124 | + | ||
125 | + | ||
126 | + | ||
127 | + /** | ||
128 | + * Set idEstatus | ||
129 | + * | ||
130 | + * @param \AppBundle\Entity\Estatus $idEstatus | ||
131 | + * @return Estatus | ||
132 | + */ | ||
133 | + public function setIdEstatus(\AppBundle\Entity\Estatus $idEstatus = null) | ||
134 | + { | ||
135 | + $this->idEstatus = $idEstatus; | ||
136 | + | ||
137 | + return $this; | ||
138 | + } | ||
139 | + | ||
140 | + /** | ||
141 | + * Get idEstatus | ||
142 | + * | ||
143 | + * @return \AppBundle\Entity\Estatus | ||
144 | + */ | ||
145 | + public function getIdEstatus() | ||
146 | + { | ||
147 | + return $this->idEstatus; | ||
148 | + } | ||
149 | + | ||
150 | + | ||
151 | + | ||
152 | + /** | ||
153 | + * @ORM\PrePersist | ||
154 | + */ | ||
155 | + public function setFechaCreacion() | ||
156 | + { | ||
157 | + $this->fecha_creacion = new \DateTime(); | ||
158 | + $this->fecha_ultima_actualizacion = new \DateTime(); | ||
159 | + } | ||
160 | + | ||
161 | + public function getFechaCreacion() | ||
162 | + { | ||
163 | + return $this->fecha_creacion; | ||
164 | + | ||
165 | + } | ||
166 | + | ||
167 | + | ||
168 | + /** | ||
169 | + * @ORM\PreUpdate | ||
170 | + */ | ||
171 | + public function setFechaUltimaActualizacion() | ||
172 | + { | ||
173 | + $this->fecha_utlima_actualizacion = new \DateTime(); | ||
174 | + } | ||
175 | + | ||
176 | +} |