Commit 3b3ca2b2 by willgonzz

merge con joel-001

parents 213dc71c f9945b4e
{
"java.configuration.updateBuildConfiguration": "interactive"
}
\ No newline at end of file
...@@ -78,6 +78,13 @@ ...@@ -78,6 +78,13 @@
<!-- <version>1.18.22</version>--> <!-- <version>1.18.22</version>-->
<!-- <scope>provided</scope>--> <!-- <scope>provided</scope>-->
<!-- </dependency>--> <!-- </dependency>-->
<dependency>
<groupId>kr.pe.kwonnam.jsp</groupId>
<artifactId>jsp-template-inheritance</artifactId>
<version>0.3.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
package com.roshka.controller; package com.roshka.controller;
import javax.validation.Valid;
import com.roshka.modelo.Cargo; import com.roshka.modelo.Cargo;
import com.roshka.repositorio.CargoRepository; import com.roshka.repositorio.CargoRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -42,8 +44,11 @@ public class CargoController { ...@@ -42,8 +44,11 @@ public class CargoController {
} }
@PostMapping(path = {"/cargo","/cargo/{id}"}) @PostMapping(path = {"/cargo","/cargo/{id}"})
public String guardarCargo(@ModelAttribute Cargo cargo, BindingResult result, @PathVariable(required = false) Long id) { public String guardarCargo(@Valid @ModelAttribute Cargo cargo, BindingResult result, @PathVariable(required = false) Long id, Model model) {
if(result.hasErrors()); if(result.hasErrors() || (id==null && cargoRepo.existsByNombreIgnoreCase(cargo.getNombre()) )){
model.addAttribute("mismoNombre", true);
return "cargo-form";
};
if(id != null ) cargo.setId(id); if(id != null ) cargo.setId(id);
cargoRepo.save(cargo); cargoRepo.save(cargo);
System.out.println(cargo.getNombre()); System.out.println(cargo.getNombre());
......
package com.roshka.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("/home")
public class HomeController {
@RequestMapping()
public String home(Model model) {
return "index";
}
}
...@@ -81,13 +81,6 @@ public class PostulanteController { ...@@ -81,13 +81,6 @@ public class PostulanteController {
this.carRepo=carRepo; this.carRepo=carRepo;
} }
@RequestMapping("home")
public String index() {
return "index";
}
@RequestMapping("/postulantes") @RequestMapping("/postulantes")
public String postulantes(Model model, public String postulantes(Model model,
@RequestParam(required = false)Long tecId, @RequestParam(required = false)Long tecId,
...@@ -184,8 +177,8 @@ public class PostulanteController { ...@@ -184,8 +177,8 @@ public class PostulanteController {
return "redirect:/postulacion-correcta"; return "redirect:/postulacion-correcta";
} }
@GetMapping("/postulacion-correcta") @GetMapping("/postulacion-correcta")
public String successPostulation(Model model){ public String successPostulation(Model model){
model.addAttribute("mensaje1", "Tu informacion se ha recibido correctamente!"); model.addAttribute("mensaje1", "Tu informacion se ha recibido correctamente!");
model.addAttribute("mensaje2", " espera por que nos pongamos en contacto!"); model.addAttribute("mensaje2", " espera por que nos pongamos en contacto!");
return "exitoRegistro"; return "exitoRegistro";
...@@ -213,9 +206,9 @@ public class PostulanteController { ...@@ -213,9 +206,9 @@ 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()); model.addAttribute("estadoP", EstadoPostulante.values());
return "detallepostulante2"; return "detallepostulante";
} }
@PostMapping({"/postulante/{postulanteId}"}) @PostMapping({"/postulante/{postulanteId}"})
public String setPostulanteEstado(@ModelAttribute Postulante postulante, BindingResult result, @PathVariable("postulanteId") Long postulanteId) { public String setPostulanteEstado(@ModelAttribute Postulante postulante, BindingResult result, @PathVariable("postulanteId") Long postulanteId) {
......
package com.roshka.controller; package com.roshka.controller;
import javax.validation.Valid;
import com.roshka.modelo.Tecnologia; import com.roshka.modelo.Tecnologia;
import com.roshka.repositorio.TecnologiaRepository; import com.roshka.repositorio.TecnologiaRepository;
...@@ -45,8 +47,11 @@ public String addtecnologiaView(Model model,@PathVariable(required = false) Long ...@@ -45,8 +47,11 @@ public String addtecnologiaView(Model model,@PathVariable(required = false) Long
} }
@PostMapping(path = {"/tecnologia","/tecnologia/{id}"}) @PostMapping(path = {"/tecnologia","/tecnologia/{id}"})
public String addtecnologia(@ModelAttribute Tecnologia tecnologia, BindingResult result, @PathVariable(required = false) Long id) { public String addtecnologia(@Valid @ModelAttribute Tecnologia tecnologia, BindingResult result, @PathVariable(required = false) Long id, Model model) {
if(result.hasErrors()); if(result.hasErrors() || (id==null && tecRepo.existsByNombreIgnoreCase(tecnologia.getNombre()))){
model.addAttribute("mismoNombre", true);
return "tecnologia-form";
}
if(id != null ) tecnologia.setId(id); if(id != null ) tecnologia.setId(id);
tecRepo.save(tecnologia); tecRepo.save(tecnologia);
System.out.println(tecnologia.getNombre()); System.out.println(tecnologia.getNombre());
......
...@@ -15,17 +15,17 @@ public class Tecnologia { ...@@ -15,17 +15,17 @@ public class Tecnologia {
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@Id @Id
@Column(name="id") @Column(name="id")
private long id; private Long id;
@Column(name="nombre") @Column(name="nombre")
@NotBlank(message = "Este campo no puede estar vacio") @NotBlank(message = "Este campo no puede estar vacio")
private String nombre; private String nombre;
public long getId() { public Long getId() {
return id; return id;
} }
public void setId(long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public String getNombre() { public String getNombre() {
......
...@@ -8,4 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository; ...@@ -8,4 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
public interface CargoRepository extends JpaRepository<Cargo,Long>{ public interface CargoRepository extends JpaRepository<Cargo,Long>{
public List<Cargo> findByNombreContainingIgnoreCase(String nombre); public List<Cargo> findByNombreContainingIgnoreCase(String nombre);
public boolean existsByNombreIgnoreCase(String nombre);
} }
...@@ -9,4 +9,6 @@ import com.roshka.modelo.Tecnologia; ...@@ -9,4 +9,6 @@ import com.roshka.modelo.Tecnologia;
public interface TecnologiaRepository extends JpaRepository<Tecnologia,Long> { public interface TecnologiaRepository extends JpaRepository<Tecnologia,Long> {
public List<Tecnologia> findByNombreContainingIgnoreCase(String nombre); public List<Tecnologia> findByNombreContainingIgnoreCase(String nombre);
public boolean existsByNombreIgnoreCase(String nombre);
} }
spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
#spring.jpa.show-sql=true spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.format_sql=true
#logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.SQL=DEBUG
#logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
spring.sql.init.mode=always spring.sql.init.mode=always
spring.sql.init.platform=postgres spring.sql.init.platform=postgres
...@@ -24,3 +24,5 @@ spring.mail.port=587 ...@@ -24,3 +24,5 @@ spring.mail.port=587
spring.mail.properties.mail.smtp.auth=true spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true spring.mail.properties.mail.smtp.starttls.enable=true
jsp-inheritance-prefix=/jsp/layouts/
jsp-inheritance-suffix=.jsp
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ page <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8" /> <layout:put block="contents" type="REPLACE">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <div class="card d-flex flex-column justify-content-center align-items-center mx-auto mt-2 p-3" style="width: 20rem;">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <h5 class="card-title">${cargo.id == null ? "Agregar" : "Modificar"} Cargo</h5>
<title>Cargo</title> <form:form
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/> action="/cargo/${cargo.id == null ? '' : cargo.id}"
<link method="post"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" modelAttribute="cargo"
rel="stylesheet" class="card-body d-flex flex-column"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" >
crossorigin="anonymous" <div class="">
/> <form:label class="form-label visually-hidden" path="nombre"
<script >Nombre del cargo
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" </form:label>
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" <form:input
crossorigin="anonymous" type="text"
></script> path="nombre"
</head> class="form-control ${ mismoNombre ? 'is-invalid' : ''}"
<body> placeholder="Nombre del cargo" required="true"
<jsp:include page="header.jsp" />
<jsp:include page="alerts.jsp" /> />
<div class="container-xxl my-md-4 bd-layout"> <div id="validationServerUsernameFeedback" class="invalid-feedback">
<h2>Agregar Cargo</h2> Este nombre ya existe
<div class="p-3 mb-2"> </div>
<form:form </div>
action="/cargo/${cargo.id == null ? '' : cargo.id}" <div class="mt-2 align-self-end">
method="post" <input type="submit" value="Guardar" class="btn btn-primary" />
modelAttribute="cargo" </div>
class="row row-cols-lg-auto g-3 align-items-center" </form:form>
> </div>
<div class="col-12"> </layout:put>
<form:label class="form-label visually-hidden" path="nombre" <layout:put block="scripts" type="APPEND">
>Nombre del cargo
</form:label> </layout:put>
<form:input </layout:extends>
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>
</body>
</html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib
prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ page prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ page
contentType="text/html;charset=UTF-8" language="java" %> contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8" /> <layout:put block="contents" type="REPLACE">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <div class="container-xxl my-md-4 bd-layout">
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <h2>Lista de cargos</h2>
<title>Cargo</title> <div>
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/> <form>
<link <label for="cargos">Nombre:</label>
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" <input
rel="stylesheet" type="text"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" name="nombre"
crossorigin="anonymous" id="nombre"
/> value="${param.nombre}"
<script />
src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" <input type="submit" value="Buscar" />
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" </form>
crossorigin="anonymous" <a href="/cargo">Agregar Nuevo Cargo</a>
></script> </div>
</head> <div>
<body> <table class="table">
<jsp:include page="header.jsp" /> <thead>
<jsp:include page="alerts.jsp" /> <tr>
<div class="container-xxl my-md-4 bd-layout"> <th scope="col">#</th>
<h2>Lista de cargos</h2> <th scope="col">Cargo</th>
<div> </tr>
<form> </thead>
<label for="cargos">Nombre:</label> <tbody>
<input <c:forEach items="${cargos}" var="cargo" varStatus="sta">
type="text" <tr>
name="nombre" <th scope="row">${sta.index+1}</th>
id="nombre" <td>${cargo.getNombre()}</td>
value="${param.nombre}" <td>
/> <a href="/convocatorias?cargoId=${cargo.id}"
<input type="submit" value="Buscar" /> >Ver Convocatorias</a
</form> >
<a href="/cargo">Agregar Nuevo Cargo</a> </td>
</div> <td><a href="/cargo/${cargo.id}">Editar cargo</a></td>
<div> </tr>
<table class="table"> </c:forEach>
<thead> </tbody>
<tr> </table>
<th scope="col">#</th> </div>
<th scope="col">Cargo</th> </div>
</tr> </layout:put>
</thead> <layout:put block="scripts" type="APPEND">
<tbody>
<c:forEach items="${cargos}" var="cargo" varStatus="sta"> </layout:put>
<tr> </layout:extends>
<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>
</html>
<%@ 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" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8"> <layout:put block="contents" type="REPLACE">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <h2>${convocatoria.id == null ? "Agregar" : "Modificar"} Convocatoria</h2>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <div class="p-3 mb-2 bg-light text-dark border border-light ">
<title>Convocatoria</title> <form:form action="/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}" method="post" modelAttribute="convocatoria">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <div class="mb-3 col-3">
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/> <form:label path="fechaInicioS" class="form-label">Fecha inicial</form:label>
<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> <form:input type="date" class="form-control" path="fechaInicioS" required="true"/>
</head>
<body> </div>
<jsp:include page="header.jsp"/> <div class="mb-3 col-3">
<jsp:include page="alerts.jsp"/> <form:label path="fechaFinS" class="form-label">Fecha Fin</form:label>
<div class="container-xxl my-md-4 bd-layout"> <form:input type="date" class="form-control" path="fechaFinS" required="true"/>
<h2>Agregar Convocatoria</h2> </div>
<div class="p-3 mb-2 " style="background-color: transparent;"> <div class="mb-3 col-3">
<form:form action="/convocatoria/${convocatoria.id == null ? '' : convocatoria.id}" method="post" modelAttribute="convocatoria"> <form:label path="cupos" class="form-label">Cupos:</form:label>
<div class="mb-3 col-3"> <form:input type="number" class="form-control" path="cupos" required="true"/>
<form:label path="fechaInicioS" class="form-label">Fecha inicial</form:label> </div>
<form:input type="date" class="form-control" path="fechaInicioS" required="true"/> <div class="mb-3 col-3">
<form:label path="cargoId" class="form-label">Cargo</form:label>
</div> <form:select class="form-select" path="cargoId" required="true">
<div class="mb-3 col-3"> <c:forEach items="${cargos}" var="cargo">
<form:label path="fechaFinS" class="form-label">Fecha Fin</form:label> <form:option value="${cargo.id}">${cargo.nombre} </form:option>
<form:input type="date" class="form-control" path="fechaFinS" required="true"/> </c:forEach>
</div> </form:select>
<div class="mb-3 col-3"> </div>
<form:label path="cupos" class="form-label">Cupos:</form:label> <button type="submit" class="btn btn-primary">Guardar</button>
<form:input type="number" class="form-control" path="cupos" required="true"/> </form:form>
</div> </div>
<div class="mb-3 col-3"> </layout:put>
<form:label path="cargoId" class="form-label">Cargo</form:label> <layout:put block="scripts" type="APPEND">
<form:select class="form-select" path="cargoId" required="true">
<c:forEach items="${cargos}" var="cargo"> </layout:put>
<form:option value="${cargo.id}">${cargo.nombre} </form:option> </layout:extends>
</c:forEach>
</form:select>
</div>
<button type="submit" class="btn btn-primary">Guardar</button>
</form:form>
</div>
</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 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" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8"> <layout:put block="contents" type="REPLACE">
<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">
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/>
<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 convocatorias</h2> <h2>Lista de convocatorias</h2>
<div> <div>
<form> <form>
...@@ -68,7 +57,8 @@ ...@@ -68,7 +57,8 @@
</table> </table>
</div> </div>
</div> </layout:put>
<layout:put block="scripts" type="APPEND">
</body>
</html> </layout:put>
\ No newline at end of file </layout:extends>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ 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" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<layout:extends name="layouts/base.jsp">
<layout:put block="contents" type="REPLACE">
<h2 style="text-align: center;">
DETALLE POSTULANTE
</h2>
<div class="row gy-3">
<div class="col-md-6">
<div class="card mb-3">
<div class="card-body">
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Nombre</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.nombre} ${postulante.apellido}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Email</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.correo}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Vive en</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.getCiudad().getNombre()}, ${postulante.getCiudad().getDepartamento().getNombre()}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Nro de Documento</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.tipoDocumento}: ${postulante.nroDocument}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Telefono</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.telefono}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Fecha de nacimiento</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.fechaNacimiento}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Resumen</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.resumen}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Nivel de Ingles</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.nivelIngles}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Estado Civil</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.estadoCivil.getDescripcion()}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Nacionalidad</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.nacionalidad.getDescripcion()}
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Disponbilidad</h6>
</div>
<div class="col-sm-9 text-secondary">
${postulante.disponibilidad.getDescripcion()}
</div>
</div>
<hr>
<div class="row">
<div class="col">
<a class="btn btn-link " href="#">Editar</a>
</div>
<div class="col">
<a class="btn btn-link " href="#">Descargar CV</a>
</div>
</div>
</div>
</div>
<!DOCTYPE html> </div>
<html lang="en"> <div class="col-md-6">
<head> <div class="row gy-3">
<meta charset="UTF-8"> <div class="col-md-6">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <div class="card h-100">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <div class="card-body">
<title>Tecnologia</title> <h6 class="d-flex align-items-center mb-3"><i class="material-icons text-info mr-2">Tecnologias</i></h6>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia">
<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> <small>${detalle_tecnologia.getTecnologia().getNombre()}</small>
</head> <div class="progress mb-3" style="height: 5px">
<body> <div class="progress-bar bg-primary" role="progressbar" style="width: ${(detalle_tecnologia.getNivel() / 5) * 100}%" aria-valuenow="${detalle_tecnologia.getNivel()}" aria-valuemin="1" aria-valuemax="5"></div>
<jsp:include page="header.jsp"/> </div>
<jsp:include page="alerts.jsp"/> </c:forEach>
<div class="container-xxl my-md-4 bd-layout"> <hr>
<h2 style="text-align: center;">DETALLE POSTULANTE</h2> <h6 class="d-flex align-items-center mb-3"><i class="material-icons text-info mr-2">Cargos al que postula</i></h6>
<div style="padding: 10px;margin: 3px;border: 1px solid black;"> <ul class="list-group list-group-flush">
<c:forEach items="${postulante.postulaciones}" var="convocatoria">
<br><b><i><label>INFORMACION GENERAL</label></i></b><br>
<label>Id: ${postulante.id}</label><br>
<label>Nombre: ${postulante.nombre}</label><br>
<label>Apellido ${postulante.apellido}</label><br>
<label>${postulante.tipoDocumento}: ${postulante.nroDocument} </label><br>
<label>Correo: ${postulante.correo}</label><br>
<label>Departamento: ${postulante.getCiudad().getDepartamento().getNombre()}</label><br>
<label>Ciudad: ${postulante.getCiudad().getNombre()}</label><br>
<label>Telefono: ${postulante.telefono}</label><br><label>
<label>Fecha de nacimiento: ${postulante.fechaNacimiento}</label><br>
<label>Resumen: ${postulante.resumen}</label><br>
<label>Nivel de ingles: ${postulante.nivelIngles}</label><br>
<label>Curriculum: ${postulante.curriculum}</label><br>
<label>Estado civil: ${postulante.estadoCivil}</label><br>
<label>Nacionalidad: ${postulante.nacionalidad}</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><b><i><label>TECNOLOGIAS</label></b></i><br>
<c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia">
<label>Tecnologias: ${detalle_tecnologia.getTecnologia().getNombre()} -</label>
<label>Nivel de Tecnologia: ${detalle_tecnologia.getNivel()}</label><br>
</c:forEach>
<br><b><i><label>EXPERIENCIAS</label></b></i><br>
<c:forEach items="${postulante.experiencias}" var="detalle_experiencia">
<label>Institucion: ${detalle_experiencia.getInstitucion()}</label><br>
<label>Fecha Inicio: ${detalle_experiencia.getFechaDesde()}</label><br>
<label>Fecha Fin: ${detalle_experiencia.getFechaHasta()}</label><br>
<label>Referencia: ${detalle_experiencia.getNombreReferencia()}</label><br>
<label>Telefono de la referencia: ${detalle_experiencia.getTelefonoReferencia()}</label><br>
<label>Cargo: ${detalle_experiencia.getCargo()}</label><br>
<label>Motivo de salida: ${detalle_experiencia.getMotivoSalida()}</label><br>
</c:forEach>
<br><b><i><label>ESTUDIOS</label></b></i><br>
<c:forEach items="${postulante.estudios}" var="detalle_estudios"> <li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<label>Institucion: ${detalle_estudios.getInstitucion().getNombre()}</label><br> <h6 class="mb-0">${convocatoria.getCargo().getNombre()}</h6>
<label>SubNombre: ${detalle_estudios.getInstitucion().getSubNombre()}</label><br> <span class="text-secondary"></span>
<label>Tipo de estudio: ${detalle_estudios.getTipoDeEstudio()}</label><br> </li>
<label>Tema de estudio: ${detalle_estudios.getTemaDeEstudio()}</label><br> </c:forEach>
<label>Fecha Inicio: ${detalle_estudios.getFechaDesde()}</label><br>
<label>Fecha Fin: ${detalle_estudios.getFechaHasta()}</label><br> </ul>
<label>Estado: ${detalle_estudios.getEstado()}</label><br>
</c:forEach> </div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<div id="carouselExampleIndicators" class="carousel carousel-dark slide" data-bs-ride="carousel">
<div class="carousel-inner">
<h6 class="d-flex align-items-center mb-3"><i class="material-icons text-info mr-2">Experiencias</i></h6>
<c:forEach items="${postulante.experiencias}" var="detalle_experiencia" varStatus="status">
<div class="carousel-item ${status.first ? 'active' : ''}" data-bs-interval="false">
<br><b><i><label>REFERENCIA PERSONAL</label></b></i><br> <ul class="list-group list-group-flush ">
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Institucion</h6>
<span class="text-secondary">${detalle_experiencia.getInstitucion()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Fecha Inicio</h6>
<span class="text-secondary">${detalle_experiencia.getFechaDesde()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Fecha Fin</h6>
<span class="text-secondary">${detalle_experiencia.getFechaHasta()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Referencia</h6>
<span class="text-secondary">${detalle_experiencia.getNombreReferencia()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Telefono de la referencia</h6>
<span class="text-secondary">${detalle_experiencia.getTelefonoReferencia()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Cargo</h6>
<span class="text-secondary">${detalle_experiencia.getCargo()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Motivo de salida</h6>
<span class="text-secondary">${detalle_experiencia.getMotivoSalida()}</span>
</li>
</ul>
</div>
</c:forEach>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<div id="carouselExampleIndicators" class="carousel carousel-dark slide" data-bs-ride="carousel">
<div class="carousel-inner">
<h6 class="d-flex align-items-center mb-3"><i class="material-icons text-info mr-2">Estudios</i></h6>
<c:forEach items="${postulante.estudios}" var="detalle_estudios" varStatus="status">
<div class="carousel-item ${status.first ? 'active' : ''}" data-bs-interval="false">
<c:forEach items="${postulante.referencias}" var="detalle_referencias"> <ul class="list-group list-group-flush ">
<label>Nombre: ${detalle_referencias.getNombre()}</label> <li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<label>Relacion: ${detalle_referencias.getRelacion()}</label><br> <h6 class="mb-0">Institucion</h6>
<label>Telefono: ${detalle_referencias.getTelefono()}</label><br> <span class="text-secondary">${detalle_estudios.getInstitucion().getNombre()}</span>
</c:forEach> </li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<br><b><i><label>CARGOS AL CUAL POSTULA</label></b></i><br> <h6 class="mb-0">Fecha Inicio</h6>
<span class="text-secondary">${detalle_estudios.getFechaDesde()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Fecha Fin</h6>
<span class="text-secondary">${detalle_estudios.getFechaHasta()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Tipo de Estudio</h6>
<span class="text-secondary">${detalle_estudios.getTipoDeEstudio()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Tema de estudio</h6>
<span class="text-secondary">${detalle_estudios.getTemaDeEstudio()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">Estado</h6>
<span class="text-secondary">${detalle_estudios.getEstado()}</span>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<h6 class="mb-0">SubNombre</h6>
<span class="text-secondary">${detalle_estudios.getInstitucion().getSubNombre()}</span>
</li>
</ul>
</div>
</c:forEach>
</div>
<button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="visually-hidden">Previous</span>
</button>
<button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="visually-hidden">Next</span>
</button>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="card">
<div class="card-body">
<h6 class="d-flex align-items-center mb-3"><i class="material-icons text-info mr-2">Referencias Personales</i></h6>
<ul class="list-group list-group-flush">
<c:forEach items="${postulante.referencias}" var="referencia">
<c:forEach items="${postulante.postulaciones}" var="convocatoria"> <li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
<label>Nombre: ${convocatoria.getCargo().getNombre()}</label><br> <h6 class="mb-0">${referencia.nombre}, ${referencia.relacion}, ${referencia.telefono}</h6>
</c:forEach> <span class="text-secondary"></span>
</li>
</c:forEach>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="padding:10px ;margin: 5px;border: 3px solid black;"> <div style="padding:10px ;margin: 5px;border: 3px solid black;">
<b><i><h2>Cambiar Estado del Postulante y Comentario de RRHH</h2></b></i> <b><i><h2>Cambiar Estado del Postulante y Comentario de RRHH</h2></b></i>
<form:form class="needs-validation" method="post" modelAttribute="postulante"> <form:form class="needs-validation" method="post" modelAttribute="postulante">
...@@ -106,13 +322,7 @@ ...@@ -106,13 +322,7 @@
</div> </div>
<input type="submit" value="submit"/> <input type="submit" value="submit"/>
</form:form> </form:form>
</div>
</layout:put>
</layout:extends>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<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://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>Document</title> <title>RRHH</title>
<link href="../css/indexStyle.css" rel="stylesheet" type="text/css"/> <link href="../css/indexStyle.css" rel="stylesheet" type="text/css"/>
</head> </head>
......
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<layout:block name="cssDeclaracion"></layout:block>
<title>RRHH</title>
</head>
<body>
<header>
<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>
</nav>
</header>
<div class="container-xxl my-md-4 bd-layout">
<layout:block name="contents">
</layout:block>
</div>
<layout:block name="scripts">
</layout:block>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
</body>
</html>
\ No newline at end of file
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</select> </div> </select> </div>
<div > <div >
<div class=" inputs d-flex justify-content-between align-items-center experience"><span class="border px-3 p-1 add-experience" data-toggle="modal" data-target="#cargoForm"><i class="fa fa-plus"></i>&nbsp;Cargo al que postulas</span></div><br> <div style="color:blue" class=" inputs d-flex justify-content-between align-items-center experience"><span class="border px-3 p-1 add-experience" data-toggle="modal" data-target="#cargoForm"><i class="fa fa-plus"></i>&nbsp;Cargo al que postulas</span></div><br>
</div> </div>
<div class="mt-3 gap-2 d-flex justify-content-between" id="cargos"> <div class="mt-3 gap-2 d-flex justify-content-between" id="cargos">
......
<%@ 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" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8"> <layout:put block="contents" type="REPLACE">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <h2>Lista de Postulantes</h2>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <div id="buscador">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <form name="buscador">
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/> <label for="nombre">Nombre</label>
<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> <input type="text" name="nombre" id="nombre" value="${param.nombre}">
<title>Lista de postulantes</title> <button>Buscar</button>
</head> <br>
<body> <label for="estado">Estado</label>
<jsp:include page="header.jsp"/> <select name="estado" id="estado">
<jsp:include page="alerts.jsp"/> <option value="">Seleccione una opcion</option>
<div class="container-xxl my-md-4 bd-layout"> <c:forEach items="${estadoP}" var="estados">
<h2>Lista de Postulantes</h2> <option value="${estados}" ${param.estado == estados ? "selected" : ""}>${estados.getEstado()}</option>
<div id="buscador"> </c:forEach>
<form name="buscador"> </select>
<label for="nombre">Nombre</label> <label for="dispo">Disponbilidad</label>
<input type="text" name="nombre" id="nombre" value="${param.nombre}"> <select name="dispo" id="dispo">
<button>Buscar</button> <option value="">Seleccione una opcion</option>
<br> <c:forEach items="${disponibilidades}" var="disponibilidad">
<label for="estado">Estado</label> <option value="${disponibilidad}" ${param.dispo == disponibilidad ? "selected" : ""}>${disponibilidad.getDescripcion()}</option>
<select name="estado" id="estado"> </c:forEach>
<option value="">Seleccione una opcion</option> </select>
<c:forEach items="${estadoP}" var="estados"> <label for="tecId">Tecnologias</label>
<option value="${estados}" ${param.estado == estados ? "selected" : ""}>${estados.getEstado()}</option> <select name="tecId" id="tecId">
<option value="">Seleccione una opcion</option>
<c:forEach items="${tecnologias}" var="tecnologia">
<option value="${tecnologia.id}" ${param.tecId == tecnologia.id ? "selected" : ""}>${tecnologia.nombre}</option>
</c:forEach>
</select>
<label for="instId">Institucion Educativa</label>
<select name="instId" id="instId">
<option value="">Seleccione una opcion</option>
<c:forEach items="${institucionesEducativas}" var="inst">
<option value="${inst.id}" ${param.instId == inst.id ? "selected" : ""}>${inst.nombre}</option>
</c:forEach>
</select>
<br>
<br>
<label for="lvlEng">Nivel de Ingles</label>
<select name="lvlEng" id="lvlEng">
<option value="">Seleccione una opcion</option>
<c:forEach var = "lvl" begin = "1" end = "5">
<option value="${lvl}" ${param.lvlEng == lvl ? "selected" : ""}>${lvl}</option>
</c:forEach>
</select>
<label for="lvlTec">Nivel de Tecnologia</label>
<select name="lvlTec" id="lvlTec">
<option value="">Seleccione una opcion</option>
<c:forEach var = "lvl" begin = "1" end = "5">
<option value="${lvl}" ${param.lvlTec == lvl ? "selected" : ""}>${lvl}</option>
</c:forEach>
</select>
<label for="expInMonths">Experiencia en general</label>
<select name="expInMonths" id="expInMonths">
<option value="">Seleccione una opcion</option>
<option value="6">Mayor a 6 meses</option>
<option value="12">Mayor a 1 año</option>
<option value="36">Mayor a 3 años</option>
<option value="60">Mayor a 5 años</option>
</select>
<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>
</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>
<th scope="col">Estado</th>
</tr>
</thead>
<tbody>
<c:forEach items="${postulantes}" var="postulante" varStatus="staPost">
<tr>
<th scope="row">${staPost.index + 1}</th>
<td>${postulante.nombre} ${postulante.apellido}</td>
<td>${postulante.disponibilidad.getDescripcion()}</td>
<td>${postulante.nivelIngles}</td>
<td>${postulante.experienciaMeses}<op></td>
<td>
<c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia" varStatus="staTec">
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
</c:forEach>
</td>
<td>${postulante.estado.getEstado()}</td>
<td><a href="/postulante/${postulante.id}">Ver</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<div>
<nav aria-label="Page navigation example">
<ul class="pagination">
<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>
</c:forEach> </c:forEach>
</select> </ul>
<label for="dispo">Disponbilidad</label> </nav>
<select name="dispo" id="dispo"> </div>
<option value="">Seleccione una opcion</option> </layout:put>
<c:forEach items="${disponibilidades}" var="disponibilidad"> <layout:put block="scripts" type="APPEND">
<option value="${disponibilidad}" ${param.dispo == disponibilidad ? "selected" : ""}>${disponibilidad.getDescripcion()}</option> <script>
</c:forEach> function habilitarLvlTec(){
</select> //si se selecciono una tecnologia entonces permitir seleccionar un nivel
<label for="tecId">Tecnologias</label> lvlTec.disabled = tecId.value == false
<select name="tecId" id="tecId"> if(lvlTec.disabled){
<option value="">Seleccione una opcion</option> lvlTec.firstElementChild.selected=true;
<c:forEach items="${tecnologias}" var="tecnologia"> }
<option value="${tecnologia.id}" ${param.tecId == tecnologia.id ? "selected" : ""}>${tecnologia.nombre}</option>
</c:forEach>
</select>
<label for="instId">Institucion Educativa</label>
<select name="instId" id="instId">
<option value="">Seleccione una opcion</option>
<c:forEach items="${institucionesEducativas}" var="inst">
<option value="${inst.id}" ${param.instId == inst.id ? "selected" : ""}>${inst.nombre}</option>
</c:forEach>
</select>
<br>
<br>
<label for="lvlEng">Nivel de Ingles</label>
<select name="lvlEng" id="lvlEng">
<option value="">Seleccione una opcion</option>
<c:forEach var = "lvl" begin = "1" end = "5">
<option value="${lvl}" ${param.lvlEng == lvl ? "selected" : ""}>${lvl}</option>
</c:forEach>
</select>
<label for="lvlTec">Nivel de Tecnologia</label>
<select name="lvlTec" id="lvlTec">
<option value="">Seleccione una opcion</option>
<c:forEach var = "lvl" begin = "1" end = "5">
<option value="${lvl}" ${param.lvlTec == lvl ? "selected" : ""}>${lvl}</option>
</c:forEach>
</select>
<label for="expInMonths">Experiencia en general</label>
<select name="expInMonths" id="expInMonths">
<option value="">Seleccione una opcion</option>
<option value="6">Mayor a 6 meses</option>
<option value="12">Mayor a 1 año</option>
<option value="36">Mayor a 3 años</option>
<option value="60">Mayor a 5 años</option>
</select>
<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> }
</div> function buscarPagina(nro){
<table class="table"> nro--
<thead> const aBuscar = 'nroPagina='+nro
<tr> if(!location.search) location.search = "?"+aBuscar
<th scope="col">#</th> const inicial = location.search.search(aBuscar);
<th scope="col">Nombre</th> if(inicial==-1){//si no se encuentra y hay otros queries
<th scope="col">Disponibilidad</th> location.search = "&"+aBuscar
<th scope="col">Nivel de Ingles</th> }
<th scope="col">Experiencia</th> location.search.replace('nroPagina=',aBuscar)
<th scope="col">Tecnologias</th> }
<th scope="col">Estado</th> const tecId = document.querySelector("#tecId");
</tr> const lvlTec = document.querySelector("#lvlTec");
</thead> tecId.addEventListener('change',habilitarLvlTec);
<tbody> habilitarLvlTec()
<c:forEach items="${postulantes}" var="postulante" varStatus="staPost"> </script>
<tr> </layout:put>
<th scope="row">${staPost.index + 1}</th> </layout:extends>
<td>${postulante.nombre} ${postulante.apellido}</td>
<td>${postulante.disponibilidad.getDescripcion()}</td>
<td>${postulante.nivelIngles}</td>
<td>${postulante.experienciaMeses}<op></td>
<td>
<c:forEach items="${postulante.tecnologias}" var="detalle_tecnologia" varStatus="staTec">
${detalle_tecnologia.getTecnologia().getNombre()}${not staTec.last ? "," : ""}
</c:forEach>
</td>
<td>${postulante.estado.getEstado()}</td>
<td><a href="/postulante/${postulante.id}">Ver</a></td>
</tr>
</c:forEach>
</tbody>
</table>
<div>
<nav aria-label="Page navigation example">
<ul class="pagination">
<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>
</c:forEach>
</ul>
</nav>
</div>
</div>
<script>
function habilitarLvlTec(){
//si se selecciono una tecnologia entonces permitir seleccionar un nivel
lvlTec.disabled = tecId.value == false
if(lvlTec.disabled){
lvlTec.firstElementChild.selected=true;
}
}
function buscarPagina(nro){
nro--
const aBuscar = 'nroPagina='+nro
if(!location.search) location.search = "?"+aBuscar
const inicial = location.search.search(aBuscar);
if(inicial==-1){//si no se encuentra y hay otros queries
location.search = "&"+aBuscar
}
location.search.replace('nroPagina=',aBuscar)
}
const tecId = document.querySelector("#tecId");
const lvlTec = document.querySelector("#lvlTec");
tecId.addEventListener('change',habilitarLvlTec);
habilitarLvlTec()
</script>
</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 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" %>
<%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<layout:extends name="layouts/base.jsp">
<!DOCTYPE html> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<html> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<head> <layout:put block="contents" type="REPLACE">
<meta charset="utf-8"> <h2>${tecnologia.id == null ? "Agregar" : "Modificar"} Tecnologia</h2>
<meta name="viewport" content="width=device-width, initial-scale=1"> <div class="p-3 mb-2 bg-light text-dark border border-light">
<!-- 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">
<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>
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<jsp:include page="header.jsp"/>
<jsp:include page="alerts.jsp"/>
<div class="container-xxl my-md-4 bd-layout">
<h2>Agregar Tecnologia</h2>
<div class="p-3 mb-2 ">
<form:form action="/tecnologia/${tecnologia.id == null ? '' : tecnologia.id}" method="post" modelAttribute="tecnologia" class="row row-cols-lg-auto g-3 align-items-center"> <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"> <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"/> <form:label class="form-label visually-hidden" path="nombre">Nombre: </form:label>
<form:input type="text" path="nombre" class="form-control ${ mismoNombre ? 'is-invalid' : ''}" required="true" placeholder="Nombre de la tecnologia"/>
<div id="validationServerUsernameFeedback" class="invalid-feedback">
Este nombre ya existe
</div>
</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>
</div> </layout:put>
</layout:extends>
\ No newline at end of file
</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 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" %>
<!DOCTYPE html> <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%>
<html lang="en"> <layout:extends name="layouts/base.jsp">
<head> <layout:put block="cssDeclaracion" type="APPEND"><link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/></layout:put>
<meta charset="UTF-8"> <layout:put block="contents" type="REPLACE">
<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">
<link href="../css/cargoStyle.css" rel="stylesheet" type="text/css"/>
<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 Tecnologias</h2> <h2>Lista de Tecnologias</h2>
<div> <div>
...@@ -50,7 +39,5 @@ ...@@ -50,7 +39,5 @@
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </layout:put>
</layout:extends>
</body>
</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