diff --git a/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java b/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java index bc82739..219922f 100644 --- a/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java +++ b/curriculumsearch/src/main/java/com/roshka/configuration/WebSecurityConfig.java @@ -56,6 +56,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter { .mvcMatchers("/tecnologia*").authenticated() .mvcMatchers("/postulantes","/postulantes/**").authenticated() .mvcMatchers("/edit-user-data").authenticated() + .mvcMatchers("/postulantesExcel*").authenticated() .anyRequest().permitAll() .and() .formLogin() diff --git a/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java b/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java index 8d2bfdd..c45afb1 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java @@ -36,11 +36,16 @@ public class CargoController { public String menuCargos(Model model,@RequestParam(required = false) String nombre,@RequestParam(defaultValue = "0")Integer nroPagina) { final Integer CANTIDAD_POR_PAGINA = 10; Pageable page = PageRequest.of(nroPagina,CANTIDAD_POR_PAGINA,Sort.by("id")); - Page CargoPag=cargoRepo.findAllCargo(page); - List cargo = CargoPag.getContent(); - model.addAttribute("pages", CargoPag.getTotalPages()); - if(nombre == null || nombre.trim().isEmpty()) model.addAttribute("cargos", cargo); - else model.addAttribute("cargos", cargoRepo.findByNombreContainingIgnoreCase(nombre)); + if(nombre == null || nombre.trim().isEmpty()) { + Page CargoPag=cargoRepo.findAll(page); + model.addAttribute("cargos", CargoPag.getContent()); + model.addAttribute("pages", CargoPag.getTotalPages()); + } + else { + Page CargoPag=cargoRepo.findByNombreContainingIgnoreCase(nombre,page); + model.addAttribute("pages", CargoPag.getTotalPages()); + model.addAttribute("cargos", CargoPag.getContent()); + } return "cargos"; } diff --git a/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java b/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java index 5b41f69..110aabb 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java @@ -18,6 +18,10 @@ import org.hibernate.type.IntegerType; import org.hibernate.type.LongType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.domain.Sort; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; @@ -43,12 +47,18 @@ public class ConvocatoriaController { @RequestMapping("/convocatorias") public String menuConvocatorias(Model model,RedirectAttributes redirectAttrs, @RequestParam(required = false) Long cargoId, - @RequestParam(required = false) Integer isOpen//1: true, 0: false + @RequestParam(required = false) EstadoConvocatoria estado,//1: true, 0: false + @RequestParam(defaultValue = "0")Integer nroPagina ) { + final Integer CANTIDAD_POR_PAGINA = 10; + Pageable page = PageRequest.of(nroPagina,CANTIDAD_POR_PAGINA,Sort.by("id")); model.addAttribute("cargos", cargoRepo.findAll()); + Page convoPag=convoRepo.findByCargoAndEstado(cargoId,estado,page); + model.addAttribute("convocatorias", convoPag.getContent()); + model.addAttribute("pages", convoPag.getTotalPages()); + model.addAttribute("estados", EstadoConvocatoria.values()); - model.addAttribute("convocatorias", convoRepo.f1ndByCargoAndEstado(new TypedParameterValue(LongType.INSTANCE, cargoId), new Date(), new TypedParameterValue(IntegerType.INSTANCE, isOpen))); //model.addAttribute("convocatorias",cargoId==null? convoRepo.findAll() : convoRepo.findByCargoId(cargoId)); return "convocatorias"; } diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 5ef4d2b..c9bf2bb 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -29,6 +29,8 @@ import org.hibernate.jpa.TypedParameterValue; import org.hibernate.type.IntegerType; import org.hibernate.type.LongType; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Sort; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; @@ -83,7 +85,8 @@ public class PostulanteController { model.addAttribute("estadosCiviles", EstadoCivil.values()); model.addAttribute("nacionalidades", Nacionalidad.values()); model.addAttribute("tiposExperencia", TipoExperiencia.values()); - model.addAttribute("CargosDisponibles", convoRepo.f1ndByCargoAndEstado(new TypedParameterValue(LongType.INSTANCE, null), new Date(), new TypedParameterValue(IntegerType.INSTANCE, 1))); + model.addAttribute("CargosDisponibles", + convoRepo.findByCargoAndEstado(null, EstadoConvocatoria.abierto, PageRequest.of(0,Integer.MAX_VALUE,Sort.by("id"))).getContent()); try { model.addAttribute("ciudades", new ObjectMapper().writeValueAsString(ciuRepo.findAll())); } catch (JsonProcessingException er) { @@ -104,7 +107,7 @@ public class PostulanteController { Postulante postulantex = post.findByNroDocument(postulante.getNroDocument()); if(postulantex != null){ postulante.setEstadoPostulante(postulantex.getEstadoPostulante()); - postulante.setComentarioRRHH(postulantex.getComentarioRRHH()); + postulante.setComentarioRRHH(postulantex.getComentarioRRHH()); estudioRepository.findByPostulante(postulantex).forEach(x -> estudioRepository.delete(x)); expRepo.findByPostulante(postulantex).forEach(x -> expRepo.delete(x)); postulanteTecnologiaRepository.findByPostulante(postulantex).forEach(x -> postulanteTecnologiaRepository.delete(x)); diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java index 20b20ba..0a01a98 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java @@ -100,7 +100,7 @@ public class PostulanteRRHHController { @RequestParam(required = false)Long convId, @RequestParam(defaultValue = "0")Integer nroPagina ) throws IOException { - final Integer CANTIDAD_POR_PAGINA = 5; + final Integer CANTIDAD_POR_PAGINA = 10; Pageable page = PageRequest.of(nroPagina,CANTIDAD_POR_PAGINA,Sort.by("id")); model.addAttribute("tecnologias", tecRepo.findAll()); model.addAttribute("disponibilidades", Disponibilidad.values()); @@ -189,7 +189,7 @@ public class PostulanteRRHHController { response.setHeader(headerKey, headerValue); HashMap filtros = new HashMap(); - filtros.put("nombre", nombre.equals("") ? "-":nombre); + filtros.put("nombre", nombre == null ? "-":nombre); filtros.put("nivelIngles", lvlEng == null ? "-" : lvlEng.toString()); filtros.put("tecnologia", tecId == null ? "-" : tecRepo.findById(tecId).get().getNombre()); filtros.put("nivelTecnologia", lvlTec == null ? "-" : lvlTec.toString()); @@ -197,6 +197,7 @@ public class PostulanteRRHHController { filtros.put("estado", estado == null ? "-" : estado.getEstado()); filtros.put("experienciaEnMeses", expInMonths == null ? "-" : expInMonths.toString()); filtros.put("convocatoria", convId == null ? "-" : cargoRepo.findById(convId).get().getCargo().getNombre()); + filtros.put("convocatoriaFecha", convId == null ? "-" : cargoRepo.findById(convId).get().getFechaInicio().toString()); PostulantesExcelExporter excelExporter = new PostulantesExcelExporter(postulantesDTO, filtros); diff --git a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java index 9c89632..3dc7872 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java @@ -47,11 +47,17 @@ public String addtecnologiaView(Model model,@PathVariable(required = false) Long public String menuTecnologias(Model model,@RequestParam(required = false) String nombre,@RequestParam(defaultValue = "0")Integer nroPagina) { final Integer CANTIDAD_POR_PAGINA = 10; Pageable page = PageRequest.of(nroPagina,CANTIDAD_POR_PAGINA,Sort.by("id")); - Page tecnologiaPag=tecRepo.findAllTecnologia(page); - List tecnologia = tecnologiaPag.getContent(); - model.addAttribute("pages", tecnologiaPag.getTotalPages()); - if(nombre == null || nombre.trim().isEmpty()) model.addAttribute("tecnologias", tecnologia); - else model.addAttribute("tecnologias", tecRepo.findByNombreContainingIgnoreCase(nombre)); + + if(nombre == null || nombre.trim().isEmpty()) { + Page tecnologiaPag=tecRepo.findAllTecnologia(page); + model.addAttribute("tecnologias", tecnologiaPag.getContent()); + model.addAttribute("pages", tecnologiaPag.getTotalPages()); + } + else { + Page tecnologiaPag=tecRepo.findByNombreContainingIgnoreCase(nombre,page); + model.addAttribute("pages", tecnologiaPag.getTotalPages()); + model.addAttribute("tecnologias", tecnologiaPag.getContent()); + } return "tecnologias"; } diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java b/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java index 932a344..ff93814 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java @@ -26,22 +26,6 @@ public class Cargo { @Column(name = "nombre") private String nombre; - public Long getId() { - return this.id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getNombre() { - return this.nombre; - } - - public void setNombre(String nombre) { - this.nombre = nombre; - } - @OneToMany(mappedBy = "cargo") @JsonManagedReference private List convocatorias; diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java b/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java index 2b1cb22..99fdae7 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java @@ -12,7 +12,6 @@ import javax.persistence.JoinColumn; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.Table; -import javax.persistence.Transient; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIdentityInfo; @@ -46,15 +45,6 @@ public class ConvocatoriaCargo { @Column(name = "fecha_fin") private Date fechaFin; - - //para deserializar desde el form como string - @Transient - private String fechaFinS; - - //para deserializar desde el form como string - @Transient - private String fechaInicioS; - @ManyToMany(mappedBy = "postulaciones") private List postulantes; @@ -90,20 +80,7 @@ public class ConvocatoriaCargo { public void setCargoId(Long cargoId) { this.cargoId = cargoId; } - public String getFechaFinS() { - return fechaFinS; - } - public String getFechaInicioS() { - return fechaInicioS; - } - public void setFechaFinS(String fechaFinS) { - this.fechaFinS = fechaFinS; - setFechaFin(fechaFinS); - } - public void setFechaInicioS(String fechaInicioS) { - this.fechaInicioS = fechaInicioS; - setFechaInicio(fechaInicioS); - } + public Long getId() { return this.id; @@ -129,4 +106,6 @@ public class ConvocatoriaCargo { this.estado = estado; } + + } diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java index dd7c024..30734d1 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java @@ -10,7 +10,7 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; public interface CargoRepository extends JpaRepository{ - public List findByNombreContainingIgnoreCase(String nombre); + public Page findByNombreContainingIgnoreCase(String nombre, Pageable pageable); public boolean existsByNombreIgnoreCase(String nombre); diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java index 726a7ae..09d3f37 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java @@ -4,8 +4,11 @@ import java.util.Date; import java.util.List; import com.roshka.modelo.ConvocatoriaCargo; +import com.roshka.modelo.EstadoConvocatoria; import org.hibernate.jpa.TypedParameterValue; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; @@ -15,8 +18,13 @@ public interface ConvocatoriaRepository extends JpaRepository findByCargoId(Long cargoId); //@Query(value="selec x from ConvocatoriaCargo x where (x.fechaFinal > ?1)",nativeQuery = true) //public List findConvocatoriaCargoByCargo(Date fechaFinal); - @Query("select c from ConvocatoriaCargo c where ( ?1 is null and ?3 is null) or ( ( ( ((c.fechaFin > ?2 or c.fechaFin=null) and ?3 = 1) or ((c.fechaFin < ?2 ) and ?3 = 0)) or ?3 is null ) and (c.cargoId = ?1 or ?1 is null) )") - public List f1ndByCargoAndEstado(TypedParameterValue cargoId, Date fecha, TypedParameterValue isOpen); + /* @Query("select c from ConvocatoriaCargo c where ( ?1 is null and ?3 is null) or ( ( ( ((c.fechaFin > ?2 or c.fechaFin=null) and ?3 = 1) or ((c.fechaFin < ?2 ) and ?3 = 0)) or ?3 is null ) and (c.cargoId = ?1 or ?1 is null) )") + public Page f1ndByCargoAndEstado(TypedParameterValue cargoId, Date fecha, TypedParameterValue isOpen, Pageable page); */ + + @Query("select c from ConvocatoriaCargo c "+ + "where (c.cargoId = ?1 or ?1 is null) and "+ + "(c.estado = ?2 or ?2 is null)") + public Page findByCargoAndEstado(Long cargoId, EstadoConvocatoria estado, Pageable page); @Query("SELECT c FROM ConvocatoriaCargo c WHERE (cargoId=?1)") public List filtrarConvocatoriasPorCargo(Long cargoId); diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java index 8ed77e1..29e6b4c 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java @@ -11,7 +11,7 @@ import com.roshka.modelo.Tecnologia; public interface TecnologiaRepository extends JpaRepository { - public List findByNombreContainingIgnoreCase(String nombre); + public Page findByNombreContainingIgnoreCase(String nombre, Pageable pageable); public boolean existsByNombreIgnoreCase(String nombre); diff --git a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java index 426686e..954bdd1 100644 --- a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java +++ b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java @@ -47,6 +47,7 @@ public class Helper { } public static LocalDate convertToLocalDateViaSqlDate(Date dateToConvert) { + if(dateToConvert == null) return null; return new java.sql.Date(dateToConvert.getTime()).toLocalDate(); } diff --git a/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java b/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java index 4fe21e4..d765f6a 100644 --- a/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java +++ b/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java @@ -59,34 +59,16 @@ public class PostulantesExcelExporter { createCell(row, 5, "Institucion", style); createCell(row, 6, "Estado", style); createCell(row, 7, "Convocatoria", style); + createCell(row, 8, "Fecha Inicio Convocatoria", style); row = sheet.createRow(6); - style = workbook.createCellStyle(); - font = workbook.createFont(); - font.setBold(true); - font.setFontHeight(14); - style.setFont(font); - createCell(row, 0, "Nombre", style); createCell(row, 1, "Nivel de Ingles", style); createCell(row, 2, "Experiencia", style); createCell(row, 3, "Tecnologias", style); createCell(row, 4, "Estado", style); - row = sheet.createRow(4); - font.setBold(false); - font.setFontHeight(12); - style.setFont(font); - createCell(row, 0, filtros.get("nombre"), style); - createCell(row, 1, filtros.get("nivelIngles"), style); - createCell(row, 2, filtros.get("experienciaEnMeses"), style); - createCell(row, 3, filtros.get("tecnologia"), style); - createCell(row, 4, filtros.get("nivelTecnologia"), style); - createCell(row, 5, filtros.get("institucion"), style); - createCell(row, 6, filtros.get("estado"), style); - createCell(row, 7, filtros.get("convocatoria"), style); - } private void createCell(Row row, int columnCount, Object value, CellStyle style) { @@ -126,6 +108,17 @@ public class PostulantesExcelExporter { createCell(row, columnCount++, user.getEstado().getEstado(), style); tecno.delete(0, tecno.length()-1); } + + Row row = sheet.createRow(4); + createCell(row, 0, filtros.get("nombre"), style); + createCell(row, 1, filtros.get("nivelIngles"), style); + createCell(row, 2, filtros.get("experienciaEnMeses"), style); + createCell(row, 3, filtros.get("tecnologia"), style); + createCell(row, 4, filtros.get("nivelTecnologia"), style); + createCell(row, 5, filtros.get("institucion"), style); + createCell(row, 6, filtros.get("estado"), style); + createCell(row, 7, filtros.get("convocatoria"), style); + createCell(row, 8, filtros.get("convocatoriaFecha"), style); } public void export(HttpServletResponse response) throws IOException { diff --git a/curriculumsearch/src/main/resources/json/cargo.json b/curriculumsearch/src/main/resources/json/cargo.json index 24605e2..09246dd 100644 --- a/curriculumsearch/src/main/resources/json/cargo.json +++ b/curriculumsearch/src/main/resources/json/cargo.json @@ -6,5 +6,17 @@ { "id": 2, "nombre": "dev php" + }, + { + "id": 3, + "nombre": "dev python" + }, + { + "id": 4, + "nombre": "dev c" + }, + { + "id": 5, + "nombre": "dev android" } ] \ No newline at end of file diff --git a/curriculumsearch/src/main/resources/json/convocatoria.json b/curriculumsearch/src/main/resources/json/convocatoria.json index 1cc1418..7758c82 100644 --- a/curriculumsearch/src/main/resources/json/convocatoria.json +++ b/curriculumsearch/src/main/resources/json/convocatoria.json @@ -3,14 +3,30 @@ "id": 1, "cargoId": 1, "estado":0, - "fechaInicio": "2021-11-01", - "fechaFin": "2021-11-30" + "fechaInicio": "2021-11-01" }, { "id": 2, "cargoId": 2, "estado":0, - "fechaInicio": "2021-11-01", - "fechaFin": "2021-11-30" + "fechaInicio": "2021-11-01" + }, + { + "id": 3, + "cargoId": 3, + "estado":0, + "fechaInicio": "2021-11-01" + }, + { + "id": 4, + "cargoId": 4, + "estado":0, + "fechaInicio": "2021-11-01" + }, + { + "id": 5, + "cargoId": 5, + "estado":0, + "fechaInicio": "2021-11-01" } ] \ No newline at end of file diff --git a/curriculumsearch/src/main/resources/json/postulante.json b/curriculumsearch/src/main/resources/json/postulante.json index 34e0467..bbbad5d 100644 --- a/curriculumsearch/src/main/resources/json/postulante.json +++ b/curriculumsearch/src/main/resources/json/postulante.json @@ -61,7 +61,7 @@ { "direccion": "Do nostrud aliqua adipisicing in sunt aute id do elit ut dolor ad aliquip.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 2 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Hopkins", @@ -108,7 +108,7 @@ { "direccion": "Occaecat non cupidatat amet reprehenderit consectetur ullamco et.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 3 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Alejandra", @@ -155,7 +155,7 @@ { "direccion": "Qui ullamco excepteur velit ad ullamco id id nisi irure dolore cupidatat mollit ullamco veniam.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 4 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Angelina", @@ -202,7 +202,7 @@ { "direccion": "Deserunt tempor ut et eiusmod et labore Lorem.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 5 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Rivas", @@ -249,7 +249,7 @@ { "direccion": "Aliqua est adipisicing do exercitation sit laborum aliquip aliqua adipisicing enim aute.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 3 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Estelle", @@ -296,7 +296,7 @@ { "direccion": "Officia eiusmod ut reprehenderit tempor consequat elit amet ex voluptate aute anim do.", "nacionalidad": "Paraguaya", - "postulaciones": [{ "id": 1 }], + "postulaciones": [{ "id": 4 }], "estadoCivil": "Soltero", "tipoDocumento": "CI", "nombre": "Mariana", diff --git a/curriculumsearch/src/main/resources/static/Convo.js b/curriculumsearch/src/main/resources/static/Convo.js index da1d9d1..0786c0a 100644 --- a/curriculumsearch/src/main/resources/static/Convo.js +++ b/curriculumsearch/src/main/resources/static/Convo.js @@ -12,9 +12,9 @@ function listarConvocatorias(id){ const opt = document.createElement("option"); opt.value = conv.id; if(conv.fechaFin!=null){ - opt.innerHTML ="Desde :"+new Date(conv.fechaInicio)+"-"+" Hasta :"+new Date(conv.fechaFin); + opt.innerHTML ="Desde :"+new Date(conv.fechaInicio).toISOString().slice(0,10)+"-"+" Hasta :"+new Date(conv.fechaFin).toISOString().slice(0,10); }else{ - opt.innerHTML ="Desde :"+new Date(conv.fechaInicio) + opt.innerHTML ="Desde :"+new Date(conv.fechaInicio).toISOString().slice(0,10) } opt.setAttribute("data-CargoId",conv.cargoId); frag.appendChild(opt) diff --git a/curriculumsearch/src/main/resources/static/main.js b/curriculumsearch/src/main/resources/static/main.js index 091b1d1..dbbf158 100644 --- a/curriculumsearch/src/main/resources/static/main.js +++ b/curriculumsearch/src/main/resources/static/main.js @@ -108,7 +108,7 @@ function validarfecha(fechaDesde, fechaHasta){ return "la fecha desde no puede ser mayor a la fecha actual" ; } - if(fechaHasta =! null && fechaDesde>fechaHasta){ + if(fechaHasta =! null && fechaHasta.trim().length >0 && fechaDesde>fechaHasta){ return "la fecha desde no puede ser mayor a la fecha hasta"; } @@ -223,7 +223,7 @@ function agregarFieldExpierncia(event){ let pos_rec; let returnFlag = false; - let requiredValues = ["institucion", "cargo", "fechaDesde", "descripcion"] + let requiredValues = ["institucion", "cargo", "fechaDesde", "descripcion","nombreReferencia","telefonoReferencia"] formData.forEach((value, key)=>{ if(requiredValues.includes(key) diff --git a/curriculumsearch/src/main/webapp/jsp/cargos.jsp b/curriculumsearch/src/main/webapp/jsp/cargos.jsp index cfa6c05..5d9754a 100644 --- a/curriculumsearch/src/main/webapp/jsp/cargos.jsp +++ b/curriculumsearch/src/main/webapp/jsp/cargos.jsp @@ -9,16 +9,25 @@ contentType="text/html;charset=UTF-8" language="java" %>

Lista de cargos

- - - +
+
+ + +
+
+ + +
+ +
- Agregar Nuevo Cargo
@@ -48,16 +57,16 @@ contentType="text/html;charset=UTF-8" language="java" %>
- - @@ -65,16 +74,7 @@ contentType="text/html;charset=UTF-8" language="java" %> diff --git a/curriculumsearch/src/main/webapp/jsp/convocatorias.jsp b/curriculumsearch/src/main/webapp/jsp/convocatorias.jsp index aeb1375..946d677 100644 --- a/curriculumsearch/src/main/webapp/jsp/convocatorias.jsp +++ b/curriculumsearch/src/main/webapp/jsp/convocatorias.jsp @@ -5,32 +5,66 @@ <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - + + +

Lista de convocatorias

- - - Estado: - -
- -
- -
- +
+ +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+ + +
+
+ + +
+ + +
+
+
+ +
+
+ + +
+ + +
- - Agregar Nueva Convocatoria + -
${SUCCESS_MESSAGE}
+
${SUCCESS_MESSAGE}
@@ -56,7 +90,11 @@ Ver postulantes - + + + Cerrar convocatoria + + @@ -66,6 +104,17 @@
+
diff --git a/curriculumsearch/src/main/webapp/jsp/layouts/base.jsp b/curriculumsearch/src/main/webapp/jsp/layouts/base.jsp index b5be976..5493334 100644 --- a/curriculumsearch/src/main/webapp/jsp/layouts/base.jsp +++ b/curriculumsearch/src/main/webapp/jsp/layouts/base.jsp @@ -78,6 +78,29 @@ + diff --git a/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp b/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp index 7d0ddcd..301ab86 100644 --- a/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp +++ b/curriculumsearch/src/main/webapp/jsp/postulante-form.jsp @@ -358,11 +358,11 @@
- +
- +
diff --git a/curriculumsearch/src/main/webapp/jsp/postulantes.jsp b/curriculumsearch/src/main/webapp/jsp/postulantes.jsp index 1b80ba7..dd4dec2 100644 --- a/curriculumsearch/src/main/webapp/jsp/postulantes.jsp +++ b/curriculumsearch/src/main/webapp/jsp/postulantes.jsp @@ -368,17 +368,7 @@ } - 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) - console.log(location.search) - } + const tecId = document.querySelector("#tecId"); const lvlTec = document.querySelector("#lvlTec"); tecId.addEventListener('change',habilitarLvlTec); diff --git a/curriculumsearch/src/main/webapp/jsp/tecnologias.jsp b/curriculumsearch/src/main/webapp/jsp/tecnologias.jsp index 4577271..c5ca2cf 100644 --- a/curriculumsearch/src/main/webapp/jsp/tecnologias.jsp +++ b/curriculumsearch/src/main/webapp/jsp/tecnologias.jsp @@ -9,11 +9,26 @@
- - - +
+
+ + +
+
+ + +
+ +
- Agregar Nueva Tecnologia +
@@ -61,17 +76,6 @@ - +