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
78c12fed
Commit
78c12fed
authored
Nov 18, 2021
by
Joel Florentin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'javi001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joel-001
parents
5db120a6
1e2f86b8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
0 deletions
+45
-0
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+6
-0
curriculumsearch/src/main/resources/static/main.js
+35
-0
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+4
-0
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
78c12fed
...
@@ -133,10 +133,16 @@ public class PostulanteController {
...
@@ -133,10 +133,16 @@ public class PostulanteController {
RedirectView
redirectView
=
new
RedirectView
(
"/work-with-us/postulacion-correcta"
,
true
);
RedirectView
redirectView
=
new
RedirectView
(
"/work-with-us/postulacion-correcta"
,
true
);
Postulante
postulantex
=
post
.
findByNroDocument
(
postulante
.
getNroDocument
());
Postulante
postulantex
=
post
.
findByNroDocument
(
postulante
.
getNroDocument
());
if
(
postulantex
!=
null
){
if
(
postulantex
!=
null
){
postulante
.
setEstadoPostulante
(
postulantex
.
getEstadoPostulante
());
postulante
.
setComentarioRRHH
(
postulantex
.
getComentarioRRHH
());
estudioRepository
.
findByPostulante
(
postulantex
).
forEach
(
x
->
estudioRepository
.
delete
(
x
));
estudioRepository
.
findByPostulante
(
postulantex
).
forEach
(
x
->
estudioRepository
.
delete
(
x
));
expRepo
.
findByPostulante
(
postulantex
).
forEach
(
x
->
expRepo
.
delete
(
x
));
expRepo
.
findByPostulante
(
postulantex
).
forEach
(
x
->
expRepo
.
delete
(
x
));
postulanteTecnologiaRepository
.
findByPostulante
(
postulantex
).
forEach
(
x
->
postulanteTecnologiaRepository
.
delete
(
x
));
postulanteTecnologiaRepository
.
findByPostulante
(
postulantex
).
forEach
(
x
->
postulanteTecnologiaRepository
.
delete
(
x
));
postulante
.
setId
(
postulantex
.
getId
());
postulante
.
setId
(
postulantex
.
getId
());
}
else
{
postulante
.
setEstadoPostulante
(
EstadoPostulante
.
NUEVO
);
postulante
.
setComentarioRRHH
(
null
);
}
}
if
(
file
!=
null
){
if
(
file
!=
null
){
DBFile
cv
=
createFile
(
file
);
DBFile
cv
=
createFile
(
file
);
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
78c12fed
...
@@ -49,7 +49,25 @@ function agregarFieldExpierncia(event){
...
@@ -49,7 +49,25 @@ function agregarFieldExpierncia(event){
//recoger del form
//recoger del form
const
pairs
=
{};
const
pairs
=
{};
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
formexp
.
classList
.
add
(
'was-validated'
)
const
formData
=
new
FormData
(
formexp
);
const
formData
=
new
FormData
(
formexp
);
let
error
=
validarfecha
(
formData
.
get
(
"fechaDesde"
),
formData
.
get
(
"fechaHasta"
))
let
appendTo
=
"Hasta"
;
if
(
error
)
{
if
(
error
.
includes
(
"desde"
))
appendTo
=
"Desde"
;
formexp
.
querySelector
(
".errorfecha"
+
appendTo
)
formexp
[
'fecha'
+
appendTo
].
setCustomValidity
(
error
)
document
.
querySelector
(
".errorfecha"
+
appendTo
).
innerHTML
=
error
;
console
.
log
(
error
);
}
else
{
formexp
.
fechaDesde
.
setCustomValidity
(
''
)
formexp
.
fechaHasta
.
setCustomValidity
(
''
)
}
const
reconocimientos
=
[{},{},{}];
const
reconocimientos
=
[{},{},{}];
let
pos_rec
;
let
pos_rec
;
let
returnFlag
=
false
;
let
returnFlag
=
false
;
...
@@ -87,6 +105,7 @@ function agregarFieldExpierncia(event){
...
@@ -87,6 +105,7 @@ function agregarFieldExpierncia(event){
pairs
[
"reconocimientos"
]
=
reconocimientos
.
filter
(
rec
=>
rec
.
nombre
);
pairs
[
"reconocimientos"
]
=
reconocimientos
.
filter
(
rec
=>
rec
.
nombre
);
experiencias
[
cont_experiencia
]
=
pairs
;
experiencias
[
cont_experiencia
]
=
pairs
;
formexp
.
reset
();
formexp
.
reset
();
formexp
.
classList
.
remove
(
'was-validated'
)
//imprimir lista actualizada
//imprimir lista actualizada
const
div
=
document
.
querySelector
(
"#experiencias"
)
const
div
=
document
.
querySelector
(
"#experiencias"
)
const
div1
=
document
.
createElement
(
'div'
);
const
div1
=
document
.
createElement
(
'div'
);
...
@@ -117,6 +136,22 @@ function agregarFieldExpierncia(event){
...
@@ -117,6 +136,22 @@ function agregarFieldExpierncia(event){
//div.appendChild(div1);
//div.appendChild(div1);
cont_experiencia
++
;
cont_experiencia
++
;
}
}
function
validarfecha
(
fechaDesde
,
fechaHasta
){
let
fechadehoy
=
new
Date
().
toISOString
().
slice
(
0
,
10
);
if
(
fechaDesde
>
fechadehoy
){
return
"la fecha desde no puede ser mayor a la fecha actual"
;
}
if
(
fechaHasta
=!
null
&&
fechaHasta
>
fechadehoy
){
return
"la fecha hasta no puede ser mayor a la fecha actual"
;
}
if
(
fechaHasta
=!
null
&&
fechaDesde
>
fechaHasta
){
return
"la fecha desde no puede ser mayor a la fecha hasta"
;
}
return
false
}
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
function
agregarFieldTecnologia
(){
function
agregarFieldTecnologia
(){
//recoger del form
//recoger del form
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
78c12fed
...
@@ -239,11 +239,15 @@
...
@@ -239,11 +239,15 @@
<div
class=
"inputs"
>
<div
class=
"inputs"
>
<label
for=
"fechaDesdeExperiencia"
class=
"form-label"
>
Fecha Desde
</label>
<label
for=
"fechaDesdeExperiencia"
class=
"form-label"
>
Fecha Desde
</label>
<input
type=
"date"
class=
"form-control"
name=
"fechaDesde"
id=
"fechaDesdeExperiencia"
required
>
<input
type=
"date"
class=
"form-control"
name=
"fechaDesde"
id=
"fechaDesdeExperiencia"
required
>
<div
class=
"invalid-feedback errorFechaDesde"
>
</div>
</div>
</div>
<div
class=
"inputs"
>
<div
class=
"inputs"
>
<label
for=
"fechaHastaExperiencia"
class=
"form-label"
>
Fecha Hasta
</label>
<label
for=
"fechaHastaExperiencia"
class=
"form-label"
>
Fecha Hasta
</label>
<input
type=
"date"
class=
"form-control"
name=
"fechaHasta"
id=
"fechaHastaExperiencia"
>
<input
type=
"date"
class=
"form-control"
name=
"fechaHasta"
id=
"fechaHastaExperiencia"
>
<div
class=
"invalid-feedback errorfechaHasta"
></div>
</div>
</div>
<div
class=
"inputs"
>
<div
class=
"inputs"
>
...
...
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