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
1
Merge Requests
1
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
Oscar Enrique Gonzalez Escurra
th-app-java
Commits
9d28912b
Commit
9d28912b
authored
Nov 12, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'William_001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into giuli_001
parents
d8e3eeb7
f5616336
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
611 additions
and
347 deletions
+611
-347
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
+17
-53
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
+22
-1
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+67
-48
curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulante.java
+14
-0
curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java
+35
-0
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
+20
-0
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+24
-2
curriculumsearch/src/main/webapp/jsp/cargo-form.jsp
+50
-25
curriculumsearch/src/main/webapp/jsp/cargos.jsp
+57
-40
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
+32
-26
curriculumsearch/src/main/webapp/jsp/convocatorias.jsp
+55
-50
curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp
+47
-8
curriculumsearch/src/main/webapp/jsp/header.jsp
+51
-4
curriculumsearch/src/main/webapp/jsp/index.jsp
+7
-11
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+57
-35
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
+18
-12
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
+38
-32
No files found.
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
View file @
9d28912b
...
...
@@ -5,8 +5,11 @@ import java.io.InputStream;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.type.TypeFactory
;
import
com.roshka.modelo.*
;
import
com.roshka.repositorio.*
;
...
...
@@ -35,48 +38,12 @@ public class CurriculumsearchApplication {
return
args
->
{
try
{
// read json and write to db
ObjectMapper
mapper
=
new
ObjectMapper
();
TypeReference
<
List
<
Departamento
>>
typeReference1
=
new
TypeReference
<
List
<
Departamento
>>(){};
InputStream
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/Departamento.json"
);
List
<
Departamento
>
departamento
=
mapper
.
readValue
(
inputStream
,
typeReference1
);
depR
.
saveAll
(
departamento
);
System
.
out
.
println
(
"Departamentos Saved!"
);
TypeReference
<
List
<
Ciudad
>>
typeReference2
=
new
TypeReference
<
List
<
Ciudad
>>(){};
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/Ciudad.json"
);
List
<
Ciudad
>
ciudades
=
mapper
.
readValue
(
inputStream
,
typeReference2
);
ciudR
.
saveAll
(
ciudades
);
System
.
out
.
println
(
"Cuidad Saved!"
);
TypeReference
<
List
<
Cargo
>>
typeReference3
=
new
TypeReference
<
List
<
Cargo
>>(){};
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/cargo.json"
);
List
<
Cargo
>
cargos
=
mapper
.
readValue
(
inputStream
,
typeReference3
);
cargoR
.
saveAll
(
cargos
);
cargoR
.
flush
();
System
.
out
.
println
(
"Cargos Saved!"
);
/* TypeReference<List<Tecnologia>> typeReference5 = new TypeReference<List<Tecnologia>>(){};
inputStream = TypeReference.class.getResourceAsStream("/json/tecnologia.json");
List<Tecnologia> tecnologias= mapper.readValue(inputStream,typeReference5);
tecRepo.saveAll(tecnologias);
tecRepo.flush();
System.out.println("Cargos Saved!"); */
TypeReference
<
List
<
ConvocatoriaCargo
>>
typeReference4
=
new
TypeReference
<
List
<
ConvocatoriaCargo
>>(){};
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/convocatoria.json"
);
List
<
ConvocatoriaCargo
>
convocatorias
=
mapper
.
readValue
(
inputStream
,
typeReference4
);
convocatorias
=
convR
.
saveAll
(
convocatorias
);
convR
.
flush
();
System
.
out
.
println
(
"convocatorias Saved!"
);
TypeReference
<
List
<
Postulante
>>
typeReference
=
new
TypeReference
<
List
<
Postulante
>>(){};
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/postulante.json"
);
List
<
Postulante
>
postulantes
=
mapper
.
readValue
(
inputStream
,
typeReference
);
/* for (Postulante postulante : postulantes) {
for (int i = 0; i < postulante.getPostulaciones().size(); i++) {
postulante.getPostulaciones().set(i, convR.getById(postulante.getPostulaciones().get(i).getId()));
}
} */
postRepo
.
saveAll
(
postulantes
);
System
.
out
.
println
(
"postulantes Saved!"
);
guardarJson
(
cargoR
,
"/json/cargo.json"
,
Cargo
.
class
);
guardarJson
(
convR
,
"/json/convocatoria.json"
,
ConvocatoriaCargo
.
class
);
guardarJson
(
depR
,
"/json/Departamento.json"
,
Departamento
.
class
);
guardarJson
(
ciudR
,
"/json/Ciudad.json"
,
Ciudad
.
class
);
guardarJson
(
postRepo
,
"/json/postulante.json"
,
Postulante
.
class
);
String
password
=
new
BCryptPasswordEncoder
().
encode
(
"test"
);
RRHHUser
testuser
=
new
RRHHUser
();
testuser
.
setEmail
(
"test@test.com"
);
...
...
@@ -106,20 +73,17 @@ public class CurriculumsearchApplication {
};
}
public
static
<
Q
,
T
extends
JpaRepository
<
Q
,
Long
>>
void
guardarJson
(
T
repo
,
String
srcJson
)
{
public
static
<
Q
,
T
extends
JpaRepository
<
Q
,
Long
>>
void
guardarJson
(
T
repo
,
String
srcJson
,
Class
<
Q
>
clazz
)
throws
JsonParseException
,
JsonMappingException
,
IOException
{
ObjectMapper
mapper
=
new
ObjectMapper
();
TypeReference
<
List
<
Q
>>
typeReference1
=
new
TypeReference
<
List
<
Q
>>(){};
TypeFactory
t
=
TypeFactory
.
defaultInstance
();
//TypeReference<List<Q>> typeReference1 = new TypeReference<List<Q>>(){};
InputStream
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
srcJson
);
List
<
Q
>
listaAguardar
;
try
{
listaAguardar
=
mapper
.
readValue
(
inputStream
,
typeReference1
);
repo
.
saveAll
(
listaAguardar
);
repo
.
flush
();
System
.
out
.
println
(
srcJson
+
" Saved!"
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
listaAguardar
=
mapper
.
readValue
(
inputStream
,
t
.
constructCollectionType
(
ArrayList
.
class
,
clazz
));
repo
.
saveAll
(
listaAguardar
);
repo
.
flush
();
System
.
out
.
println
(
srcJson
+
" Saved!"
);
}
...
...
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
View file @
9d28912b
...
...
@@ -2,7 +2,9 @@ package com.roshka.DTO;
import
java.util.List
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.PostulanteTecnologia
;
public
class
PostulanteListaDTO
{
...
...
@@ -13,8 +15,11 @@ public class PostulanteListaDTO {
private
Long
nivelIngles
;
private
Long
experienciaMeses
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
private
EstadoPostulante
estado
;
private
List
<
ConvocatoriaCargo
>
convocatoria
;
public
PostulanteListaDTO
(
Long
id
,
String
nombre
,
String
apellido
,
Disponibilidad
disponibilidad
,
Long
nivelIngles
,
Long
experienciaMeses
,
List
<
PostulanteTecnologia
>
tecnologias
)
{
Long
nivelIngles
,
Long
experienciaMeses
,
List
<
PostulanteTecnologia
>
tecnologias
,
EstadoPostulante
estado
,
List
<
ConvocatoriaCargo
>
convocatoria
)
{
this
.
id
=
id
;
this
.
nombre
=
nombre
;
this
.
apellido
=
apellido
;
...
...
@@ -22,6 +27,8 @@ public class PostulanteListaDTO {
this
.
nivelIngles
=
nivelIngles
;
this
.
experienciaMeses
=
experienciaMeses
;
this
.
tecnologias
=
tecnologias
;
this
.
estado
=
estado
;
this
.
convocatoria
=
convocatoria
;
}
public
Long
getId
()
{
return
id
;
...
...
@@ -65,6 +72,20 @@ public class PostulanteListaDTO {
public
void
setTecnologias
(
List
<
PostulanteTecnologia
>
tecnologias
)
{
this
.
tecnologias
=
tecnologias
;
}
public
EstadoPostulante
getEstado
(){
return
estado
;
}
public
void
setEstado
(
EstadoPostulante
estado
){
this
.
estado
=
estado
;
}
public
List
<
ConvocatoriaCargo
>
getConvocatoria
()
{
return
this
.
convocatoria
;
}
public
void
setConvocatoria
(
List
<
ConvocatoriaCargo
>
convocatoria
)
{
this
.
convocatoria
=
convocatoria
;
}
...
...
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
9d28912b
...
...
@@ -14,6 +14,7 @@ import com.roshka.modelo.*;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.EstadoCivil
;
import
com.roshka.modelo.Nacionalidad
;
import
com.roshka.modelo.Postulante
;
...
...
@@ -42,6 +43,7 @@ import org.springframework.http.HttpStatus;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -90,12 +92,14 @@ public class PostulanteController {
public
String
postulantes
(
Model
model
,
@RequestParam
(
required
=
false
)
Long
tecId
,
@RequestParam
(
required
=
false
)
String
nombre
,
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
Disponibilidad
dispo
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
Long
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
5
;
...
...
@@ -103,7 +107,9 @@ public class PostulanteController {
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"institucionesEducativas"
,
institucionRepository
.
findAll
());
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
dispo
,
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
);
model
.
addAttribute
(
"estadoP"
,
EstadoPostulante
.
values
());
model
.
addAttribute
(
"convocatoriaC"
,
cargoRepo
.
findAll
());
Page
<
Postulante
>
postulantesPag
=
post
.
postulantesMultiFiltro
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
dispo
,
lvlEng
,
lvlTec
,
tecId
,
instId
,
cargoId
,
page
,
estado
,
convId
);
List
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
...
...
@@ -115,14 +121,14 @@ public class PostulanteController {
expTotal
+=
Helper
.
getMonthsDifference
(
experiencia
.
getFechaDesde
(),
experiencia
.
getFechaHasta
());
}
if
(
expInMonths
!=
null
&&
expInMonths
>
expTotal
)
continue
;
postulantesDTO
.
add
(
new
PostulanteListaDTO
(
postulante
.
getId
(),
postulante
.
getNombre
(),
postulante
.
getApellido
(),
postulante
.
getDisponibilidad
(),
postulante
.
getNivelIngles
(),
expTotal
,
postulante
.
getTecnologias
()));
postulantesDTO
.
add
(
new
PostulanteListaDTO
(
postulante
.
getId
(),
postulante
.
getNombre
(),
postulante
.
getApellido
(),
postulante
.
getDisponibilidad
(),
postulante
.
getNivelIngles
(),
expTotal
,
postulante
.
getTecnologias
()
,
postulante
.
getEstadoPostulante
(),
postulante
.
getPostulaciones
()
));
}
model
.
addAttribute
(
"pages"
,
postulantesPag
.
getTotalPages
());
model
.
addAttribute
(
"postulantes"
,
postulantesDTO
);
return
"postulantes"
;
}
@RequestMapping
(
"/postulante"
)
public
String
getFormPostulante
(
Model
model
){
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
...
...
@@ -140,10 +146,10 @@ public class PostulanteController {
er
.
printStackTrace
();
}
model
.
addAttribute
(
"departamentos"
,
depRepo
.
findAll
());
return
"postulante-form"
;
}
@PostMapping
(
value
=
"/postulante"
,
consumes
=
"application/json"
)
public
String
guardarPostulante
(
@RequestBody
Postulante
postulante
){
//Codigo encargado de modificar postulacion si se envia mismo CI
...
...
@@ -155,31 +161,31 @@ public class PostulanteController {
postulante
.
setId
(
postulantex
.
getId
());
}
postulante
.
getTecnologias
().
stream
().
filter
(
tec
->
tec
.
getTecnologia
().
getId
()
!=
0
tec
->
tec
.
getTecnologia
().
getId
()
!=
0
).
forEach
(
tec
->
tec
.
setTecnologia
(
tecRepo
.
getById
(
tec
.
getTecnologia
().
getId
()))
);
/* for (int i = 0; i < postulante.getPostulaciones().size(); i++) {
postulante.getPostulaciones().set(i, cargoRepo.getById(postulante.getPostulaciones().get(i).getId()));
}
*/
for
(
Estudio
estudio:
postulante
.
getEstudios
()){
String
nombreIns
=
""
;
nombreIns
=
estudio
.
getInstitucion
().
getNombre
().
toLowerCase
();
Institucion
institucion
=
institucionRepository
.
findByNombre
(
nombreIns
);
if
(
institucion
==
null
){
institucionRepository
.
save
(
estudio
.
getInstitucion
());
}
else
{
estudio
.
setInstitucion
(
institucion
);
tec
->
tec
.
setTecnologia
(
tecRepo
.
getById
(
tec
.
getTecnologia
().
getId
()))
);
/* for (int i = 0; i < postulante.getPostulaciones().size(); i++) {
postulante.getPostulaciones().set(i, cargoRepo.getById(postulante.getPostulaciones().get(i).getId()));
}
*/
for
(
Estudio
estudio:
postulante
.
getEstudios
()){
String
nombreIns
=
""
;
nombreIns
=
estudio
.
getInstitucion
().
getNombre
().
toLowerCase
();
Institucion
institucion
=
institucionRepository
.
findByNombre
(
nombreIns
);
if
(
institucion
==
null
){
institucionRepository
.
save
(
estudio
.
getInstitucion
());
}
else
{
estudio
.
setInstitucion
(
institucion
);
}
}
post
.
save
(
postulante
);
return
"redirect:/postulacion-correcta"
;
}
}
post
.
save
(
postulante
);
return
"redirect:/postulacion-correcta"
;
}
@GetMapping
(
"/postulacion-correcta"
)
public
String
successPostulation
(
Model
model
){
@GetMapping
(
"/postulacion-correcta"
)
public
String
successPostulation
(
Model
model
){
model
.
addAttribute
(
"mensaje1"
,
"Tu informacion se ha recibido correctamente!"
);
model
.
addAttribute
(
"mensaje2"
,
" espera por que nos pongamos en contacto!"
);
return
"exitoRegistro"
;
...
...
@@ -188,26 +194,38 @@ public class PostulanteController {
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ExceptionHandler
({
MethodArgumentNotValidException
.
class
})
public
ResponseEntity
<
String
>
handleValidationExceptions
(
MethodArgumentNotValidException
ex
)
{
MethodArgumentNotValidException
ex
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
.
body
(
ex
.
getMessage
());
}
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ExceptionHandler
({
ConstraintViolationException
.
class
})
public
ResponseEntity
<
String
>
handleValidationExceptions2
(
ConstraintViolationException
ex
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
.
body
(
ex
.
getMessage
());
}
@GetMapping
({
"/postulante/{postulanteId}"
})
public
String
getPostulanteDetalle
(
Model
model
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
Postulante
p
=
post
.
findById
(
postulanteId
).
orElse
(
null
);
model
.
addAttribute
(
"postulante"
,
p
);
return
"detallepostulante"
;
}
}
}
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ExceptionHandler
({
ConstraintViolationException
.
class
})
public
ResponseEntity
<
String
>
handleValidationExceptions2
(
ConstraintViolationException
ex
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
.
body
(
ex
.
getMessage
());
}
@GetMapping
({
"/postulante/{postulanteId}"
})
public
String
getPostulanteDetalle
(
Model
model
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
Postulante
p
=
post
.
findById
(
postulanteId
).
orElse
(
null
);
model
.
addAttribute
(
"postulante"
,
p
);
model
.
addAttribute
(
"estadoP"
,
EstadoPostulante
.
values
());
return
"detallepostulante"
;
}
@PostMapping
({
"/postulante/{postulanteId}"
})
public
String
setPostulanteEstado
(
@ModelAttribute
Postulante
postulante
,
BindingResult
result
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
//post.setPostulanteEstadoAndComentario(postulante.getEstadoPostulante(),postulante.getComentarioRRHH(), postulante.getId());
Postulante
postulanteVd
=
post
.
getById
(
postulanteId
);
postulanteVd
.
setEstadoPostulante
(
postulante
.
getEstadoPostulante
());
postulanteVd
.
setComentarioRRHH
(
postulante
.
getComentarioRRHH
());
post
.
setPostulanteEstadoAndComentario
(
postulante
.
getEstadoPostulante
(),
postulante
.
getComentarioRRHH
(),
postulanteId
);
//post.save(postulanteVd);
return
"redirect:/postulante/"
+
postulanteId
;
}
}
\ No newline at end of file
curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulante.java
0 → 100644
View file @
9d28912b
package
com
.
roshka
.
modelo
;
public
enum
EstadoPostulante
{
NUEVO
(
"Nuevo"
),
CONTACTADO
(
"Contactado"
),
RECHAZADO
(
"Rechazado"
),
CONTRADADO
(
"Contradado"
),
VOLVERLLAMAR
(
"Volver a llamar"
);
private
final
String
estado
;
EstadoPostulante
(
String
estado
){
this
.
estado
=
estado
;
}
public
String
getEstado
(){
return
this
.
estado
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java
0 → 100644
View file @
9d28912b
package
com
.
roshka
.
modelo
;
import
java.util.Arrays
;
import
javax.persistence.AttributeConverter
;
import
javax.persistence.Converter
;
@Converter
(
autoApply
=
true
)
public
class
EstadoPostulanteConverter
implements
AttributeConverter
<
EstadoPostulante
,
String
>,
org
.
springframework
.
core
.
convert
.
converter
.
Converter
<
String
,
EstadoPostulante
>
{
@Override
public
String
convertToDatabaseColumn
(
EstadoPostulante
modalidad
)
{
if
(
modalidad
==
null
)
{
return
null
;
}
return
modalidad
.
getEstado
();
}
@Override
public
EstadoPostulante
convertToEntityAttribute
(
String
estado
)
{
if
(
estado
==
null
)
{
return
null
;
}
return
Arrays
.
stream
(
EstadoPostulante
.
values
())
.
filter
(
c
->
c
.
getEstado
().
equals
(
estado
))
.
findFirst
()
.
orElseThrow
(
IllegalArgumentException:
:
new
);
}
@Override
public
EstadoPostulante
convert
(
String
arg0
)
{
return
convertToEntityAttribute
(
arg0
);
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
View file @
9d28912b
...
...
@@ -72,6 +72,13 @@ public class Postulante {
@Column
(
name
=
"estado_civil"
)
@NotNull
private
EstadoCivil
estadoCivil
;
@Column
(
name
=
"estado_postulante"
)
@NotNull
private
EstadoPostulante
estadoPostulante
=
EstadoPostulante
.
NUEVO
;
@Column
(
name
=
"comentario_rrhh"
)
private
String
comentarioRRHH
;
@Column
(
name
=
"nacionalidad"
,
length
=
2
)
@NotNull
...
...
@@ -271,4 +278,17 @@ public class Postulante {
public
List
<
ReferenciaPersonal
>
getReferencias
()
{
return
referencias
;
}
public
EstadoPostulante
getEstadoPostulante
()
{
return
this
.
estadoPostulante
;
}
public
void
setEstadoPostulante
(
EstadoPostulante
estadoPostulante
)
{
this
.
estadoPostulante
=
estadoPostulante
;
}
public
String
getComentarioRRHH
(){
return
comentarioRRHH
;
}
public
void
setComentarioRRHH
(
String
comentarioRRHH
){
this
.
comentarioRRHH
=
comentarioRRHH
;
}
}
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
9d28912b
...
...
@@ -2,13 +2,18 @@ package com.roshka.repositorio;
import
java.util.List
;
import
javax.transaction.Transactional
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.Postulante
;
...
...
@@ -55,7 +60,24 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"and (pt.nivel >= ?4 or ?4 is null) "
+
"and (pt.tecnologia.id = ?5 or ?5 is null) "
+
" and (e.institucion.id = ?6 or ?6 is null ) "
+
" and (conv.cargoId = ?7 or ?7 is null ) "
)
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Disponibilidad
disponibilidad
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
);
" and (conv.cargoId = ?7 or ?7 is null ) "
+
"and (p.estadoPostulante = ?8 or ?8 is null) "
+
" and (conv.id=?9 or ?9 is null ) "
)
public
Page
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Disponibilidad
disponibilidad
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
,
Long
cargoId
,
Pageable
pageable
,
EstadoPostulante
estado
,
Long
convo
);
@Transactional
@Modifying
@Query
(
"UPDATE Postulante p SET p.estadoPostulante = ?1 , p.comentarioRRHH = ?2 WHERE p.id = ?3"
)
void
setPostulanteEstadoAndComentario
(
EstadoPostulante
eP
,
String
comentario
,
Long
Id
);
/*@Transactional
@Modifying
@Query("UPDATE Postulante p SET p.estadoPostulante = ?1 WHERE p.id = ?2")
void setPostulanteEstadoPostulante(EstadoPostulante eP, Long Id);
@Transactional
@Modifying
@Query("UPDATE Postulante p SET p.comentarioRRHH = ?1 WHERE p.id = ?2")
void setPostulanteEstadoComentario( String comentario, Long Id);*/
}
curriculumsearch/src/main/webapp/jsp/cargo-form.jsp
View file @
9d28912b
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<head>
<meta
charset=
"UTF-8"
/
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/
>
<title>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<div
class=
"container"
>
<form:form
action=
"/cargo/${cargo.id == null ? '' : cargo.id}"
method=
"post"
modelAttribute=
"cargo"
class=
"row row-cols-lg-auto g-3 align-items-center"
>
<div
class=
"col-12"
>
<form:label
class=
"form-label visually-hidden"
path=
"nombre"
>
Nombre del cargo
</form:label>
<form:input
type=
"text"
path=
"nombre"
class=
"form-control"
placeholder=
"Nombre del cargo"
/>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
/>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Agregar Cargo
</h2>
<div
class=
"p-3 mb-2 bg-light text-dark border border-light"
>
<form:form
action=
"/cargo/${cargo.id == null ? '' : cargo.id}"
method=
"post"
modelAttribute=
"cargo"
class=
"row row-cols-lg-auto g-3 align-items-center"
>
<div
class=
"col-12"
>
<form:label
class=
"form-label visually-hidden"
path=
"nombre"
>
Nombre del cargo
</form:label>
<form:input
type=
"text"
path=
"nombre"
class=
"form-control"
placeholder=
"Nombre del cargo"
required=
"true"
/>
</div>
<div
class=
"col-12"
>
<input
type=
"submit"
value=
"Guardar"
class=
"btn btn-primary"
/>
</div>
</form:form>
</div>
<div
class=
"col-12"
>
<input
type=
"submit"
value=
"Guardar"
class=
"btn btn-primary"
/>
</div>
</form:form>
</div>
</body>
</html>
\ No newline at end of file
</div>
</body>
</html>
curriculumsearch/src/main/webapp/jsp/cargos.jsp
View file @
9d28912b
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<head>
<meta
charset=
"UTF-8"
/
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/
>
<title>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body
class=
"container"
>
<div>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
/>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Lista de cargos
</h2>
<div>
<form>
<label
for=
"cargos"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
>
<label
for=
"cargos"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
/>
</form>
<a
href=
"/cargo"
>
Agregar Nuevo Cargo
</a>
</div>
<div>
</div>
<div>
<table
class=
"table"
>
<thead>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${cargos}"
var=
"cargo"
varStatus=
"sta"
>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${cargo.getNombre()}
</td>
<td>
<a
href=
"/convocatorias?cargoId=${cargo.id}"
>
Ver Convocatorias
</a
>
</td>
<td><a
href=
"/cargo/${cargo.id}"
>
Editar cargo
</a></td>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${cargos}"
var=
"cargo"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${cargo.getNombre()}
</td>
<td><a
href=
"/convocatorias?cargoId=${cargo.id}"
>
Ver Convocatorias
</a></td>
<td><a
href=
"/cargo/${cargo.id}"
>
Editar cargo
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</c:forEach>
</tbody>
</table>
</div>
</div>
</body>
</html>
\ No newline at end of file
</body>
</html>
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
View file @
9d28912b
...
...
@@ -7,36 +7,41 @@
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
C
argo
</title>
<title>
C
onvocatoria
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<div
class=
"container"
>
<form:form
action=
"/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}"
method=
"post"
modelAttribute=
"convocatoria"
>
<div
class=
"mb-3"
>
<form:label
path=
"fechaInicioS"
class=
"form-label"
>
Fecha inicial
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaInicioS"
/>
</div>
<div
class=
"mb-3"
>
<form:label
path=
"fechaFinS"
class=
"form-label"
>
Fecha Fin
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaFinS"
/>
</div>
<div
class=
"mb-3"
>
<form:label
path=
"cupos"
class=
"form-label"
>
Cupos:
</form:label>
<form:input
type=
"number"
class=
"form-control"
path=
"cupos"
/>
</div>
<div
class=
"mb-3 form-check"
>
<form:label
path=
"cargoId"
class=
"form-label"
>
Cargo
</form:label>
<form:select
class=
"form-select"
path=
"cargoId"
>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<form:option
value=
"${cargo.id}"
>
${cargo.nombre}
</form:option>
</c:forEach>
</form:select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Guardar
</button>
</form:form>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Agregar Convocatoria
</h2>
<div
class=
"p-3 mb-2 bg-light text-dark border border-light "
>
<form:form
action=
"/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}"
method=
"post"
modelAttribute=
"convocatoria"
>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"fechaInicioS"
class=
"form-label"
>
Fecha inicial
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaInicioS"
required=
"true"
/>
</div>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"fechaFinS"
class=
"form-label"
>
Fecha Fin
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaFinS"
required=
"true"
/>
</div>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"cupos"
class=
"form-label"
>
Cupos:
</form:label>
<form:input
type=
"number"
class=
"form-control"
path=
"cupos"
required=
"true"
/>
</div>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"cargoId"
class=
"form-label"
>
Cargo
</form:label>
<form:select
class=
"form-select"
path=
"cargoId"
required=
"true"
>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<form:option
value=
"${cargo.id}"
>
${cargo.nombre}
</form:option>
</c:forEach>
</form:select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Guardar
</button>
</form:form>
</div>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/convocatorias.jsp
View file @
9d28912b
...
...
@@ -11,57 +11,62 @@
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body
class=
"container"
>
<div>
<form>
<label
for=
"cargos"
>
Cargos:
</label>
<select
class=
"form-select"
name=
"cargoId"
id=
"cargos"
>
<option
value=
""
>
Todos los cargos
</option>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<option
value=
"${cargo.id}"
${
param
.
cargoId =
=
cargo
.
id
?
"
selected
"
:
""}
>
${cargo.nombre}
</option>
</c:forEach>
</select>
Estado:
<input
type=
"radio"
id=
"cualquiera"
name=
"isOpen"
checked
value=
""
>
<label
for=
"abierto"
>
Cualquiera
</label><br>
<input
type=
"radio"
id=
"abierto"
name=
"isOpen"
value=
"1"
>
<label
for=
"abierto"
>
Abierto
</label><br>
<input
type=
"radio"
id=
"cerrado"
name=
"isOpen"
value=
"0"
>
<label
for=
"cerrado"
>
Cerrado
</label><br>
<input
type=
"submit"
value=
"Buscar"
>
</form>
</div>
<div>
<a
href=
"/convocatoria"
>
Agregar Nueva Convocatoria
</a>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
<th
scope=
"col"
>
Fecha Desde
</th>
<th
scope=
"col"
>
Fecha Hasta
</th>
<th
scope=
"col"
>
Vacantes
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${convocatorias}"
var=
"convocatoria"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${convocatoria.getCargo().getNombre()}
</td>
<td>
${convocatoria.getFechaInicio().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getFechaFin().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getCupos()}
</td>
<td>
Ver Postulantes
</td>
<td><a
href=
"/convocatoria/${convocatoria.id}"
>
Editar
</a></td>
</tr>
</c:forEach>
<body
>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Lista de convocatorias
</h2>
<div>
<form>
<label
for=
"cargos"
>
Cargos:
</label>
<select
name=
"cargoId"
id=
"cargos"
>
<option
value=
""
>
Todos los cargos
</option>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<option
value=
"${cargo.id}"
${
param
.
cargoId =
=
cargo
.
id
?
"
selected
"
:
""}
>
${cargo.nombre}
</option>
</c:forEach>
</select>
Estado:
<input
type=
"radio"
id=
"cualquiera"
name=
"isOpen"
checked
value=
""
>
<label
for=
"abierto"
>
Cualquiera
</label><br>
<input
type=
"radio"
id=
"abierto"
name=
"isOpen"
value=
"1"
>
<label
for=
"abierto"
>
Abierto
</label><br>
<input
type=
"radio"
id=
"cerrado"
name=
"isOpen"
value=
"0"
>
<label
for=
"cerrado"
>
Cerrado
</label><br>
<input
type=
"submit"
value=
"Buscar"
>
</form>
</div>
<div>
<a
href=
"/convocatoria"
>
Agregar Nueva Convocatoria
</a>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
<th
scope=
"col"
>
Fecha Desde
</th>
<th
scope=
"col"
>
Fecha Hasta
</th>
<th
scope=
"col"
>
Vacantes
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${convocatorias}"
var=
"convocatoria"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${convocatoria.getCargo().getNombre()}
</td>
<td>
${convocatoria.getFechaInicio().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getFechaFin().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getCupos()}
</td>
<td>
Ver Postulantes
</td>
<td><a
href=
"/convocatoria/${convocatoria.id}"
>
Editar
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</tbody>
</table>
</div>
</div>
</body>
...
...
curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp
View file @
9d28912b
...
...
@@ -2,14 +2,22 @@
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<html>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Tecnologia
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<h2
style=
"text-align: center;"
>
DETALLE POSTULANTE
</h2>
<div
style=
"padding: 10px;margin: 3px;border: 1px solid black;"
>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2
style=
"text-align: center;"
>
DETALLE POSTULANTE
</h2>
<div
style=
"padding: 10px;margin: 3px;border: 1px solid black;"
>
<br><label>
INFORMACION GENERAL
</label><br>
<label>
Id: ${postulante.id}
</label><br>
...
...
@@ -27,8 +35,9 @@
<label>
Curriculum: ${postulante.curriculum}
</label><br>
<label>
Estado civil: ${postulante.estadoCivil}
</label><br>
<label>
Nacionalidad: ${postulante.nacionalidad}
</label><br>
<label>
Disponibilidad: ${postulante.disponibilidad}
</label><br>
<label>
Disponibilidad: ${postulante.disponibilidad}
</label><br>
<label>
Estado del Postulante: ${postulante.estadoPostulante.getEstado()}
</label><br>
<label>
Comentario RRHH: ${postulante.getComentarioRRHH()}
</label><br>
<br><label>
TECNOLOGIAS
</label><br>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
>
<label>
Tecnologias: ${detalle_tecnologia.getTecnologia().getNombre()} -
</label>
...
...
@@ -74,8 +83,37 @@
</c:forEach>
</div>
</div>
<div
style=
"padding:10px ;margin: 5px;border: 3px solid black;"
>
<h2>
Cambiar Estado del Postulante y Comentario de RRHH
</h2>
<form:form
class=
"needs-validation"
method=
"post"
modelAttribute=
"postulante"
>
<form:label
path=
"estadoPostulante"
class=
"form-label"
>
Estado
</form:label>
<div
class=
"inputs"
>
<form:select
class=
"form-select"
path=
"estadoPostulante"
aria-label=
"Default select example"
>
<c:forEach
items=
"${estadoP}"
var=
"estadoPostulante"
>
<c:choose>
<c:when
test=
"${estadoPostulante.getEstado()=='Nuevo' }"
>
</c:when>
<c:otherwise>
<form:option
value=
"${estadoPostulante}"
>
${estadoPostulante.getEstado()}
</form:option>
</c:otherwise>
</c:choose>
</c:forEach>
</form:select>
</div>
<div
class=
"inputs"
>
<form:label
path=
"comentarioRRHH"
class=
"form-label"
>
ComentarioRRHH
</form:label>
<form:textarea
class=
"form-control"
path=
"comentarioRRHH"
id=
"comentarioRRHH"
></form:textarea>
</div>
<input
type=
"submit"
value=
"submit"
/>
</form:form>
</div>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/header.jsp
View file @
9d28912b
...
...
@@ -2,8 +2,54 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<header>
<div class="d-flex">
<div class="ml-auto">
<a href="/logout" class="btn btn-dark">Salir</a></div>
</div>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">ROSHKA</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="/home">Home</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Cargos
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/cargo">Agregar Cargo</a></li>
<li><a class="dropdown-item" href="/convocatoria">Agregar Convocatoria</a></li>
<li><a class="dropdown-item" href="/cargos">Listar cargos</a></li>
<li><a class="dropdown-item" href="/convocatorias">Listar convocatorias</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Tecnologias
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/tecnologia">Agregar</a></li>
<li><a class="dropdown-item" href="/tecnologias">Listar</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
Postulantes
</a>
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<li><a class="dropdown-item" href="/postulante">Agregar</a></li>
<li><a class="dropdown-item" href="/postulantes">Listar</a></li>
</ul>
</li>
<li class="nav-item">
<a class="nav-link" href="/logout">Salir</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
9d28912b
...
...
@@ -7,21 +7,16 @@
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<link
href=
"https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin=
"anonymous"
>
<link
href=
"https://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<title>
Document
</title>
</head>
<body>
<div
class=
"container"
>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<a
href=
"postulante"
>
Form postulante
</a>
<a
href=
"postulantes"
>
Lista de postulantes
</a>
<a
href=
"/tecnologias"
>
Tecnologias
</a>
<a
href=
"convocatorias"
>
Lista de convocatorias
</a>
<a
href=
"cargos"
>
Lista de cargos
</a>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
</div>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
9d28912b
...
...
@@ -11,13 +11,24 @@
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<title>
Lista de postulantes
</title>
</head>
<body
class=
"container"
>
<body>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Lista de Postulantes
</h2>
<div
id=
"buscador"
>
<form
name=
"buscador"
>
<label
for=
"nombre"
>
Nombre
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
>
<button>
Buscar
</button>
<br>
<label
for=
"estado"
>
Estado
</label>
<select
name=
"estado"
id=
"estado"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${estadoP}"
var=
"estados"
>
<option
value=
"${estados}"
${
param
.
estado =
=
estados
?
"
selected
"
:
""}
>
${estados.getEstado()}
</option>
</c:forEach>
</select>
<label
for=
"dispo"
>
Disponbilidad
</label>
<select
name=
"dispo"
id=
"dispo"
>
<option
value=
""
>
Seleccione una opcion
</option>
...
...
@@ -62,6 +73,13 @@
<option
value=
"36"
>
Mayor a 3 años
</option>
<option
value=
"60"
>
Mayor a 5 años
</option>
</select>
<label
for=
"convId"
>
convocatoria
</label>
<select
name=
"convId"
id=
"convId"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${convocatoriaC}"
var=
"convo"
>
<option
value=
"${convo.id}"
${
param
.
convId =
=
convo
.
id
?
"
selected
"
:
""}
>
${convo.getCargo().getNombre()}
</option>
</c:forEach>
</select>
</form>
</div>
...
...
@@ -74,6 +92,7 @@
<th
scope=
"col"
>
Nivel de Ingles
</th>
<th
scope=
"col"
>
Experiencia
</th>
<th
scope=
"col"
>
Tecnologias
</th>
<th
scope=
"col"
>
Estado
</th>
</tr>
</thead>
<tbody>
...
...
@@ -83,51 +102,53 @@
<td>
${postulante.nombre} ${postulante.apellido}
</td>
<td>
${postulante.disponibilidad.getDescripcion()}
</td>
<td>
${postulante.nivelIngles}
</td>
<td>
${postulante.experienciaMeses}
</td>
<td>
${postulante.experienciaMeses}
<
op><
/td>
<td>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
varStatus=
"staTec"
>
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
</c:forEach>
</td>
<td>
${postulante.estado.getEstado()}
</td>
<td><a
href=
"/postulante/${postulante.id}"
>
Ver
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<div>
<nav
aria-label=
"Page navigation example"
>
<ul
class=
"pagination"
>
<c:forEach
begin=
"1"
end=
"${pages}"
var=
"nro"
>
<li
class=
"page-item ${(param.nroPagina == null and nro == 1) or param.nroPagina == nro-1 ? 'active' : ''}"
><a
class=
"page-link"
href=
"javascript:buscarPagina(${nro})"
>
${nro}
</a></li>
</c:forEach>
</ul>
</nav>
</div>
<script>
function
habilitarLvlTec
(){
//si se selecciono una tecnologia entonces permitir seleccionar un nivel
lvlTec
.
disabled
=
tecId
.
value
==
false
if
(
lvlTec
.
disabled
){
lvlTec
.
firstElementChild
.
selected
=
true
;
}
}
function
buscarPagina
(
nro
){
nro
--
const
aBuscar
=
'nroPagina='
+
nro
if
(
!
location
.
search
)
location
.
search
=
"?"
+
aBuscar
const
inicial
=
location
.
search
.
search
(
aBuscar
);
if
(
inicial
==-
1
){
//si no se encuentra y hay otros queries
location
.
search
=
"&"
+
aBuscar
}
location
.
search
.
replace
(
'nroPagina='
,
aBuscar
)
}
const
tecId
=
document
.
querySelector
(
"#tecId"
);
const
lvlTec
=
document
.
querySelector
(
"#lvlTec"
);
tecId
.
addEventListener
(
'change'
,
habilitarLvlTec
);
habilitarLvlTec
()
</script>
<div>
<nav
aria-label=
"Page navigation example"
>
<ul
class=
"pagination"
>
<c:forEach
begin=
"1"
end=
"${pages}"
var=
"nro"
>
<li
class=
"page-item ${(param.nroPagina == null and nro == 1) or param.nroPagina == nro-1 ? 'active' : ''}"
><a
class=
"page-link"
href=
"javascript:buscarPagina(${nro})"
>
${nro}
</a></li>
</c:forEach>
</ul>
</nav>
</div>
</div>
<script>
function
habilitarLvlTec
(){
//si se selecciono una tecnologia entonces permitir seleccionar un nivel
lvlTec
.
disabled
=
tecId
.
value
==
false
if
(
lvlTec
.
disabled
){
lvlTec
.
firstElementChild
.
selected
=
true
;
}
}
function
buscarPagina
(
nro
){
nro
--
const
aBuscar
=
'nroPagina='
+
nro
if
(
!
location
.
search
)
location
.
search
=
"?"
+
aBuscar
const
inicial
=
location
.
search
.
search
(
aBuscar
);
if
(
inicial
==-
1
){
//si no se encuentra y hay otros queries
location
.
search
=
"&"
+
aBuscar
}
location
.
search
.
replace
(
'nroPagina='
,
aBuscar
)
}
const
tecId
=
document
.
querySelector
(
"#tecId"
);
const
lvlTec
=
document
.
querySelector
(
"#lvlTec"
);
tecId
.
addEventListener
(
'change'
,
habilitarLvlTec
);
habilitarLvlTec
()
</script>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
View file @
9d28912b
...
...
@@ -11,22 +11,28 @@
<!-- Bootstrap CSS -->
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<title>
Hello, world!
</title>
<style
type=
"text/css"
media=
"screen"
>
body
{
background-color
:
rgba
(
98
,
0
,
255
,
0
)
}
</style>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<title>
Agregar Tecnologia
</title>
</head>
<body>
<form:form
action=
"/tecnologia/${tecnologia.id == null ? '' : tecnologia.id}"
method=
"post"
modelAttribute=
"tecnologia"
>
<form:label
path=
"nombre"
>
name:
</form:label>
<form:input
type=
"text"
path=
"nombre"
/>
<input
type=
"submit"
value=
"submit"
/>
</form:form>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Agregar Tecnologia
</h2>
<div
class=
"p-3 mb-2 bg-light text-dark border border-light"
>
<form:form
action=
"/tecnologia/${tecnologia.id == null ? '' : tecnologia.id}"
method=
"post"
modelAttribute=
"tecnologia"
class=
"row row-cols-lg-auto g-3 align-items-center"
>
<div
class=
"col-12"
>
<form:label
class=
"form-label visually-hidden"
path=
"nombre"
>
Nombre:
</form:label>
<form:input
type=
"text"
path=
"nombre"
class=
"form-control"
required=
"true"
placeholder=
"Nombre de la tecnologia"
/>
</div>
<div
class=
"col-12"
>
<input
type=
"submit"
value=
"Guardar"
class=
"btn btn-primary"
/>
</div>
</form:form>
</div>
</div>
...
...
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
View file @
9d28912b
...
...
@@ -11,38 +11,44 @@
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body
class=
"container"
>
<div>
<form>
<label
for=
"tecnologias"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
>
</form>
<a
href=
"/tecnologia"
>
Agregar Nueva Tecnologia
</a>
</div>
<div>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Tecnologia
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${tecnologia.getNombre()}
</td>
<td><a
href=
"/tecnologia/${tecnologia.id}"
>
Editar tecnologia
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<body>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<h2>
Lista de Tecnologias
</h2>
<div>
<form>
<label
for=
"tecnologias"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
>
</form>
<a
href=
"/tecnologia"
>
Agregar Nueva Tecnologia
</a>
</div>
<div>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Tecnologia
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${tecnologia.getNombre()}
</td>
<td><a
href=
"/tecnologia/${tecnologia.id}"
>
Editar tecnologia
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
</body>
...
...
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