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
3c2e8c53
Commit
3c2e8c53
authored
Nov 09, 2021
by
Cesar Giulano Gonzalez Maqueda
Browse files
Options
Browse Files
Download
Plain Diff
Merge con javi001
parents
7291d37f
e88779db
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
578 additions
and
69 deletions
+578
-69
curriculumsearch/src/main/java/com/roshka/controller/CargoController.java
+53
-0
curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java
+72
-0
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
+59
-0
curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java
+3
-3
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
+2
-8
curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java
+36
-4
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
+1
-1
curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java
+11
-0
curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java
+17
-0
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
+3
-1
curriculumsearch/src/main/webapp/jsp/cargo-form.jsp
+15
-7
curriculumsearch/src/main/webapp/jsp/cargos.jsp
+50
-0
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
+43
-0
curriculumsearch/src/main/webapp/jsp/convocatorias.jsp
+69
-0
curriculumsearch/src/main/webapp/jsp/index.jsp
+6
-1
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
+48
-44
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
+40
-0
curriculumsearch/src/main/webapp/jsp/tecnologias.jsp
+50
-0
No files found.
curriculumsearch/src/main/java/com/roshka/controller/CargoController.java
0 → 100644
View file @
3c2e8c53
package
com
.
roshka
.
controller
;
import
com.roshka.modelo.Cargo
;
import
com.roshka.repositorio.CargoRepository
;
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.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.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Controller
public
class
CargoController
{
CargoRepository
cargoRepo
;
@Autowired
public
CargoController
(
CargoRepository
cargoRepo
)
{
this
.
cargoRepo
=
cargoRepo
;
}
@RequestMapping
(
"/cargos"
)
public
String
menuCargos
(
Model
model
,
@RequestParam
(
required
=
false
)
String
nombre
)
{
if
(
nombre
==
null
||
nombre
.
trim
().
isEmpty
())
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findAll
());
else
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findByNombreContainingIgnoreCase
(
nombre
));
return
"cargos"
;
}
@RequestMapping
(
path
=
{
"/cargo"
,
"/cargo/{id}"
},
method
=
RequestMethod
.
GET
)
public
String
formCargo
(
Model
model
,
@PathVariable
(
required
=
false
)
Long
id
)
{
if
(
id
==
null
)
model
.
addAttribute
(
"cargo"
,
new
Cargo
());
else
model
.
addAttribute
(
"cargo"
,
cargoRepo
.
getById
(
id
));
return
"cargo-form"
;
}
@PostMapping
(
path
=
{
"/cargo"
,
"/cargo/{id}"
})
public
String
guardarCargo
(
@ModelAttribute
Cargo
cargo
,
BindingResult
result
,
@PathVariable
(
required
=
false
)
Long
id
)
{
if
(
result
.
hasErrors
());
if
(
id
!=
null
)
cargo
.
setId
(
id
);
cargoRepo
.
save
(
cargo
);
System
.
out
.
println
(
cargo
.
getNombre
());
return
"redirect:/cargos"
;
}
}
curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java
0 → 100644
View file @
3c2e8c53
package
com
.
roshka
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
com.roshka.repositorio.CargoRepository
;
import
com.roshka.repositorio.ConvocatoriaRepository
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.hibernate.type.IntegerType
;
import
org.hibernate.type.LongType
;
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.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
ConvocatoriaController
{
CargoRepository
cargoRepo
;
ConvocatoriaRepository
convoRepo
;
@Autowired
public
ConvocatoriaController
(
CargoRepository
cargoRepo
,
ConvocatoriaRepository
convoRepo
)
{
this
.
cargoRepo
=
cargoRepo
;
this
.
convoRepo
=
convoRepo
;
}
@RequestMapping
(
"/convocatorias"
)
public
String
menuConvocatorias
(
Model
model
,
@RequestParam
(
required
=
false
)
Long
cargoId
,
@RequestParam
(
required
=
false
)
Integer
isOpen
//1: true, 0: false
)
{
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findAll
());
model
.
addAttribute
(
"convocatorias"
,
convoRepo
.
f1ndByCargoAndEstado
(
new
TypedParameterValue
(
LongType
.
INSTANCE
,
cargoId
),
new
Date
(),
new
TypedParameterValue
(
IntegerType
.
INSTANCE
,
isOpen
)));
//model.addAttribute("convocatorias",cargoId==null? convoRepo.findAll() : convoRepo.findByCargoId(cargoId));
return
"convocatorias"
;
}
@RequestMapping
(
path
=
{
"/convocatoria"
,
"/convocatoria/{id}"
})
public
String
formConvocatoria
(
Model
model
,
@PathVariable
(
required
=
false
)
Long
id
)
{
model
.
addAttribute
(
"cargos"
,
cargoRepo
.
findAll
());
if
(
id
==
null
)
model
.
addAttribute
(
"convocatoria"
,
new
ConvocatoriaCargo
());
else
{
ConvocatoriaCargo
cc
=
convoRepo
.
getById
(
id
);
cc
.
setFechaFinS
(
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
((
cc
.
getFechaFin
())));
cc
.
setFechaInicioS
(
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
((
cc
.
getFechaInicio
())));
model
.
addAttribute
(
"convocatoria"
,
cc
);
}
return
"convocatoria-form"
;
}
@PostMapping
(
path
=
{
"/convocatoria"
,
"/convocatoria/{id}"
})
public
String
guardarConvocatoria
(
@ModelAttribute
ConvocatoriaCargo
convocatoria
,
BindingResult
result
,
@PathVariable
(
required
=
false
)
Long
id
)
{
if
(
result
.
hasErrors
());
if
(
id
!=
null
)
convocatoria
.
setId
(
id
);
convoRepo
.
save
(
convocatoria
);
System
.
out
.
println
(
convocatoria
.
getFechaInicio
());
return
"redirect:/convocatorias"
;
}
}
curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java
0 → 100644
View file @
3c2e8c53
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:/"
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java
View file @
3c2e8c53
...
...
@@ -18,7 +18,7 @@ import com.fasterxml.jackson.annotation.JsonManagedReference;
public
class
Cargo
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
l
ong
id
;
private
L
ong
id
;
@NotBlank
@Column
(
name
=
"nombre"
)
...
...
@@ -28,13 +28,13 @@ public class Cargo {
@JsonManagedReference
private
List
<
ConvocatoriaCargo
>
convocatorias
;
public
l
ong
getId
()
{
public
L
ong
getId
()
{
return
id
;
}
public
String
getNombre
()
{
return
nombre
;
}
public
void
setId
(
l
ong
id
)
{
public
void
setId
(
L
ong
id
)
{
this
.
id
=
id
;
}
public
void
setNombre
(
String
nombre
)
{
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java
View file @
3c2e8c53
...
...
@@ -13,14 +13,8 @@ import javax.persistence.ManyToOne;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
lombok.AccessLevel
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
@Data
@RequiredArgsConstructor
@NoArgsConstructor
(
access
=
AccessLevel
.
PACKAGE
,
force
=
true
)
@Entity
@Table
(
name
=
"ciudad"
)
public
class
Ciudad
{
...
...
curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java
View file @
3c2e8c53
...
...
@@ -12,6 +12,7 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToMany
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.roshka.utils.Helper
;
...
...
@@ -21,13 +22,16 @@ import com.roshka.utils.Helper;
public
class
ConvocatoriaCargo
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
private
l
ong
id
;
private
L
ong
id
;
@ManyToOne
()
@JoinColumn
@JoinColumn
(
name
=
"cargo_id"
,
insertable
=
false
,
updatable
=
false
)
@JsonBackReference
private
Cargo
cargo
;
@Column
(
name
=
"cargo_id"
)
private
Long
cargoId
;
@Column
(
name
=
"fecha_inicio"
)
private
Date
fechaInicio
;
...
...
@@ -37,10 +41,18 @@ public class ConvocatoriaCargo {
@Column
(
name
=
"cupos"
)
private
int
cupos
;
//para deserializar desde el form como string
@Transient
private
String
fechaFinS
;
//para deserializar desde el form como string
@Transient
private
String
fechaInicioS
;
@ManyToMany
(
mappedBy
=
"postulaciones"
)
private
List
<
Postulante
>
postulantes
;
public
l
ong
getId
()
{
public
L
ong
getId
()
{
return
id
;
}
public
Cargo
getCargo
()
{
...
...
@@ -55,7 +67,7 @@ public class ConvocatoriaCargo {
public
Date
getFechaInicio
()
{
return
fechaInicio
;
}
public
void
setId
(
l
ong
id
)
{
public
void
setId
(
L
ong
id
)
{
this
.
id
=
id
;
}
public
void
setCargo
(
Cargo
cargo
)
{
...
...
@@ -82,5 +94,25 @@ public class ConvocatoriaCargo {
public
void
setPostulantes
(
List
<
Postulante
>
postulantes
)
{
this
.
postulantes
=
postulantes
;
}
public
Long
getCargoId
()
{
return
cargoId
;
}
public
void
setCargoId
(
Long
cargoId
)
{
this
.
cargoId
=
cargoId
;
}
public
String
getFechaFinS
()
{
return
fechaFinS
;
}
public
String
getFechaInicioS
()
{
return
fechaInicioS
;
}
public
void
setFechaFinS
(
String
fechaFinS
)
{
this
.
fechaFinS
=
fechaFinS
;
setFechaFin
(
fechaFinS
);
}
public
void
setFechaInicioS
(
String
fechaInicioS
)
{
this
.
fechaInicioS
=
fechaInicioS
;
setFechaInicio
(
fechaInicioS
);
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java
View file @
3c2e8c53
...
...
@@ -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/repositorio/CargoRepository.java
0 → 100644
View file @
3c2e8c53
package
com
.
roshka
.
repositorio
;
import
java.util.List
;
import
com.roshka.modelo.Cargo
;
import
org.springframework.data.jpa.repository.JpaRepository
;
public
interface
CargoRepository
extends
JpaRepository
<
Cargo
,
Long
>{
public
List
<
Cargo
>
findByNombreContainingIgnoreCase
(
String
nombre
);
}
curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java
0 → 100644
View file @
3c2e8c53
package
com
.
roshka
.
repositorio
;
import
java.util.Date
;
import
java.util.List
;
import
com.roshka.modelo.ConvocatoriaCargo
;
import
org.hibernate.jpa.TypedParameterValue
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
public
interface
ConvocatoriaRepository
extends
JpaRepository
<
ConvocatoriaCargo
,
Long
>
{
public
List
<
ConvocatoriaCargo
>
findByCargoId
(
Long
cargoId
);
@Query
(
"select c from ConvocatoriaCargo c where ( ?1 is null and ?3 is null) or ( ( ( (c.fechaFin > ?2 and ?3 = 1) or (c.fechaFin < ?2 and ?3 = 0)) or ?3 is null ) and (c.cargoId = ?1 or ?1 is null) )"
)
public
List
<
ConvocatoriaCargo
>
f1ndByCargoAndEstado
(
TypedParameterValue
cargoId
,
Date
fecha
,
TypedParameterValue
isOpen
);
}
curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java
View file @
3c2e8c53
...
...
@@ -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/webapp/jsp/cargo.jsp
→
curriculumsearch/src/main/webapp/jsp/cargo
-form
.jsp
View file @
3c2e8c53
...
...
@@ -8,14 +8,21 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<h1>
Hola
</h1>
<c:forEach
var=
"i"
items=
"${postu}"
>
<tr>
<td>
- ${i.getPostulante().getNombre()}
</td>
</tr>
<br/>
</c:forEach>
<div
class=
"container"
>
<form:form
action=
"/cargo/${cargo.id == null ? '' : cargo.id}"
method=
"post"
modelAttribute=
"cargo"
class=
"row row-cols-lg-auto g-3 align-items-center"
>
<div
class=
"col-12"
>
<form:label
class=
"form-label visually-hidden"
path=
"nombre"
>
Nombre del cargo
</form:label>
<form:input
type=
"text"
path=
"nombre"
class=
"form-control"
placeholder=
"Nombre del cargo"
/>
</div>
<div
class=
"col-12"
>
<input
type=
"submit"
value=
"Guardar"
class=
"btn btn-primary"
/>
</div>
</form:form>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/cargos.jsp
0 → 100644
View file @
3c2e8c53
<
%@
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>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body
class=
"container"
>
<div>
<form>
<label
for=
"cargos"
>
Nombre:
</label>
<input
type=
"text"
name=
"nombre"
id=
"nombre"
value=
"${param.nombre}"
/>
<input
type=
"submit"
value=
"Buscar"
>
</form>
<a
href=
"/cargo"
>
Agregar Nuevo Cargo
</a>
</div>
<div>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${cargos}"
var=
"cargo"
varStatus=
"sta"
>
<tr>
<th
scope=
"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>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
0 → 100644
View file @
3c2e8c53
<
%@
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>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body>
<div
class=
"container"
>
<form:form
action=
"/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}"
method=
"post"
modelAttribute=
"convocatoria"
>
<div
class=
"mb-3"
>
<form:label
path=
"fechaInicioS"
class=
"form-label"
>
Fecha inicial
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaInicioS"
/>
</div>
<div
class=
"mb-3"
>
<form:label
path=
"fechaFinS"
class=
"form-label"
>
Fecha Fin
</form:label>
<form:input
type=
"date"
class=
"form-control"
path=
"fechaFinS"
/>
</div>
<div
class=
"mb-3"
>
<form:label
path=
"cupos"
class=
"form-label"
>
Cupos:
</form:label>
<form:input
type=
"number"
class=
"form-control"
path=
"cupos"
/>
</div>
<div
class=
"mb-3 form-check"
>
<form:label
path=
"cargoId"
class=
"form-label"
>
Cargo
</form:label>
<form:select
class=
"form-select"
path=
"cargoId"
>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<form:option
value=
"${cargo.id}"
>
${cargo.nombre}
</form:option>
</c:forEach>
</form:select>
</div>
<button
type=
"submit"
class=
"btn btn-primary"
>
Guardar
</button>
</form:form>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/convocatorias.jsp
0 → 100644
View file @
3c2e8c53
<
%@
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>
Cargo
</title>
<link
href=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel=
"stylesheet"
integrity=
"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin=
"anonymous"
>
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
</head>
<body
class=
"container"
>
<div>
<form>
<label
for=
"cargos"
>
Cargos:
</label>
<select
class=
"form-select"
name=
"cargoId"
id=
"cargos"
>
<option
value=
""
>
Todos los cargos
</option>
<c:forEach
items=
"${cargos}"
var=
"cargo"
>
<option
value=
"${cargo.id}"
${
param
.
cargoId =
=
cargo
.
id
?
"
selected
"
:
""}
>
${cargo.nombre}
</option>
</c:forEach>
</select>
Estado:
<input
type=
"radio"
id=
"cualquiera"
name=
"isOpen"
checked
value=
""
>
<label
for=
"abierto"
>
Cualquiera
</label><br>
<input
type=
"radio"
id=
"abierto"
name=
"isOpen"
value=
"1"
>
<label
for=
"abierto"
>
Abierto
</label><br>
<input
type=
"radio"
id=
"cerrado"
name=
"isOpen"
value=
"0"
>
<label
for=
"cerrado"
>
Cerrado
</label><br>
<input
type=
"submit"
value=
"Buscar"
>
</form>
</div>
<div>
<a
href=
"/convocatoria"
>
Agregar Nueva Convocatoria
</a>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Cargo
</th>
<th
scope=
"col"
>
Fecha Desde
</th>
<th
scope=
"col"
>
Fecha Hasta
</th>
<th
scope=
"col"
>
Vacantes
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${convocatorias}"
var=
"convocatoria"
varStatus=
"sta"
>
<tr>
<th
scope=
"row"
>
${sta.index+1}
</th>
<td>
${convocatoria.getCargo().getNombre()}
</td>
<td>
${convocatoria.getFechaInicio().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getFechaFin().toString().split(" ")[0]}
</td>
<td>
${convocatoria.getCupos()}
</td>
<td>
Ver Postulantes
</td>
<td><a
href=
"/convocatoria/${convocatoria.id}"
>
Editar
</a></td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
3c2e8c53
...
...
@@ -13,7 +13,6 @@
<title>
Document
</title>
</head>
<body>
<div
class=
"container"
>
<jsp:include
page=
"header.jsp"
/>
<a
href=
"postulante"
>
Form postulante
</a>
...
...
@@ -26,5 +25,10 @@
</form>
</div>
</div>
<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>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/postulantes.jsp
View file @
3c2e8c53
...
...
@@ -11,43 +11,45 @@
<script
src=
"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity=
"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin=
"anonymous"
></script>
<title>
Lista de postulantes
</title>
</head>
<body
class=
"container"
>
<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>
<body>
<div
class=
"container"
>
<jsp:include
page=
"header.jsp"
/>
<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>
</div>
</div>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Nombre
</th>
<th
scope=
"col"
>
Disponibilidad
</th>
<th
scope=
"col"
>
Nivel de Ingles
</th>
<th
scope=
"col"
>
Experiencia
</th>
<th
scope=
"col"
>
Tecnologias
</th>
</tr>
</thead>
<tbody>
<table
class=
"table"
>
<thead>
<tr>
<th
scope=
"col"
>
#
</th>
<th
scope=
"col"
>
Nombre
</th>
<th
scope=
"col"
>
Disponibilidad
</th>
<th
scope=
"col"
>
Nivel de Ingles
</th>
<th
scope=
"col"
>
Experiencia
</th>
<th
scope=
"col"
>
Tecnologias
</th>
</tr>
</thead>
<tbody>
<c:forEach
items=
"${postulantes}"
var=
"postulante"
varStatus=
"staPost"
>
<tr>
<th
scope=
"row"
>
${staPost.index + 1}
</th>
...
...
@@ -57,18 +59,19 @@
<td>
0
</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>
</tr>
</c:forEach>
</tbody>
</table>
<div
id=
"paginator"
>
</div>
</tbody>
</table>
<div
id=
"paginator"
>
</div>
</div>
</body>
</html>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/tecnologia-form.jsp
0 → 100644
View file @
3c2e8c53
<
%@
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 @
3c2e8c53
<
%@
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