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
292ba98e
Unverified
Commit
292ba98e
authored
Jul 18, 2020
by
Gabriel Antônio da Silva
Committed by
GitHub
Jul 18, 2020
Browse files
Merge pull request #67 from lmts-ufape/editarProjeto
add de planos de trabalho em avaliador e restricao em editar projeto
parents
7ccae9d4
6804f40a
Changes
7
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/ProponenteController.php
View file @
292ba98e
...
@@ -86,8 +86,11 @@ class ProponenteController extends Controller
...
@@ -86,8 +86,11 @@ class ProponenteController extends Controller
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
first
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
get
();
$projetos
=
Trabalho
::
where
(
'proponente_id'
,
$proponente
->
id
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
]);
return
view
(
'proponente.projetos'
)
->
with
([
'projetos'
=>
$projetos
,
'hoje'
=>
$hoje
]);
}
}
public
function
projetosEdital
(
$id
)
{
public
function
projetosEdital
(
$id
)
{
$edital
=
Evento
::
find
(
$id
);
$edital
=
Evento
::
find
(
$id
);
...
...
app/Http/Controllers/UserController.php
View file @
292ba98e
...
@@ -100,6 +100,12 @@ class UserController extends Controller
...
@@ -100,6 +100,12 @@ class UserController extends Controller
return
redirect
()
->
back
()
->
withErrors
([
'nova_senha'
=>
'Senhas diferentes'
]);
return
redirect
()
->
back
()
->
withErrors
([
'nova_senha'
=>
'Senhas diferentes'
]);
}
}
}
}
if
(
Auth
()
->
user
()
->
avaliadors
!=
null
&&
$request
->
area
!=
null
&&
Auth
()
->
user
()
->
tipo
!=
"avaliador"
){
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
area_id
=
$request
->
area
;
$avaliador
->
update
();
}
switch
(
$request
->
tipo
)
{
switch
(
$request
->
tipo
)
{
case
"administradorResponsavel"
:
case
"administradorResponsavel"
:
...
@@ -110,6 +116,7 @@ class UserController extends Controller
...
@@ -110,6 +116,7 @@ class UserController extends Controller
case
"avaliador"
:
case
"avaliador"
:
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
=
Avaliador
::
where
(
'user_id'
,
'='
,
$id
)
->
first
();
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
user_id
=
$user
->
id
;
$avaliador
->
area_id
=
$request
->
area
;
$avaliador
->
update
();
$avaliador
->
update
();
break
;
break
;
case
"proponente"
:
case
"proponente"
:
...
...
resources/views/avaliador/editais.blade.php
View file @
292ba98e
...
@@ -35,12 +35,12 @@
...
@@ -35,12 +35,12 @@
<
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"
>
@
if
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
1
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
@
if
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
<
a
href
=
"{{ route('avaliador.visualizarTrabalho', ['evento_id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
a
href
=
"{{ route('avaliador.visualizarTrabalho', ['evento_id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Projetos
para
avaliar
Projetos
para
avaliar
</
a
>
</
a
>
@
elseif
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
1
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
false
)
@
elseif
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
false
)
<
button
disabled
=
"disabled"
class
=
"dropdown-item"
>
<
button
disabled
=
"disabled"
class
=
"dropdown-item"
>
Convite
recusado
Convite
recusado
</
button
>
</
button
>
...
...
resources/views/avaliador/listarTrabalhos.blade.php
View file @
292ba98e
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
<
tr
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Projeto
</
th
>
<
th
scope
=
"col"
>
Nome
do
Projeto
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Baixar
</
th
>
<
th
scope
=
"col"
>
Projeto
</
th
>
<
th
scope
=
"col"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
>
Parecer
</
th
>
<
th
scope
=
"col"
>
Parecer
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
...
@@ -32,6 +33,24 @@
...
@@ -32,6 +33,24 @@
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
a
>
</
td
>
</
td
>
<
td
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
php
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
pivot
->
participante_id
)
->
first
()
!=
null
){
$planoTrabalho
=
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
pivot
->
participante_id
)
->
first
()
->
nome
;
}
else
{
$planoTrabalho
=
null
;
}
@
endphp
@
if
(
$planoTrabalho
!=
null
)
<
a
href
=
"{{route('download', ['file' =>
$planoTrabalho
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
@
else
Não
há
planos
de
trabalho
.
@
endif
@
endforeach
</
td
>
<
td
>
<
td
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
form
action
=
"{{ route('avaliador.parecer', ['evento' =>
$evento
]) }}"
method
=
"POST"
>
<
form
action
=
"{{ route('avaliador.parecer', ['evento' =>
$evento
]) }}"
method
=
"POST"
>
...
...
resources/views/proponente/projetos.blade.php
View file @
292ba98e
...
@@ -49,9 +49,12 @@
...
@@ -49,9 +49,12 @@
<
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"
>
@
if
(
$projeto
->
evento
->
inicioSubmissao
<=
$hoje
&&
$hoje
<=
$projeto
->
evento
->
fimSubmissao
)
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Editar
projeto
Editar
projeto
</
a
>
</
a
>
@
else
@
endif
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
projeto
Visualizar
projeto
</
a
>
</
a
>
...
...
resources/views/proponente/projetosEdital.blade.php
View file @
292ba98e
...
@@ -66,9 +66,12 @@
...
@@ -66,9 +66,12 @@
<
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"
>
@
if
(
$edital
->
inicioSubmissao
<=
$hoje
&&
$hoje
<=
$edital
->
fimSubmissao
)
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
<
a
href
=
"{{ route('trabalho.editar', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Editar
projeto
Editar
projeto
</
a
>
</
a
>
@
else
@
endif
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
projeto
Visualizar
projeto
</
a
>
</
a
>
...
...
resources/views/user/perfilUser.blade.php
View file @
292ba98e
...
@@ -95,6 +95,38 @@
...
@@ -95,6 +95,38 @@
</
span
>
</
span
>
@
enderror
@
enderror
</
div
>
</
div
>
@
if
(
Auth
()
->
user
()
->
avaliadors
)
<
div
class
=
"col-md-4"
>
<
label
for
=
"area"
class
=
"col-form-label"
>
{{
__
(
'Área:'
)
}}
</
label
>
<
select
style
=
"display: inline"
class
=
"form-control @error('area') is-invalid @enderror"
name
=
"area"
id
=
"area"
>
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
null
)
<
option
value
=
""
selected
>
Indefinida
</
option
>
@
foreach
(
App\Area
::
all
()
as
$area
)
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
$area
->
id
)
<
option
value
=
"{{
$area->id
}}"
selected
>
{{
$area
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$area->id
}}"
>
{{
$area
->
nome
}}
</
option
>
@
endif
@
endforeach
@
else
@
foreach
(
App\Area
::
all
()
as
$area
)
@
if
(
Auth
()
->
user
()
->
avaliadors
->
area_id
==
$area
->
id
)
<
option
value
=
"{{
$area->id
}}"
selected
>
{{
$area
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$area->id
}}"
>
{{
$area
->
nome
}}
</
option
>
@
endif
@
endforeach
@
endif
</
select
>
@
error
(
'area'
)
<
span
class
=
"invalid-feedback"
role
=
"alert"
>
<
strong
>
{{
$message
}}
</
strong
>
</
span
>
@
enderror
</
div
>
@
endif
</
div
>
</
div
>
<
div
class
=
"form-group row"
>
<
div
class
=
"form-group row"
>
<
div
class
=
"col-md-4"
>
<
div
class
=
"col-md-4"
>
...
...
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