Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
c5671df7
Commit
c5671df7
authored
Nov 09, 2021
by
Joaquin Elias Baranda Ayala
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'giuli_001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joaquin
parents
8bb7dd8b
81f5c43c
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1057 additions
and
122 deletions
+1057
-122
curriculumsearch/pom.xml
+11
-0
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
+13
-10
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
+71
-0
curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java
+57
-0
curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetailsService.java
+24
-0
curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java
+76
-0
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+54
-14
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
+57
-0
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
+59
-0
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
+2
-1
curriculumsearch/src/main/java/com/roshka/modelo/DisponibilidadConverter.java
+6
-1
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
+14
-14
curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java
+63
-0
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
+1
-1
curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumento.java
+27
-0
curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java
+31
-0
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
+17
-5
curriculumsearch/src/main/java/com/roshka/repositorio/RRHHUserRepository.java
+8
-0
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
+3
-1
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
+11
-1
curriculumsearch/src/main/resources/application.properties
+3
-3
curriculumsearch/src/main/resources/json/postulante.json
+14
-14
curriculumsearch/src/main/resources/static/main.js
+18
-6
curriculumsearch/src/main/webapp/jsp/alerts.jsp
+19
-0
curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp
+52
-0
curriculumsearch/src/main/webapp/jsp/header.jsp
+10
-0
curriculumsearch/src/main/webapp/jsp/index.jsp
+17
-5
curriculumsearch/src/main/webapp/jsp/login.jsp
+51
-0
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+18
-15
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+69
-31
curriculumsearch/src/main/webapp/jsp/register_success.jsp
+16
-0
curriculumsearch/src/main/webapp/jsp/registration.jsp
+75
-0
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
+40
-0
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
+50
-0
No files found.
curriculumsearch/pom.xml
View file @
c5671df7
...
...
@@ -63,6 +63,17 @@
<artifactId>
jstl
</artifactId>
<version>
1.2
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.projectlombok</groupId>-->
<!-- <artifactId>lombok</artifactId>-->
<!-- <version>1.18.22</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
</dependencies>
<build>
...
...
curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java
View file @
c5671df7
...
...
@@ -6,15 +6,8 @@ import java.util.List;
import
com.fasterxml.jackson.core.type.TypeReference
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.roshka.modelo.Ciudad
;
import
com.roshka.modelo.Departamento
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.PostulanteTecnologia
;
import
com.roshka.modelo.Tecnologia
;
import
com.roshka.repositorio.CiudadRepository
;
import
com.roshka.repositorio.DepartamentoRepository
;
import
com.roshka.repositorio.PostulanteRepository
;
import
com.roshka.repositorio.TecnologiaRepository
;
import
com.roshka.modelo.*
;
import
com.roshka.repositorio.*
;
import
org.springframework.boot.CommandLineRunner
;
import
org.springframework.boot.SpringApplication
;
...
...
@@ -22,6 +15,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import
org.springframework.boot.autoconfigure.domain.EntityScan
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.data.jpa.repository.config.EnableJpaRepositories
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
@SpringBootApplication
@EnableJpaRepositories
(
"com.roshka.repositorio"
)
...
...
@@ -33,7 +27,8 @@ public class CurriculumsearchApplication {
}
@Bean
CommandLineRunner
runner
(
PostulanteRepository
postRepo
,
TecnologiaRepository
tecRepo
,
DepartamentoRepository
depR
,
CiudadRepository
ciudR
)
{
CommandLineRunner
runner
(
PostulanteRepository
postRepo
,
TecnologiaRepository
tecRepo
,
DepartamentoRepository
depR
,
CiudadRepository
ciudR
,
RRHHUserRepository
rrhhUserRepository
)
{
return
args
->
{
try
{
// read json and write to db
...
...
@@ -53,6 +48,14 @@ public class CurriculumsearchApplication {
List
<
Postulante
>
postulantes
=
mapper
.
readValue
(
inputStream
,
typeReference
);
postRepo
.
saveAll
(
postulantes
);
System
.
out
.
println
(
"postulantes Saved!"
);
String
password
=
new
BCryptPasswordEncoder
().
encode
(
"test"
);
RRHHUser
testuser
=
new
RRHHUser
();
testuser
.
setEmail
(
"test@test.com"
);
testuser
.
setFirstName
(
"test"
);
testuser
.
setLastName
(
"test"
);
testuser
.
setPassword
(
password
);
rrhhUserRepository
.
save
(
testuser
);
System
.
out
.
println
(
"Usuario Test: \nEmail: test@test.com\nPassword: test"
);
}
catch
(
IOException
e
){
System
.
out
.
println
(
"Unable to save tecnologias: "
+
e
.
getMessage
());
...
...
curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
DTO
;
import
java.util.List
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.PostulanteTecnologia
;
public
class
PostulanteListaDTO
{
private
Long
id
;
private
String
nombre
;
private
String
apellido
;
private
Disponibilidad
disponibilidad
;
private
Integer
nivelIngles
;
private
Long
experienciaMeses
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
public
PostulanteListaDTO
(
Long
id
,
String
nombre
,
String
apellido
,
Disponibilidad
disponibilidad
,
Integer
nivelIngles
,
Long
experienciaMeses
,
List
<
PostulanteTecnologia
>
tecnologias
)
{
this
.
id
=
id
;
this
.
nombre
=
nombre
;
this
.
apellido
=
apellido
;
this
.
disponibilidad
=
disponibilidad
;
this
.
nivelIngles
=
nivelIngles
;
this
.
experienciaMeses
=
experienciaMeses
;
this
.
tecnologias
=
tecnologias
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getNombre
()
{
return
nombre
;
}
public
void
setNombre
(
String
nombre
)
{
this
.
nombre
=
nombre
;
}
public
String
getApellido
()
{
return
apellido
;
}
public
void
setApellido
(
String
apellido
)
{
this
.
apellido
=
apellido
;
}
public
Disponibilidad
getDisponibilidad
()
{
return
disponibilidad
;
}
public
void
setDisponibilidad
(
Disponibilidad
disponibilidad
)
{
this
.
disponibilidad
=
disponibilidad
;
}
public
Integer
getNivelIngles
()
{
return
nivelIngles
;
}
public
void
setNivelIngles
(
Integer
nivelIngles
)
{
this
.
nivelIngles
=
nivelIngles
;
}
public
Long
getExperienciaMeses
()
{
return
experienciaMeses
;
}
public
void
setExperienciaMeses
(
Long
experienciaMeses
)
{
this
.
experienciaMeses
=
experienciaMeses
;
}
public
List
<
PostulanteTecnologia
>
getTecnologias
()
{
return
tecnologias
;
}
public
void
setTecnologias
(
List
<
PostulanteTecnologia
>
tecnologias
)
{
this
.
tecnologias
=
tecnologias
;
}
}
curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
configuration
;
import
java.util.Collection
;
import
com.roshka.modelo.RRHHUser
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.userdetails.UserDetails
;
public
class
CustomUserDetails
implements
UserDetails
{
private
RRHHUser
user
;
public
CustomUserDetails
(
RRHHUser
user
)
{
this
.
user
=
user
;
}
@Override
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
return
null
;
}
@Override
public
String
getPassword
()
{
return
user
.
getPassword
();
}
@Override
public
String
getUsername
()
{
return
user
.
getEmail
();
}
@Override
public
boolean
isAccountNonExpired
()
{
return
true
;
}
@Override
public
boolean
isAccountNonLocked
()
{
return
true
;
}
@Override
public
boolean
isCredentialsNonExpired
()
{
return
true
;
}
@Override
public
boolean
isEnabled
()
{
return
true
;
}
public
String
getFullName
()
{
return
user
.
getFirstName
()
+
" "
+
user
.
getLastName
();
}
}
\ No newline at end of file
curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetailsService.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
configuration
;
import
com.roshka.modelo.RRHHUser
;
import
com.roshka.repositorio.RRHHUserRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.security.core.userdetails.UsernameNotFoundException
;
public
class
CustomUserDetailsService
implements
UserDetailsService
{
@Autowired
private
RRHHUserRepository
userRepo
;
@Override
public
UserDetails
loadUserByUsername
(
String
username
)
throws
UsernameNotFoundException
{
RRHHUser
user
=
userRepo
.
findByEmail
(
username
);
if
(
user
==
null
)
{
throw
new
UsernameNotFoundException
(
"User not found"
);
}
return
new
CustomUserDetails
(
user
);
}
}
curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
configuration
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.authentication.dao.DaoAuthenticationProvider
;
import
org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.web.util.matcher.AntPathRequestMatcher
;
import
javax.sql.DataSource
;
@Configuration
@EnableWebSecurity
public
class
WebSecurityConfig
extends
WebSecurityConfigurerAdapter
{
@Autowired
private
DataSource
dataSource
;
@Bean
public
UserDetailsService
userDetailsService
()
{
return
new
CustomUserDetailsService
();
}
@Bean
public
BCryptPasswordEncoder
passwordEncoder
()
{
return
new
BCryptPasswordEncoder
();
}
@Bean
public
DaoAuthenticationProvider
authenticationProvider
()
{
DaoAuthenticationProvider
authProvider
=
new
DaoAuthenticationProvider
();
authProvider
.
setUserDetailsService
(
userDetailsService
());
authProvider
.
setPasswordEncoder
(
passwordEncoder
());
return
authProvider
;
}
@Override
protected
void
configure
(
AuthenticationManagerBuilder
auth
)
throws
Exception
{
auth
.
authenticationProvider
(
authenticationProvider
());
}
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
// .csrf().disable()
.
authorizeRequests
()
.
antMatchers
(
"/"
).
authenticated
()
.
antMatchers
(
"/home"
).
authenticated
()
.
antMatchers
(
"/cargo*"
).
authenticated
()
.
antMatchers
(
"/convocatoria*"
).
authenticated
()
.
antMatchers
(
"/tecnologia*"
).
authenticated
()
.
antMatchers
(
"/postulantes"
).
authenticated
()
.
anyRequest
().
permitAll
()
.
and
()
.
formLogin
()
.
loginPage
(
"/login"
)
.
usernameParameter
(
"email"
)
.
defaultSuccessUrl
(
"/home"
)
.
permitAll
()
.
and
()
.
logout
()
.
logoutUrl
(
"/logout"
)
.
logoutRequestMatcher
(
new
AntPathRequestMatcher
(
"/logout"
,
"GET"
))
.
clearAuthentication
(
true
)
.
invalidateHttpSession
(
true
)
.
deleteCookies
(
"JSESSIONID"
,
"remember-me"
)
.
logoutSuccessUrl
(
"/login"
);
}
}
\ No newline at end of file
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
c5671df7
package
com
.
roshka
.
controller
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Locale
;
import
javax.validation.ConstraintViolationException
;
import
com.roshka.DTO.PostulanteListaDTO
;
import
com.roshka.modelo.*
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
...
...
@@ -13,13 +17,18 @@ import com.roshka.modelo.EstadoCivil;
import
com.roshka.modelo.Nacionalidad
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.TipoExperiencia
;
import
com.roshka.repositorio.*
;
import
com.roshka.repositorio.CiudadRepository
;
import
com.roshka.repositorio.DepartamentoRepository
;
import
com.roshka.repositorio.ExperienciaRepository
;
import
com.roshka.repositorio.InstitucionRepository
;
import
com.roshka.repositorio.PostulanteRepository
;
import
com.roshka.repositorio.TecnologiaRepository
;
import
com.roshka.utils.Helper
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.hibernate.type.StringType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
...
...
@@ -40,7 +49,10 @@ public class PostulanteController {
CiudadRepository
ciuRepo
;
@Autowired
public
PostulanteController
(
PostulanteRepository
post
,
TecnologiaRepository
tecRepo
,
ExperienciaRepository
expRepo
,
InstitucionRepository
institucionRepository
,
DepartamentoRepository
depRepo
,
CiudadRepository
ciuRepo
)
{
public
PostulanteController
(
PostulanteRepository
post
,
TecnologiaRepository
tecRepo
,
ExperienciaRepository
expRepo
,
InstitucionRepository
institucionRepository
,
DepartamentoRepository
depRepo
,
CiudadRepository
ciuRepo
)
{
this
.
post
=
post
;
this
.
tecRepo
=
tecRepo
;
this
.
expRepo
=
expRepo
;
...
...
@@ -49,8 +61,7 @@ public class PostulanteController {
this
.
ciuRepo
=
ciuRepo
;
}
@RequestMapping
(
"/"
)
@RequestMapping
(
"home"
)
public
String
index
()
{
...
...
@@ -59,10 +70,32 @@ public class PostulanteController {
@RequestMapping
(
"/postulantes"
)
public
String
postulantes
(
Model
model
,
@RequestParam
(
required
=
false
,
name
=
"tec"
)
Long
tecnologidaId
)
{
@RequestParam
(
required
=
false
)
Long
tecId
,
@RequestParam
(
required
=
false
)
String
nombre
,
@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
)
{
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
if
(
tecnologidaId
==
null
)
model
.
addAttribute
(
"postulantes"
,
post
.
findAll
());
else
model
.
addAttribute
(
"postulantes"
,
post
.
buscarPostulantesPorTecnologia
(
tecnologidaId
));
model
.
addAttribute
(
"disponibilidades"
,
Disponibilidad
.
values
());
model
.
addAttribute
(
"institucionesEducativas"
,
institucionRepository
.
findAll
());
List
<
Postulante
>
postulantes
=
post
.
postulantesMultiFiltro
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
()
?
new
TypedParameterValue
(
StringType
.
INSTANCE
,
null
)
:
new
TypedParameterValue
(
StringType
.
INSTANCE
,
"%"
+
nombre
+
"%"
),
dispo
,
lvlEng
,
lvlTec
,
tecId
,
instId
);
List
<
PostulanteListaDTO
>
postulantesDTO
=
new
ArrayList
<>();
for
(
Postulante
postulante
:
postulantes
)
{
long
expTotal
=
0
;
//Sumamos el tiempo de experiencia total en meses de cada postulante
//expTotal = postulante.getExperiencias().stream().mapToLong(e -> Helper.getMonthsDifference(e.getFechaDesde(), e.getFechaHasta())).sum();
for
(
Experiencia
experiencia
:
postulante
.
getExperiencias
())
{
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
()));
}
model
.
addAttribute
(
"postulantes"
,
postulantesDTO
);
return
"postulantes"
;
}
...
...
@@ -88,23 +121,30 @@ public class PostulanteController {
@PostMapping
(
value
=
"/postulante"
,
consumes
=
"application/json"
)
public
String
guardarPostulante
(
@RequestBody
Postulante
postulante
){
System
.
out
.
println
(
"hola"
);
postulante
.
getTecnologias
().
stream
().
filter
(
tec
->
tec
.
getTecnologia
().
getId
()
!=
0
).
forEach
(
tec
->
tec
.
setTecnologia
(
tecRepo
.
getById
(
tec
.
getTecnologia
().
getId
()))
);
for
(
Estudio
estudio:
postulante
.
getEstudios
()){
Institucion
institucion
=
institucionRepository
.
findByNombre
(
estudio
.
getInstitucion
().
getNombre
());
String
nombreIns
=
""
;
nombreIns
=
estudio
.
getInstitucion
().
getNombre
().
toLowerCase
();
Institucion
institucion
=
institucionRepository
.
findByNombre
(
nombreIns
);
if
(
institucion
==
null
){
institucionRepository
.
save
(
estudio
.
getInstitucion
());
}
else
{
estudio
.
setInstitucion
(
institucion
);
}
}
System
.
out
.
println
(
"hola"
);
post
.
save
(
postulante
);
return
"redirect:/"
;
return
"redirect:/postulacion-correcta"
;
}
@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"
;
}
@ResponseStatus
(
HttpStatus
.
BAD_REQUEST
)
...
...
@@ -125,11 +165,11 @@ public class PostulanteController {
@GetMapping
({
"/post
id
"
})
public
String
getPostulanteDetalle
(
Model
model
)
{
Postulante
p
=
post
.
findById
(
1L
)
.
get
();
@GetMapping
({
"/post
ulante/{postulanteId}
"
})
public
String
getPostulanteDetalle
(
Model
model
,
@PathVariable
(
"postulanteId"
)
Long
postulanteId
)
{
Postulante
p
=
post
.
findById
(
postulanteId
).
orElse
(
null
);
model
.
addAttribute
(
"postulante"
,
p
);
return
"detallepostulante"
;
}
}
}
curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
controller
;
import
com.roshka.modelo.RRHHUser
;
import
com.roshka.repositorio.RRHHUserRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
javax.servlet.http.HttpServletRequest
;
@Controller
public
class
RRHHUserController
{
private
static
final
long
REGISTER_CODE
=
1234
;
RRHHUserRepository
rrhhUserRepository
;
@Autowired
public
RRHHUserController
(
RRHHUserRepository
rrhhUserRepository
){
this
.
rrhhUserRepository
=
rrhhUserRepository
;
}
@GetMapping
(
"/"
)
public
String
redirectOnHome
(){
return
"redirect:/home"
;
}
@GetMapping
(
"/register"
)
public
String
showRegistrationForm
(
Model
model
)
{
model
.
addAttribute
(
"user"
,
new
RRHHUser
());
return
"registration"
;
}
@GetMapping
(
"/login"
)
public
String
getLogin
(
Model
model
,
HttpServletRequest
request
)
{
if
(
request
.
getParameter
(
"error"
)!=
null
){
model
.
addAttribute
(
"error"
,
"Credenciales Incorrectas"
);
}
return
"login"
;
}
@PostMapping
(
"/process_register"
)
public
String
processRegister
(
HttpServletRequest
request
,
RRHHUser
user
)
{
if
(
Long
.
parseLong
(
request
.
getParameter
(
"registrationCode"
))
!=
REGISTER_CODE
){
return
"redirect:/register"
;
}
BCryptPasswordEncoder
passwordEncoder
=
new
BCryptPasswordEncoder
();
String
encodedPassword
=
passwordEncoder
.
encode
(
user
.
getPassword
());
user
.
setPassword
(
encodedPassword
);
rrhhUserRepository
.
save
(
user
);
return
"register_success"
;
}
}
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
controller
;
import
com.roshka.modelo.Tecnologia
;
import
com.roshka.repositorio.TecnologiaRepository
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Controller
public
class
TecnologiaController
{
TecnologiaRepository
tecRepo
;
@Autowired
public
TecnologiaController
(
TecnologiaRepository
tecRepo
){
this
.
tecRepo
=
tecRepo
;
}
@GetMapping
(
path
=
{
"/tecnologia"
,
"/tecnologia/{id}"
})
public
String
addtecnologiaView
(
Model
model
,
@PathVariable
(
required
=
false
)
Long
id
)
{
if
(
id
==
null
)
model
.
addAttribute
(
"tecnologia"
,
new
Tecnologia
());
else
model
.
addAttribute
(
"tecnologia"
,
tecRepo
.
getById
(
id
));
return
"tecnologia-form"
;
}
@RequestMapping
(
"/tecnologias"
)
public
String
menuTecnologias
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
)
{
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findAll
());
else
model
.
addAttribute
(
"tecnologias"
,
tecRepo
.
findByNombreContainingIgnoreCase
(
nombre
));
return
"tecnologias"
;
}
@PostMapping
(
path
=
{
"/tecnologia"
,
"/tecnologia/{id}"
})
public
String
addtecnologia
(
@ModelAttribute
Tecnologia
tecnologia
,
BindingResult
result
,
@PathVariable
(
required
=
false
)
Long
id
)
{
if
(
result
.
hasErrors
());
if
(
id
!=
null
)
tecnologia
.
setId
(
id
);
tecRepo
.
save
(
tecnologia
);
System
.
out
.
println
(
tecnologia
.
getNombre
());
return
"redirect:/tecnologias"
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
View file @
c5671df7
...
...
@@ -14,6 +14,7 @@ import javax.persistence.Table;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Table
(
name
=
"ciudad"
)
public
class
Ciudad
{
...
...
@@ -66,6 +67,6 @@ public class Ciudad{
}
curriculumsearch/src/main/java/com/roshka/modelo/DisponibilidadConverter.java
View file @
c5671df7
...
...
@@ -6,7 +6,7 @@ import javax.persistence.AttributeConverter;
import
javax.persistence.Converter
;
@Converter
(
autoApply
=
true
)
public
class
DisponibilidadConverter
implements
AttributeConverter
<
Disponibilidad
,
String
>
{
public
class
DisponibilidadConverter
implements
AttributeConverter
<
Disponibilidad
,
String
>
,
org
.
springframework
.
core
.
convert
.
converter
.
Converter
<
String
,
Disponibilidad
>
{
@Override
public
String
convertToDatabaseColumn
(
Disponibilidad
modalidad
)
{
...
...
@@ -27,4 +27,9 @@ public class DisponibilidadConverter implements AttributeConverter<Disponibilida
.
findFirst
()
.
orElseThrow
(
IllegalArgumentException:
:
new
);
}
@Override
public
Disponibilidad
convert
(
String
arg0
)
{
return
convertToEntityAttribute
(
arg0
);
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
View file @
c5671df7
...
...
@@ -30,10 +30,10 @@ public class Postulante {
@Size
(
max
=
255
)
private
String
apellido
;
@Column
(
name
=
"
ci
"
)
@Column
(
name
=
"
nro_document
"
)
@NotBlank
(
message
=
"Este campo no puede estar vacio"
)
@Size
(
max
=
120
)
private
String
ci
;
private
String
nroDocument
;
@Column
(
name
=
"correo"
)
@NotBlank
(
message
=
"Este campo no puede estar vacio"
)
...
...
@@ -61,7 +61,7 @@ public class Postulante {
@Column
(
name
=
"nivel_ingles"
)
@Min
(
value
=
1
)
@Max
(
value
=
5
)
private
long
nivelIngles
;
private
Integer
nivelIngles
;
@Column
(
name
=
"curriculum"
)
private
String
curriculum
;
...
...
@@ -74,9 +74,9 @@ public class Postulante {
@NotNull
private
Nacionalidad
nacionalidad
;
@Column
(
name
=
"tipo_documento"
,
length
=
2
)
@Not
Blank
(
message
=
"este campo debe estar completo"
)
private
String
tipoDocumento
;
@Column
(
name
=
"tipo_documento"
,
length
=
3
)
@Not
Null
private
TipoDocumento
tipoDocumento
;
@Column
(
name
=
"disponibilidad"
,
length
=
2
)
...
...
@@ -131,12 +131,12 @@ public class Postulante {
this
.
apellido
=
apellido
;
}
public
String
get
Ci
()
{
return
ci
;
public
String
get
nroDocument
()
{
return
nroDocument
;
}
public
void
set
Ci
(
String
ci
)
{
this
.
ci
=
ci
;
public
void
set
nroDocument
(
String
nroDocument
)
{
this
.
nroDocument
=
nroDocument
;
}
public
String
getCorreo
()
{
...
...
@@ -175,11 +175,11 @@ public class Postulante {
this
.
resumen
=
resumen
;
}
public
long
getNivelIngles
()
{
public
Integer
getNivelIngles
()
{
return
nivelIngles
;
}
public
void
setNivelIngles
(
long
nivelIngles
)
{
public
void
setNivelIngles
(
Integer
nivelIngles
)
{
this
.
nivelIngles
=
nivelIngles
;
}
...
...
@@ -215,13 +215,13 @@ public class Postulante {
public
void
setEstadoCivil
(
EstadoCivil
estadoCivil
)
{
this
.
estadoCivil
=
estadoCivil
;
}
public
void
setTipoDocumento
(
String
tipoDocumento
)
{
public
void
setTipoDocumento
(
TipoDocumento
tipoDocumento
)
{
this
.
tipoDocumento
=
tipoDocumento
;
}
public
EstadoCivil
getEstadoCivil
()
{
return
estadoCivil
;
}
public
String
getTipoDocumento
()
{
public
TipoDocumento
getTipoDocumento
()
{
return
tipoDocumento
;
}
public
Nacionalidad
getNacionalidad
()
{
...
...
curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
modelo
;
import
javax.persistence.*
;
@Entity
@Table
(
name
=
"recursos_humanos_user"
)
public
class
RRHHUser
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
Long
id
;
@Column
(
nullable
=
false
,
unique
=
true
,
length
=
45
)
private
String
email
;
@Column
(
nullable
=
false
,
length
=
64
)
private
String
password
;
@Column
(
name
=
"first_name"
,
nullable
=
false
,
length
=
20
)
private
String
firstName
;
@Column
(
name
=
"last_name"
,
nullable
=
false
,
length
=
20
)
private
String
lastName
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getEmail
()
{
return
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getPassword
()
{
return
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getFirstName
()
{
return
firstName
;
}
public
void
setFirstName
(
String
firstName
)
{
this
.
firstName
=
firstName
;
}
public
String
getLastName
()
{
return
lastName
;
}
public
void
setLastName
(
String
lastName
)
{
this
.
lastName
=
lastName
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
View file @
c5671df7
...
...
@@ -29,7 +29,7 @@ public class Tecnologia {
this
.
id
=
id
;
}
public
String
getNombre
()
{
return
nombre
.
toLowerCase
()
;
return
nombre
;
}
public
void
setNombre
(
String
nombre
)
{
this
.
nombre
=
nombre
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumento.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
modelo
;
import
com.fasterxml.jackson.annotation.JsonValue
;
public
enum
TipoDocumento
{
CI
(
"CI"
,
"Cedula de identidad"
),
DNI
(
"PAS"
,
"Pasaporte"
),
Otro
(
"Otro"
,
"Otro"
);
private
String
code
;
private
String
descripcion
;
private
TipoDocumento
(
String
code
,
String
descripcion
)
{
this
.
code
=
code
;
this
.
descripcion
=
descripcion
;
}
public
void
setDescripcion
(
String
descripcion
){
this
.
descripcion
=
descripcion
;
}
@JsonValue
public
String
getCode
()
{
return
code
;
}
public
String
getDescripcion
()
{
return
descripcion
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
modelo
;
import
java.util.Arrays
;
import
javax.persistence.AttributeConverter
;
import
javax.persistence.Converter
;
@Converter
(
autoApply
=
true
)
public
class
TipoDocumentoConverter
implements
AttributeConverter
<
TipoDocumento
,
String
>
{
@Override
public
String
convertToDatabaseColumn
(
TipoDocumento
modalidad
)
{
if
(
modalidad
==
null
)
{
return
null
;
}
return
modalidad
.
getCode
();
}
@Override
public
TipoDocumento
convertToEntityAttribute
(
String
code
)
{
if
(
code
==
null
)
{
return
null
;
}
return
Arrays
.
stream
(
TipoDocumento
.
values
())
.
filter
(
c
->
c
.
getCode
().
equals
(
code
))
.
findFirst
()
.
orElseThrow
(
IllegalArgumentException:
:
new
);
}
}
curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java
View file @
c5671df7
...
...
@@ -2,15 +2,17 @@ package com.roshka.repositorio;
import
java.util.List
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
com.roshka.modelo.Disponibilidad
;
import
com.roshka.modelo.Postulante
;
public
interface
PostulanteRepository
extends
JpaRepository
<
Postulante
,
Long
>
{
@Query
(
"select p from Postulante p join p.estudios e on e.institucion LIKE %?1%"
)
@Query
(
"select p from Postulante p join p.estudios e on e.institucion
.nombre
LIKE %?1%"
)
public
List
<
Postulante
>
findByInstitucionEstudio
(
String
institucion
);
@Query
(
"select p from Postulante p "
+
...
...
@@ -36,8 +38,18 @@ public interface PostulanteRepository extends JpaRepository<Postulante,Long> {
"join Tecnologia tec on pt.tecnologia.id=tec.id "
+
"where tec.nombre=?1 and pt.nivel=?2"
)
public
List
<
Postulante
>
findByPostulanteTecnologiaM
(
String
tecno
,
long
idt
);
@Query
(
value
=
"select DISTINCT p "
+
"from Postulante p join p.experiencias x "
+
"join p.estudios e "
+
"join p.tecnologias pt "
+
"where (?1 is null or lower(p.nombre) LIKE lower(?1) or lower(p.apellido) LIKE lower(?1) ) "
+
"and (p.disponibilidad = ?2 or ?2 is null) "
+
"and (p.nivelIngles >= ?3 or ?3 is null) "
+
"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 ) "
)
public
List
<
Postulante
>
postulantesMultiFiltro
(
TypedParameterValue
nombre
,
Disponibilidad
disponibilidad
,
Long
nivelInges
,
Long
nivel
,
Long
tecnoId
,
Long
instId
);
}
curriculumsearch/src/main/java/com/roshka/repositorio/RRHHUserRepository.java
0 → 100644
View file @
c5671df7
package
com
.
roshka
.
repositorio
;
import
com.roshka.modelo.RRHHUser
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
RRHHUserRepository
extends
JpaRepository
<
RRHHUser
,
Long
>
{
RRHHUser
findByEmail
(
String
username
);
}
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
View file @
c5671df7
...
...
@@ -2,9 +2,11 @@ package com.roshka.repositorio;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
import
com.roshka.modelo.Tecnologia
;
public
interface
TecnologiaRepository
extends
JpaRepository
<
Tecnologia
,
Long
>
{
public
List
<
Tecnologia
>
findByNombreContainingIgnoreCase
(
String
nombre
);
}
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
View file @
c5671df7
...
...
@@ -2,6 +2,9 @@ package com.roshka.utils;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.time.YearMonth
;
import
java.time.ZoneOffset
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
public
class
Helper
{
...
...
@@ -12,7 +15,7 @@ public class Helper {
*/
public
static
Date
convertirFecha
(
String
fecha
)
{
try
{
if
(
fecha
==
null
||
fecha
.
trim
().
equals
(
""
))
return
null
;
return
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
parse
(
fecha
);
}
catch
(
ParseException
e
)
{
// TODO Auto-generated catch block
...
...
@@ -21,4 +24,11 @@ public class Helper {
return
null
;
}
}
public
static
final
long
getMonthsDifference
(
Date
date1
,
Date
date2
)
{
YearMonth
m1
=
YearMonth
.
from
(
date1
.
toInstant
().
atZone
(
ZoneOffset
.
UTC
));
YearMonth
m2
=
YearMonth
.
from
(
date2
.
toInstant
().
atZone
(
ZoneOffset
.
UTC
));
return
m1
.
until
(
m2
,
ChronoUnit
.
MONTHS
)
+
1
;
}
}
curriculumsearch/src/main/resources/application.properties
View file @
c5671df7
spring.jpa.hibernate.ddl-auto
=
create-drop
spring.jpa.database-platform
=
org.hibernate.dialect.PostgreSQLDialect
spring.jpa.show-sql
=
true
#
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql
=
true
logging.level.org.hibernate.SQL
=
DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder
=
TRACE
#
logging.level.org.hibernate.SQL=DEBUG
#
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
spring.sql.init.mode
=
always
spring.sql.init.platform
=
postgres
...
...
curriculumsearch/src/main/resources/json/postulante.json
View file @
c5671df7
...
...
@@ -3,11 +3,11 @@
"resumen"
:
"In irure aliquip qui cillum veniam sint amet amet sint ex proident anim mollit."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Taylor"
,
"apellido"
:
"Obrien"
,
"correo"
:
"gladysalexander@dadabase.com"
,
"
ci
"
:
5821432
,
"
nroDocument
"
:
5821432
,
"ciudadId"
:
238
,
"telefono"
:
"(950) 417-3681"
,
"fechaNacimiento"
:
"2021-08-16"
,
...
...
@@ -61,11 +61,11 @@
"resumen"
:
"Do nostrud aliqua adipisicing in sunt aute id do elit ut dolor ad aliquip."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Hopkins"
,
"apellido"
:
"Parks"
,
"correo"
:
"grahamgriffith@zilidium.com"
,
"
ci
"
:
4213361
,
"
nroDocument
"
:
4213361
,
"ciudadId"
:
96
,
"telefono"
:
"(866) 560-2541"
,
"fechaNacimiento"
:
"2021-09-04"
,
...
...
@@ -107,11 +107,11 @@
"resumen"
:
"Occaecat non cupidatat amet reprehenderit consectetur ullamco et."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Alejandra"
,
"apellido"
:
"Riggs"
,
"correo"
:
"ruthrobertson@homelux.com"
,
"
ci
"
:
4605787
,
"
nroDocument
"
:
4605787
,
"ciudadId"
:
30
,
"telefono"
:
"(876) 580-2411"
,
"fechaNacimiento"
:
"2021-01-28"
,
...
...
@@ -153,11 +153,11 @@
"resumen"
:
"Qui ullamco excepteur velit ad ullamco id id nisi irure dolore cupidatat mollit ullamco veniam."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Angelina"
,
"apellido"
:
"Wallace"
,
"correo"
:
"christiwalls@capscreen.com"
,
"
ci
"
:
4591352
,
"
nroDocument
"
:
4591352
,
"ciudadId"
:
65
,
"telefono"
:
"(931) 499-3122"
,
"fechaNacimiento"
:
"2021-06-05"
,
...
...
@@ -199,11 +199,11 @@
"resumen"
:
"Deserunt tempor ut et eiusmod et labore Lorem."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Rivas"
,
"apellido"
:
"Owens"
,
"correo"
:
"shirleyguzman@equitox.com"
,
"
ci
"
:
3969318
,
"
nroDocument
"
:
3969318
,
"ciudadId"
:
143
,
"telefono"
:
"(972) 524-2610"
,
"fechaNacimiento"
:
"2021-09-09"
,
...
...
@@ -245,11 +245,11 @@
"resumen"
:
"Aliqua est adipisicing do exercitation sit laborum aliquip aliqua adipisicing enim aute."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"ci
"
,
"tipoDocumento"
:
"CI
"
,
"nombre"
:
"Estelle"
,
"apellido"
:
"Gamble"
,
"correo"
:
"mclaughlinpate@enomen.com"
,
"
ci
"
:
2329745
,
"
nroDocument
"
:
2329745
,
"ciudadId"
:
248
,
"telefono"
:
"(933) 501-3525"
,
"fechaNacimiento"
:
"2021-03-24"
,
...
...
@@ -291,11 +291,11 @@
"resumen"
:
"Officia eiusmod ut reprehenderit tempor consequat elit amet ex voluptate aute anim do."
,
"nacionalidad"
:
"Paraguayo"
,
"estadoCivil"
:
"Soltero"
,
"tipoDocumento"
:
"
ci
"
,
"tipoDocumento"
:
"
CI
"
,
"nombre"
:
"Mariana"
,
"apellido"
:
"Ratliff"
,
"correo"
:
"loramiddleton@musanpoly.com"
,
"
ci
"
:
4519594
,
"
nroDocument
"
:
4519594
,
"ciudadId"
:
104
,
"telefono"
:
"(817) 492-2493"
,
"fechaNacimiento"
:
"2021-07-30"
,
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
c5671df7
...
...
@@ -26,7 +26,14 @@ const formValidator = function () {
},
false
)
})
}
function
carg
(
elemento
)
{
var
element
=
document
.
getElementById
(
'descripcion'
);
if
(
elemento
==
"otro"
){
element
.
style
.
display
=
'block'
;
}
else
{
element
.
style
.
display
=
'none'
;
}
}
function
agregarFieldExpierncia
(
event
){
//recoger del form
const
pairs
=
{};
...
...
@@ -79,7 +86,7 @@ function agregarFieldExpierncia(event){
content
+=
`
<li id="exp-
${
index
}
">
${
exp
.
institucion
}
<button type="button" onclick="eliminarExperiencia(event)"> <span class="glyphicon glyphicon-trash"></span>
Tras
</button>
<button type="button" onclick="eliminarExperiencia(event)"> <span class="glyphicon glyphicon-trash"></span>
Eliminar
</button>
</li>
`
...
...
@@ -173,6 +180,7 @@ function serializeJSON (form) {
// Create a new FormData object
const
formData
=
new
FormData
(
form
);
// Create an object to hold the name/value pairs
const
pairs
=
{};
...
...
@@ -189,20 +197,24 @@ function serializeJSON (form) {
}
async
function
postData
(
url
=
''
,
data
=
{})
{
var
token
=
document
.
querySelector
(
"meta[name='_csrf']"
).
content
;
var
headerxs
=
document
.
querySelector
(
"meta[name='_csrf_header']"
).
content
;
// Default options are marked with *
const
response
=
await
fetch
(
url
,
{
let
senddata
=
{
method
:
'POST'
,
// *GET, POST, PUT, DELETE, etc.
mode
:
'cors'
,
// no-cors, *cors, same-origin
cache
:
'no-cache'
,
// *default, no-cache, reload, force-cache, only-if-cached
credentials
:
'same-origin'
,
// include, *same-origin, omit
headers
:
{
'Content-Type'
:
'application/json'
// 'Content-Type': 'application/x-www-form-urlencoded',
'Content-Type'
:
'application/json'
,
// 'Content-Type': 'application/x-www-form-urlencoded',
},
redirect
:
'follow'
,
// manual, *follow, error
referrerPolicy
:
'no-referrer'
,
// no-referrer, *no-referrer-when-downgrade, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin, unsafe-url
body
:
data
// body data type must match "Content-Type" header
});
}
senddata
[
"headers"
][
headerxs
]
=
token
;
const
response
=
await
fetch
(
url
,
senddata
);
return
response
;
// parses JSON response into native JavaScript objects
}
formValidator
()
...
...
curriculumsearch/src/main/webapp/jsp/alerts.jsp
0 → 100644
View file @
c5671df7
<%@ 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" %>
<div class="container">
<c:if test="${not empty error}">
<div class="alert alert-danger alert-dismissible fade show" role="alert">
${error}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</c:if>
<c:if test="${not empty success}">
<div class="alert alert-success alert-dismissible fade show" role="alert">
${success}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
</c:if>
</div>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp
0 → 100644
View file @
c5671df7
<
%@
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"
%
>
<html>
<head>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito+Sans:400,400i,700,900&display=swap"
rel=
"stylesheet"
>
</head>
<style>
body
{
text-align
:
center
;
padding
:
40px
0
;
background
:
#EBF0F5
;
}
h1
{
color
:
#506BEE
;
font-family
:
"Nunito Sans"
,
"Helvetica Neue"
,
sans-serif
;
font-weight
:
900
;
font-size
:
40px
;
margin-bottom
:
10px
;
}
p
{
color
:
#404F5E
;
font-family
:
"Nunito Sans"
,
"Helvetica Neue"
,
sans-serif
;
font-size
:
20px
;
margin
:
0
;
}
i
{
color
:
#506BEE
;
font-size
:
100px
;
line-height
:
200px
;
margin-left
:
-15px
;
}
.card
{
background
:
white
;
padding
:
60px
;
border-radius
:
4px
;
box-shadow
:
0
2px
3px
#C8D0D8
;
display
:
inline-block
;
margin
:
0
auto
;
}
</style>
<body>
<div
class=
"card"
>
<div
style=
"border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;"
>
<i
class=
"checkmark"
>
✓
</i>
</div>
<h1>
Genial!
</h1>
<p>
${mensaje1}
<br/>
${mensaje2}
</p>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/header.jsp
0 → 100644
View file @
c5671df7
<%@ 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" %>
<header>
<div class="d-flex">
<div class="ml-auto">
<a href="/logout" class="btn btn-dark">Salir</a></div>
</div>
</header>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
c5671df7
<
%@
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"
>
<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"
>
<title>
Document
</title>
</head>
<body>
<a
href=
"postulante"
>
Form postulante
</a>
<a
href=
"postulantes"
>
Lista de postulantes
</a>
<a
href=
"#"
>
Tecnologias
</a>
<a
href=
"convocatorias"
>
Lista de convocatorias
</a>
<a
href=
"cargos"
>
Lista de cargos
</a>
<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>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/login.jsp
0 → 100644
View file @
c5671df7
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, shrink-to-fit=no"
>
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
<title>
Login
</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://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
</head>
<body>
<jsp:include
page=
"alerts.jsp"
/>
<section
class=
"vh-100"
style=
"background-color: #508bfc;"
>
<div
class=
"container py-5 h-100"
>
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"col-12 col-md-8 col-lg-6 col-xl-5"
>
<div
class=
"card shadow-2-strong"
style=
"border-radius: 1rem;"
>
<div
class=
"card-body p-5 text-center"
>
<form:form
method=
"post"
action=
"/login"
>
<h3
class=
"mb-5"
>
Ingresar
</h3>
<div
class=
"form-outline mb-4"
>
<input
type=
"email"
id=
"typeEmailX-2"
class=
"form-control form-control-lg"
name=
"email"
placeholder=
"example@example.com"
/>
<label
class=
"form-label"
for=
"typeEmailX-2"
>
Email
</label>
</div>
<div
class=
"form-outline mb-4"
>
<input
type=
"password"
id=
"typePasswordX-2"
class=
"form-control form-control-lg"
name=
"password"
/>
<label
class=
"form-label"
for=
"typePasswordX-2"
>
Password
</label>
</div>
<button
class=
"btn btn-primary btn-lg btn-block"
type=
"submit"
>
Ingresar
</button>
</form:form>
<hr
class=
"my-4"
>
</div>
</div>
</div>
</div>
</div>
</section>
<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>
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
c5671df7
...
...
@@ -15,7 +15,7 @@
<style
type=
"text/css"
media=
"screen"
>
body
{
background-color
:
blue
background-color
:
#506BEE
}
.card
{
...
...
@@ -27,7 +27,7 @@
}
.image
span
{
background-color
:
blue
;
background-color
:
#506BEE
;
color
:
#fff
;
padding
:
6px
;
height
:
30px
;
...
...
@@ -43,7 +43,7 @@
}
.user-details
h4
{
color
:
blue
color
:
#506BEE
}
.ratings
{
...
...
@@ -75,7 +75,7 @@
.inputs
input
:focus
{
box-shadow
:
none
;
border
:
2px
solid
blue
border
:
2px
solid
#506BEE
}
.about-inputs
label
{
...
...
@@ -119,10 +119,10 @@
}
.add-experience
:hover
{
background
:
blue
;
background
:
#506BEE
;
color
:
#fff
;
cursor
:
pointer
;
border
:
solid
1px
blue
border
:
solid
1px
#506BEE
}
</style>
...
...
@@ -180,18 +180,19 @@
</c:forEach>
</select>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"tipoDocumento"
class=
"form-label"
>
Tipo de documento
</label>
<input
type=
"text"
name=
"tipoDocumento"
class=
"form-control "
id=
"tipoDocumento"
required
>
<div
class=
"valid-feedback"
>
Luce Bien!
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"tipoDocumento"
class=
"form-label"
>
Tipo de documento
</label>
<select
name=
"tipoDocumento"
id=
"tipoDocumento"
class=
"bg-light"
required
onchange=
'carg(this.value);'
>
<option
value=
'CI'
selected
>
C.I
</option>
<option
value=
'PAS'
>
Pasport
</option>
<option
value=
'Otro'
>
Otro
</option>
</select>
</div>
<div
class=
"inputs mb-3 col-md-6"
>
<label
for=
"
ci"
class=
"form-label"
>
Cedula de identidad
</label>
<input
type=
"number"
name=
"
ci"
class=
"form-control "
id=
"ci
"
required
>
<label
for=
"
nroDocument"
class=
"form-label"
>
Numero de Documento
</label>
<input
type=
"number"
name=
"
nroDocument"
class=
"form-control "
id=
"nroDocument
"
required
>
<div
class=
"valid-feedback"
>
Luce Bien!
</div>
...
...
@@ -468,6 +469,8 @@
</div>
</div>
</div>
<meta
name=
"_csrf"
content=
"${_csrf.token}"
/>
<meta
name=
"_csrf_header"
content=
"${_csrf.headerName}"
/>
<!-- Optional JavaScript; choose one of the two! -->
...
...
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
c5671df7
...
...
@@ -13,28 +13,56 @@
</head>
<body
class=
"container"
>
<div
id=
"buscador"
>
<div
class=
"dropdown"
id=
"experiencia"
>
<a
class=
"btn btn-secondary dropdown-toggle"
href=
"#"
role=
"button"
id=
"dropdownMenuLink"
data-bs-toggle=
"dropdown"
aria-expanded=
"false"
>
Experiencia
</a>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuLink"
>
<li><a
class=
"dropdown-item"
href=
"#"
>
Junior
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
Semisenior
</a></li>
<li><a
class=
"dropdown-item"
href=
"#"
>
Senior
</a></li>
</ul>
</div>
<div
class=
"dropdown"
id=
"tecnologia"
>
<a
class=
"btn btn-secondary dropdown-toggle"
href=
"#"
role=
"button"
id=
"dropdownMenuLink"
data-bs-toggle=
"dropdown"
aria-expanded=
"false"
>
Tecnologia
</a>
<ul
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuLink"
>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
>
<li><a
class=
"dropdown-item"
href=
"?tec=${tecnologia.id}"
>
${tecnologia.nombre}
</a></li>
</c:forEach>
</ul>
</div>
<form
name=
"buscador"
>
<label
for=
"nombre"
>
Nombre
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
>
<button>
Buscar
</button>
<br>
<label
for=
"dispo"
>
Disponbilidad
</label>
<select
name=
"dispo"
id=
"dispo"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${disponibilidades}"
var=
"disponibilidad"
>
<option
value=
"${disponibilidad}"
${
param
.
dispo =
=
disponibilidad
?
"
selected
"
:
""}
>
${disponibilidad.getDescripcion()}
</option>
</c:forEach>
</select>
<label
for=
"tecId"
>
Tecnologias
</label>
<select
name=
"tecId"
id=
"tecId"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${tecnologias}"
var=
"tecnologia"
>
<option
value=
"${tecnologia.id}"
${
param
.
tecId =
=
tecnologia
.
id
?
"
selected
"
:
""}
>
${tecnologia.nombre}
</option>
</c:forEach>
</select>
<label
for=
"instId"
>
Institucion Educativa
</label>
<select
name=
"instId"
id=
"instId"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
items=
"${institucionesEducativas}"
var=
"inst"
>
<option
value=
"${inst.id}"
${
param
.
instId =
=
inst
.
id
?
"
selected
"
:
""}
>
${inst.nombre}
</option>
</c:forEach>
</select>
<br>
<label
for=
"lvlEng"
>
Nivel de Ingles
</label>
<select
name=
"lvlEng"
id=
"lvlEng"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
var =
"lvl"
begin =
"1"
end =
"5"
>
<option
value=
"${lvl}"
${
param
.
lvlEng =
=
lvl
?
"
selected
"
:
""}
>
${lvl}
</option>
</c:forEach>
</select>
<label
for=
"lvlTec"
>
Nivel de Tecnologia
</label>
<select
name=
"lvlTec"
id=
"lvlTec"
>
<option
value=
""
>
Seleccione una opcion
</option>
<c:forEach
var =
"lvl"
begin =
"1"
end =
"5"
>
<option
value=
"${lvl}"
${
param
.
lvlTec =
=
lvl
?
"
selected
"
:
""}
>
${lvl}
</option>
</c:forEach>
</select>
<label
for=
"expInMonths"
>
Experiencia en general
</label>
<select
name=
"expInMonths"
id=
"expInMonths"
>
<option
value=
""
>
Seleccione una opcion
</option>
<option
value=
"6"
>
Mayor a 6 meses
</option>
<option
value=
"12"
>
Mayor a 1 año
</option>
<option
value=
"36"
>
Mayor a 3 años
</option>
<option
value=
"60"
>
Mayor a 5 años
</option>
</select>
</form>
</div>
<table
class=
"table"
>
<thead>
...
...
@@ -54,21 +82,30 @@
<td>
${postulante.nombre} ${postulante.apellido}
</td>
<td>
${postulante.disponibilidad.getDescripcion()}
</td>
<td>
${postulante.nivelIngles}
</td>
<td>
0
</td>
<td>
${postulante.experienciaMeses}
</td>
<td>
<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>
</td>
</tr>
<td><a
href=
"/postulante/${postulante.id}"
>
Ver
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<div
id=
"paginator"
>
</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
;
}
}
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/register_success.jsp
0 → 100644
View file @
c5671df7
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Registration Success
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/webjars/bootstrap/css/bootstrap.min.css"
/>
</head>
<body>
<div
class=
"container text-center"
>
<h3>
You have signed up successfully!
</h3>
<h4><a
href=
"${pageContext.request.contextPath}/login"
>
Click here to Login
</a></h4>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/registration.jsp
0 → 100644
View file @
c5671df7
<
%@
taglib
prefix=
"form"
uri=
"http://www.springframework.org/tags/form"
%
>
<html>
<head>
<meta
charset=
"ISO-8859-1"
>
<title>
Registration Success
</title>
<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://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>
<style>
@media
(
min-width
:
1025px
)
{
.h-custom
{
height
:
100vh
!important
;
}
}
</style>
<body>
<section
class=
"h-100 h-custom"
>
<div
class=
"container py-5 h-100"
>
<div
class=
"row d-flex justify-content-center align-items-center h-100"
>
<div
class=
"col-lg-8 col-xl-6"
>
<div
class=
"card rounded-3"
>
<img
src=
"https://cdn.pixabay.com/photo/2013/08/09/05/54/layer-170971_960_720.jpg"
class=
"w-100"
style=
"border-top-left-radius: .3rem; border-top-right-radius: .3rem;height: 250px;"
alt=
"Sample photo"
;
>
<div
class=
"card-body p-4 p-md-5"
>
<h3
class=
"mb-4 pb-2 pb-md-0 mb-md-5 px-md-2"
>
Informacion de Registro
</h3>
<form:form
action=
"/process_register"
class=
"px-md-2"
method=
"POST"
modelAttribute=
"user"
>
<div
class=
"form-outline mb-4"
>
<form:label
path=
"email"
class=
"form-label"
>
Email
</form:label>
<form:input
path=
"email"
type=
"email"
class=
"form-control"
required=
"required"
></form:input>
</div>
<div
class=
"row"
>
<div
class=
"col-md-6 mb-4"
>
<div
class=
"form-outline"
>
<form:label
path=
"firstName"
class=
"form-label"
>
Nombre
</form:label>
<form:input
path=
"firstName"
class=
"form-control"
></form:input>
</div>
</div>
<div
class=
"col-md-6 mb-4"
>
<div
class=
"form-outline"
>
<form:label
path=
"lastName"
class=
"form-label"
>
Apellido
</form:label>
<form:input
path=
"lastName"
class=
"form-control"
></form:input>
</div>
</div>
</div>
<div
class=
"mb-4"
>
<form:label
path=
"password"
class=
"form-label"
>
Contrasena
</form:label>
<form:input
type=
"password"
path=
"password"
class=
"form-control"
required=
"required"
></form:input>
</div>
<div
class=
"row mb-4 pb-2 pb-md-0 mb-md-5"
>
<div
class=
"col-md-6"
>
<div
class=
"form-outline"
>
<input
type=
"text"
id=
"form3Example1w"
class=
"form-control"
name=
"registrationCode"
required
/>
<label
class=
"form-label"
for=
"form3Example1w"
>
Registration code
</label>
</div>
</div>
</div>
<button
type=
"submit"
class=
"btn btn-success btn-lg mb-1"
>
Submit
</button>
</form:form>
</div>
</div>
</div>
</div>
</div>
</section>
</body>
</html>
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
0 → 100644
View file @
c5671df7
<
%@
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>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<!-- 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>
</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>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
0 → 100644
View file @
c5671df7
<
%@
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"
>
<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
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>
</div>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment