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
75f96f7f
Commit
75f96f7f
authored
Nov 02, 2021
by
Joaquin Elias Baranda Ayala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Se agrego correctamente la carga de estudioReconomiento
parent
2677513a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
18 deletions
+42
-18
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
+2
-11
curriculumsearch/src/main/resources/static/main.js
+11
-1
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+29
-6
No files found.
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
View file @
75f96f7f
...
...
@@ -3,6 +3,7 @@ package com.roshka.modelo;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.CascadeType
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
...
...
@@ -30,8 +31,6 @@ public class Estudio {
private
Date
fechaDesde
;
@Column
(
name
=
"fecha_hasta"
)
private
Date
fechaHasta
;
@Column
(
name
=
"referencias"
)
private
String
referencias
;
@Column
(
name
=
"titulo"
)
private
String
titulo
;
...
...
@@ -41,7 +40,7 @@ public class Estudio {
private
Postulante
postulante
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"estudio"
)
@OneToMany
(
mappedBy
=
"estudio"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
...
...
@@ -105,14 +104,6 @@ public class Estudio {
this
.
fechaHasta
=
fechaHasta
;
}
public
String
getReferencias
()
{
return
this
.
referencias
;
}
public
void
setReferencias
(
String
referencias
)
{
this
.
referencias
=
referencias
;
}
public
String
getTitulo
()
{
return
this
.
titulo
;
}
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
75f96f7f
...
...
@@ -112,9 +112,19 @@ function agregarFieldEstudio(){
const
pairs
=
{};
const
formest
=
document
.
querySelector
(
"[name=estudio-form"
);
const
formData
=
new
FormData
(
formest
);
const
estudioReconocimiento
=
[{},{},{}];
let
pos_rec
;
for
(
const
[
name
,
value
]
of
formData
){
pairs
[
name
]
=
value
pos_rec
=
name
.
split
(
"-"
);
//rec-nombre-index
if
(
pos_rec
.
length
>
1
)
{
estudioReconocimiento
[
pos_rec
[
2
]][
pos_rec
[
1
]]
=
value
}
else
{
pairs
[
name
]
=
value
}
}
pairs
[
"estudioReconocimiento"
]
=
estudioReconocimiento
.
filter
(
rec
=>
rec
.
nombre
);
estudios
[
cont_estudios
]
=
pairs
;
formest
.
reset
();
//imprimir lista actualizada
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
75f96f7f
...
...
@@ -160,18 +160,41 @@
<label
for=
"tipoDeEstudio"
class=
"form-label"
>
Tipo De Estudio
</label>
<input
type=
"text"
class=
"form-control "
name=
"tipoDeEstudio"
id=
"tipoDeEstudio"
>
<label
for=
"institucion"
class=
"form-label"
>
Institucion
</label>
<input
type=
"text"
class=
"form-control "
name=
"institucion"
id=
"institucion"
>
<input
type=
"text"
class=
"form-control "
name=
"institucion"
id=
"institucion"
>
<label
for=
"fechaDesde"
class=
"form-label"
>
Fecha Desde
</label>
<input
type=
"date"
class=
"form-control "
name=
"fechaDesde"
id=
"fechaDesde"
>
<label
for=
"fechaHasta"
class=
"form-label"
>
Fecha Hasta
</label>
<input
type=
"date"
class=
"form-control "
name=
"fechaHasta"
id=
"fechaHasta"
>
<label
for=
"referencias"
class=
"form-label"
>
Referencias
</label>
<input
type=
"text"
class=
"form-control "
name=
"referencias"
id=
"referencias"
>
<label
for=
"titulo"
class=
"form-label"
>
Titulo
</label>
<input
type=
"text"
class=
"form-control "
name=
"titulo"
id=
"titulo"
>
<label
class=
"form-label"
>
Reconocimientos
</label>
<div
class=
"row mb-3"
>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-0"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-0"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
<div
class=
"row mb-3"
>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-1"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-1"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
<div
class=
"row mb-3"
>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-nombre-2"
placeholder=
"Titulo del reconocimiento"
aria-label=
"First name"
>
</div>
<div
class=
"col"
>
<input
type=
"text"
class=
"form-control"
name=
"rec-certificado-2"
placeholder=
"Adjuntar archivo"
aria-label=
"Last name"
>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
...
...
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