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
904ecc3f
Commit
904ecc3f
authored
May 29, 2020
by
Gabriel-31415
Browse files
exibir projetos do proponente na view visualizar edital
parent
eda6aa23
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/EventoController.php
View file @
904ecc3f
...
@@ -178,8 +178,8 @@ class EventoController extends Controller
...
@@ -178,8 +178,8 @@ class EventoController extends Controller
if
(
$proponente
!=
null
){
if
(
$proponente
!=
null
){
$hasTrabalho
=
false
;
$hasTrabalho
=
false
;
$hasFile
=
false
;
$hasFile
=
false
;
$trabalhos
=
$proponente
->
trabalhos
()
->
get
();
$trabalhos
=
$proponente
->
trabalhos
(
)
->
where
(
'evento_id'
,
$evento
->
id
)
->
get
();
$trabalhosCount
=
$proponente
->
trabalhos
()
->
count
();
$trabalhosCount
=
$proponente
->
trabalhos
(
)
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
();
if
(
$trabalhosCount
!=
0
){
if
(
$trabalhosCount
!=
0
){
$hasTrabalho
=
true
;
$hasTrabalho
=
true
;
...
...
app/Policies/EventoPolicy.php
View file @
904ecc3f
...
@@ -24,8 +24,12 @@ class EventoPolicy
...
@@ -24,8 +24,12 @@ class EventoPolicy
public
function
isCoordenador
(
User
$user
,
Evento
$evento
){
public
function
isCoordenador
(
User
$user
,
Evento
$evento
){
if
(
Auth
()
->
user
()
->
coordenadorComissao
->
first
()
!=
null
){
return
$evento
->
criador_id
==
Auth
()
->
user
()
->
coordenadorComissao
->
first
()
->
id
;
}
else
{
return
false
;
}
return
$evento
->
criador_id
==
Auth
()
->
user
()
->
coordenadorComissao
->
first
()
->
id
;
}
}
}
}
resources/views/evento/visualizarEvento.blade.php
View file @
904ecc3f
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
<
p
>
<
p
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/calendar-evento.svg')}
}
"
alt
=
""
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/calendar-evento.svg')}
}
"
alt
=
""
>
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
inicioRevisao
))}}
-
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
fimRevisao
))}}
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
inicioRevisao
))}}
-
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
fimRevisao
))}}
</
p
>
--
}}
</
p
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
class
=
"row margin"
>
<
div
class
=
"row margin"
>
...
...
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