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
1
Merge Requests
1
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
Oscar Enrique Gonzalez Escurra
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
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletions
+46
-1
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
+5
-1
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
78c12fed
...
...
@@ -133,10 +133,16 @@ public class PostulanteController {
RedirectView
redirectView
=
new
RedirectView
(
"/work-with-us/postulacion-correcta"
,
true
);
Postulante
postulantex
=
post
.
findByNroDocument
(
postulante
.
getNroDocument
());
if
(
postulantex
!=
null
){
postulante
.
setEstadoPostulante
(
postulantex
.
getEstadoPostulante
());
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
));
postulante
.
setId
(
postulantex
.
getId
());
}
else
{
postulante
.
setEstadoPostulante
(
EstadoPostulante
.
NUEVO
);
postulante
.
setComentarioRRHH
(
null
);
}
if
(
file
!=
null
){
DBFile
cv
=
createFile
(
file
);
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
78c12fed
...
...
@@ -49,7 +49,25 @@ function agregarFieldExpierncia(event){
//recoger del form
const
pairs
=
{};
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
formexp
.
classList
.
add
(
'was-validated'
)
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
=
[{},{},{}];
let
pos_rec
;
let
returnFlag
=
false
;
...
...
@@ -87,6 +105,7 @@ function agregarFieldExpierncia(event){
pairs
[
"reconocimientos"
]
=
reconocimientos
.
filter
(
rec
=>
rec
.
nombre
);
experiencias
[
cont_experiencia
]
=
pairs
;
formexp
.
reset
();
formexp
.
classList
.
remove
(
'was-validated'
)
//imprimir lista actualizada
const
div
=
document
.
querySelector
(
"#experiencias"
)
const
div1
=
document
.
createElement
(
'div'
);
...
...
@@ -117,6 +136,22 @@ function agregarFieldExpierncia(event){
//div.appendChild(div1);
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
(){
//recoger del form
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
78c12fed
...
...
@@ -239,12 +239,16 @@
<div
class=
"inputs"
>
<label
for=
"fechaDesdeExperiencia"
class=
"form-label"
>
Fecha Desde
</label>
<input
type=
"date"
class=
"form-control"
name=
"fechaDesde"
id=
"fechaDesdeExperiencia"
required
>
<div
class=
"invalid-feedback errorFechaDesde"
>
</div>
</div>
<div
class=
"inputs"
>
<label
for=
"fechaHastaExperiencia"
class=
"form-label"
>
Fecha Hasta
</label>
<input
type=
"date"
class=
"form-control"
name=
"fechaHasta"
id=
"fechaHastaExperiencia"
>
</div>
<div
class=
"invalid-feedback errorfechaHasta"
></div>
</div>
<div
class=
"inputs"
>
<label
for=
"cargo"
class=
"form-label"
>
Cargo
</label>
...
...
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