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
77746912
Commit
77746912
authored
Nov 02, 2021
by
Nelson Ruiz
Browse files
Options
Browse Files
Download
Plain Diff
Se hizo estilos en el form
parents
971a2f4f
c253c4b5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
74 additions
and
86 deletions
+74
-86
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+1
-0
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
+5
-0
curriculumsearch/src/main/java/com/roshka/modelo/EstudioReconocimiento.java
+3
-0
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
+25
-1
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaReconocimiento.java
+19
-7
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaTecnologia.java
+0
-64
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
+7
-1
curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java
+3
-0
curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaTecnologiaRepository.java
+0
-10
curriculumsearch/src/main/resources/static/main.js
+11
-3
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+0
-0
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
77746912
...
@@ -5,6 +5,7 @@ import java.util.Date;
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
com.roshka.modelo.Experiencia
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.repositorio.PostulanteRepository
;
import
com.roshka.repositorio.PostulanteRepository
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
View file @
77746912
...
@@ -12,6 +12,9 @@ import javax.persistence.JoinColumn;
...
@@ -12,6 +12,9 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
javax.persistence.OneToMany
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
@Entity
@Entity
@Table
(
name
=
"estudio"
)
@Table
(
name
=
"estudio"
)
public
class
Estudio
{
public
class
Estudio
{
...
@@ -34,8 +37,10 @@ public class Estudio {
...
@@ -34,8 +37,10 @@ public class Estudio {
@ManyToOne
@ManyToOne
@JoinColumn
@JoinColumn
@JsonBackReference
private
Postulante
postulante
;
private
Postulante
postulante
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"estudio"
)
@OneToMany
(
mappedBy
=
"estudio"
)
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/EstudioReconocimiento.java
View file @
77746912
...
@@ -10,6 +10,8 @@ import javax.persistence.JoinColumn;
...
@@ -10,6 +10,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Entity
@Table
(
name
=
"estudio_reconocimiento"
)
@Table
(
name
=
"estudio_reconocimiento"
)
public
class
EstudioReconocimiento
{
public
class
EstudioReconocimiento
{
...
@@ -21,6 +23,7 @@ public class EstudioReconocimiento {
...
@@ -21,6 +23,7 @@ public class EstudioReconocimiento {
private
String
nombre
;
private
String
nombre
;
@Column
(
name
=
"certificado"
)
@Column
(
name
=
"certificado"
)
private
String
certificado
;
private
String
certificado
;
@JsonBackReference
@ManyToOne
@ManyToOne
@JoinColumn
@JoinColumn
private
Estudio
estudio
;
private
Estudio
estudio
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
View file @
77746912
...
@@ -3,11 +3,16 @@ package com.roshka.modelo;
...
@@ -3,11 +3,16 @@ package com.roshka.modelo;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.Column
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
import
javax.persistence.*
;
import
javax.persistence.*
;
@Entity
@Entity
...
@@ -26,10 +31,17 @@ public class Experiencia {
...
@@ -26,10 +31,17 @@ public class Experiencia {
private
String
referencias
;
private
String
referencias
;
@Column
(
name
=
"cargo"
)
@Column
(
name
=
"cargo"
)
private
String
cargo
;
private
String
cargo
;
@ManyToOne
@Column
(
name
=
"descripcion"
)
private
String
descripcion
;
@JsonBackReference
@ManyToOne
(
optional
=
false
)
@JoinColumn
@JoinColumn
private
Postulante
postulante
;
private
Postulante
postulante
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"experiencia"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
ExperienciaReconocimiento
>
reconocimientos
;
public
long
getId
()
{
public
long
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -86,4 +98,16 @@ public class Experiencia {
...
@@ -86,4 +98,16 @@ public class Experiencia {
public
Postulante
getPostulante
()
{
public
Postulante
getPostulante
()
{
return
postulante
;
return
postulante
;
}
}
public
String
getDescripcion
()
{
return
descripcion
;
}
public
void
setDescripcion
(
String
descripcion
)
{
this
.
descripcion
=
descripcion
;
}
public
void
setReconocimientos
(
List
<
ExperienciaReconocimiento
>
reconocimientos
)
{
this
.
reconocimientos
=
reconocimientos
;
}
public
List
<
ExperienciaReconocimiento
>
getReconocimientos
()
{
return
reconocimientos
;
}
}
}
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaReconocimiento.java
View file @
77746912
...
@@ -2,6 +2,8 @@ package com.roshka.modelo;
...
@@ -2,6 +2,8 @@ package com.roshka.modelo;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Entity
@Table
(
name
=
"experiencia_reconocimiento"
)
@Table
(
name
=
"experiencia_reconocimiento"
)
public
class
ExperienciaReconocimiento
{
public
class
ExperienciaReconocimiento
{
...
@@ -10,12 +12,16 @@ public class ExperienciaReconocimiento {
...
@@ -10,12 +12,16 @@ public class ExperienciaReconocimiento {
@Column
(
name
=
"id"
)
@Column
(
name
=
"id"
)
private
long
id
;
private
long
id
;
@ManyToOne
@ManyToOne
(
optional
=
false
)
@JoinColumn
@JoinColumn
@JsonBackReference
private
Experiencia
experiencia
;
private
Experiencia
experiencia
;
@Column
(
name
=
"nivel"
)
@Column
(
name
=
"nombre"
)
private
long
nivel
;
private
String
nombre
;
@Column
(
name
=
"certificado"
)
private
String
certificado
;
public
long
getId
()
{
public
long
getId
()
{
return
id
;
return
id
;
...
@@ -29,10 +35,16 @@ public class ExperienciaReconocimiento {
...
@@ -29,10 +35,16 @@ public class ExperienciaReconocimiento {
public
void
setExperiencia
(
Experiencia
experiencia
)
{
public
void
setExperiencia
(
Experiencia
experiencia
)
{
this
.
experiencia
=
experiencia
;
this
.
experiencia
=
experiencia
;
}
}
public
long
getNivel
()
{
public
String
getCertificado
()
{
return
nivel
;
return
certificado
;
}
public
String
getNombre
()
{
return
nombre
;
}
public
void
setCertificado
(
String
certificado
)
{
this
.
certificado
=
certificado
;
}
}
public
void
setN
ivel
(
long
nivel
)
{
public
void
setN
ombre
(
String
nombre
)
{
this
.
n
ivel
=
nivel
;
this
.
n
ombre
=
nombre
;
}
}
}
}
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaTecnologia.java
deleted
100644 → 0
View file @
971a2f4f
package
com
.
roshka
.
modelo
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
@Entity
@Table
(
name
=
"experiencia_tecnologia"
)
public
class
ExperienciaTecnologia
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
AUTO
)
@Column
(
name
=
"id"
)
private
Long
id
;
@ManyToOne
@JoinColumn
private
Experiencia
experencia
;
@ManyToOne
@JoinColumn
private
Tecnologia
tecnologia
;
@Column
(
name
=
"nivel"
)
private
Long
nivel
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
Experiencia
getExperencia
()
{
return
experencia
;
}
public
void
setExperencia
(
Experiencia
experencia
)
{
this
.
experencia
=
experencia
;
}
public
Tecnologia
getTecnologia
()
{
return
tecnologia
;
}
public
void
setTecnologia
(
Tecnologia
tecnologia
)
{
this
.
tecnologia
=
tecnologia
;
}
public
Long
getNivel
()
{
return
nivel
;
}
public
void
setNivel
(
Long
nivel
)
{
this
.
nivel
=
nivel
;
}
}
curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java
View file @
77746912
...
@@ -2,8 +2,11 @@ package com.roshka.modelo;
...
@@ -2,8 +2,11 @@ package com.roshka.modelo;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
...
@@ -52,12 +55,15 @@ public class Postulante {
...
@@ -52,12 +55,15 @@ public class Postulante {
@Column
(
name
=
"disponibilidad"
)
@Column
(
name
=
"disponibilidad"
)
private
String
disponibilidad
;
private
String
disponibilidad
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
PostulanteTecnologia
>
tecnologias
;
private
List
<
PostulanteTecnologia
>
tecnologias
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
Experiencia
>
experiencias
;
private
List
<
Experiencia
>
experiencias
=
new
ArrayList
<>()
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
Estudio
>
estudios
;
private
List
<
Estudio
>
estudios
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java
View file @
77746912
...
@@ -8,6 +8,8 @@ import javax.persistence.Id;
...
@@ -8,6 +8,8 @@ import javax.persistence.Id;
import
javax.persistence.JoinColumn
;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Entity
@Table
(
name
=
"postulante_tecnologia"
)
@Table
(
name
=
"postulante_tecnologia"
)
...
@@ -23,6 +25,7 @@ public class PostulanteTecnologia {
...
@@ -23,6 +25,7 @@ public class PostulanteTecnologia {
private
Tecnologia
tecnologia
;
private
Tecnologia
tecnologia
;
@ManyToOne
()
@ManyToOne
()
@JoinColumn
@JoinColumn
@JsonBackReference
private
Postulante
postulante
;
private
Postulante
postulante
;
public
long
getId
()
{
public
long
getId
()
{
return
id
;
return
id
;
...
...
curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaTecnologiaRepository.java
deleted
100644 → 0
View file @
971a2f4f
package
com
.
roshka
.
repositorio
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
com.roshka.modelo.ExperienciaTecnologia
;
public
interface
ExperienciaTecnologiaRepository
extends
JpaRepository
<
ExperienciaTecnologia
,
Long
>
{
}
curriculumsearch/src/main/resources/static/main.js
View file @
77746912
...
@@ -9,9 +9,19 @@ function agregarFieldExpierncia(){
...
@@ -9,9 +9,19 @@ function agregarFieldExpierncia(){
const
pairs
=
{};
const
pairs
=
{};
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
const
formData
=
new
FormData
(
formexp
);
const
formData
=
new
FormData
(
formexp
);
const
reconocimientos
=
[{},{},{}];
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
)
{
reconocimientos
[
pos_rec
[
2
]][
pos_rec
[
1
]]
=
value
}
else
{
pairs
[
name
]
=
value
pairs
[
name
]
=
value
}
}
}
pairs
[
"reconocimientos"
]
=
reconocimientos
.
filter
(
rec
=>
rec
.
nombre
);
experiencias
[
cont_experiencia
]
=
pairs
;
experiencias
[
cont_experiencia
]
=
pairs
;
formexp
.
reset
();
formexp
.
reset
();
//imprimir lista actualizada
//imprimir lista actualizada
...
@@ -25,7 +35,7 @@ function agregarFieldExpierncia(){
...
@@ -25,7 +35,7 @@ function agregarFieldExpierncia(){
content
+=
`
content
+=
`
<li id="exp-
${
index
}
">
<li id="exp-
${
index
}
">
${
exp
.
institucion
}
${
exp
.
institucion
}
<button type="button" onclick="eliminarExperiencia(event)">
Eliminar
</button>
<button type="button" onclick="eliminarExperiencia(event)">
<span class="glyphicon glyphicon-trash"></span> Tras
</button>
</li>
</li>
`
`
...
@@ -40,7 +50,6 @@ function agregarFieldExpierncia(){
...
@@ -40,7 +50,6 @@ function agregarFieldExpierncia(){
function
eliminarExperiencia
(
event
)
{
function
eliminarExperiencia
(
event
)
{
//eliminar del array
//eliminar del array
console
.
log
(
event
.
target
.
parentElement
.
id
.
split
(
"-"
)[
1
])
experiencias
[
event
.
target
.
parentElement
.
id
.
split
(
"-"
)[
1
]]
=
null
experiencias
[
event
.
target
.
parentElement
.
id
.
split
(
"-"
)[
1
]]
=
null
//eliminar en html
//eliminar en html
event
.
target
.
parentElement
.
remove
()
event
.
target
.
parentElement
.
remove
()
...
@@ -87,7 +96,6 @@ form.addEventListener("submit",(evt)=>{
...
@@ -87,7 +96,6 @@ form.addEventListener("submit",(evt)=>{
postData
(
'postulante'
,
serializeJSON
(
form
))
postData
(
'postulante'
,
serializeJSON
(
form
))
.
then
(
response
=>
{
.
then
(
response
=>
{
console
.
log
(
response
);
// JSON data parsed by `data.json()` call
location
.
replace
(
response
.
url
);
location
.
replace
(
response
.
url
);
});
});
evt
.
preventDefault
();
evt
.
preventDefault
();
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
77746912
This diff is collapsed.
Click to expand it.
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