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
a9ccf5e1
Unverified
Commit
a9ccf5e1
authored
Jul 14, 2021
by
José Rômulo
Committed by
GitHub
Jul 14, 2021
Browse files
Merge branch 'lmts-ufape:master' into master
parents
ad40c6b8
6ee8f32f
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
a9ccf5e1
...
@@ -67,11 +67,10 @@ class AdministradorController extends Controller
...
@@ -67,11 +67,10 @@ class AdministradorController extends Controller
public
function
showProjetos
(
Request
$request
){
public
function
showProjetos
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$editais
=
Evento
::
with
(
'trabalhos'
)
->
get
();
$projetos
=
Trabalho
::
all
();
$projetos
=
Trabalho
::
all
();
return
view
(
'administrador.listaProjetos'
,
compact
(
'projetos'
,
'evento'
,
'editais'
));
return
view
(
'administrador.listaProjetos'
)
->
with
([
'projetos'
=>
$projetos
,
'evento'
=>
$evento
]);
}
}
public
function
visualizarParecer
(
Request
$request
){
public
function
visualizarParecer
(
Request
$request
){
...
...
app/Http/Controllers/TrabalhoController.php
View file @
a9ccf5e1
...
@@ -321,15 +321,16 @@ class TrabalhoController extends Controller
...
@@ -321,15 +321,16 @@ class TrabalhoController extends Controller
public
function
show
(
$id
)
public
function
show
(
$id
)
{
{
$projeto
=
Auth
::
user
()
->
proponentes
->
trabalhos
()
->
where
(
'id'
,
$id
)
->
first
();
//
$projeto = Auth::user()->proponentes->trabalhos()->where('id', $id)->first();
if
(
Auth
::
user
()
->
tipo
==
'administrador'
){
//
if(Auth::user()->tipo == 'administrador'){
$projeto
=
Trabalho
::
find
(
$id
);
//
$projeto = Trabalho::find($id);
}
//
}
if
(
!
$projeto
){
//
if(!$projeto){
// $projeto = Auth::user()->coordenadorComissao->trabalho()->where('id', $id)->first();
//
// $projeto = Auth::user()->coordenadorComissao->trabalho()->where('id', $id)->first();
return
back
()
->
withErrors
([
'Proposta não encontrada!'
]);
// return back()->withErrors(['Proposta não encontrada!']);
}
// }
$projeto
=
Trabalho
::
find
(
$id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$grandeAreas
=
GrandeArea
::
all
();
$grandeAreas
=
GrandeArea
::
all
();
$areas
=
Area
::
all
();
$areas
=
Area
::
all
();
...
...
resources/views/administrador/listaProjetos.blade.php
View file @
a9ccf5e1
...
@@ -19,7 +19,23 @@
...
@@ -19,7 +19,23 @@
</
div
>
</
div
>
@
endif
@
endif
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
div
class
=
"col-md-12"
>
@
foreach
(
$editais
as
$edital
)
<
div
class
=
"accordion"
id
=
"accordionExample"
>
<
div
class
=
"card"
>
<
div
class
=
"card-header"
id
=
"headingOne"
>
<
h2
class
=
"mb-0"
>
<
button
class
=
"btn btn-link btn-block text-left"
type
=
"button"
data
-
toggle
=
"collapse"
data
-
target
=
"#collapse{{
$edital->id
}}"
aria
-
expanded
=
"true"
aria
-
controls
=
"collapse{{
$edital->id
}}"
>
{{
$edital
->
nome
}}
</
button
>
</
h2
>
</
div
>
<
div
id
=
"collapse{{
$edital->id
}}"
class
=
"collapse "
aria
-
labelledby
=
"headingOne"
data
-
parent
=
"#accordionExample"
>
<
div
class
=
"card-body"
>
<
table
class
=
"table table-bordered"
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
thead
>
<
tr
>
<
tr
>
...
@@ -32,7 +48,8 @@
...
@@ -32,7 +48,8 @@
</
tr
>
</
tr
>
</
thead
>
</
thead
>
<
tbody
id
=
"eventos"
>
<
tbody
id
=
"eventos"
>
@
foreach
(
$projetos
as
$projeto
)
@
foreach
(
$edital
->
trabalhos
as
$projeto
)
<
tr
>
<
tr
>
<
td
>
<
td
>
<
a
href
=
"{{ route('trabalho.show',['id'=>
$projeto->id
]) }}"
class
=
"visualizarEvento"
>
<
a
href
=
"{{ route('trabalho.show',['id'=>
$projeto->id
]) }}"
class
=
"visualizarEvento"
>
...
@@ -52,6 +69,17 @@
...
@@ -52,6 +69,17 @@
@
endforeach
@
endforeach
</
tbody
>
</
tbody
>
</
table
>
</
table
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endforeach
</
div
>
<
div
class
=
"col-md-12"
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
endsection
\ No newline at end of file
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