Commit 9d28912b by Cesar Giulano Gonzalez Maqueda

Merge branch 'William_001' of https://phoebe.roshka.com/gitlab/hshah/TalentoHumano into giuli_001

parents d8e3eeb7 f5616336
...@@ -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();
}
} }
......
...@@ -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;
}
......
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;
}
}
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);
}
}
...@@ -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;
}
} }
...@@ -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);*/
} }
<%@ 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
<%@ 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
...@@ -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>Cargo</title> <title>Convocatoria</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
...@@ -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>
......
...@@ -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
...@@ -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
...@@ -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
...@@ -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
...@@ -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>
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment