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
3d892253
Commit
3d892253
authored
Nov 25, 2021
by
willgonzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambio en el controler convocatoria, validacion de no crear una convocatoria abierta
parent
a9d830fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java
+3
-11
No files found.
curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java
View file @
3d892253
...
...
@@ -48,22 +48,14 @@ public class ConvocatoriaController {
return
"convocatorias"
;
}
@
PostMapping
(
"/convocatoria
"
)
public
String
guardarConvocatoria
(
@ModelAttribute
ConvocatoriaCargo
convocatoria
,
BindingResult
result
,
RedirectAttributes
redirectAttributes
)
{
for
(
ConvocatoriaCargo
conv:
convoRepo
.
findByCargoId
(
convocatoria
.
getCargoId
()
))
{
@
RequestMapping
(
"/convocatoria/crear/{id}
"
)
public
String
guardarConvocatoria
a
(
@PathVariable
(
required
=
false
)
Long
id
,
RedirectAttributes
redirectAttributes
)
{
for
(
ConvocatoriaCargo
conv:
convoRepo
.
findByCargoId
(
id
))
{
if
(
conv
.
getEstado
()==
EstadoConvocatoria
.
abierto
){
redirectAttributes
.
addFlashAttribute
(
"SUCCESS_MESSAGE"
,
"Ya existe una convocatoria Abierta con ese cargo"
);
return
"redirect:/convocatorias"
;
}
}
if
(
result
.
hasErrors
());
convocatoria
.
setFechaInicio
(
new
Date
());
convocatoria
.
setEstado
(
EstadoConvocatoria
.
abierto
);
convoRepo
.
save
(
convocatoria
);
return
"redirect:/convocatorias"
;
}
@RequestMapping
(
"/convocatoria/crear/{id}"
)
public
String
guardarConvocatoriaa
(
@PathVariable
(
required
=
false
)
Long
id
)
{
ConvocatoriaCargo
convocatoria
=
new
ConvocatoriaCargo
();
convocatoria
.
setCargo
(
cargoRepo
.
findByIdCargo
(
id
));
convocatoria
.
setCargoId
(
cargoRepo
.
findByIdCargo
(
id
).
getId
());
...
...
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