Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
th-app-java
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amparo Oliver
th-app-java
Commits
5d08b6b8
You need to sign in or sign up before continuing.
Commit
5d08b6b8
authored
Nov 18, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
detalles visuales
parents
188fdf51
91549d25
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
75 additions
and
73 deletions
+75
-73
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+2
-25
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
+31
-0
curriculumsearch/src/main/resources/static/main.js
+4
-4
curriculumsearch/src/main/webapp/css/formPostulanteStyle.css
+1
-1
curriculumsearch/src/main/webapp/img/LogoRoshka.ico
+0
-0
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
+0
-0
curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp
+1
-3
curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp
+1
-0
curriculumsearch/src/main/webapp/jsp/forgot_password_form.jsp
+1
-0
curriculumsearch/src/main/webapp/jsp/index.jsp
+2
-0
curriculumsearch/src/main/webapp/jsp/layouts/base.jsp
+2
-0
curriculumsearch/src/main/webapp/jsp/login.jsp
+1
-0
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+29
-40
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
5d08b6b8
...
...
@@ -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,29 +95,6 @@ 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
){
...
...
@@ -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
);
}
...
...
curriculumsearch/src/main/java/com/roshka/utils/Helper.java
View file @
5d08b6b8
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
;
}
}
}
curriculumsearch/src/main/resources/static/main.js
View file @
5d08b6b8
...
...
@@ -266,7 +266,7 @@ function agregarFieldExpierncia(event){
const
exp
=
experiencias
[
index
];
if
(
exp
==
null
)
continue
;
content
+=
`
<div class="col border border-3" id="exp-
${
index
}
">
<div class="col border border-3
rounded
" id="exp-
${
index
}
">
<center><h4>Experiencia <i class="bi bi-trash-fill" onclick="eliminarExperiencia(
${
index
}
)"></i></h4></center>
<dl class="row row-cols-md-2 gx-0 gy-2">
<dt class="col-sm-auto text-start">Institucion</dt>
...
...
@@ -379,7 +379,7 @@ function agregarFieldEstudio(){
const
est
=
estudios
[
index
];
if
(
est
==
null
)
continue
;
content
+=
`
<div class="col border border-3" id="est-
${
index
}
">
<div class="col border border-3
rounded
" id="est-
${
index
}
">
<center><h4>Estudio <i class="bi bi-trash-fill" onclick="eliminarEstudio(
${
index
}
)"></i></h4></center>
<dl class="row row-cols-md-2 gx-0 gy-2">
<dt class="col-sm-auto text-start">Institucion</dt>
...
...
@@ -473,7 +473,7 @@ function agregarFieldCargo(){
if
(
car
==
null
)
continue
;
content1
+=
`
<div class="col-auto" id="car-
${
index
}
" style="text-transform: uppercase;">
${
document
.
querySelector
(
'[name=cargo-id] >
option[value="'
+
car
.
id
+
'"]'
).
innerHTML
}
<i class="bi bi-trash-fill" onclick="eliminarCargoPostulante(event)"></i>
${
document
.
querySelector
(
'[name=cargo-id] >
option[value="'
+
car
.
id
+
'"]'
).
innerHTML
}
<i class="bi bi-trash-fill" onclick="eliminarCargoPostulante(event)"></i>
</div>
...
...
@@ -546,7 +546,7 @@ function agregarFieldReferencia(event){
const
exp
=
referencias
[
index
];
if
(
exp
==
null
)
continue
;
content
+=
`
<div class="col border border-3" id="ref-
${
index
}
">
<div class="col border border-3
rounded
" id="ref-
${
index
}
">
<center><h4>Referencia Personal <i class="bi bi-trash-fill" onclick="eliminarReferencia(
${
index
}
)"></i></h4></center>
<dl class="row row-cols-sm-2">
<dt class="col-sm-auto text-start">Nombre</dt>
...
...
curriculumsearch/src/main/webapp/css/formPostulanteStyle.css
View file @
5d08b6b8
...
...
@@ -15,7 +15,7 @@ body {
border-radius:4px;
transform:translate(-50%,10%);*/
box-shadow
:
3px
3px
4px
rgba
(
175
,
209
,
20
,
0.2
)
}
}
.card
{
border
:
none
}
...
...
curriculumsearch/src/main/webapp/img/LogoRoshka.
jpg
→
curriculumsearch/src/main/webapp/img/LogoRoshka.
ico
View file @
5d08b6b8
File moved
curriculumsearch/src/main/webapp/jsp/convocatoria-form.jsp
View file @
5d08b6b8
curriculumsearch/src/main/webapp/jsp/detallepostulante.jsp
View file @
5d08b6b8
...
...
@@ -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" %>
<layout:extends name="layouts/base.jsp">
<layout:put block="contents" type="REPLACE">
<h2 style="text-align: center;">
...
...
@@ -372,9 +373,6 @@
</div>
<layout:put block="scripts" type="APPEND">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="../valEdad.js"></script>
</layout:put>
...
...
curriculumsearch/src/main/webapp/jsp/exitoRegistro.jsp
View file @
5d08b6b8
...
...
@@ -4,6 +4,7 @@
<html>
<head>
<link
href=
"https://fonts.googleapis.com/css?family=Nunito+Sans:400,400i,700,900&display=swap"
rel=
"stylesheet"
>
<link
rel=
"icon"
href=
"../img/LogoRoshka.ico"
>
</head>
<style>
body
{
...
...
curriculumsearch/src/main/webapp/jsp/forgot_password_form.jsp
View file @
5d08b6b8
...
...
@@ -8,6 +8,7 @@
<title>
Forgot Password
</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://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
rel=
"icon"
href=
"../img/LogoRoshka.ico"
>
</head>
<body>
...
...
curriculumsearch/src/main/webapp/jsp/index.jsp
View file @
5d08b6b8
...
...
@@ -5,6 +5,7 @@
<layout:extends name="layouts/base.jsp">
<layout:put block="cssDeclaracion" type="REPLACE">
<link href="../css/indexStyle.css" rel="stylesheet" type="text/css"/>
<link rel="icon" href="../img/LogoRoshka.ico">
</layout:put>
</layout:extends>
\ No newline at end of file
curriculumsearch/src/main/webapp/jsp/layouts/base.jsp
View file @
5d08b6b8
...
...
@@ -9,6 +9,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"
>
<link
rel=
"icon"
href=
"../img/LogoRoshka.ico"
>
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css"
>
<layout:block
name=
"cssDeclaracion"
>
<link
href=
"../css/cargoStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
</layout:block>
...
...
curriculumsearch/src/main/webapp/jsp/login.jsp
View file @
5d08b6b8
...
...
@@ -9,6 +9,7 @@
<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://getbootstrap.com/docs/4.0/examples/signin/signin.css"
rel=
"stylesheet"
crossorigin=
"anonymous"
>
<link
href=
"../css/style.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
rel=
"icon"
href=
"../img/LogoRoshka.ico"
>
</head>
<body>
<jsp:include
page=
"alerts.jsp"
/>
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
5d08b6b8
...
...
@@ -13,6 +13,7 @@
<title>
Curriculum
</title>
<link
href=
"../css/formPostulanteStyle.css"
rel=
"stylesheet"
type=
"text/css"
/>
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css"
>
<link
rel=
"icon"
href=
"../img/LogoRoshka.ico"
>
</head>
<body
class=
"container"
>
...
...
@@ -143,53 +144,30 @@
<input
class=
"form-control"
type=
"file"
id=
"cvFile"
>
</div>
<!-- Button Agregar Cargo al que postulas -->
<hr>
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2
border
mx-auto"
>
<div
class=
"row w-100 p-3 gy-2 mx-auto"
>
<div
class=
"col-12"
>
<h3>
Cargos
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#cargoForm"
></i></h3>
</div>
<div
class=
"col-12"
>
<div
class=
"mt-3 gap-2 row row-cols-4"
style=
"display: flex;"
id=
"cargos"
>
</div>
</div>
<div
class=
"col-12"
>
<p
id=
"no-valid-cargo"
style=
"display: none; color:
darkred; border: solid 1px darkred; border-radius: 25px; width: 75%"
class=
"m-3
"
>
<p
id=
"no-valid-cargo"
style=
"display: none; color:
red;"
class=
"text-center
"
>
*Agrega por lo menos un cargo
</p>
</div>
</div>
</div>
<!-- Button Agregar Experiencia -->
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2 border mx-auto"
>
<div
class=
"col-12"
>
<h3>
Experiencias
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#experienciaForm"
></i></h3>
</div>
<div
class=
"col-12"
>
<div
class=
"mt-3 gap-2 row row-cols-4"
id=
"experiencias"
>
</div>
</div>
</div>
</div>
<!-- Button Agregar Estudio -->
<hr>
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2
border
mx-auto"
>
<div
class=
"row w-100 p-3 gy-2 mx-auto"
>
<div
class=
"col-12"
>
<h3>
Estudios
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#estudioForm"
></i></h3>
</div>
...
...
@@ -202,11 +180,11 @@
</div>
<!-- Button Agregar Tecnologia -->
<hr>
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2
border
mx-auto"
>
<div
class=
"row w-100 p-3 gy-2 mx-auto"
>
<div
class=
"col-12"
>
<h3>
Tecnologias
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#tecnologiaForm"
></i></h3>
...
...
@@ -218,7 +196,7 @@
</div>
<div
class=
"col-12"
>
<p
id=
"no-valid-tecno"
style=
"display: none; color:
darkred; border: solid 1px darkred; border-radius: 25px; width: 75%"
class=
"m-3
"
>
<p
id=
"no-valid-tecno"
style=
"display: none; color:
red;"
class=
"text-center
"
>
*Agrega por lo menos una tecnologia
</p>
</div>
...
...
@@ -227,14 +205,25 @@
</div>
</div>
<!-- Button Agregar Experiencia -->
<hr>
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2 mx-auto"
>
<div
class=
"col-12"
>
<h3>
Experiencias
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#experienciaForm"
></i></h3>
</div>
<div
class=
"col-12"
>
<div
class=
"mt-3 gap-2 row row-cols-4"
id=
"experiencias"
>
</div>
</div>
</div>
</div>
<!-- Button Agregar Refencia personal -->
<hr>
<div
class=
"inputs mb-3 col-md-12"
>
<div
class=
"row w-100 p-3 gy-2 border mx-auto"
>
<div
class=
"row w-100 p-3 gy-2 mx-auto"
>
<div
class=
"col-12"
>
<h3>
Referencia Personal
<i
class=
"bi bi-plus-circle-fill"
data-bs-toggle=
"modal"
data-bs-target=
"#referenciaForm"
></i></h3>
</div>
...
...
@@ -263,7 +252,7 @@
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
CargosDisponibles
</h5>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
style=
"color:#21130d;"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
...
...
@@ -295,7 +284,7 @@
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Experiencia
</h5>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
style=
"color:#21130d;"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
...
...
@@ -370,7 +359,7 @@
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
tecnologia
</h5>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
style=
"color:#21130d;"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
...
...
@@ -408,7 +397,7 @@
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Estudios
</h5>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
style=
"color:#21130d;"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
...
...
@@ -477,7 +466,7 @@
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"exampleModalLabel"
>
Referencias Personales
</h5>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
>
<button
type=
"button"
class=
"close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
style=
"color:#21130d;"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment