Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
e43ec496
Commit
e43ec496
authored
Aug 19, 2021
by
José Rômulo
Browse files
Adicionando substituir participante
parent
8d0924c7
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/TrabalhoController.php
View file @
e43ec496
...
...
@@ -44,35 +44,6 @@ use Illuminate\Support\Facades\Notification;
class
TrabalhoController
extends
Controller
{
###### Prototipo troca de participantes ######
public
function
telaTrocaPart
(
Request
$request
){
$projeto
=
Trabalho
::
find
(
$request
->
projeto_id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$participantes
=
$projeto
->
participantes
;
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
$projeto
->
id
)
->
select
(
'user_id'
)
->
get
();
$participantesExcluidos
=
Participante
::
onlyTrashed
()
->
where
(
'trabalho_id'
,
$projeto
->
id
);
$participantesExcluidosUsersIds
=
Participante
::
onlyTrashed
()
->
where
(
'trabalho_id'
,
$projeto
->
id
)
->
select
(
'user_id'
);
$users
=
User
::
whereIn
(
'id'
,
$participantesUsersIds
)
->
get
();
$usersExcluidos
=
User
::
whereIn
(
'id'
,
$participantesExcluidosUsersIds
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$projeto
->
id
)
->
get
();
return
view
(
'trocarParti'
)
->
with
([
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
'users'
=>
$users
,
'usersExcluidos'
=>
$usersExcluidos
,
'participantes'
=>
$participantes
,
'participantesExcluidos'
=>
$participantesExcluidos
,
'arquivos'
=>
$arquivos
,
'estados'
=>
$this
->
estados
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
]);
}
##############################################
public
$estados
=
array
(
'AC'
=>
'Acre'
,
'AL'
=>
'Alagoas'
,
...
...
@@ -460,15 +431,17 @@ class TrabalhoController extends Controller
}
public
function
excluirParticipante
(
$id
){
$participante
=
Participante
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
where
(
'trabalho_id'
,
$id
)
->
first
();
$participante
=
Participante
::
where
(
'id'
,
$id
)
->
first
();
//$participante = Participante::where('user_id', Auth()->user()->id)
// ->where('trabalho_id', $id)->first();
$participante
->
trabalhos
()
->
detach
(
$id
);
//
$participante->trabalhos()->detach($id);
$participante
->
delete
();
return
redirect
()
->
back
();
}
public
function
novaVersao
(
Request
$request
){
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
...
...
@@ -1378,4 +1351,142 @@ class TrabalhoController extends Controller
return
redirect
(
route
(
'proponente.projetos'
))
->
with
([
'mensagem'
=>
'Projeto atualizado com sucesso!'
]);
}
public
function
telaTrocaPart
(
Request
$request
){
$projeto
=
Trabalho
::
find
(
$request
->
projeto_id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$participantes
=
$projeto
->
participantes
;
$participantesExcluidos
=
Participante
::
onlyTrashed
()
->
where
(
'trabalho_id'
,
$projeto
->
id
)
->
get
();
return
view
(
'administrador.substituirParticipante'
)
->
with
([
'projeto'
=>
$projeto
,
'edital'
=>
$edital
,
'participantes'
=>
$participantes
,
'participantesExcluidos'
=>
$participantesExcluidos
,
'estados'
=>
$this
->
estados
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
]);
}
public
function
trocaParticipante
(
Request
$request
){
try
{
DB
::
beginTransaction
();
$trabalho
=
Trabalho
::
find
(
$request
->
projetoId
);
$evento
=
Evento
::
find
(
$request
->
editalId
);
$participanteSubstituido
=
Participante
::
where
(
'id'
,
$request
->
participanteId
)
->
first
();
$planoAntigo
=
Arquivo
::
where
(
'id'
,
$participanteSubstituido
->
planoTrabalho
->
id
)
->
first
();
$passwordTemporario
=
Str
::
random
(
8
);
$data
[
'name'
]
=
$request
->
name
;
$data
[
'email'
]
=
$request
->
email
;
$data
[
'password'
]
=
bcrypt
(
$passwordTemporario
);
$data
[
'data_de_nascimento'
]
=
$request
->
data_de_nascimento
;
$data
[
'cpf'
]
=
$request
->
cpf
;
$data
[
'tipo'
]
=
'participante'
;
$data
[
'funcao_participante_id'
]
=
4
;
$data
[
'rg'
]
=
$request
->
rg
;
$data
[
'celular'
]
=
$request
->
celular
;
$data
[
'cep'
]
=
$request
->
cep
;
$data
[
'uf'
]
=
$request
->
uf
;
$data
[
'cidade'
]
=
$request
->
cidade
;
$data
[
'rua'
]
=
$request
->
rua
;
$data
[
'numero'
]
=
$request
->
numero
;
$data
[
'bairro'
]
=
$request
->
bairro
;
$data
[
'complemento'
]
=
$request
->
complemento
;
if
(
$request
->
instituicao
!=
"Outra"
){
$data
[
'instituicao'
]
=
$request
->
instituicao
;
}
else
{
$data
[
'instituicao'
]
=
$request
->
outrainstituicao
;
}
$data
[
'total_periodos'
]
=
$request
->
total_periodos
;
if
(
$request
->
curso
!=
"Outro"
){
$data
[
'curso'
]
=
$request
->
curso
;
}
else
{
$data
[
'curso'
]
=
$request
->
outrocurso
;
}
$data
[
'turno'
]
=
$request
->
turno
;
$data
[
'periodo_atual'
]
=
$request
->
periodo_atual
;
$data
[
'ordem_prioridade'
]
=
$request
->
ordem_prioridade
;
$data
[
'media_do_curso'
]
=
$request
->
media_do_curso
;
$data
[
'nomePlanoTrabalho'
]
=
$request
->
nomePlanoTrabalho
;
if
(
$request
->
substituirApenasPlanoCheck
==
'check'
){
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
)
{
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$data
[
'nomePlanoTrabalho'
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
now
();
$participanteSubstituido
->
planoTrabalho
()
->
delete
();
$arquivo
->
participanteId
=
$participanteSubstituido
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
else
{
$participanteSubstituido
->
delete
();
$user
=
User
::
where
(
'email'
,
$data
[
'email'
])
->
first
();
if
(
!
$user
){
$data
[
'usuarioTemp'
]
=
true
;
$user
=
User
::
create
(
$data
);
$endereco
=
Endereco
::
create
(
$data
);
$endereco
->
user
()
->
save
(
$user
);
}
$participante
=
$user
->
participantes
->
where
(
'trabalho_id'
,
$trabalho
->
id
)
->
first
();
if
(
!
$participante
){
$participante
=
Participante
::
create
(
$data
);
}
$user
->
participantes
()
->
save
(
$participante
);
$trabalho
->
participantes
()
->
save
(
$participante
);
if
(
$request
->
manterPlanoCheck
==
'check'
){
$planoAntigo
->
participanteId
=
$participante
->
id
;
$planoAntigo
->
save
();
}
else
{
if
(
$request
->
has
(
'anexoPlanoTrabalho'
)
)
{
$path
=
'trabalhos/'
.
$evento
->
id
.
'/'
.
$trabalho
->
id
.
'/'
;
$nome
=
$data
[
'nomePlanoTrabalho'
]
.
".pdf"
;
$file
=
$request
->
anexoPlanoTrabalho
;
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$data
[
'nomePlanoTrabalho'
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
now
();
$arquivo
->
participanteId
=
$participante
->
id
;
$arquivo
->
versaoFinal
=
true
;
$arquivo
->
save
();
}
}
}
$evento
->
trabalhos
()
->
save
(
$trabalho
);
$trabalho
->
save
();
DB
::
commit
();
return
redirect
(
route
(
'trabalho.trocaParticipante'
,
[
'evento_id'
=>
$evento
->
id
,
'projeto_id'
=>
$trabalho
->
id
]))
->
with
([
'sucesso'
=>
'Troca de participantes realizada com sucesso!'
]);
}
catch
(
\
Throwable
$th
)
{
DB
::
rollback
();
return
redirect
(
route
(
'trabalho.trocaParticipante'
,
[
'evento_id'
=>
$evento
->
id
,
'projeto_id'
=>
$trabalho
->
id
]))
->
with
([
'erro'
=>
$th
->
getMessage
()]);
}
}
}
\ No newline at end of file
resources/views/administrador/analisar.blade.php
View file @
e43ec496
...
...
@@ -248,13 +248,12 @@
<div class="
dropdown
-
menu
">
@if(
$avaliador->pivot
->parecer != null)
<a href="
{{
route
(
'admin.visualizarParecer'
,
[
'trabalho_id'
=>
$trabalho
->
id
,
'avaliador_id'
=>
$avaliador
->
id
])
}}
" class="
dropdown
-
item
text
-
center
">
Vizualizar Parecer
Vizualizar Parecer
</a>
@e
lse
@e
ndif
<a href="
{{
route
(
'admin.removerProjAval'
,
[
'trabalho_id'
=>
$trabalho
->
id
,
'avaliador_id'
=>
$avaliador
->
id
])
}}
" class="
dropdown
-
item
text
-
center
">
Desatribuir Avaliador
</a>
@endif
</div>
</div>
</td>
...
...
resources/views/administrador/substituirParticipante.blade.php
0 → 100644
View file @
e43ec496
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
>
@
if
(
session
(
'sucesso'
))
<
div
class
=
"alert alert-success"
role
=
"alert"
>
{{
session
(
'sucesso'
)
}}
</
div
>
@
endif
@
if
(
session
(
'erro'
))
<
div
class
=
"alert alert-danger"
role
=
"alert"
>
{{
session
(
'erro'
)
}}
</
div
>
@
endif
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
<
div
class
=
"card-header"
>
<
h4
class
=
"card-title"
style
=
"color:#1492E6"
>
Substituir
Participante
</
h4
>
<
h5
style
=
"color:grey; font-size:medium"
>
{{
$edital
->
nome
}}
:
{{
$projeto
->
titulo
}}
</
h5
>
</
div
>
<
div
class
=
"card-body"
>
<
h4
>
Formação
Atual
</
h4
>
<
div
style
=
"margin-top: 20px"
>
<
div
class
=
"card-header"
>
<
h5
class
=
"card-title"
style
=
"color:#1492E6"
>
Nome
/
Periodo
</
h5
>
</
div
>
<
div
class
=
"card-body"
>
@
foreach
(
$participantes
as
$participante
)
<
div
class
=
"row"
style
=
"margin-bottom: 20px;"
>
<
div
class
=
"col-10"
>
<
h4
style
=
"font-size:20px"
>
{{
$participante
->
user
->
name
}}
</
h4
>
<
h5
style
=
"color:grey; font-size:medium"
>
{{
date
(
'd-m-Y'
,
strtotime
(
$participante
->
created_at
))}}
-
Atualmente
</
h5
>
</
div
>
<
div
class
=
"col-2 align-self-center"
>
<
div
class
=
"row justify-content-around"
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalSubParticipante
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"fas fa-exchange-alt fa-2x"
></
i
><
a
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalVizuParticipante
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"far fa-eye fa-2x"
></
i
></
a
>
</
div
>
</
div
>
</
div
>
<!--
Modal
substituir
participante
-->
<
div
class
=
"modal fade"
id
=
"modalSubParticipante
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Novo
participante
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
@
include
(
'administrador.substituirParticipanteForm'
)
</
div
>
</
div
>
</
div
>
</
div
>
<!--
Modal
visualizar
informações
participante
-->
<
div
class
=
"modal fade"
id
=
"modalVizuParticipante
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Informações
Participante
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
@
include
(
'administrador.substituirParticipanteForm'
,
[
'visualizarOnly'
=>
1
])
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
</
div
>
</
div
>
<
h4
style
=
"margin-top: 50px"
>
Histórico
de
participantes
</
h4
>
<
div
style
=
"margin-top: 20px"
>
<
div
class
=
"card-header"
>
<
h5
class
=
"card-title"
style
=
"color:#1492E6"
>
Nome
/
Periodo
</
h5
>
</
div
>
<
div
class
=
"card-body"
>
@
foreach
(
$participantesExcluidos
as
$participante
)
<
div
class
=
"row"
style
=
"margin-bottom: 20px;"
>
<
div
class
=
"col-10"
>
<
h4
style
=
"font-size:20px"
>
{{
$participante
->
user
->
name
}}
</
h4
>
<
h5
style
=
"color:grey; font-size:medium"
>
{{
date
(
'd-m-Y'
,
strtotime
(
$participante
->
created_at
))}}
-
{{
date
(
'd-m-Y'
,
strtotime
(
$participante
->
deleted_at
))}}
</
h5
>
</
div
>
<
div
class
=
"col-2 align-self-center"
>
<
div
class
=
"row justify-content-center"
>
<
a
href
=
""
data
-
toggle
=
"modal"
data
-
target
=
"#modalVizuParticipanteExcluido
{
{$participante->id}
}
"
class
=
"button"
><
i
class
=
"far fa-eye fa-2x"
></
i
></
a
>
</
div
>
</
div
>
</
div
>
<!--
Modal
visualizar
informações
participante
excluido
-->
<
div
class
=
"modal fade"
id
=
"modalVizuParticipanteExcluido
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered modal-lg"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
style
=
"overflow-x:auto"
>
<
h5
class
=
"modal-title"
id
=
"exampleModalLabel"
style
=
"color:#1492E6"
>
Informações
Participante
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
style
=
"padding-top: 8px; color:#1492E6"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
@
include
(
'administrador.substituirParticipanteForm'
,
[
'visualizarOnly'
=>
1
])
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
$
(
document
)
.
ready
(
function
(){
$
(
'input.cep:text'
)
.
mask
(
'00000-000'
);
$
(
'input.cpf:text'
)
.
mask
(
'000.000.000-00'
);
$
(
'input.celular'
)
.
mask
(
'(00) 00000-0000'
);
$
(
'input'
)
.
on
(
"input"
,
function
(){
var
maxlength
=
$
(
this
)
.
attr
(
"maxlength"
);
var
currentLength
=
$
(
this
)
.
val
()
.
length
;
var
idInput
=
$
(
this
)
.
attr
(
"id"
);
if
(
currentLength
>=
maxlength
){
$
(
"#caracsRestantes"
+
idInput
)
.
html
(
"Caracteres restantes: "
+
(
maxlength
-
this
.
value
.
length
));
}
else
if
(
currentLength
==
0
){
$
(
"#caracsRestantes"
+
idInput
)
.
html
(
""
);
}
else
{
$
(
"#caracsRestantes"
+
idInput
)
.
html
(
"Caracteres restantes: "
+
(
maxlength
-
this
.
value
.
length
));
}
});
});
function
manterPlano
(
checkBox
){
var
checkboxInput
=
checkBox
;
var
idParticipante
=
checkboxInput
.
id
;
var
tituloPlano
=
document
.
getElementById
(
'nomePlanoTrabalho'
+
idParticipante
);
var
anexoPlano
=
document
.
getElementById
(
'anexoPlanoTrabalho'
+
idParticipante
);
if
(
checkboxInput
.
checked
){
tituloPlano
.
setAttribute
(
'disabled'
,
'disabled'
);
tituloPlano
.
removeAttribute
(
'required'
);
anexoPlano
.
setAttribute
(
'disabled'
,
'disabled'
);
anexoPlano
.
removeAttribute
(
'required'
);
}
else
if
(
!
checkboxInput
.
checked
){
tituloPlano
.
removeAttribute
(
'disabled'
);
tituloPlano
.
setAttribute
(
'required'
,
'required'
);
anexoPlano
.
removeAttribute
(
'disabled'
);
anexoPlano
.
setAttribute
(
'required'
,
'required'
);
}
}
function
substituirApenasPlano
(
checkBox
){
var
checkboxInput
=
checkBox
;
var
checkBoxId
=
checkboxInput
.
id
;
var
idParticipante
=
checkBoxId
.
slice
(
11
);
var
inputsForm
=
[];
inputsForm
.
push
(
document
.
getElementById
(
'nome'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'email'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'nascimento'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'cpf'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'rg'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'cep'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'celular'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'estado'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'cidade'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'bairro'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'rua'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'numero'
+
idParticipante
));
var
complementoInput
=
document
.
getElementById
(
'complemento'
+
idParticipante
);
inputsForm
.
push
(
complementoInput
);
inputsForm
.
push
(
document
.
getElementById
(
'instituicao['
+
idParticipante
+
']'
));
var
outraInstituicaoInput
=
document
.
getElementById
(
'outrainstituicao['
+
idParticipante
+
']'
);
inputsForm
.
push
(
outraInstituicaoInput
);
inputsForm
.
push
(
document
.
getElementById
(
'curso['
+
idParticipante
+
']'
));
var
outroCursoInput
=
document
.
getElementById
(
'outrocurso['
+
idParticipante
+
']'
);
inputsForm
.
push
(
outroCursoInput
);
inputsForm
.
push
(
document
.
getElementById
(
'turno'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'periodosTotal'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'periodo'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'ordem'
+
idParticipante
));
inputsForm
.
push
(
document
.
getElementById
(
'media'
+
idParticipante
));
if
(
checkboxInput
.
checked
){
inputsForm
.
forEach
(
function
(
item
,
indice
,
array
){
item
.
setAttribute
(
'disabled'
,
'disabled'
);
item
.
removeAttribute
(
'required'
);
});
}
else
if
(
!
checkboxInput
.
checked
){
inputsForm
.
forEach
(
function
(
item
,
indice
,
array
){
item
.
removeAttribute
(
'disabled'
);
item
.
setAttribute
(
'required'
,
'required'
);
});
complementoInput
.
removeAttribute
(
'required'
);
outraInstituicaoInput
.
removeAttribute
(
'required'
);
outroCursoInput
.
removeAttribute
(
'required'
);
}
}
function
showInstituicao
(
instituicao
){
var
instituicaoSelect
=
instituicao
;
var
idSelect
=
instituicaoSelect
.
id
;
var
instituicao
=
document
.
getElementById
(
'outra'
+
idSelect
);
var
display
=
document
.
getElementById
(
'display'
+
idSelect
);
if
(
instituicaoSelect
.
value
===
"Outra"
){
display
.
style
.
display
=
"block"
;
instituicao
.
parentElement
.
style
.
display
=
''
;
instituicao
.
value
=
""
;
}
else
if
(
instituicaoSelect
.
value
===
"UFAPE"
){
display
.
style
.
display
=
"none"
;
}
}
function
showCurso
(
curso
){
var
cursoSelect
=
curso
;
var
idSelect
=
cursoSelect
.
id
;
var
curso
=
document
.
getElementById
(
'outro'
+
idSelect
);
var
displayCurso
=
document
.
getElementById
(
'display'
+
idSelect
);
if
(
cursoSelect
.
value
===
"Outro"
){
displayCurso
.
style
.
display
=
"block"
;
curso
.
parentElement
.
style
.
display
=
''
;
curso
.
value
=
""
;
}
else
{
displayCurso
.
style
.
display
=
"none"
;
}
}
function
gerarPeriodo
(
e
){
var
select
=
e
.
parentElement
.
parentElement
.
nextElementSibling
;
selectPeriodos
=
select
.
children
[
0
]
.
children
[
1
];
var
html
=
`<option value="" disabled selected>-- TOTAL DE PERIODOS --</option>`
;
for
(
var
i
=
0
;
i
<
parseInt
(
e
.
value
);
i
++
)
{
html
+=
`<option value="${i+1}">${i+1}º</option>`
;
}
$
(
selectPeriodos
)
.
html
(
''
);
$
(
selectPeriodos
)
.
append
(
html
);
}
</
script
>
@
endsection
\ No newline at end of file
resources/views/administrador/substituirParticipanteForm.blade.php
0 → 100644
View file @
e43ec496
This diff is collapsed.
Click to expand it.
resources/views/proponente/projetos.blade.php
View file @
e43ec496
...
...
@@ -94,7 +94,8 @@
Editar
</
a
>
<
hr
class
=
"dropdown-hr"
>
@
else
@
elseif
(
$projeto
->
evento
->
fimSubmissao
<=
$hoje
)
<
a
href
=
"{{route('trabalho.trocaParticipante', ['evento_id' =>
$projeto->evento
->id, 'projeto_id' =>
$projeto->id
])}}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Substituir
participante
</
a
>
@
endif
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
...
...
resources/views/proponente/projetosEdital.blade.php
View file @
e43ec496
...
...
@@ -107,7 +107,8 @@
Editar
</
a
>
<
hr
class
=
"dropdown-hr"
>
@
else
@
elseif
(
$projeto
->
evento
->
fimSubmissao
<=
$hoje
)
<
a
href
=
"{{route('trabalho.trocaParticipante', ['evento_id' =>
$projeto->evento
->id, 'projeto_id' =>
$projeto->id
])}}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Substituir
participante
</
a
>
@
endif
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
...
...
routes/web.php
View file @
e43ec496
...
...
@@ -129,6 +129,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route
::
get
(
'/projeto/{id}/excluirParticipante'
,
'TrabalhoController@excluirParticipante'
)
->
name
(
'trabalho.excluirParticipante'
);
Route
::
get
(
'/projeto/exportar/{id}'
,
'TrabalhoController@exportProjeto'
)
->
name
(
'exportar.projeto'
);
Route
::
get
(
'/projeto/substituirParticipante'
,
'TrabalhoController@telaTrocaPart'
)
->
name
(
'trabalho.trocaParticipante'
);
Route
::
post
(
'/projeto/substituirParticipante'
,
'TrabalhoController@trocaParticipante'
)
->
name
(
'trabalho.infoTrocaParticipante'
);
//######### Atribuição #######################################
Route
::
get
(
'/atribuir'
,
'AtribuicaoController@distribuicaoAutomatica'
)
->
name
(
'distribuicao'
);
...
...
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