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
4e81e3a3
Commit
4e81e3a3
authored
Jun 11, 2020
by
alinetenorio
Browse files
view de projetos do participante
parent
df0e9928
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/ParticipanteController.php
View file @
4e81e3a3
...
@@ -3,6 +3,9 @@
...
@@ -3,6 +3,9 @@
namespace
App\Http\Controllers
;
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
App\Evento
;
use
App\Trabalho
;
use
App\Participante
;
class
ParticipanteController
extends
Controller
class
ParticipanteController
extends
Controller
{
{
...
@@ -10,4 +13,16 @@ class ParticipanteController extends Controller
...
@@ -10,4 +13,16 @@ class ParticipanteController extends Controller
return
view
(
'participante.index'
);
return
view
(
'participante.index'
);
}
}
public
function
edital
(
$id
){
$edital
=
Evento
::
find
(
$id
);
$trabalhosId
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
select
(
'id'
)
->
get
();
$meusTrabalhosId
=
Participante
::
where
(
'user_id'
,
'='
,
Auth
()
->
user
()
->
id
)
->
whereIn
(
'trabalho_id'
,
$trabalhosId
)
->
select
(
'trabalho_id'
)
->
get
();
$projetos
=
Trabalho
::
whereIn
(
'id'
,
$meusTrabalhosId
)
->
get
();
//dd($projetos);
return
view
(
'participante.projetos'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
}
}
resources/views/administrador/editais.blade.php
View file @
4e81e3a3
...
@@ -167,8 +167,8 @@
...
@@ -167,8 +167,8 @@
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('p
rojetos
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{ route('p
articipante
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetid
os
Meus
projet
os
</
a
>
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
Visualizar
resultado
...
...
resources/views/participante/editais.blade.php
deleted
100644 → 0
View file @
df0e9928
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
</
div
>
</
div
>
<
hr
>
@
if
(
auth
()
->
user
()
->
tipo
===
"participante"
)
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Baixar
edital
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$eventos
as
$evento
)
<
tr
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
</
a
>
</
td
>
<
td
></
td
>
<
td
>
{{
$evento
->
created_at
}}
</
td
>
<
td
style
=
"text-align: center"
>
<
a
href
=
"{{ route('baixar.edital', ['id' =>
$evento->id
]) }}"
>
<
img
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
width
=
"15px"
>
</
a
>
</
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('projetos.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetidos
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
</
a
>
{{
--
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
preeliminar
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
final
</
a
>
--
}}
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
@
endif
</
div
>
\ No newline at end of file
resources/views/participante/projetos.blade.php
0 → 100644
View file @
4e81e3a3
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Projetos
do
edital
{{
$edital
->
nome
}}
</
h3
>
<
h6
style
=
"color: rgb(4, 78, 4);"
>
Submissão
irá
até
o
dia
{{
date
(
'd-m-Y'
,
strtotime
(
$edital
->
fimSubmissao
))
}}
</
h6
>
</
div
>
<
div
class
=
"col-sm-2"
>
<!--
Se
usuário
não
é
proponente
,
redirecionar
para
view
de
cadastro
-->
@
if
(
Auth
::
user
()
->
proponentes
==
null
)
<
a
href
=
"{{ route('proponente.create' )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
else
<
a
href
=
"{{ route('trabalho.index', ['id' =>
$edital->id
] )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
projeto
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$projetos
as
$projeto
)
<
tr
>
<
td
>
{{
$projeto
->
titulo
}}
</
td
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
<
td
style
=
"color: rgb(6, 85, 6)"
>
Avaliado
</
td
>
@
elseif
(
$projeto
->
status
==
'Submetido'
)
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
@
endif
<
td
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_at
))
}}
</
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Visualizar
projeto
</
a
>
@
if
(
$projeto
->
status
==
'Submetido'
)
<
a
href
=
"{{ route('trabalho.destroy', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Sair
do
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
\ No newline at end of file
routes/web.php
View file @
4e81e3a3
...
@@ -35,6 +35,7 @@ Route::post('/proponente/cadastro', 'ProponenteController@store'
...
@@ -35,6 +35,7 @@ Route::post('/proponente/cadastro', 'ProponenteController@store'
//######### Participante ########################################
//######### Participante ########################################
Route
::
get
(
'/participante/index'
,
'ParticipanteController@index'
)
->
name
(
'participante.index'
);
Route
::
get
(
'/participante/index'
,
'ParticipanteController@index'
)
->
name
(
'participante.index'
);
Route
::
get
(
'/participante/edital/{id}'
,
'ParticipanteController@edital'
)
->
name
(
'participante.edital'
);
//######### Rotas Administrador #################################
//######### Rotas Administrador #################################
Route
::
get
(
'/perfil-usuario'
,
'UserController@minhaConta'
)
->
middleware
(
'auth'
)
->
name
(
'user.perfil'
);
Route
::
get
(
'/perfil-usuario'
,
'UserController@minhaConta'
)
->
middleware
(
'auth'
)
->
name
(
'user.perfil'
);
...
...
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