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
0eb6fbe3
Commit
0eb6fbe3
authored
Nov 12, 2021
by
Joaquin Elias Baranda Ayala
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'William_001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joaquin
parents
029bb203
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 @
0eb6fbe3
...
@@ -5,8 +5,11 @@ import java.io.InputStream;
...
@@ -5,8 +5,11 @@ import java.io.InputStream;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.fasterxml.jackson.core.JsonParseException
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.JsonMappingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.type.TypeFactory
;
import
com.roshka.modelo.*
;
import
com.roshka.modelo.*
;
import
com.roshka.repositorio.*
;
import
com.roshka.repositorio.*
;
...
@@ -35,48 +38,12 @@ public class CurriculumsearchApplication {
...
@@ -35,48 +38,12 @@ public class CurriculumsearchApplication {
return
args
->
{
return
args
->
{
try
{
try
{
// read json and write to db
// read json and write to db
ObjectMapper
mapper
=
new
ObjectMapper
();
guardarJson
(
cargoR
,
"/json/cargo.json"
,
Cargo
.
class
);
TypeReference
<
List
<
Departamento
>>
typeReference1
=
new
TypeReference
<
List
<
Departamento
>>(){};
guardarJson
(
convR
,
"/json/convocatoria.json"
,
ConvocatoriaCargo
.
class
);
InputStream
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
"/json/Departamento.json"
);
guardarJson
(
depR
,
"/json/Departamento.json"
,
Departamento
.
class
);
List
<
Departamento
>
departamento
=
mapper
.
readValue
(
inputStream
,
typeReference1
);
guardarJson
(
ciudR
,
"/json/Ciudad.json"
,
Ciudad
.
class
);
depR
.
saveAll
(
departamento
);
guardarJson
(
postRepo
,
"/json/postulante.json"
,
Postulante
.
class
);
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!"
);
String
password
=
new
BCryptPasswordEncoder
().
encode
(
"test"
);
String
password
=
new
BCryptPasswordEncoder
().
encode
(
"test"
);
RRHHUser
testuser
=
new
RRHHUser
();
RRHHUser
testuser
=
new
RRHHUser
();
testuser
.
setEmail
(
"test@test.com"
);
testuser
.
setEmail
(
"test@test.com"
);
...
@@ -106,20 +73,17 @@ public class CurriculumsearchApplication {
...
@@ -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
();
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
);
InputStream
inputStream
=
TypeReference
.
class
.
getResourceAsStream
(
srcJson
);
List
<
Q
>
listaAguardar
;
List
<
Q
>
listaAguardar
;
try
{
listaAguardar
=
mapper
.
readValue
(
inputStream
,
t
.
constructCollectionType
(
ArrayList
.
class
,
clazz
));
listaAguardar
=
mapper
.
readValue
(
inputStream
,
typeReference1
);
repo
.
saveAll
(
listaAguardar
);
repo
.
saveAll
(
listaAguardar
);
repo
.
flush
();
repo
.
flush
();
System
.
out
.
println
(
srcJson
+
" Saved!"
);
System
.
out
.
println
(
srcJson
+
" Saved!"
);
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
}
}
...
...
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
View file @
0eb6fbe3
...
@@ -2,7 +2,9 @@ package com.roshka.DTO;
...
@@ -2,7 +2,9 @@ package com.roshka.DTO;
import
java.util.List
;
import
java.util.List
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.PostulanteTecnologia
;
import
com.roshka.modelo.PostulanteTecnologia
;
public
class
PostulanteListaDTO
{
public
class
PostulanteListaDTO
{
...
@@ -13,8 +15,11 @@ public class PostulanteListaDTO {
...
@@ -13,8 +15,11 @@ public class PostulanteListaDTO {
private
Long
nivelIngles
;
private
Long
nivelIngles
;
private
Long
experienciaMeses
;
private
Long
experienciaMeses
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
private
EstadoPostulante
estado
;
private
List
<
ConvocatoriaCargo
>
convocatoria
;
public
PostulanteListaDTO
(
Long
id
,
String
nombre
,
String
apellido
,
Disponibilidad
disponibilidad
,
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
.
id
=
id
;
this
.
nombre
=
nombre
;
this
.
nombre
=
nombre
;
this
.
apellido
=
apellido
;
this
.
apellido
=
apellido
;
...
@@ -22,6 +27,8 @@ public class PostulanteListaDTO {
...
@@ -22,6 +27,8 @@ public class PostulanteListaDTO {
this
.
nivelIngles
=
nivelIngles
;
this
.
nivelIngles
=
nivelIngles
;
this
.
experienciaMeses
=
experienciaMeses
;
this
.
experienciaMeses
=
experienciaMeses
;
this
.
tecnologias
=
tecnologias
;
this
.
tecnologias
=
tecnologias
;
this
.
estado
=
estado
;
this
.
convocatoria
=
convocatoria
;
}
}
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
...
@@ -65,6 +72,20 @@ public class PostulanteListaDTO {
...
@@ -65,6 +72,20 @@ public class PostulanteListaDTO {
public
void
setTecnologias
(
List
<
PostulanteTecnologia
>
tecnologias
)
{
public
void
setTecnologias
(
List
<
PostulanteTecnologia
>
tecnologias
)
{
this
.
tecnologias
=
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 @
0eb6fbe3
...
@@ -14,6 +14,7 @@ import com.roshka.modelo.*;
...
@@ -14,6 +14,7 @@ import com.roshka.modelo.*;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.EstadoCivil
;
import
com.roshka.modelo.EstadoCivil
;
import
com.roshka.modelo.Nacionalidad
;
import
com.roshka.modelo.Nacionalidad
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
...
@@ -42,6 +43,7 @@ import org.springframework.http.HttpStatus;
...
@@ -42,6 +43,7 @@ import org.springframework.http.HttpStatus;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.ui.Model
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -90,12 +92,14 @@ public class PostulanteController {
...
@@ -90,12 +92,14 @@ public class PostulanteController {
public
String
postulantes
(
Model
model
,
public
String
postulantes
(
Model
model
,
@RequestParam
(
required
=
false
)
Long
tecId
,
@RequestParam
(
required
=
false
)
Long
tecId
,
@RequestParam
(
required
=
false
)
String
nombre
,
@RequestParam
(
required
=
false
)
String
nombre
,
@RequestParam
(
required
=
false
)
EstadoPostulante
estado
,
@RequestParam
(
required
=
false
)
Disponibilidad
dispo
,
@RequestParam
(
required
=
false
)
Disponibilidad
dispo
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlEng
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
lvlTec
,
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
Long
instId
,
@RequestParam
(
required
=
false
)
Long
expInMonths
,
@RequestParam
(
required
=
false
)
Long
expInMonths
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Long
convId
,
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
@RequestParam
(
defaultValue
=
"0"
)
Integer
nroPagina
)
{
)
{
final
Integer
CANTIDAD_POR_PAGINA
=
5
;
final
Integer
CANTIDAD_POR_PAGINA
=
5
;
...
@@ -103,7 +107,9 @@ public class PostulanteController {
...
@@ -103,7 +107,9 @@ public class PostulanteController {
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"institucionesEducativas"
,
institucionRepository
.
findAll
());
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
<
Postulante
>
postulantes
=
postulantesPag
.
getContent
();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
...
@@ -115,14 +121,14 @@ public class PostulanteController {
...
@@ -115,14 +121,14 @@ public class PostulanteController {
expTotal
+=
Helper
.
getMonthsDifference
(
experiencia
.
getFechaDesde
(),
experiencia
.
getFechaHasta
());
expTotal
+=
Helper
.
getMonthsDifference
(
experiencia
.
getFechaDesde
(),
experiencia
.
getFechaHasta
());
}
}
if
(
expInMonths
!=
null
&&
expInMonths
>
expTotal
)
continue
;
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
(
"pages"
,
postulantesPag
.
getTotalPages
());
model
.
addAttribute
(
"postulantes"
,
postulantesDTO
);
model
.
addAttribute
(
"postulantes"
,
postulantesDTO
);
return
"postulantes"
;
return
"postulantes"
;
}
}
@RequestMapping
(
"/postulante"
)
@RequestMapping
(
"/postulante"
)
public
String
getFormPostulante
(
Model
model
){
public
String
getFormPostulante
(
Model
model
){
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
...
@@ -140,10 +146,10 @@ public class PostulanteController {
...
@@ -140,10 +146,10 @@ public class PostulanteController {
er
.
printStackTrace
();
er
.
printStackTrace
();
}
}
model
.
addAttribute
(
"departamentos"
,
depRepo
.
findAll
());
model
.
addAttribute
(
"departamentos"
,
depRepo
.
findAll
());
return
"postulante-form"
;
return
"postulante-form"
;
}
}
@PostMapping
(
value
=
"/postulante"
,
consumes
=
"application/json"
)
@PostMapping
(
value
=
"/postulante"
,
consumes
=
"application/json"
)
public
String
guardarPostulante
(
@RequestBody
Postulante
postulante
){
public
String
guardarPostulante
(
@RequestBody
Postulante
postulante
){
//Codigo encargado de modificar postulacion si se envia mismo CI
//Codigo encargado de modificar postulacion si se envia mismo CI
...
@@ -155,31 +161,31 @@ public class PostulanteController {
...
@@ -155,31 +161,31 @@ public class PostulanteController {
postulante
.
setId
(
postulantex
.
getId
());
postulante
.
setId
(
postulantex
.
getId
());
}
}
postulante
.
getTecnologias
().
stream
().
filter
(
postulante
.
getTecnologias
().
stream
().
filter
(
tec
->
tec
.
getTecnologia
().
getId
()
!=
0
tec
->
tec
.
getTecnologia
().
getId
()
!=
0
).
forEach
(
).
forEach
(
tec
->
tec
.
setTecnologia
(
tecRepo
.
getById
(
tec
.
getTecnologia
().
getId
()))
tec
->
tec
.
setTecnologia
(
tecRepo
.
getById
(
tec
.
getTecnologia
().
getId
()))
);
);
/* for (int i = 0; i < postulante.getPostulaciones().size(); i++) {
/* for (int i = 0; i < postulante.getPostulaciones().size(); i++) {
postulante.getPostulaciones().set(i, cargoRepo.getById(postulante.getPostulaciones().get(i).getId()));
postulante.getPostulaciones().set(i, cargoRepo.getById(postulante.getPostulaciones().get(i).getId()));
}
}
*/
*/
for
(
Estudio
estudio:
postulante
.
getEstudios
()){
for
(
Estudio
estudio:
postulante
.
getEstudios
()){
String
nombreIns
=
""
;
String
nombreIns
=
""
;
nombreIns
=
estudio
.
getInstitucion
().
getNombre
().
toLowerCase
();
nombreIns
=
estudio
.
getInstitucion
().
getNombre
().
toLowerCase
();
Institucion
institucion
=
institucionRepository
.
findByNombre
(
nombreIns
);
Institucion
institucion
=
institucionRepository
.
findByNombre
(
nombreIns
);
if
(
institucion
==
null
){
if
(
institucion
==
null
){
institucionRepository
.
save
(
estudio
.
getInstitucion
());
institucionRepository
.
save
(
estudio
.
getInstitucion
());
}
else
{
}
else
{
estudio
.
setInstitucion
(
institucion
);
estudio
.
setInstitucion
(
institucion
);
}
}
post
.
save
(
postulante
);
return
"redirect:/postulacion-correcta"
;
}
}
}
post
.
save
(
postulante
);
return
"redirect:/postulacion-correcta"
;
}
@GetMapping
(
"/postulacion-correcta"
)
@GetMapping
(
"/postulacion-correcta"
)
public
String
successPostulation
(
Model
model
){
public
String
successPostulation
(
Model
model
){
model
.
addAttribute
(
"mensaje1"
,
"Tu informacion se ha recibido correctamente!"
);
model
.
addAttribute
(
"mensaje1"
,
"Tu informacion se ha recibido correctamente!"
);
model
.
addAttribute
(
"mensaje2"
,
" espera por que nos pongamos en contacto!"
);
model
.
addAttribute
(
"mensaje2"
,
" espera por que nos pongamos en contacto!"
);
return
"exitoRegistro"
;
return
"exitoRegistro"
;
...
@@ -188,26 +194,38 @@ public class PostulanteController {
...
@@ -188,26 +194,38 @@ public class PostulanteController {
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ExceptionHandler
({
MethodArgumentNotValidException
.
class
})
@ExceptionHandler
({
MethodArgumentNotValidException
.
class
})
public
ResponseEntity
<
String
>
handleValidationExceptions
(
public
ResponseEntity
<
String
>
handleValidationExceptions
(
MethodArgumentNotValidException
ex
)
{
MethodArgumentNotValidException
ex
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
.
body
(
ex
.
getMessage
());
.
body
(
ex
.
getMessage
());
}
}
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
@ExceptionHandler
({
ConstraintViolationException
.
class
})
@ExceptionHandler
({
ConstraintViolationException
.
class
})
public
ResponseEntity
<
String
>
handleValidationExceptions2
(
public
ResponseEntity
<
String
>
handleValidationExceptions2
(
ConstraintViolationException
ex
)
{
ConstraintViolationException
ex
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
return
ResponseEntity
.
status
(
HttpStatus
.
BAD_REQUEST
)
.
body
(
ex
.
getMessage
());
.
body
(
ex
.
getMessage
());
}
}
@GetMapping
({
"/postulante/{postulanteId}"
})
@GetMapping
({
"/postulante/{postulanteId}"
})
public
String
getPostulanteDetalle
(
Model
model
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
public
String
getPostulanteDetalle
(
Model
model
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
Postulante
p
=
post
.
findById
(
postulanteId
).
orElse
(
null
);
Postulante
p
=
post
.
findById
(
postulanteId
).
orElse
(
null
);
model
.
addAttribute
(
"postulante"
,
p
);
model
.
addAttribute
(
"postulante"
,
p
);
return
"detallepostulante"
;
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 @
0eb6fbe3
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 @
0eb6fbe3
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 @
0eb6fbe3
...
@@ -72,6 +72,13 @@ public class Postulante {
...
@@ -72,6 +72,13 @@ public class Postulante {
@Column
(
name
=
"estado_civil"
)
@Column
(
name
=
"estado_civil"
)
@NotNull
@NotNull
private
EstadoCivil
estadoCivil
;
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
)
@Column
(
name
=
"nacionalidad"
,
length
=
2
)
@NotNull
@NotNull
...
@@ -271,4 +278,17 @@ public class Postulante {
...
@@ -271,4 +278,17 @@ public class Postulante {
public
List
<
ReferenciaPersonal
>
getReferencias
()
{
public
List
<
ReferenciaPersonal
>
getReferencias
()
{
return
referencias
;
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 @
0eb6fbe3
...
@@ -2,13 +2,18 @@ package com.roshka.repositorio;
...
@@ -2,13 +2,18 @@ package com.roshka.repositorio;
import
java.util.List
;
import
java.util.List
;
import
javax.transaction.Transactional
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.jpa.repository.Query
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.EstadoPostulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
...
@@ -55,7 +60,24 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
...
@@ -55,7 +60,24 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"and (pt.nivel >= ?4 or ?4 is null) "
+
"and (pt.nivel >= ?4 or ?4 is null) "
+
"and (pt.tecnologia.id = ?5 or ?5 is null) "
+
"and (pt.tecnologia.id = ?5 or ?5 is null) "
+
" and (e.institucion.id = ?6 or ?6 is null ) "
+
" and (e.institucion.id = ?6 or ?6 is null ) "
+
" and (conv.cargoId = ?7 or ?7 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 (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 @
0eb6fbe3
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
/
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/
>
<title>
Cargo
</title>
<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"
>
<link
<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>
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
</head>
rel=
"stylesheet"
<body>
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
<div
class=
"container"
>
crossorigin=
"anonymous"
<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"
>
<script
<form:label
class=
"form-label visually-hidden"
path=
"nombre"
>
Nombre del cargo
</form:label>
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
<form:input
type=
"text"
path=
"nombre"
class=
"form-control"
placeholder=
"Nombre del cargo"
/>
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>
<div
class=
"col-12"
>
</div>
<input
type=
"submit"
value=
"Guardar"
class=
"btn btn-primary"
/>
</body>
</div>
</html>
</form:form>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/cargos.jsp
View file @
0eb6fbe3
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
page
<
%@
page
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
contentType=
"text/html;charset=UTF-8"
language=
"java"
%
>
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
/
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/
>
<title>
Cargo
</title>
<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"
>
<link
<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>
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
</head>
rel=
"stylesheet"
<body
class=
"container"
>
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
<div>
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>
<form>
<label
for=
"cargos"
>
Nombre:
</label>
<label
for=
"cargos"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
<input
type=
"submit"
value=
"Buscar"
>
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
/>
</form>
</form>
<a
href=
"/cargo"
>
Agregar Nuevo Cargo
</a>
<a
href=
"/cargo"
>
Agregar Nuevo Cargo
</a>
</div>
</div>
<div>
<div>
<table
class=
"table"
>
<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>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"row"
>
${sta.index+1}
</th>
<th
scope=
"col"
>
Cargo
</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>
</tr>
</thead>
</c:forEach>
<tbody>
</tbody>
</table>
<c:forEach
items=
"${cargos}"
var=
"cargo"
varStatus=
"sta"
>
</div>
<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>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
View file @
0eb6fbe3
...
@@ -7,36 +7,41 @@
...
@@ -7,36 +7,41 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<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"
>
<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>
<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>
</head>
<body>
<body>
<div
class=
"container"
>
<jsp:include
page=
"header.jsp"
/>
<form:form
action=
"/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}"
method=
"post"
modelAttribute=
"convocatoria"
>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"mb-3"
>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<form:label
path=
"fechaInicioS"
class=
"form-label"
>
Fecha inicial
</form:label>
<h2>
Agregar Convocatoria
</h2>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaInicioS"
/>
<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>
<div
class=
"mb-3 col-3"
>
<div
class=
"mb-3"
>
<form:label
path=
"fechaInicioS"
class=
"form-label"
>
Fecha inicial
</form:label>
<form:label
path=
"fechaFinS"
class=
"form-label"
>
Fecha Fin
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaInicioS"
required=
"true"
/>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaFinS"
/>
</div>
</div>
<div
class=
"mb-3"
>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"cupos"
class=
"form-label"
>
Cupos:
</form:label>
<form:label
path=
"fechaFinS"
class=
"form-label"
>
Fecha Fin
</form:label>
<form:input
type=
"number"
class=
"form-control"
path=
"cupos"
/>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaFinS"
required=
"true"
/>
</div>
</div>
<div
class=
"mb-3 form-check"
>
<div
class=
"mb-3 col-3"
>
<form:label
path=
"cargoId"
class=
"form-label"
>
Cargo
</form:label>
<form:label
path=
"cupos"
class=
"form-label"
>
Cupos:
</form:label>
<form:select
class=
"form-select"
path=
"cargoId"
>
<form:input
type=
"number"
class=
"form-control"
path=
"cupos"
required=
"true"
/>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
</div>
<form:option
value=
"${cargo.id}"
>
${cargo.nombre}
</form:option>
<div
class=
"mb-3 col-3"
>
</c:forEach>
<form:label
path=
"cargoId"
class=
"form-label"
>
Cargo
</form:label>
</form:select>
<form:select
class=
"form-select"
path=
"cargoId"
required=
"true"
>
</div>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<button
type=
"submit"
class=
"btn btn-primary"
>
Guardar
</button>
<form:option
value=
"${cargo.id}"
>
${cargo.nombre}
</form:option>
</form:form>
</c:forEach>
</form:select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Guardar
</button>
</form:form>
</div>
</div>
</div>
</body>
</body>
</html>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/convocatorias.jsp
View file @
0eb6fbe3
...
@@ -11,57 +11,62 @@
...
@@ -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"
>
<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>
<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>
</head>
<body
class=
"container"
>
<body
>
<div>
<jsp:include
page=
"header.jsp"
/>
<form>
<jsp:include
page=
"alerts.jsp"
/>
<label
for=
"cargos"
>
Cargos:
</label>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<select
class=
"form-select"
name=
"cargoId"
id=
"cargos"
>
<h2>
Lista de convocatorias
</h2>
<option
value=
""
>
Todos los cargos
</option>
<div>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<form>
<option
value=
"${cargo.id}"
${
param
.
cargoId =
=
cargo
.
id
?
"
selected
"
:
""}
>
${cargo.nombre}
</option>
<label
for=
"cargos"
>
Cargos:
</label>
</c:forEach>
<select
name=
"cargoId"
id=
"cargos"
>
</select>
<option
value=
""
>
Todos los cargos
</option>
Estado:
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<input
type=
"radio"
id=
"cualquiera"
name=
"isOpen"
checked
value=
""
>
<option
value=
"${cargo.id}"
${
param
.
cargoId =
=
cargo
.
id
?
"
selected
"
:
""}
>
${cargo.nombre}
</option>
<label
for=
"abierto"
>
Cualquiera
</label><br>
</c:forEach>
<input
type=
"radio"
id=
"abierto"
name=
"isOpen"
value=
"1"
>
</select>
<label
for=
"abierto"
>
Abierto
</label><br>
Estado:
<input
type=
"radio"
id=
"cerrado"
name=
"isOpen"
value=
"0"
>
<input
type=
"radio"
id=
"cualquiera"
name=
"isOpen"
checked
value=
""
>
<label
for=
"cerrado"
>
Cerrado
</label><br>
<label
for=
"abierto"
>
Cualquiera
</label><br>
<input
type=
"submit"
value=
"Buscar"
>
<input
type=
"radio"
id=
"abierto"
name=
"isOpen"
value=
"1"
>
</form>
<label
for=
"abierto"
>
Abierto
</label><br>
</div>
<input
type=
"radio"
id=
"cerrado"
name=
"isOpen"
value=
"0"
>
<div>
<label
for=
"cerrado"
>
Cerrado
</label><br>
<a
href=
"/convocatoria"
>
Agregar Nueva Convocatoria
</a>
<input
type=
"submit"
value=
"Buscar"
>
<table
class=
"table"
>
</form>
<thead>
</div>
<tr>
<div>
<th
scope=
"col"
>
#
</th>
<a
href=
"/convocatoria"
>
Agregar Nueva Convocatoria
</a>
<th
scope=
"col"
>
Cargo
</th>
<table
class=
"table"
>
<th
scope=
"col"
>
Fecha Desde
</th>
<thead>
<th
scope=
"col"
>
Fecha Hasta
</th>
<tr>
<th
scope=
"col"
>
Vacantes
</th>
<th
scope=
"col"
>
#
</th>
</tr>
<th
scope=
"col"
>
Cargo
</th>
</thead>
<th
scope=
"col"
>
Fecha Desde
</th>
<tbody>
<th
scope=
"col"
>
Fecha Hasta
</th>
<th
scope=
"col"
>
Vacantes
</th>
<c:forEach
items=
"${convocatorias}"
var=
"convocatoria"
varStatus=
"sta"
>
</tr>
<tr>
</thead>
<th
scope=
"row"
>
${sta.index+1}
</th>
<tbody>
<td>
${convocatoria.getCargo().getNombre()}
</td>
<td>
${convocatoria.getFechaInicio().toString().split(" ")[0]}
</td>
<c:forEach
items=
"${convocatorias}"
var=
"convocatoria"
varStatus=
"sta"
>
<td>
${convocatoria.getFechaFin().toString().split(" ")[0]}
</td>
<tr>
<td>
${convocatoria.getCupos()}
</td>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
Ver Postulantes
</td>
<td>
${convocatoria.getCargo().getNombre()}
</td>
<td><a
href=
"/convocatoria/${convocatoria.id}"
>
Editar
</a></td>
<td>
${convocatoria.getFechaInicio().toString().split(" ")[0]}
</td>
</tr>
<td>
${convocatoria.getFechaFin().toString().split(" ")[0]}
</td>
</c:forEach>
<td>
${convocatoria.getCupos()}
</td>
<td>
Ver Postulantes
</td>
<td><a
href=
"/convocatoria/${convocatoria.id}"
>
Editar
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</tbody>
</div>
</table>
</div>
</div>
</body>
</body>
...
...
curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp
View file @
0eb6fbe3
...
@@ -2,14 +2,22 @@
...
@@ -2,14 +2,22 @@
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"c"
uri=
"http://java.sun.com/jsp/jstl/core"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<html>
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<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>
</head>
<body>
<body>
<h2
style=
"text-align: center;"
>
DETALLE POSTULANTE
</h2>
<jsp:include
page=
"header.jsp"
/>
<div
style=
"padding: 10px;margin: 3px;border: 1px solid black;"
>
<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>
<br><label>
INFORMACION GENERAL
</label><br>
<label>
Id: ${postulante.id}
</label><br>
<label>
Id: ${postulante.id}
</label><br>
...
@@ -27,8 +35,9 @@
...
@@ -27,8 +35,9 @@
<label>
Curriculum: ${postulante.curriculum}
</label><br>
<label>
Curriculum: ${postulante.curriculum}
</label><br>
<label>
Estado civil: ${postulante.estadoCivil}
</label><br>
<label>
Estado civil: ${postulante.estadoCivil}
</label><br>
<label>
Nacionalidad: ${postulante.nacionalidad}
</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>
<br><label>
TECNOLOGIAS
</label><br>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
>
<label>
Tecnologias: ${detalle_tecnologia.getTecnologia().getNombre()} -
</label>
<label>
Tecnologias: ${detalle_tecnologia.getTecnologia().getNombre()} -
</label>
...
@@ -74,8 +83,37 @@
...
@@ -74,8 +83,37 @@
</c:forEach>
</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>
</body>
</html>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/header.jsp
View file @
0eb6fbe3
...
@@ -2,8 +2,54 @@
...
@@ -2,8 +2,54 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<header>
<header>
<div class="d-flex">
<div class="ml-auto">
<a href="/logout" class="btn btn-dark">Salir</a></div>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
</div>
<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>
</header>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
0eb6fbe3
...
@@ -7,21 +7,16 @@
...
@@ -7,21 +7,16 @@
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<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"
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
integrity=
"sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M"
crossorigin=
"anonymous"
>
<link
href=
"https://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<title>
Document
</title>
<title>
Document
</title>
</head>
</head>
<body>
<body>
<div
class=
"container"
>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"header.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<jsp:include
page=
"alerts.jsp"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<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>
</div>
</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>
</body>
</html>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
0eb6fbe3
...
@@ -11,13 +11,24 @@
...
@@ -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>
<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>
<title>
Lista de postulantes
</title>
</head>
</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"
>
<div
id=
"buscador"
>
<form
name=
"buscador"
>
<form
name=
"buscador"
>
<label
for=
"nombre"
>
Nombre
</label>
<label
for=
"nombre"
>
Nombre
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
>
<button>
Buscar
</button>
<button>
Buscar
</button>
<br>
<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>
<label
for=
"dispo"
>
Disponbilidad
</label>
<select
name=
"dispo"
id=
"dispo"
>
<select
name=
"dispo"
id=
"dispo"
>
<option
value=
""
>
Seleccione una opcion
</option>
<option
value=
""
>
Seleccione una opcion
</option>
...
@@ -62,6 +73,13 @@
...
@@ -62,6 +73,13 @@
<option
value=
"36"
>
Mayor a 3 años
</option>
<option
value=
"36"
>
Mayor a 3 años
</option>
<option
value=
"60"
>
Mayor a 5 años
</option>
<option
value=
"60"
>
Mayor a 5 años
</option>
</select>
</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>
</form>
</div>
</div>
...
@@ -74,6 +92,7 @@
...
@@ -74,6 +92,7 @@
<th
scope=
"col"
>
Nivel de Ingles
</th>
<th
scope=
"col"
>
Nivel de Ingles
</th>
<th
scope=
"col"
>
Experiencia
</th>
<th
scope=
"col"
>
Experiencia
</th>
<th
scope=
"col"
>
Tecnologias
</th>
<th
scope=
"col"
>
Tecnologias
</th>
<th
scope=
"col"
>
Estado
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -83,51 +102,53 @@
...
@@ -83,51 +102,53 @@
<td>
${postulante.nombre} ${postulante.apellido}
</td>
<td>
${postulante.nombre} ${postulante.apellido}
</td>
<td>
${postulante.disponibilidad.getDescripcion()}
</td>
<td>
${postulante.disponibilidad.getDescripcion()}
</td>
<td>
${postulante.nivelIngles}
</td>
<td>
${postulante.nivelIngles}
</td>
<td>
${postulante.experienciaMeses}
</td>
<td>
${postulante.experienciaMeses}
<
op><
/td>
<td>
<td>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
varStatus=
"staTec"
>
<c:forEach
items=
"${postulante.tecnologias}"
var=
"detalle_tecnologia"
varStatus=
"staTec"
>
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
</c:forEach>
</c:forEach>
</td>
</td>
<td>
${postulante.estado.getEstado()}
</td>
<td><a
href=
"/postulante/${postulante.id}"
>
Ver
</a></td>
<td><a
href=
"/postulante/${postulante.id}"
>
Ver
</a></td>
</tr>
</tr>
</c:forEach>
</c:forEach>
</tbody>
</tbody>
</table>
</table>
<div>
<div>
<nav
aria-label=
"Page navigation example"
>
<nav
aria-label=
"Page navigation example"
>
<ul
class=
"pagination"
>
<ul
class=
"pagination"
>
<c:forEach
begin=
"1"
end=
"${pages}"
var=
"nro"
>
<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>
<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>
</c:forEach>
</ul>
</ul>
</nav>
</nav>
</div>
</div>
<script>
</div>
function
habilitarLvlTec
(){
<script>
//si se selecciono una tecnologia entonces permitir seleccionar un nivel
function
habilitarLvlTec
(){
lvlTec
.
disabled
=
tecId
.
value
==
false
//si se selecciono una tecnologia entonces permitir seleccionar un nivel
if
(
lvlTec
.
disabled
){
lvlTec
.
disabled
=
tecId
.
value
==
false
lvlTec
.
firstElementChild
.
selected
=
true
;
if
(
lvlTec
.
disabled
){
}
lvlTec
.
firstElementChild
.
selected
=
true
;
}
}
function
buscarPagina
(
nro
){
}
nro
--
function
buscarPagina
(
nro
){
const
aBuscar
=
'nroPagina='
+
nro
nro
--
if
(
!
location
.
search
)
location
.
search
=
"?"
+
aBuscar
const
aBuscar
=
'nroPagina='
+
nro
const
inicial
=
location
.
search
.
search
(
aBuscar
);
if
(
!
location
.
search
)
location
.
search
=
"?"
+
aBuscar
if
(
inicial
==-
1
){
//si no se encuentra y hay otros queries
const
inicial
=
location
.
search
.
search
(
aBuscar
);
location
.
search
=
"&"
+
aBuscar
if
(
inicial
==-
1
){
//si no se encuentra y hay otros queries
}
location
.
search
=
"&"
+
aBuscar
location
.
search
.
replace
(
'nroPagina='
,
aBuscar
)
}
}
location
.
search
.
replace
(
'nroPagina='
,
aBuscar
)
const
tecId
=
document
.
querySelector
(
"#tecId"
);
}
const
lvlTec
=
document
.
querySelector
(
"#lvlTec"
);
const
tecId
=
document
.
querySelector
(
"#tecId"
);
tecId
.
addEventListener
(
'change'
,
habilitarLvlTec
);
const
lvlTec
=
document
.
querySelector
(
"#lvlTec"
);
habilitarLvlTec
()
tecId
.
addEventListener
(
'change'
,
habilitarLvlTec
);
</script>
habilitarLvlTec
()
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
View file @
0eb6fbe3
...
@@ -11,22 +11,28 @@
...
@@ -11,22 +11,28 @@
<!-- Bootstrap CSS -->
<!-- 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"
>
<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>
<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>
<style
type=
"text/css"
media=
"screen"
>
body
{
background-color
:
rgba
(
98
,
0
,
255
,
0
)
}
</style>
</head>
</head>
<body>
<body>
<jsp:include
page=
"header.jsp"
/>
<form:form
action=
"/tecnologia/${tecnologia.id == null ? '' : tecnologia.id}"
method=
"post"
modelAttribute=
"tecnologia"
>
<jsp:include
page=
"alerts.jsp"
/>
<form:label
path=
"nombre"
>
name:
</form:label>
<form:input
type=
"text"
path=
"nombre"
/>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<input
type=
"submit"
value=
"submit"
/>
<h2>
Agregar Tecnologia
</h2>
</form:form>
<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 @
0eb6fbe3
...
@@ -11,38 +11,44 @@
...
@@ -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"
>
<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>
<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>
</head>
<body
class=
"container"
>
<body>
<div>
<jsp:include
page=
"header.jsp"
/>
<form>
<jsp:include
page=
"alerts.jsp"
/>
<label
for=
"tecnologias"
>
Nombre:
</label>
<div
class=
"container-xxl my-md-4 bd-layout"
>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<h2>
Lista de Tecnologias
</h2>
<input
type=
"submit"
value=
"Buscar"
>
</form>
<div>
<a
href=
"/tecnologia"
>
Agregar Nueva Tecnologia
</a>
<form>
</div>
<label
for=
"tecnologias"
>
Nombre:
</label>
<div>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<table
class=
"table"
>
<input
type=
"submit"
value=
"Buscar"
>
<thead>
</form>
<tr>
<a
href=
"/tecnologia"
>
Agregar Nueva Tecnologia
</a>
<th
scope=
"col"
>
#
</th>
</div>
<th
scope=
"col"
>
Tecnologia
</th>
<div>
</tr>
<table
class=
"table"
>
</thead>
<thead>
<tbody>
<tr>
<th
scope=
"col"
>
#
</th>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
varStatus=
"sta"
>
<th
scope=
"col"
>
Tecnologia
</th>
<tr>
</tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
</thead>
<td>
${tecnologia.getNombre()}
</td>
<tbody>
<td><a
href=
"/tecnologia/${tecnologia.id}"
>
Editar tecnologia
</a></td>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
varStatus=
"sta"
>
</tr>
<tr>
</c:forEach>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${tecnologia.getNombre()}
</td>
<td><a
href=
"/tecnologia/${tecnologia.id}"
>
Editar tecnologia
</a></td>
</tbody>
</tr>
</table>
</c:forEach>
</tbody>
</table>
</div>
</div>
</div>
</body>
</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