From 9a871b71d0068f16384fce7294a4b4e0850788f3 Mon Sep 17 00:00:00 2001 From: Wilmer Ramones Date: Thu, 7 Jul 2016 11:50:24 -0400 Subject: [PATCH] =?UTF-8?q?a=C3=B1adido=20la=20fecha=20de=20ingreso=20a=20?= =?UTF-8?q?ubv=20al=20formulario,=20entidad=20adscripcion,=20y=20registrat?= =?UTF-8?q?ionController?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + app/sessions/sess_bgvgescqjdgk1dlrb0koron6v2 | 2 +- .../Controller/RegistrationController.php | 1 + src/AppBundle/Entity/Adscripcion.php | 28 ++++++++++++++++++++++ src/AppBundle/Entity/DocenteEscala.php | 15 +++++++++++- src/AppBundle/Form/UserType.php | 9 +++---- 6 files changed, 50 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8c2ebe4..947e9ec 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /web/uploads/ /app/bootstrap.php.cache /app/cache/* +/app/sessions/ /app/config/parameters.yml /app/logs/* !app/cache/.gitkeep diff --git a/app/sessions/sess_bgvgescqjdgk1dlrb0koron6v2 b/app/sessions/sess_bgvgescqjdgk1dlrb0koron6v2 index a0ae8ff..812a8c1 100644 --- a/app/sessions/sess_bgvgescqjdgk1dlrb0koron6v2 +++ b/app/sessions/sess_bgvgescqjdgk1dlrb0koron6v2 @@ -1 +1 @@ -_sf2_attributes|a:4:{s:15:"_csrf/solicitar";s:43:"RLF62VSfJLAlMnifYVXncsvGx3ZFbTP1frw4-tY49t8";s:18:"_csrf/authenticate";s:43:"kGpdaDAMIF5qk2UnjTTFudnDG6lv5qI1e0IiAS8qsfE";s:14:"_security_main";s:387:"C:74:"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken":299:{a:3:{i:0;N;i:1;s:4:"main";i:2;s:259:"a:4:{i:0;C:25:"AppBundle\Entity\Usuarios":106:{a:3:{i:0;i:11;i:1;s:8:"wramones";i:2;s:60:"$2y$13$UN60aw0H6QLaO5k.ghyvIOrQjW1UPt210b6ReDJUgQGZ7VK9SwoeK";}}i:1;b:1;i:2;a:1:{i:0;C:21:"AppBundle\Entity\Role":38:{a:2:{i:0;i:3;i:1;s:12:"ROLE_DOCENTE";}}}i:3;a:0:{}}";}}";s:10:"_csrf/user";s:43:"8jwP_9MNqXeJDV5zeplCA4ORQkAKirc090Ms8MMTxNM";}_sf2_flashes|a:0:{}_sf2_meta|a:3:{s:1:"u";i:1467903770;s:1:"c";i:1467903769;s:1:"l";s:1:"0";} \ No newline at end of file +_sf2_attributes|a:4:{s:15:"_csrf/solicitar";s:43:"RLF62VSfJLAlMnifYVXncsvGx3ZFbTP1frw4-tY49t8";s:18:"_csrf/authenticate";s:43:"kGpdaDAMIF5qk2UnjTTFudnDG6lv5qI1e0IiAS8qsfE";s:14:"_security_main";s:387:"C:74:"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken":299:{a:3:{i:0;N;i:1;s:4:"main";i:2;s:259:"a:4:{i:0;C:25:"AppBundle\Entity\Usuarios":106:{a:3:{i:0;i:11;i:1;s:8:"wramones";i:2;s:60:"$2y$13$UN60aw0H6QLaO5k.ghyvIOrQjW1UPt210b6ReDJUgQGZ7VK9SwoeK";}}i:1;b:1;i:2;a:1:{i:0;C:21:"AppBundle\Entity\Role":38:{a:2:{i:0;i:3;i:1;s:12:"ROLE_DOCENTE";}}}i:3;a:0:{}}";}}";s:10:"_csrf/user";s:43:"8jwP_9MNqXeJDV5zeplCA4ORQkAKirc090Ms8MMTxNM";}_sf2_flashes|a:0:{}_sf2_meta|a:3:{s:1:"u";i:1467905617;s:1:"c";i:1467903769;s:1:"l";s:1:"0";} \ No newline at end of file diff --git a/src/AppBundle/Controller/RegistrationController.php b/src/AppBundle/Controller/RegistrationController.php index f81f358..882915a 100644 --- a/src/AppBundle/Controller/RegistrationController.php +++ b/src/AppBundle/Controller/RegistrationController.php @@ -79,6 +79,7 @@ class RegistrationController extends Controller $adscripcion->setTrabajo($nombreTrabajo); $adscripcion->setPregrado($nombrePregrado); $adscripcion->setIdRolInstitucion($this->getUser()->getIdRolInstitucion()); + $adscripcion->setFechaIngreso($form->get('fecha_ingreso')->getData()); if ($form->get('escala')->getData()){ diff --git a/src/AppBundle/Entity/Adscripcion.php b/src/AppBundle/Entity/Adscripcion.php index e9b23a2..378fbca 100644 --- a/src/AppBundle/Entity/Adscripcion.php +++ b/src/AppBundle/Entity/Adscripcion.php @@ -43,6 +43,12 @@ class Adscripcion * }) */ protected $idRolInstitucion; + + /** @ORM\Column(type="date", nullable=false, options={"comment" = "Fecha de de Ingreso a la Institucion"}) + /** + * @Assert\Date() + */ + private $fecha_ingreso; /** @@ -361,6 +367,28 @@ class Adscripcion } + /** + * Set fecha_escala + * + * @param \DateTime $fecha_escala + * @return Comment + */ + public function setFechaIngreso($fecha_ingreso) + { + $this->fecha_ingreso = $fecha_ingreso; + + return $this; + } + + /** + * Get fecha_escala + * + * @return \DateTime + */ + public function getFechaIngreso() + { + return $this->fecha_ingreso; + } } diff --git a/src/AppBundle/Entity/DocenteEscala.php b/src/AppBundle/Entity/DocenteEscala.php index a798fc5..c22f295 100644 --- a/src/AppBundle/Entity/DocenteEscala.php +++ b/src/AppBundle/Entity/DocenteEscala.php @@ -42,6 +42,7 @@ class DocenteEscala */ protected $idRolInstitucion; + /** * @var \AppBundle\Entity\Escalafones * @@ -144,6 +145,17 @@ class DocenteEscala } /** + * Get fecha_creacion + * + * @return \DateTime + */ +public function getFechaCreacion() +{ + return $this->fecha_creacion; +} + + + /** * Set fecha_escala * * @param \DateTime $fecha_escala @@ -163,9 +175,10 @@ public function setFechaEscala($fecha_escala) */ public function getFechaEscala() { - return $this->postedon; + return $this->fecha_escala; } + /** * Set idRolInstitucion * diff --git a/src/AppBundle/Form/UserType.php b/src/AppBundle/Form/UserType.php index 41561f9..e16d9e8 100644 --- a/src/AppBundle/Form/UserType.php +++ b/src/AppBundle/Form/UserType.php @@ -1,9 +1,10 @@ add('fecha_ingreso', BirthdayType::class, array( + ->add('fecha_ingreso', BirthdayType::class, array( 'label' => 'Fecha de Ingreso UBV', - ))*/ + )) ->add('trabajo', FileType::class, array( 'label' => 'Digital Constancia Trabajo', 'constraints' => array( -- 2.0.0