Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
cc771cb7
You need to sign in or sign up before continuing.
Commit
cc771cb7
authored
Nov 05, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
form con ciudad, estado civil y nacionalidad
parent
fe3075a0
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
202 additions
and
244 deletions
+202
-244
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+27
-7
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
+3
-0
curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java
+3
-0
curriculumsearch/src/main/java/com/roshka/modelo/EstadoCivil.java
+17
-0
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
+31
-1
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaReconocimiento.java
+0
-50
curriculumsearch/src/main/java/com/roshka/modelo/ModalidadConverter.java
+0
-30
curriculumsearch/src/main/java/com/roshka/modelo/Nacionalidad.java
+3
-9
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
+6
-6
curriculumsearch/src/main/java/com/roshka/modelo/TipoExperiencia.java
+6
-29
curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaReconocimientoRepository.java
+0
-11
curriculumsearch/src/main/resources/json/postulante.json
+26
-60
curriculumsearch/src/main/resources/static/main.js
+24
-3
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+56
-38
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
cc771cb7
...
@@ -5,9 +5,15 @@ import java.util.List;
...
@@ -5,9 +5,15 @@ import java.util.List;
import
javax.validation.ConstraintViolationException
;
import
javax.validation.ConstraintViolationException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Modalidad
;
import
com.roshka.modelo.EstadoCivil
;
import
com.roshka.modelo.Nacionalidad
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.TipoExperiencia
;
import
com.roshka.repositorio.CiudadRepository
;
import
com.roshka.repositorio.DepartamentoRepository
;
import
com.roshka.repositorio.ExperienciaRepository
;
import
com.roshka.repositorio.ExperienciaRepository
;
import
com.roshka.repositorio.PostulanteRepository
;
import
com.roshka.repositorio.PostulanteRepository
;
import
com.roshka.repositorio.TecnologiaRepository
;
import
com.roshka.repositorio.TecnologiaRepository
;
...
@@ -32,13 +38,16 @@ public class PostulanteController {
...
@@ -32,13 +38,16 @@ public class PostulanteController {
@Autowired
@Autowired
ExperienciaRepository
expRepo
;
ExperienciaRepository
expRepo
;
@Autowired
CiudadRepository
ciuRepo
;
@Autowired
DepartamentoRepository
depRepo
;
@RequestMapping
(
"/"
)
@RequestMapping
(
"/"
)
public
String
index
()
{
public
String
index
()
{
List
<
Postulante
>
j
=
post
.
personasConExperienciaMayor
(
30
);
for
(
Postulante
postulante
:
j
)
{
System
.
out
.
println
(
postulante
.
getNombre
());
}
return
"index"
;
return
"index"
;
}
}
...
@@ -54,8 +63,19 @@ public class PostulanteController {
...
@@ -54,8 +63,19 @@ public class PostulanteController {
@RequestMapping
(
"/postulante"
)
@RequestMapping
(
"/postulante"
)
public
String
getFormPostulante
(
Model
model
){
public
String
getFormPostulante
(
Model
model
){
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"modalidades"
,
Modalidad
.
values
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
//TODO:
model
.
addAttribute
(
"estadosCiviles"
,
EstadoCivil
.
values
());
model
.
addAttribute
(
"nacionalidades"
,
Nacionalidad
.
values
());
model
.
addAttribute
(
"tiposExperencia"
,
TipoExperiencia
.
values
());
try
{
model
.
addAttribute
(
"ciudades"
,
new
ObjectMapper
().
writeValueAsString
(
ciuRepo
.
findAll
()));
}
catch
(
JsonProcessingException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
model
.
addAttribute
(
"departamentos"
,
depRepo
.
findAll
());
return
"postulante-form"
;
return
"postulante-form"
;
}
}
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
View file @
cc771cb7
...
@@ -12,6 +12,8 @@ import javax.persistence.ManyToOne;
...
@@ -12,6 +12,8 @@ import javax.persistence.ManyToOne;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Entity
@Table
(
name
=
"ciudad"
)
@Table
(
name
=
"ciudad"
)
public
class
Ciudad
{
public
class
Ciudad
{
...
@@ -34,6 +36,7 @@ public class Ciudad{
...
@@ -34,6 +36,7 @@ public class Ciudad{
@ManyToOne
(
targetEntity
=
Departamento
.
class
,
fetch
=
FetchType
.
EAGER
)
@ManyToOne
(
targetEntity
=
Departamento
.
class
,
fetch
=
FetchType
.
EAGER
)
@JoinColumn
(
name
=
"departamento_id"
,
insertable
=
false
,
updatable
=
false
)
@JoinColumn
(
name
=
"departamento_id"
,
insertable
=
false
,
updatable
=
false
)
@JsonBackReference
private
Departamento
departamento
;
private
Departamento
departamento
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java
View file @
cc771cb7
...
@@ -9,6 +9,8 @@ import javax.persistence.Id;
...
@@ -9,6 +9,8 @@ import javax.persistence.Id;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToMany
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
@Entity
@Entity
@Table
(
name
=
"departamento"
)
@Table
(
name
=
"departamento"
)
public
class
Departamento
{
public
class
Departamento
{
...
@@ -18,6 +20,7 @@ public class Departamento {
...
@@ -18,6 +20,7 @@ public class Departamento {
private
String
nombre
;
private
String
nombre
;
@OneToMany
(
mappedBy
=
"departamento"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"departamento"
,
cascade
=
CascadeType
.
ALL
)
@JsonManagedReference
private
List
<
Ciudad
>
ciudad
;
private
List
<
Ciudad
>
ciudad
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/EstadoCivil.java
0 → 100644
View file @
cc771cb7
package
com
.
roshka
.
modelo
;
import
com.fasterxml.jackson.annotation.JsonValue
;
public
enum
EstadoCivil
{
SOLTERO
(
"Soltero"
),
CONCUBINADO
(
"Concubinado"
),
CASADO
(
"Casado"
),
VIUDO
(
"Viudo"
),
DIVORCIADO
(
"Divorciado"
);
private
String
descripcion
;
private
EstadoCivil
(
String
descripcion
)
{
this
.
descripcion
=
descripcion
;
}
@JsonValue
public
String
getDescripcion
()
{
return
descripcion
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
View file @
cc771cb7
...
@@ -53,8 +53,38 @@ public class Experiencia {
...
@@ -53,8 +53,38 @@ public class Experiencia {
@JoinColumn
@JoinColumn
private
Postulante
postulante
;
private
Postulante
postulante
;
@ManyToOne
@Column
(
name
=
"tipo_experiencia"
)
@NotNull
private
TipoExperiencia
tipoExperiencia
;
private
TipoExperiencia
tipoExperiencia
;
@Column
(
name
=
"descripcion"
)
@NotBlank
private
String
descripcion
;
public
String
getDescripcion
()
{
return
descripcion
;
}
public
void
setDescripcion
(
String
descripcion
)
{
this
.
descripcion
=
descripcion
;
}
public
Date
getFechaDesde
()
{
return
fechaDesde
;
}
public
String
getMotivoSalida
()
{
return
motivoSalida
;
}
public
TipoExperiencia
getTipoExperiencia
()
{
return
tipoExperiencia
;
}
public
void
setMotivoSalida
(
String
motivoSalida
)
{
this
.
motivoSalida
=
motivoSalida
;
}
public
void
setTipoExperiencia
(
TipoExperiencia
tipoExperiencia
)
{
this
.
tipoExperiencia
=
tipoExperiencia
;
}
public
long
getId
()
{
public
long
getId
()
{
...
...
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaReconocimiento.java
deleted
100644 → 0
View file @
fe3075a0
package
com
.
roshka
.
modelo
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Table
(
name
=
"experiencia_reconocimiento"
)
public
class
ExperienciaReconocimiento
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Column
(
name
=
"id"
)
private
long
id
;
@ManyToOne
(
optional
=
false
)
@JoinColumn
@JsonBackReference
private
Experiencia
experiencia
;
@Column
(
name
=
"nombre"
)
private
String
nombre
;
@Column
(
name
=
"certificado"
)
private
String
certificado
;
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
public
Experiencia
getExperiencia
()
{
return
experiencia
;
}
public
void
setExperiencia
(
Experiencia
experiencia
)
{
this
.
experiencia
=
experiencia
;
}
public
String
getCertificado
()
{
return
certificado
;
}
public
String
getNombre
()
{
return
nombre
;
}
public
void
setCertificado
(
String
certificado
)
{
this
.
certificado
=
certificado
;
}
public
void
setNombre
(
String
nombre
)
{
this
.
nombre
=
nombre
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/ModalidadConverter.java
deleted
100644 → 0
View file @
fe3075a0
package
com
.
roshka
.
modelo
;
import
java.util.Arrays
;
import
javax.persistence.AttributeConverter
;
import
javax.persistence.Converter
;
@Converter
(
autoApply
=
true
)
public
class
ModalidadConverter
implements
AttributeConverter
<
Modalidad
,
String
>
{
@Override
public
String
convertToDatabaseColumn
(
Modalidad
modalidad
)
{
if
(
modalidad
==
null
)
{
return
null
;
}
return
modalidad
.
getCode
();
}
@Override
public
Modalidad
convertToEntityAttribute
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
return
Arrays
.
stream
(
Modalidad
.
values
())
.
filter
(
c
->
c
.
getCode
().
equals
(
code
))
.
findFirst
()
.
orElseThrow
(
IllegalArgumentException:
:
new
);
}
}
curriculumsearch/src/main/java/com/roshka/modelo/
Mod
alidad.java
→
curriculumsearch/src/main/java/com/roshka/modelo/
Nacion
alidad.java
View file @
cc771cb7
...
@@ -2,22 +2,16 @@ package com.roshka.modelo;
...
@@ -2,22 +2,16 @@ package com.roshka.modelo;
import
com.fasterxml.jackson.annotation.JsonValue
;
import
com.fasterxml.jackson.annotation.JsonValue
;
public
enum
Mod
alidad
{
public
enum
Nacion
alidad
{
P
RESENCIAL
(
"P"
,
"Presencial"
),
SEMIPRESENCIAL
(
"S"
,
"Semi Presencial"
),
REMOTO
(
"R"
,
"Remot
o"
);
P
Y
(
"Paraguayo"
),
EX
(
"Extranjer
o"
);
private
String
code
;
private
String
descripcion
;
private
String
descripcion
;
private
Modalidad
(
String
code
,
String
descripcion
)
{
private
Nacionalidad
(
String
descripcion
)
{
this
.
code
=
code
;
this
.
descripcion
=
descripcion
;
this
.
descripcion
=
descripcion
;
}
}
@JsonValue
@JsonValue
public
String
getCode
()
{
return
code
;
}
public
String
getDescripcion
()
{
public
String
getDescripcion
()
{
return
descripcion
;
return
descripcion
;
}
}
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
View file @
cc771cb7
...
@@ -68,11 +68,11 @@ public class Postulante {
...
@@ -68,11 +68,11 @@ public class Postulante {
@Column
(
name
=
"estado_civil"
)
@Column
(
name
=
"estado_civil"
)
@NotNull
@NotNull
private
String
estadoCivil
;
private
EstadoCivil
estadoCivil
;
@Column
(
name
=
"nacionalidad"
,
length
=
2
)
@Column
(
name
=
"nacionalidad"
,
length
=
2
)
@NotNull
@NotNull
private
String
nacionalidad
;
private
Nacionalidad
nacionalidad
;
@Column
(
name
=
"tipo_documento"
,
length
=
2
)
@Column
(
name
=
"tipo_documento"
,
length
=
2
)
@NotBlank
(
message
=
"este campo debe estar completo"
)
@NotBlank
(
message
=
"este campo debe estar completo"
)
...
@@ -212,23 +212,23 @@ public class Postulante {
...
@@ -212,23 +212,23 @@ public class Postulante {
public
void
setCiudadId
(
Long
ciudadId
)
{
public
void
setCiudadId
(
Long
ciudadId
)
{
this
.
ciudadId
=
ciudadId
;
this
.
ciudadId
=
ciudadId
;
}
}
public
void
setEstadoCivil
(
String
estadoCivil
)
{
public
void
setEstadoCivil
(
EstadoCivil
estadoCivil
)
{
this
.
estadoCivil
=
estadoCivil
;
this
.
estadoCivil
=
estadoCivil
;
}
}
public
void
setTipoDocumento
(
String
tipoDocumento
)
{
public
void
setTipoDocumento
(
String
tipoDocumento
)
{
this
.
tipoDocumento
=
tipoDocumento
;
this
.
tipoDocumento
=
tipoDocumento
;
}
}
public
String
getEstadoCivil
()
{
public
EstadoCivil
getEstadoCivil
()
{
return
estadoCivil
;
return
estadoCivil
;
}
}
public
String
getTipoDocumento
()
{
public
String
getTipoDocumento
()
{
return
tipoDocumento
;
return
tipoDocumento
;
}
}
public
String
getNacionalidad
()
{
public
Nacionalidad
getNacionalidad
()
{
return
nacionalidad
;
return
nacionalidad
;
}
}
public
void
setNacionalidad
(
String
nacionalidad
)
{
public
void
setNacionalidad
(
Nacionalidad
nacionalidad
)
{
this
.
nacionalidad
=
nacionalidad
;
this
.
nacionalidad
=
nacionalidad
;
}
}
...
...
curriculumsearch/src/main/java/com/roshka/modelo/TipoExperiencia.java
View file @
cc771cb7
package
com
.
roshka
.
modelo
;
package
com
.
roshka
.
modelo
;
import
javax.persistence.Column
;
import
com.fasterxml.jackson.annotation.JsonValue
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
public
enum
TipoExperiencia
{
TRABAJO_NORMAL
(
"Trabajo Normal"
),
PASANTIA
(
"Pasantia"
);
@Entity
@Table
(
name
=
"tipo_experiencia"
)
public
class
TipoExperiencia
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Column
(
name
=
"id"
)
private
long
id
;
@Column
(
name
=
"descripcion"
)
private
String
descripcion
;
private
String
descripcion
;
private
TipoExperiencia
(
String
descripcion
){
this
.
descripcion
=
descripcion
;
public
long
getId
()
{
return
id
;
}
public
void
setId
(
long
id
)
{
this
.
id
=
id
;
}
}
@JsonValue
public
String
getDescripcion
()
{
public
String
getDescripcion
()
{
return
descripcion
;
return
descripcion
;
}
}
public
void
setDescripcion
(
String
descripcion
)
{
this
.
descripcion
=
descripcion
;
}
}
}
curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaReconocimientoRepository.java
deleted
100644 → 0
View file @
fe3075a0
package
com
.
roshka
.
repositorio
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
com.roshka.modelo.ExperienciaReconocimiento
;
public
interface
ExperienciaReconocimientoRepository
extends
JpaRepository
<
ExperienciaReconocimiento
,
Long
>
{
}
curriculumsearch/src/main/resources/json/postulante.json
View file @
cc771cb7
[
[
{
{
"resumen"
:
"In irure aliquip qui cillum veniam sint amet amet sint ex proident anim mollit."
,
"resumen"
:
"In irure aliquip qui cillum veniam sint amet amet sint ex proident anim mollit."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Taylor"
,
"nombre"
:
"Taylor"
,
"apellido"
:
"Obrien"
,
"apellido"
:
"Obrien"
,
...
@@ -19,16 +19,11 @@
...
@@ -19,16 +19,11 @@
"institucion"
:
"Fanfare"
,
"institucion"
:
"Fanfare"
,
"fechaDesde"
:
"2014-09-10"
,
"fechaDesde"
:
"2014-09-10"
,
"fechaHasta"
:
"2016-01-01"
,
"fechaHasta"
:
"2016-01-01"
,
"tipoExperiencia"
:
"Trabajo Normal"
,
"cargo"
:
"dba"
,
"cargo"
:
"dba"
,
"descripcion"
:
"Enim qui Lorem ut magna."
,
"descripcion"
:
"Enim qui Lorem ut magna."
,
"nombreReferencia"
:
"Marissa"
,
"nombreReferencia"
:
"Marissa"
,
"telefonoReferencia"
:
"(804) 471-2089"
,
"telefonoReferencia"
:
"(804) 471-2089"
"reconocimientos"
:
[
{
"nombre"
:
"ganador de x"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -69,8 +64,8 @@
...
@@ -69,8 +64,8 @@
},
},
{
{
"resumen"
:
"Do nostrud aliqua adipisicing in sunt aute id do elit ut dolor ad aliquip."
,
"resumen"
:
"Do nostrud aliqua adipisicing in sunt aute id do elit ut dolor ad aliquip."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Hopkins"
,
"nombre"
:
"Hopkins"
,
"apellido"
:
"Parks"
,
"apellido"
:
"Parks"
,
...
@@ -90,13 +85,8 @@
...
@@ -90,13 +85,8 @@
"cargo"
:
"developer frontend"
,
"cargo"
:
"developer frontend"
,
"descripcion"
:
"Consequat fugiat qui sint deserunt ullamco."
,
"descripcion"
:
"Consequat fugiat qui sint deserunt ullamco."
,
"nombreReferencia"
:
"Iva"
,
"nombreReferencia"
:
"Iva"
,
"telefonoReferencia"
:
"(947) 580-2363"
,
"tipoExperiencia"
:
"Trabajo Normal"
,
"reconocimientos"
:
[
"telefonoReferencia"
:
"(947) 580-2363"
{
"nombre"
:
"ganador de x"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -125,8 +115,8 @@
...
@@ -125,8 +115,8 @@
},
},
{
{
"resumen"
:
"Occaecat non cupidatat amet reprehenderit consectetur ullamco et."
,
"resumen"
:
"Occaecat non cupidatat amet reprehenderit consectetur ullamco et."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Alejandra"
,
"nombre"
:
"Alejandra"
,
"apellido"
:
"Riggs"
,
"apellido"
:
"Riggs"
,
...
@@ -144,15 +134,10 @@
...
@@ -144,15 +134,10 @@
"fechaDesde"
:
"2014-08-26"
,
"fechaDesde"
:
"2014-08-26"
,
"fechaHasta"
:
"2016-01-01"
,
"fechaHasta"
:
"2016-01-01"
,
"cargo"
:
"dba"
,
"cargo"
:
"dba"
,
"tipoExperiencia"
:
"Trabajo Normal"
,
"descripcion"
:
"Aute culpa ea mollit adipisicing dolore dolore amet adipisicing occaecat commodo enim cillum."
,
"descripcion"
:
"Aute culpa ea mollit adipisicing dolore dolore amet adipisicing occaecat commodo enim cillum."
,
"nombreReferencia"
:
"Rose"
,
"nombreReferencia"
:
"Rose"
,
"telefonoReferencia"
:
"(853) 471-2006"
,
"telefonoReferencia"
:
"(853) 471-2006"
"reconocimientos"
:
[
{
"nombre"
:
"mejor alumno"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -181,8 +166,8 @@
...
@@ -181,8 +166,8 @@
},
},
{
{
"resumen"
:
"Qui ullamco excepteur velit ad ullamco id id nisi irure dolore cupidatat mollit ullamco veniam."
,
"resumen"
:
"Qui ullamco excepteur velit ad ullamco id id nisi irure dolore cupidatat mollit ullamco veniam."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Angelina"
,
"nombre"
:
"Angelina"
,
"apellido"
:
"Wallace"
,
"apellido"
:
"Wallace"
,
...
@@ -203,12 +188,7 @@
...
@@ -203,12 +188,7 @@
"descripcion"
:
"Aliquip occaecat minim dolor enim commodo."
,
"descripcion"
:
"Aliquip occaecat minim dolor enim commodo."
,
"nombreReferencia"
:
"Elba"
,
"nombreReferencia"
:
"Elba"
,
"telefonoReferencia"
:
"(881) 568-2597"
,
"telefonoReferencia"
:
"(881) 568-2597"
,
"reconocimientos"
:
[
"tipoExperiencia"
:
"Trabajo Normal"
{
"nombre"
:
"ganador de x"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -237,8 +217,8 @@
...
@@ -237,8 +217,8 @@
},
},
{
{
"resumen"
:
"Deserunt tempor ut et eiusmod et labore Lorem."
,
"resumen"
:
"Deserunt tempor ut et eiusmod et labore Lorem."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Rivas"
,
"nombre"
:
"Rivas"
,
"apellido"
:
"Owens"
,
"apellido"
:
"Owens"
,
...
@@ -259,12 +239,7 @@
...
@@ -259,12 +239,7 @@
"descripcion"
:
"Dolore nulla deserunt fugiat est reprehenderit tempor qui excepteur."
,
"descripcion"
:
"Dolore nulla deserunt fugiat est reprehenderit tempor qui excepteur."
,
"nombreReferencia"
:
"Crawford"
,
"nombreReferencia"
:
"Crawford"
,
"telefonoReferencia"
:
"(903) 568-2045"
,
"telefonoReferencia"
:
"(903) 568-2045"
,
"reconocimientos"
:
[
"tipoExperiencia"
:
"Trabajo Normal"
{
"nombre"
:
"ganador de x"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -293,8 +268,8 @@
...
@@ -293,8 +268,8 @@
},
},
{
{
"resumen"
:
"Aliqua est adipisicing do exercitation sit laborum aliquip aliqua adipisicing enim aute."
,
"resumen"
:
"Aliqua est adipisicing do exercitation sit laborum aliquip aliqua adipisicing enim aute."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Estelle"
,
"nombre"
:
"Estelle"
,
"apellido"
:
"Gamble"
,
"apellido"
:
"Gamble"
,
...
@@ -315,12 +290,7 @@
...
@@ -315,12 +290,7 @@
"descripcion"
:
"Do do est ad ea pariatur aliquip sit ipsum in duis laborum velit magna."
,
"descripcion"
:
"Do do est ad ea pariatur aliquip sit ipsum in duis laborum velit magna."
,
"nombreReferencia"
:
"Schultz"
,
"nombreReferencia"
:
"Schultz"
,
"telefonoReferencia"
:
"(903) 420-3902"
,
"telefonoReferencia"
:
"(903) 420-3902"
,
"reconocimientos"
:
[
"tipoExperiencia"
:
"Trabajo Normal"
{
"nombre"
:
"mejor alumno"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
@@ -349,8 +319,8 @@
...
@@ -349,8 +319,8 @@
},
},
{
{
"resumen"
:
"Officia eiusmod ut reprehenderit tempor consequat elit amet ex voluptate aute anim do."
,
"resumen"
:
"Officia eiusmod ut reprehenderit tempor consequat elit amet ex voluptate aute anim do."
,
"nacionalidad"
:
"
py
"
,
"nacionalidad"
:
"
Paraguayo
"
,
"estadoCivil"
:
"S
OLTERO
"
,
"estadoCivil"
:
"S
oltero
"
,
"tipoDocumento"
:
"ci"
,
"tipoDocumento"
:
"ci"
,
"nombre"
:
"Mariana"
,
"nombre"
:
"Mariana"
,
"apellido"
:
"Ratliff"
,
"apellido"
:
"Ratliff"
,
...
@@ -371,12 +341,8 @@
...
@@ -371,12 +341,8 @@
"descripcion"
:
"Anim labore anim veniam deserunt ex aute."
,
"descripcion"
:
"Anim labore anim veniam deserunt ex aute."
,
"nombreReferencia"
:
"Francesca"
,
"nombreReferencia"
:
"Francesca"
,
"telefonoReferencia"
:
"(961) 420-2150"
,
"telefonoReferencia"
:
"(961) 420-2150"
,
"reconocimientos"
:
[
"tipoExperiencia"
:
"Trabajo Normal"
{
"nombre"
:
"ganador de x"
,
"certificado"
:
"cert"
}
]
}
}
],
],
"estudios"
:
[
"estudios"
:
[
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
cc771cb7
...
@@ -253,6 +253,27 @@ function eliminarEstudio(event) {
...
@@ -253,6 +253,27 @@ function eliminarEstudio(event) {
//evento para cambio de ciudad segun departamento
const
depSelect
=
document
.
querySelector
(
"#departamentos"
);
depSelect
.
addEventListener
(
"change"
,
evt
=>
listarCiudades
(
evt
.
target
.
value
))
listarCiudades
(
depSelect
.
value
);
//variable ciudades esta declarada en el jsp
/**
* Listar todas las ciudades en el select de ciudades
* @param {*} depId
*/
function
listarCiudades
(
depId
){
const
ciuAmostrar
=
ciudades
.
filter
(
c
=>
c
.
departamentoId
==
depId
);
const
ciudad
=
document
.
querySelector
(
"select[name=ciudadId]"
);
const
frag
=
document
.
createDocumentFragment
();
for
(
const
ciu
of
ciuAmostrar
)
{
const
opt
=
document
.
createElement
(
"option"
);
opt
.
value
=
ciu
.
id
;
opt
.
innerHTML
=
ciu
.
nombre
;
opt
.
setAttribute
(
"data-departamentoId"
,
ciu
.
departamentoId
);
frag
.
appendChild
(
opt
)
}
ciudad
.
replaceChildren
(
frag
);
}
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
cc771cb7
...
@@ -171,7 +171,23 @@
...
@@ -171,7 +171,23 @@
Luce Bien!
Luce Bien!
</div>
</div>
</div>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"nacionalidad"
class=
"form-label"
>
Nacionalidad
</label>
<select
name=
"nacionalidad"
id=
"nacionalidad"
class=
"bg-light"
>
<c:forEach
items=
"${nacionalidades}"
var=
"nacionalidad"
>
<option
value=
"${nacionalidad.getDescripcion()}"
>
${nacionalidad.getDescripcion()}
</option>
</c:forEach>
</select>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"tipoDocumento"
class=
"form-label"
>
Tipo de documento
</label>
<input
type=
"text"
name=
"tipoDocumento"
class=
"form-control "
id=
"tipoDocumento"
required
>
<div
class=
"valid-feedback"
>
Luce Bien!
</div>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"ci"
class=
"form-label"
>
Cedula de identidad
</label>
<label
for=
"ci"
class=
"form-label"
>
Cedula de identidad
</label>
...
@@ -181,13 +197,23 @@
...
@@ -181,13 +197,23 @@
</div>
</div>
</div>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<div
class=
"inputs mb-3 col-md-6"
>
<label
form=
"ciudad"
class=
"form-label"
>
Ciudad
</label>
<label
for=
"departamentos"
class=
"form-label"
>
Departamentos
</label>
<input
type=
"text"
name=
"ciudad"
class=
"form-control "
id=
"ciudad"
required
>
<select
id=
"departamentos"
class=
"bg-light"
>
<div
class=
"valid-feedback"
>
<c:forEach
items=
"${departamentos}"
var=
"departamentos"
>
Luce Bien!
<option
value=
"${departamentos.getId()}"
>
${departamentos.getNombre()}
</option>
</div>
</c:forEach>
</select>
</div>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"ciudad"
class=
"form-label"
>
Ciudad
</label>
<select
name=
"ciudadId"
id=
"ciudad"
class=
"bg-light"
>
</select>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"telefono"
class=
"form-label"
>
Telefono
</label>
<label
for=
"telefono"
class=
"form-label"
>
Telefono
</label>
<input
type=
"number"
name=
"telefono"
class=
"form-control "
id=
"telefono"
required
>
<input
type=
"number"
name=
"telefono"
class=
"form-control "
id=
"telefono"
required
>
...
@@ -225,10 +251,10 @@
...
@@ -225,10 +251,10 @@
</select>
</div>
</select>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"
modalidad"
class=
"form-label"
>
Modalidad
</label>
<label
for=
"
estadoCivil"
class=
"form-label"
>
Estado Civil
</label>
<select
name=
"
modalidad"
id=
"modalidad
"
class=
"bg-light"
>
<select
name=
"
estadoCivil"
id=
"estadoCivil
"
class=
"bg-light"
>
<c:forEach
items=
"${
modalidades}"
var=
"modalidad
"
>
<c:forEach
items=
"${
estadosCiviles}"
var=
"estadoCivil
"
>
<option
value=
"${
modalidad.getCode()}"
>
${modalidad
.getDescripcion()}
</option>
<option
value=
"${
estadoCivil.getDescripcion()}"
>
${estadoCivil
.getDescripcion()}
</option>
</c:forEach>
</c:forEach>
...
@@ -316,35 +342,22 @@
...
@@ -316,35 +342,22 @@
<label
for=
"refTel"
class=
"form-label"
>
Telefono de la Referencia
</label>
<label
for=
"refTel"
class=
"form-label"
>
Telefono de la Referencia
</label>
<input
type=
"text"
class=
"form-control "
name=
"telefonoReferencia"
id=
"refTel"
>
<input
type=
"text"
class=
"form-control "
name=
"telefonoReferencia"
id=
"refTel"
>
</div>
</div>
<div
class=
"inputs"
>
<label
for=
"motivoSalida"
class=
"form-label"
>
Motivo de Salida
</label>
<textarea
class=
"form-control "
name=
"motivoSalida"
id=
"motivoSalida"
></textarea>
</div>
<div
class=
"inputs"
>
<label
for=
"tipoExperiencia"
class=
"form-label"
>
Tipo de Experiencia
</label>
<select
name=
"tipoExperiencia"
id=
"tipoExperiencia"
class=
"bg-light"
>
<c:forEach
items=
"${tiposExperencia}"
var=
"tipoExperiencia"
>
<option
value=
"${tipoExperiencia.getDescripcion()}"
>
${tipoExperiencia.getDescripcion()}
</option>
</c:forEach>
</select>
</div>
<div
class=
"inputs"
>
<label
class=
"form-label"
>
Reconocimientos
</label>
</div>
<div
class=
"row mb-3"
>
<div
class=
"inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-0"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
" inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-0"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
<div
class=
"row mb-3"
>
<div
class=
"inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-1"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
"inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-1"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
<div
class=
"row mb-3"
>
<div
class=
"inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-2"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
"inputs col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-2"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
</form>
</form>
</div>
</div>
...
@@ -460,6 +473,10 @@
...
@@ -460,6 +473,10 @@
<script
src=
"https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity=
"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin=
"anonymous"
></script>
<script
src=
"https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity=
"sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity=
"sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin=
"anonymous"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity=
"sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin=
"anonymous"
></script>
<script
src=
"https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
integrity=
"sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy"
crossorigin=
"anonymous"
></script>
<script>
var
ciudades
=
$
{
ciudades
};
</script>
<script
src=
"./main.js"
></script>
<script
src=
"./main.js"
></script>
</body>
</body>
</html>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment