Commit 0eb6fbe3 by Joaquin Elias Baranda Ayala

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

parents 029bb203 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;
}
......
...@@ -14,6 +14,7 @@ import com.roshka.modelo.*; ...@@ -14,6 +14,7 @@ import com.roshka.modelo.*;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.roshka.modelo.Disponibilidad; import com.roshka.modelo.Disponibilidad;
import com.roshka.modelo.EstadoPostulante;
import com.roshka.modelo.EstadoCivil; import com.roshka.modelo.EstadoCivil;
import com.roshka.modelo.Nacionalidad; import com.roshka.modelo.Nacionalidad;
import com.roshka.modelo.Postulante; import com.roshka.modelo.Postulante;
...@@ -42,6 +43,7 @@ import org.springframework.http.HttpStatus; ...@@ -42,6 +43,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -90,12 +92,14 @@ public class PostulanteController { ...@@ -90,12 +92,14 @@ public class PostulanteController {
public String postulantes(Model model, public String postulantes(Model model,
@RequestParam(required = false)Long tecId, @RequestParam(required = false)Long tecId,
@RequestParam(required = false)String nombre, @RequestParam(required = false)String nombre,
@RequestParam(required = false)EstadoPostulante estado,
@RequestParam(required = false)Disponibilidad dispo, @RequestParam(required = false)Disponibilidad dispo,
@RequestParam(required = false)Long lvlEng, @RequestParam(required = false)Long lvlEng,
@RequestParam(required = false)Long lvlTec, @RequestParam(required = false)Long lvlTec,
@RequestParam(required = false)Long instId, @RequestParam(required = false)Long instId,
@RequestParam(required = false)Long expInMonths, @RequestParam(required = false)Long expInMonths,
@RequestParam(required = false)Long cargoId, @RequestParam(required = false)Long cargoId,
@RequestParam(required = false)Long convId,
@RequestParam(defaultValue = "0")Integer nroPagina @RequestParam(defaultValue = "0")Integer nroPagina
) { ) {
final Integer CANTIDAD_POR_PAGINA = 5; final Integer CANTIDAD_POR_PAGINA = 5;
...@@ -103,7 +107,9 @@ public class PostulanteController { ...@@ -103,7 +107,9 @@ public class PostulanteController {
model.addAttribute("tecnologias", tecRepo.findAll()); model.addAttribute("tecnologias", tecRepo.findAll());
model.addAttribute("disponibilidades", Disponibilidad.values()); model.addAttribute("disponibilidades", Disponibilidad.values());
model.addAttribute("institucionesEducativas", institucionRepository.findAll()); model.addAttribute("institucionesEducativas", institucionRepository.findAll());
Page<Postulante> postulantesPag = post.postulantesMultiFiltro(nombre == null || nombre.trim().isEmpty() ? new TypedParameterValue(StringType.INSTANCE,null) : new TypedParameterValue(StringType.INSTANCE,"%"+nombre+"%"), dispo, lvlEng, lvlTec, tecId, instId,cargoId,page); model.addAttribute("estadoP", EstadoPostulante.values());
model.addAttribute("convocatoriaC", cargoRepo.findAll());
Page<Postulante> postulantesPag = post.postulantesMultiFiltro(nombre == null || nombre.trim().isEmpty() ? new TypedParameterValue(StringType.INSTANCE,null) : new TypedParameterValue(StringType.INSTANCE,"%"+nombre+"%"),dispo, lvlEng, lvlTec, tecId, instId,cargoId,page,estado,convId);
List<Postulante> postulantes = postulantesPag.getContent(); List<Postulante> postulantes = postulantesPag.getContent();
List<PostulanteListaDTO> postulantesDTO = new ArrayList<>(); List<PostulanteListaDTO> postulantesDTO = new ArrayList<>();
...@@ -115,7 +121,7 @@ public class PostulanteController { ...@@ -115,7 +121,7 @@ public class PostulanteController {
expTotal += Helper.getMonthsDifference(experiencia.getFechaDesde(), experiencia.getFechaHasta()); expTotal += Helper.getMonthsDifference(experiencia.getFechaDesde(), experiencia.getFechaHasta());
} }
if(expInMonths != null && expInMonths > expTotal) continue; if(expInMonths != null && expInMonths > expTotal) continue;
postulantesDTO.add(new PostulanteListaDTO(postulante.getId(), postulante.getNombre(), postulante.getApellido(), postulante.getDisponibilidad(), postulante.getNivelIngles(), expTotal, postulante.getTecnologias())); postulantesDTO.add(new PostulanteListaDTO(postulante.getId(), postulante.getNombre(), postulante.getApellido(), postulante.getDisponibilidad(), postulante.getNivelIngles(), expTotal, postulante.getTecnologias(),postulante.getEstadoPostulante(),postulante.getPostulaciones()));
} }
model.addAttribute("pages", postulantesPag.getTotalPages()); model.addAttribute("pages", postulantesPag.getTotalPages());
...@@ -207,7 +213,19 @@ public class PostulanteController { ...@@ -207,7 +213,19 @@ public class PostulanteController {
public String getPostulanteDetalle(Model model, @PathVariable("postulanteId") Long postulanteId) { public String getPostulanteDetalle(Model model, @PathVariable("postulanteId") Long postulanteId) {
Postulante p = post.findById(postulanteId).orElse(null); Postulante p = post.findById(postulanteId).orElse(null);
model.addAttribute("postulante",p); model.addAttribute("postulante",p);
model.addAttribute("estadoP", EstadoPostulante.values());
return "detallepostulante"; return "detallepostulante";
} }
@PostMapping({"/postulante/{postulanteId}"})
public String setPostulanteEstado(@ModelAttribute Postulante postulante, BindingResult result, @PathVariable("postulanteId") Long postulanteId) {
//post.setPostulanteEstadoAndComentario(postulante.getEstadoPostulante(),postulante.getComentarioRRHH(), postulante.getId());
Postulante postulanteVd = post.getById(postulanteId);
postulanteVd.setEstadoPostulante(postulante.getEstadoPostulante());
postulanteVd.setComentarioRRHH(postulante.getComentarioRRHH());
post.setPostulanteEstadoAndComentario(postulante.getEstadoPostulante(), postulante.getComentarioRRHH(), postulanteId);
//post.save(postulanteVd);
return "redirect:/postulante/"+postulanteId;
} }
}
\ No newline at end of file
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);
}
}
...@@ -73,6 +73,13 @@ public class Postulante { ...@@ -73,6 +73,13 @@ public class Postulante {
@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
private Nacionalidad nacionalidad; private Nacionalidad nacionalidad;
...@@ -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"> />
<script
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
</head>
<body>
<jsp:include page="header.jsp" />
<jsp:include page="alerts.jsp" />
<div class="container-xxl my-md-4 bd-layout">
<h2>Agregar Cargo</h2>
<div class="p-3 mb-2 bg-light text-dark border border-light">
<form:form
action="/cargo/${cargo.id == null ? '' : cargo.id}"
method="post"
modelAttribute="cargo"
class="row row-cols-lg-auto g-3 align-items-center"
>
<div class="col-12"> <div class="col-12">
<form:label class="form-label visually-hidden" path="nombre">Nombre del cargo </form:label> <form:label class="form-label visually-hidden" path="nombre"
<form:input type="text" path="nombre" class="form-control" placeholder="Nombre del cargo"/> >Nombre del cargo
</form:label>
<form:input
type="text"
path="nombre"
class="form-control"
placeholder="Nombre del cargo" required="true"
/>
</div> </div>
<div class="col-12"> <div class="col-12">
<input type="submit" value="Guardar" class="btn btn-primary"/> <input type="submit" value="Guardar" class="btn btn-primary" />
</div> </div>
</form:form> </form:form>
</div> </div>
</body> </div>
</body>
</html> </html>
<%@ 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"
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> <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>
...@@ -29,21 +47,21 @@ ...@@ -29,21 +47,21 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<c:forEach items="${cargos}" var="cargo" varStatus="sta"> <c:forEach items="${cargos}" var="cargo" varStatus="sta">
<tr> <tr>
<th scope="row">${sta.index+1}</th> <th scope="row">${sta.index+1}</th>
<td>${cargo.getNombre()}</td> <td>${cargo.getNombre()}</td>
<td><a href="/convocatorias?cargoId=${cargo.id}">Ver Convocatorias</a></td> <td>
<a href="/convocatorias?cargoId=${cargo.id}"
>Ver Convocatorias</a
>
</td>
<td><a href="/cargo/${cargo.id}">Editar cargo</a></td> <td><a href="/cargo/${cargo.id}">Editar cargo</a></td>
</tr> </tr>
</c:forEach> </c:forEach>
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>
...@@ -7,29 +7,33 @@ ...@@ -7,29 +7,33 @@
<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"/>
<jsp:include page="alerts.jsp"/>
<div class="container-xxl my-md-4 bd-layout">
<h2>Agregar Convocatoria</h2>
<div class="p-3 mb-2 bg-light text-dark border border-light ">
<form:form action="/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}" method="post" modelAttribute="convocatoria"> <form:form action="/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}" method="post" modelAttribute="convocatoria">
<div class="mb-3"> <div class="mb-3 col-3">
<form:label path="fechaInicioS" class="form-label">Fecha inicial</form:label> <form:label path="fechaInicioS" class="form-label">Fecha inicial</form:label>
<form:input type="date" class="form-control" path="fechaInicioS"/> <form:input type="date" class="form-control" path="fechaInicioS" required="true"/>
</div> </div>
<div class="mb-3"> <div class="mb-3 col-3">
<form:label path="fechaFinS" class="form-label">Fecha Fin</form:label> <form:label path="fechaFinS" class="form-label">Fecha Fin</form:label>
<form:input type="date" class="form-control" path="fechaFinS"/> <form:input type="date" class="form-control" path="fechaFinS" required="true"/>
</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="cupos" class="form-label">Cupos:</form:label>
<form:input type="number" class="form-control" path="cupos"/> <form:input type="number" class="form-control" path="cupos" 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="cargoId" class="form-label">Cargo</form:label>
<form:select class="form-select" path="cargoId"> <form:select class="form-select" path="cargoId" required="true">
<c:forEach items="${cargos}" var="cargo"> <c:forEach items="${cargos}" var="cargo">
<form:option value="${cargo.id}">${cargo.nombre} </form:option> <form:option value="${cargo.id}">${cargo.nombre} </form:option>
</c:forEach> </c:forEach>
...@@ -38,5 +42,6 @@ ...@@ -38,5 +42,6 @@
<button type="submit" class="btn btn-primary">Guardar</button> <button type="submit" class="btn btn-primary">Guardar</button>
</form:form> </form:form>
</div> </div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -11,11 +11,15 @@ ...@@ -11,11 +11,15 @@
<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 >
<jsp:include page="header.jsp"/>
<jsp:include page="alerts.jsp"/>
<div class="container-xxl my-md-4 bd-layout">
<h2>Lista de convocatorias</h2>
<div> <div>
<form> <form>
<label for="cargos">Cargos:</label> <label for="cargos">Cargos:</label>
<select class="form-select" name="cargoId" id="cargos"> <select name="cargoId" id="cargos">
<option value="">Todos los cargos</option> <option value="">Todos los cargos</option>
<c:forEach items="${cargos}" var="cargo"> <c:forEach items="${cargos}" var="cargo">
<option value="${cargo.id}" ${param.cargoId == cargo.id ? "selected" : ""} >${cargo.nombre}</option> <option value="${cargo.id}" ${param.cargoId == cargo.id ? "selected" : ""} >${cargo.nombre}</option>
...@@ -63,6 +67,7 @@ ...@@ -63,6 +67,7 @@
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -2,12 +2,20 @@ ...@@ -2,12 +2,20 @@
<%@ 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>
<jsp:include page="header.jsp"/>
<jsp:include page="alerts.jsp"/>
<div class="container-xxl my-md-4 bd-layout">
<h2 style="text-align: center;">DETALLE POSTULANTE</h2> <h2 style="text-align: center;">DETALLE POSTULANTE</h2>
<div style="padding: 10px;margin: 3px;border: 1px solid black;"> <div style="padding: 10px;margin: 3px;border: 1px solid black;">
...@@ -28,7 +36,8 @@ ...@@ -28,7 +36,8 @@
<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>
...@@ -75,6 +84,35 @@ ...@@ -75,6 +84,35 @@
</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>
......
...@@ -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 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>
</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"/>
<a href="postulante">Form postulante</a> <div class="container-xxl my-md-4 bd-layout">
<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,12 +102,13 @@ ...@@ -83,12 +102,13 @@
<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>
...@@ -104,6 +124,7 @@ ...@@ -104,6 +124,7 @@
</ul> </ul>
</nav> </nav>
</div> </div>
</div>
<script> <script>
function habilitarLvlTec(){ function habilitarLvlTec(){
//si se selecciono una tecnologia entonces permitir seleccionar un nivel //si se selecciono una tecnologia entonces permitir seleccionar un nivel
......
...@@ -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>
<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> </form:form>
</div>
</div>
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
<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>
<jsp:include page="header.jsp"/>
<jsp:include page="alerts.jsp"/>
<div class="container-xxl my-md-4 bd-layout">
<h2>Lista de Tecnologias</h2>
<div> <div>
<form> <form>
<label for="tecnologias">Nombre:</label> <label for="tecnologias">Nombre:</label>
...@@ -44,6 +49,7 @@ ...@@ -44,6 +49,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
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