diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index d63bba8..bbb6c96 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -23,7 +23,7 @@ import com.roshka.repositorio.ExperienciaRepository; import com.roshka.repositorio.InstitucionRepository; import com.roshka.repositorio.PostulanteRepository; import com.roshka.repositorio.TecnologiaRepository; - +import com.roshka.utils.Helper; import org.hibernate.jpa.TypedParameterValue; import org.hibernate.type.IntegerType; @@ -95,30 +95,7 @@ public class PostulanteController { return "postulante-form"; } - private DBFile createFile(MultipartFile file) { - // Normalize file name - String fileName = StringUtils.cleanPath(file.getOriginalFilename()); - - try { - // Check if the file's name contains invalid characters - if(fileName.contains("..")) { - throw new Exception("Sorry! Filename contains invalid path sequence " + fileName); - } - if(file.getSize()==0) throw new Exception("Sorry! File cant be void");; - - DBFile dbFile = new DBFile(fileName, file.getContentType(), file.getBytes()); - - return dbFile; - } catch (IOException ex) { - ex.printStackTrace(); - return null; - } - catch(Exception ex){ - ex.printStackTrace(); - return null; - } - } - + @PostMapping(value = "/work-with-us",consumes = "multipart/form-data") public RedirectView guardarPostulante(@RequestPart(name = "file",required = false) MultipartFile file,@RequestPart("postulante") Postulante postulante, RedirectAttributes redirectAttributes){ //Codigo encargado de modificar postulacion si se envia mismo CI @@ -138,7 +115,7 @@ public class PostulanteController { } if(file!=null){ - DBFile cv = createFile(file); + DBFile cv = Helper.createFile(file); if(cv!=null) cv.setPostulante(postulante); postulante.setCvFile(cv); } diff --git a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java index 78f3197..0c3ae5e 100644 --- a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java +++ b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java @@ -1,5 +1,6 @@ package com.roshka.utils; +import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.YearMonth; @@ -7,6 +8,11 @@ import java.time.ZoneOffset; import java.time.temporal.ChronoUnit; import java.util.Date; +import com.roshka.modelo.DBFile; + +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + public class Helper { /** * Se espera fecha en el formato yyyy-MM-dd @@ -31,4 +37,29 @@ public class Helper { return m1.until(m2, ChronoUnit.MONTHS) + 1; } + + public static DBFile createFile(MultipartFile file) { + // Normalize file name + String fileName = StringUtils.cleanPath(file.getOriginalFilename()); + + try { + // Check if the file's name contains invalid characters + if(fileName.contains("..")) { + throw new Exception("Sorry! Filename contains invalid path sequence " + fileName); + } + if(file.getSize()==0) throw new Exception("Sorry! File cant be void");; + + DBFile dbFile = new DBFile(fileName, file.getContentType(), file.getBytes()); + + return dbFile; + } catch (IOException ex) { + ex.printStackTrace(); + return null; + } + catch(Exception ex){ + ex.printStackTrace(); + return null; + } + } + } diff --git a/curriculumsearch/src/main/resources/static/main.js b/curriculumsearch/src/main/resources/static/main.js index 9c476ee..beb8b33 100644 --- a/curriculumsearch/src/main/resources/static/main.js +++ b/curriculumsearch/src/main/resources/static/main.js @@ -145,6 +145,16 @@ function agregarFieldTecnologia(){ return; } + for(let i=0;i - ${tecn.tecnologia.nombre} ( ${tecn.nivel} )   - - - + ${tecn.tecnologia.nombre} ( ${tecn.nivel} )   ` @@ -259,19 +266,25 @@ function agregarFieldExpierncia(event){ const exp = experiencias[index]; if(exp==null) continue; content += ` -
-

Experiencia

-
-
-
-
-
-
-
- - +
+
Experiencia
+
+
Institucion
+
${exp.institucion}
+
Cargo
+
${exp.cargo}
+
Referencia
+
${exp.nombreReferencia}
+
Telf. Referencia
+
${exp.telefonoReferencia}
+
Fecha Inicio
+
${exp.fechaDesde}
+
Fecha Fin
+
${exp.fechaHasta}
+
Motivo de salida
+
${exp.motivoSalida}
+
- ` } //content += "" @@ -366,14 +379,22 @@ function agregarFieldEstudio(){ const est = estudios[index]; if(est==null) continue; content += ` -
-

Estudio

-
-
-
-
-
-
+
+
Estudio
+
+
Institucion
+
${est.institucion.nombre}
+
Tipo de estudio
+
${est.tipoDeEstudio}
+
Carrera
+
${est.temaDeEstudio}
+
Fecha Inicio
+
${est.fechaDesde}
+
Fecha Fin
+
${est.fechaHasta}
+
Estado
+
${est.estado}
+
@@ -452,7 +473,7 @@ function agregarFieldCargo(){ if(car==null) continue; content1 += `
- ${document.querySelector('[name=cargo-id] > option[value="'+car.id+'"]').innerHTML} + ${document.querySelector('[name=cargo-id] > option[value="'+car.id+'"]').innerHTML}  
@@ -525,13 +546,16 @@ function agregarFieldReferencia(event){ const exp = referencias[index]; if(exp==null) continue; content += ` -
-

Referencia Personal

- -
-
-
- +
+
Referencia Personal
+
+
Nombre
+
${exp.nombre}
+
Telefono
+
${exp.telefono}
+
Relacion
+
${exp.relacion}
+
` diff --git a/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css b/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css index 3c626e1..d21e36f 100644 --- a/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css +++ b/curriculumsearch/src/main/webapp/css/formPostulanteStyle.css @@ -16,7 +16,7 @@ body { border-radius:4px; transform:translate(-50%,10%);*/ - box-shadow:3px 3px 4px rgba(175, 209, 20, 0.2)} + } .card { border: none } @@ -197,4 +197,11 @@ dos bordes con color y que giramos con transform: rotate(-45deg); .content-select:hover i{ margin-top: 3px; +} + +h4{ + color: #5e5b5b; + text-transform: capitalize; + + font-size: large; } \ No newline at end of file diff --git a/curriculumsearch/src/main/webapp/css/indexStyle.css b/curriculumsearch/src/main/webapp/css/indexStyle.css index 81197c0..73a5237 100644 --- a/curriculumsearch/src/main/webapp/css/indexStyle.css +++ b/curriculumsearch/src/main/webapp/css/indexStyle.css @@ -1,7 +1,7 @@ body{ background-image:url(/img/fondoIndex.jpg); - background-size:cover; - background-repeat:no-repeat; + background-repeat: no-repeat; + background-size: cover; height:100vh;width:100vw; background-attachment: fixed; -webkit-text-size-adjust: 100%; diff --git a/curriculumsearch/src/main/webapp/img/LogoRoshka.jpg b/curriculumsearch/src/main/webapp/img/LogoRoshka.ico similarity index 100% rename from curriculumsearch/src/main/webapp/img/LogoRoshka.jpg rename to curriculumsearch/src/main/webapp/img/LogoRoshka.ico Binary files a/curriculumsearch/src/main/webapp/img/LogoRoshka.jpg and b/curriculumsearch/src/main/webapp/img/LogoRoshka.ico differ diff --git a/curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp b/curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp index fa866ef..8fbd0ff 100644 --- a/curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp +++ b/curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp @@ -40,6 +40,6 @@
- + diff --git a/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp index 8f031a5..574c253 100644 --- a/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp +++ b/curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp @@ -4,6 +4,7 @@ <%@ taglib uri="http://kwonnam.pe.kr/jsp/template-inheritance" prefix="layout"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +

@@ -131,7 +132,7 @@
- +
@@ -153,7 +154,7 @@
-
Tecnologias
+
Tecnologias
${detalle_tecnologia.getTecnologia().getNombre()}
@@ -161,7 +162,7 @@

-
Cargos al que postula
+
Cargos al que postula
    @@ -184,7 +185,21 @@
@@ -250,8 +259,20 @@
@@ -313,7 +327,7 @@
-
Referencias Personales
+
Referencias Personales
    @@ -337,7 +351,7 @@
- - - - + diff --git a/curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp b/curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp index f462dbf..22d442c 100644 --- a/curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp +++ b/curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp @@ -4,6 +4,7 @@ +