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
39586201
Commit
39586201
authored
Apr 09, 2022
by
Guilherme Silva
Browse files
Alterado maneira visual de como é definida a bolsa do participante
parent
464662f4
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/ParticipanteController.php
View file @
39586201
...
@@ -99,23 +99,11 @@ class ParticipanteController extends Controller
...
@@ -99,23 +99,11 @@ class ParticipanteController extends Controller
return
view
(
'documentacaoComplementar.listar'
)
->
with
([
'participantes'
=>
$participantes
,
'trabalho'
=>
$trabalho
]);
return
view
(
'documentacaoComplementar.listar'
)
->
with
([
'participantes'
=>
$participantes
,
'trabalho'
=>
$trabalho
]);
}
}
public
function
alterarBolsa
(
$id
,
$tipo
){
public
function
alterarBolsa
(
Request
$request
){
$participante
=
Participante
::
find
(
$id
);
$participante
=
Participante
::
find
(
$request
->
id
);
if
(
$participante
->
tipoBolsa
==
null
){
$participante
->
tipoBolsa
=
$request
->
tipo
;
if
(
$tipo
==
1
){
$participante
->
tipoBolsa
=
"Voluntario"
;
}
else
{
$participante
->
tipoBolsa
=
"Bolsista"
;
}
}
else
{
if
(
$participante
->
tipoBolsa
==
"Bolsista"
){
$participante
->
tipoBolsa
=
"Voluntario"
;
}
else
{
$participante
->
tipoBolsa
=
"Bolsista"
;
}
}
$participante
->
save
();
$participante
->
save
();
return
redirect
()
->
back
()
->
with
([
'
mensagem'
=>
'Altera
ção da bolsa realizada com sucesso!'
]);
return
redirect
()
->
back
()
->
with
([
'
sucesso'
=>
'Defini
ção da bolsa realizada com sucesso!'
]);
}
}
public
function
atualizarDocComplementar
(
Request
$request
){
public
function
atualizarDocComplementar
(
Request
$request
){
...
...
resources/views/administrador/resultadosProjetos.blade.php
View file @
39586201
...
@@ -2,6 +2,12 @@
...
@@ -2,6 +2,12 @@
@
section
(
'content'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
@
if
(
session
(
'sucesso'
))
<
div
class
=
"alert alert-success"
role
=
"alert"
>
{{
session
(
'sucesso'
)
}}
</
div
>
@
endif
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
...
@@ -33,6 +39,7 @@
...
@@ -33,6 +39,7 @@
<
table
class
=
"table table-bordered"
style
=
"display: block; white-space: nowrap; border-radius:10px; margin-bottom:0px"
>
<
table
class
=
"table table-bordered"
style
=
"display: block; white-space: nowrap; border-radius:10px; margin-bottom:0px"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
<
th
scope
=
"col"
>
Posição
</
th
>
<
th
scope
=
"col"
>
Pontuação
</
th
>
<
th
scope
=
"col"
>
Pontuação
</
th
>
<
th
scope
=
"col"
style
=
"width: 100%;"
>
Nome
do
projeto
</
th
>
<
th
scope
=
"col"
style
=
"width: 100%;"
>
Nome
do
projeto
</
th
>
<
th
scope
=
"col"
>
Proponente
</
th
>
<
th
scope
=
"col"
>
Proponente
</
th
>
...
@@ -44,9 +51,11 @@
...
@@ -44,9 +51,11 @@
</
tr
>
</
tr
>
</
thead
>
</
thead
>
<
tbody
id
=
"projetos"
>
<
tbody
id
=
"projetos"
>
@
php
$cont
=
1
;
@
endphp
@
foreach
(
$trabalhos
as
$trabalho
)
@
foreach
(
$trabalhos
as
$trabalho
)
@
if
(
$trabalho
->
status
==
'aprovado'
)
@
if
(
$trabalho
->
status
==
'aprovado'
)
<
tr
>
<
tr
>
<
td
>
{{
$cont
}}
</
td
>
<
td
>
{{
$trabalho
->
pontuacao
}}
</
td
>
<
td
>
{{
$trabalho
->
pontuacao
}}
</
td
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$trabalho
->
titulo
}}
{{
$trabalho
->
titulo
}}
...
@@ -90,26 +99,19 @@
...
@@ -90,26 +99,19 @@
</
button
>
</
button
>
</
td
>
</
td
>
</
tr
>
</
tr
>
@
php
$cont
+=
1
;
@
endphp
@
endif
@
endif
@
endforeach
@
endforeach
</
tbody
>
</
tbody
>
</
table
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-md-12"
>
<
br
>
{{
$trabalhos
->
links
()
}}
</
div
>
</
div
>
</
div
>
</
div
>
{{
--
Janelas
--
}}
{{
--
Janelas
--
}}
@
foreach
(
$trabalhos
as
$trabalho
)
@
foreach
(
$trabalhos
as
$trabalho
)
<
div
class
=
"modal fade"
id
=
"modalConfirmTrab
{
{$trabalho->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
<
div
class
=
"modal fade"
id
=
"modalConfirmTrab
{
{$trabalho->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"modalConfirmLabel"
aria
-
hidden
=
"true"
>
aria
-
labelledby
=
"modalConfirmLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-
md
modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-dialog modal-
lg
modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
div
class
=
"modal-header"
>
<
h4
class
=
"modal-title"
id
=
"modalConfirmLabel"
align
=
"center"
title
=
"Participantes do
{
{$trabalho->titulo}
}
"
>
<
h4
class
=
"modal-title"
id
=
"modalConfirmLabel"
align
=
"center"
title
=
"Participantes do
{
{$trabalho->titulo}
}
"
>
...
@@ -121,19 +123,18 @@
...
@@ -121,19 +123,18 @@
<
div
class
=
"modal-body"
>
<
div
class
=
"modal-body"
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
foreach
(
$trabalho
->
participantes
as
$participante
)
<
div
class
=
"row modal-header-submeta"
>
<
div
class
=
"row modal-header-submeta"
>
<
div
class
=
"col-sm-
8
"
>
<
div
class
=
"col-sm-
7"
style
=
"padding-left: 0px
"
>
<
p
style
=
"font-size: 22px"
>
Discente
:
{{
$participante
->
user
->
name
}}
</
p
>
<
p
style
=
"font-size: 22px"
>
Discente
:
{{
$participante
->
user
->
name
}}
</
p
>
</
div
>
</
div
>
<
div
class
=
"col-sm-4"
align
=
"left"
style
=
"padding-left: 0px"
>
<
div
class
=
"col-sm-5 text-right"
style
=
"padding-right: 0px"
>
<
button
type
=
"button"
class
=
"btn btn-primary"
data
-
dismiss
=
"modal"
data
-
toggle
=
"modal"
data
-
target
=
"#modalConfirm
{
{$participante->id}
}
"
onclick
=
"myFunction(
{
{$trabalho->id}
}
)"
>
<
form
id
=
"alteracao_bolsa
{
{$participante->id}
}
"
method
=
"POST"
action
=
"
{
{route('bolsa.alterar')}
}
"
>
@
if
(
$participante
->
tipoBolsa
==
null
)
@
csrf
Não
Definida
<
input
type
=
"hidden"
id
=
"participante_
{
{$participante->id}
}
"
name
=
"id"
value
=
"
{
{$participante->id}
}
"
>
@
elseif
(
$participante
->
tipoBolsa
==
"Voluntario"
)
<
input
type
=
"radio"
id
=
"bolsista
{
{$participante->id}
}
"
name
=
"tipo"
value
=
"Bolsista"
required
@
if
(
$participante
->
tipoBolsa
==
'Bolsista'
)
checked
@
endif
>
Bolsista
Voluntário
<
input
type
=
"radio"
id
=
"voluntario
{
{$participante->id}
}
"
name
=
"tipo"
value
=
"Voluntario"
required
@
if
(
$participante
->
tipoBolsa
==
'Voluntario'
)
checked
@
endif
>
Voluntario
@
else
{{
$participante
->
tipoBolsa
}}
<
button
type
=
"submit"
class
=
"btn btn-primary"
form
=
"alteracao_bolsa
{
{$participante->id}
}
"
>
Definir
</
button
>
@
endif
</
form
>
</
button
>
</
div
>
</
div
>
</
div
>
</
div
>
<
br
>
<
br
>
...
@@ -142,60 +143,6 @@
...
@@ -142,60 +143,6 @@
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
{{
--
Janela
de
alocação
de
bolsa
--
}}
<
div
class
=
"modal fade"
id
=
"modalConfirm
{
{$participante->id}
}
"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"modalConfirmLabel"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-content"
>
<
div
class
=
"modal-header"
>
<
h4
class
=
"modal-title"
id
=
"modalConfirmLabel"
align
=
"center"
>
Confirmar
alteração
do
tipo
de
bolsa
?</
h4
>
</
div
>
@
if
(
$participante
->
tipoBolsa
!=
null
)
<
div
class
=
"modal-body"
>
<
h5
class
=
"modal-title"
id
=
"modalConfirmLabel"
align
=
"center"
>
@
if
(
$participante
->
tipoBolsa
==
'Voluntario'
)
O
discente
{{
$participante
->
user
->
name
}}
será
definido
como
bolsista
@
else
O
discente
{{
$participante
->
user
->
name
}}
será
definido
como
voluntário
@
endif
</
h5
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
dismiss
=
"modal"
>
Não
</
button
>
<
a
type
=
"button"
href
=
"{{ route('bolsa.alterar',['id'=>
$participante->id
, 'tipo'=>1]) }}"
id
=
"btnSubmit"
class
=
"btn btn-info"
>
Sim
</
a
>
</
div
>
@
else
<
div
class
=
"modal-body"
>
<
div
class
=
"row"
>
<
div
class
=
"col-6"
>
<
a
style
=
"float: right;"
type
=
"button"
href
=
"{{ route('bolsa.alterar',['id'=>
$participante->id
, 'tipo'=>1]) }}"
id
=
"btnSubmit"
class
=
"btn btn-info"
>
Voluntário
</
a
>
</
div
>
<
div
class
=
"col-6"
>
<
a
style
=
"float: left;"
type
=
"button"
href
=
"{{ route('bolsa.alterar',['id'=>
$participante->id
, 'tipo'=>2]) }}"
id
=
"btnSubmit"
class
=
"btn btn-info"
>
Bolsista
</
a
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"modal-footer"
>
<
button
type
=
"button"
class
=
"btn btn-danger"
data
-
dismiss
=
"modal"
>
Cancelar
</
button
>
</
div
>
@
endif
</
div
>
</
div
>
</
div
>
@
endforeach
@
endforeach
@
endforeach
@
endsection
@
endsection
...
...
routes/web.php
View file @
39586201
...
@@ -149,7 +149,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
...
@@ -149,7 +149,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//########## Bolsas
//########## Bolsas
Route
::
get
(
'/bolsas'
,
'ParticipanteController@listarParticipanteEdital'
)
->
name
(
'bolsas.listar'
);
Route
::
get
(
'/bolsas'
,
'ParticipanteController@listarParticipanteEdital'
)
->
name
(
'bolsas.listar'
);
Route
::
ge
t
(
'/bolsas/alteracao
/{id}/{tipo}
'
,
'ParticipanteController@alterarBolsa'
)
->
name
(
'bolsa.alterar'
);
Route
::
pos
t
(
'/bolsas/alteracao'
,
'ParticipanteController@alterarBolsa'
)
->
name
(
'bolsa.alterar'
);
//########## Relatórios
//########## Relatórios
Route
::
get
(
'/projeto/planosTrabalho/{id}'
,
'ArquivoController@listar'
)
->
name
(
'planos.listar'
);
Route
::
get
(
'/projeto/planosTrabalho/{id}'
,
'ArquivoController@listar'
)
->
name
(
'planos.listar'
);
...
...
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