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
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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
16 deletions
+40
-16
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
+2
-11
curriculumsearch/src/main/resources/static/main.js
+10
-0
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+28
-5
No files found.
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
View file @
75f96f7f
...
@@ -3,6 +3,7 @@ package com.roshka.modelo;
...
@@ -3,6 +3,7 @@ package com.roshka.modelo;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.persistence.CascadeType
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
...
@@ -30,8 +31,6 @@ public class Estudio {
...
@@ -30,8 +31,6 @@ public class Estudio {
private
Date
fechaDesde
;
private
Date
fechaDesde
;
@Column
(
name
=
"fecha_hasta"
)
@Column
(
name
=
"fecha_hasta"
)
private
Date
fechaHasta
;
private
Date
fechaHasta
;
@Column
(
name
=
"referencias"
)
private
String
referencias
;
@Column
(
name
=
"titulo"
)
@Column
(
name
=
"titulo"
)
private
String
titulo
;
private
String
titulo
;
...
@@ -41,7 +40,7 @@ public class Estudio {
...
@@ -41,7 +40,7 @@ public class Estudio {
private
Postulante
postulante
;
private
Postulante
postulante
;
@JsonManagedReference
@JsonManagedReference
@OneToMany
(
mappedBy
=
"estudio"
)
@OneToMany
(
mappedBy
=
"estudio"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
...
@@ -105,14 +104,6 @@ public class Estudio {
...
@@ -105,14 +104,6 @@ public class Estudio {
this
.
fechaHasta
=
fechaHasta
;
this
.
fechaHasta
=
fechaHasta
;
}
}
public
String
getReferencias
()
{
return
this
.
referencias
;
}
public
void
setReferencias
(
String
referencias
)
{
this
.
referencias
=
referencias
;
}
public
String
getTitulo
()
{
public
String
getTitulo
()
{
return
this
.
titulo
;
return
this
.
titulo
;
}
}
...
...
curriculumsearch/src/main/resources/static/main.js
View file @
75f96f7f
...
@@ -112,9 +112,19 @@ function agregarFieldEstudio(){
...
@@ -112,9 +112,19 @@ function agregarFieldEstudio(){
const
pairs
=
{};
const
pairs
=
{};
const
formest
=
document
.
querySelector
(
"[name=estudio-form"
);
const
formest
=
document
.
querySelector
(
"[name=estudio-form"
);
const
formData
=
new
FormData
(
formest
);
const
formData
=
new
FormData
(
formest
);
const
estudioReconocimiento
=
[{},{},{}];
let
pos_rec
;
for
(
const
[
name
,
value
]
of
formData
){
for
(
const
[
name
,
value
]
of
formData
){
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
[
name
]
=
value
}
}
}
pairs
[
"estudioReconocimiento"
]
=
estudioReconocimiento
.
filter
(
rec
=>
rec
.
nombre
);
estudios
[
cont_estudios
]
=
pairs
;
estudios
[
cont_estudios
]
=
pairs
;
formest
.
reset
();
formest
.
reset
();
//imprimir lista actualizada
//imprimir lista actualizada
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
75f96f7f
...
@@ -161,17 +161,40 @@
...
@@ -161,17 +161,40 @@
<input
type=
"text"
class=
"form-control "
name=
"tipoDeEstudio"
id=
"tipoDeEstudio"
>
<input
type=
"text"
class=
"form-control "
name=
"tipoDeEstudio"
id=
"tipoDeEstudio"
>
<label
for=
"institucion"
class=
"form-label"
>
Institucion
</label>
<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>
<label
for=
"fechaDesde"
class=
"form-label"
>
Fecha Desde
</label>
<input
type=
"date"
class=
"form-control "
name=
"fechaDesde"
id=
"fechaDesde"
>
<input
type=
"date"
class=
"form-control "
name=
"fechaDesde"
id=
"fechaDesde"
>
<label
for=
"fechaHasta"
class=
"form-label"
>
Fecha Hasta
</label>
<label
for=
"fechaHasta"
class=
"form-label"
>
Fecha Hasta
</label>
<input
type=
"date"
class=
"form-control "
name=
"fechaHasta"
id=
"fechaHasta"
>
<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>
<label
for=
"titulo"
class=
"form-label"
>
Titulo
</label>
<input
type=
"text"
class=
"form-control "
name=
"titulo"
id=
"titulo"
>
<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>
</form>
</div>
</div>
<div
class=
"modal-footer"
>
<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