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
2677513a
Commit
2677513a
authored
Nov 02, 2021
by
Joaquin Elias Baranda Ayala
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'joel-001' of
https://phoebe.roshka.com/gitlab/hshah/TalentoHumano
into joaquin
parents
58f92202
a5c78d23
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
105 additions
and
96 deletions
+105
-96
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
+0
-10
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
+39
-7
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaReconocimiento.java
+4
-1
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
+10
-0
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
+34
-3
No files found.
curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java
View file @
2677513a
package
com
.
roshka
.
controller
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
javax.servlet.http.HttpServletRequest
;
import
com.roshka.modelo.Experiencia
;
import
com.roshka.modelo.Postulante
;
import
com.roshka.repositorio.PostulanteRepository
;
...
...
@@ -35,10 +29,6 @@ public class PostulanteController {
@PostMapping
(
value
=
"/postulante"
,
consumes
=
"application/json"
)
public
String
guardarPostulante
(
@RequestBody
Postulante
postulante
){
post
.
save
(
postulante
);
for
(
Experiencia
exp:
postulante
.
getExperiencias
()){
exp
.
setPostulante
(
postulante
);
}
post
.
save
(
postulante
);
return
"redirect:/"
;
}
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java
View file @
2677513a
...
...
@@ -12,6 +12,9 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.OneToMany
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
@Entity
@Table
(
name
=
"estudio"
)
public
class
Estudio
{
...
...
@@ -34,8 +37,10 @@ public class Estudio {
@ManyToOne
@JoinColumn
@JsonBackReference
private
Postulante
postulante
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"estudio"
)
private
List
<
EstudioReconocimiento
>
estudioReconocimiento
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/EstudioReconocimiento.java
View file @
2677513a
...
...
@@ -10,6 +10,8 @@ import javax.persistence.JoinColumn;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Table
(
name
=
"estudio_reconocimiento"
)
public
class
EstudioReconocimiento
{
...
...
@@ -21,6 +23,7 @@ public class EstudioReconocimiento {
private
String
nombre
;
@Column
(
name
=
"certificado"
)
private
String
certificado
;
@JsonBackReference
@ManyToOne
@JoinColumn
private
Estudio
estudio
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java
View file @
2677513a
...
...
@@ -3,11 +3,16 @@ package com.roshka.modelo;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
import
javax.persistence.*
;
@Entity
...
...
@@ -22,14 +27,23 @@ public class Experiencia {
private
Date
fechaDesde
;
@Column
(
name
=
"fecha_hasta"
)
private
Date
fechaHasta
;
@Column
(
name
=
"referencias"
)
private
String
referencias
;
@Column
(
name
=
"nombre_referencia"
)
private
String
nombreReferencia
;
@Column
(
name
=
"telefono_referencia"
)
private
String
telefonoReferencia
;
@Column
(
name
=
"cargo"
)
private
String
cargo
;
@ManyToOne
@Column
(
name
=
"descripcion"
)
private
String
descripcion
;
@JsonBackReference
@ManyToOne
(
optional
=
false
)
@JoinColumn
private
Postulante
postulante
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"experiencia"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
ExperienciaReconocimiento
>
reconocimientos
;
public
long
getId
()
{
return
id
;
}
...
...
@@ -74,11 +88,17 @@ public class Experiencia {
e
.
printStackTrace
();
}
}
public
String
getReferencias
()
{
return
referencias
;
public
String
getNombreReferencia
()
{
return
nombreReferencia
;
}
public
String
getTelefonoReferencia
()
{
return
telefonoReferencia
;
}
public
void
setNombreReferencia
(
String
nombreReferencia
)
{
this
.
nombreReferencia
=
nombreReferencia
;
}
public
void
set
Referencias
(
String
referencias
)
{
this
.
referencias
=
referencias
;
public
void
set
TelefonoReferencia
(
String
telefonoReferencia
)
{
this
.
telefonoReferencia
=
telefonoReferencia
;
}
public
String
getCargo
()
{
return
cargo
;
...
...
@@ -92,4 +112,16 @@ public class Experiencia {
public
Postulante
getPostulante
()
{
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 @
2677513a
...
...
@@ -2,6 +2,8 @@ package com.roshka.modelo;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Table
(
name
=
"experiencia_reconocimiento"
)
public
class
ExperienciaReconocimiento
{
...
...
@@ -10,8 +12,9 @@ public class ExperienciaReconocimiento {
@Column
(
name
=
"id"
)
private
long
id
;
@ManyToOne
@ManyToOne
(
optional
=
false
)
@JoinColumn
@JsonBackReference
private
Experiencia
experiencia
;
@Column
(
name
=
"nombre"
)
...
...
curriculumsearch/src/main/java/com/roshka/modelo/ExperienciaTecnologia.java
deleted
100644 → 0
View file @
58f92202
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 @
2677513a
...
...
@@ -2,8 +2,11 @@ package com.roshka.modelo;
import
javax.persistence.*
;
import
com.fasterxml.jackson.annotation.JsonManagedReference
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -52,12 +55,15 @@ public class Postulante {
@Column
(
name
=
"disponibilidad"
)
private
String
disponibilidad
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
PostulanteTecnologia
>
tecnologias
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
Experiencia
>
experiencias
;
private
List
<
Experiencia
>
experiencias
=
new
ArrayList
<>()
;
@JsonManagedReference
@OneToMany
(
mappedBy
=
"postulante"
,
cascade
=
CascadeType
.
ALL
)
private
List
<
Estudio
>
estudios
;
...
...
curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java
View file @
2677513a
...
...
@@ -8,6 +8,8 @@ import javax.persistence.Id;
import
javax.persistence.JoinColumn
;
import
javax.persistence.ManyToOne
;
import
javax.persistence.Table
;
import
com.fasterxml.jackson.annotation.JsonBackReference
;
@Entity
@Table
(
name
=
"postulante_tecnologia"
)
...
...
@@ -23,6 +25,7 @@ public class PostulanteTecnologia {
private
Tecnologia
tecnologia
;
@ManyToOne
()
@JoinColumn
@JsonBackReference
private
Postulante
postulante
;
public
long
getId
()
{
return
id
;
...
...
curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaTecnologiaRepository.java
deleted
100644 → 0
View file @
58f92202
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 @
2677513a
...
...
@@ -9,9 +9,19 @@ function agregarFieldExpierncia(){
const
pairs
=
{};
const
formexp
=
document
.
querySelector
(
"[name=experiencia-form]"
);
const
formData
=
new
FormData
(
formexp
);
const
reconocimientos
=
[{},{},{}];
let
pos_rec
;
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
[
"reconocimientos"
]
=
reconocimientos
.
filter
(
rec
=>
rec
.
nombre
);
experiencias
[
cont_experiencia
]
=
pairs
;
formexp
.
reset
();
//imprimir lista actualizada
...
...
curriculumsearch/src/main/webapp/jsp/postulante-form.jsp
View file @
2677513a
...
...
@@ -100,9 +100,40 @@
<label
for=
"fechaHasta"
class=
"form-label"
>
Fecha Hasta
</label>
<input
type=
"date"
class=
"form-control "
name=
"fechaHasta"
id=
"fechaHasta"
>
<label
for=
"cargo"
class=
"form-label"
>
Cargo
</label>
<input
type=
"cargo"
class=
"form-control "
name=
"cargo"
id=
"cargo"
>
<label
for=
"refNombre"
class=
"form-label"
>
Referencia Nombre
</label>
<input
type=
"text"
class=
"form-control "
name=
"referencias"
id=
"refNombre"
>
<input
type=
"text"
class=
"form-control "
name=
"cargo"
id=
"cargo"
>
<label
for=
"descripcion"
class=
"form-label"
>
Descripcion
</label>
<textarea
class=
"form-control "
name=
"descripcion"
id=
"descripcion"
>
</textarea>
<label
for=
"refNombre"
class=
"form-label"
>
Nombre de la Referencia
</label>
<input
type=
"text"
class=
"form-control "
name=
"nombreReferencia"
id=
"refNombre"
>
<label
for=
"refTel"
class=
"form-label"
>
Telefono de la Referencia
</label>
<input
type=
"text"
class=
"form-control "
name=
"telefonoReferencia"
id=
"refTel"
>
<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