Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
8060f9e6
Commit
8060f9e6
authored
3 years ago
by
Jose Fernando Mendes da Costa
Browse files
Options
Download
Email Patches
Plain Diff
Filtro por status do trabalho na tela de listagem
parent
2e8a4b10
master
carl-branch
dependabot/composer/dompdf/dompdf-1.2.2
dependabot/composer/guzzlehttp/guzzle-6.5.8
dependabot/composer/guzzlehttp/psr7-1.8.5
dependabot/composer/symfony/http-kernel-4.4.50
dependabot/npm_and_yarn/decode-uri-component-0.2.2
dependabot/npm_and_yarn/express-4.18.2
dependabot/npm_and_yarn/json5-and-json5-2.2.3
dependabot/npm_and_yarn/loader-utils-and-webpack-cli-1.4.2
dependabot/npm_and_yarn/minimist-and-mkdirp-1.2.8
dependabot/npm_and_yarn/qs-and-express-6.11.0
excluir_projeto_submetido
updates_mar
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/Http/Controllers/AdministradorController.php
+13
-14
app/Http/Controllers/AdministradorController.php
resources/views/administrador/analisar.blade.php
+31
-3
resources/views/administrador/analisar.blade.php
routes/web.php
+1
-1
routes/web.php
with
45 additions
and
18 deletions
+45
-18
app/Http/Controllers/AdministradorController.php
View file @
8060f9e6
...
...
@@ -66,26 +66,25 @@ class AdministradorController extends Controller
return
view
(
'administrador.projetos'
)
->
with
([
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
public
function
analisar
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhosSubmetidos
=
$evento
->
trabalhos
->
where
(
'status'
,
'submetido'
);
$trabalhosAvaliados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'avaliado'
);
$trabalhosAprovados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'aprovado'
);
$trabalhosReprovados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'reprovado'
);
$trabalhosCorrigidos
=
$evento
->
trabalhos
->
Where
(
'status'
,
'corrigido'
);
$trabalhos
=
$this
->
paginate
(
$trabalhosSubmetidos
);
$trabalhos
=
$this
->
paginate
(
$trabalhosSubmetidos
->
merge
(
$trabalhosAvaliados
)
->
merge
(
$trabalhosAprovados
)
->
merge
(
$trabalhosReprovados
)
->
merge
(
$trabalhosCorrigidos
)
->
sortBy
(
'titulo'
))
->
withPath
(
'/usuarios/analisarProjetos?evento_id='
.
$evento
->
id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$status
=
[
'submetido'
,
'avaliado'
,
'aprovado'
,
'reprovado'
,
'corrigido'
];
$withPath
=
'/usuarios/analisarProjetos?evento_id='
.
$evento
->
id
;
if
(
$request
->
column
!=
null
)
{
$status
=
[
$request
->
column
];
$withPath
=
'/usuarios/analisarProjetos/'
.
$request
->
column
.
'?evento_id='
.
$evento
->
id
;
}
$trabalhos
=
Trabalho
::
where
(
'evento_id'
,
$evento
->
id
)
->
whereIn
(
'status'
,
$status
)
->
orderBy
(
'titulo'
)
->
paginate
(
5
)
->
withPath
(
$withPath
);
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
// $participantes = Participante::where('trabalho_id', $id)->get();
// $participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get();
// $participantes = User::whereIn('id', $participantesUsersIds)->get();
return
view
(
'administrador.analisar'
)
->
with
([
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
,
'funcaoParticipantes'
=>
$funcaoParticipantes
]);
return
view
(
'administrador.analisar'
)
->
with
([
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'column'
=>
$request
->
column
]);
}
// Utilizado para paginação de Collection
...
...
This diff is collapsed.
Click to expand it.
resources/views/administrador/analisar.blade.php
View file @
8060f9e6
...
...
@@ -2,7 +2,7 @@
@
section
(
'content'
)
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 100px;
overflow-x: hidden;overflow-y:hidden
"
>
<
div
class
=
"row justify-content-center"
style
=
"margin-top: 100px;"
>
<
div
class
=
"col-md-11"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-7"
>
...
...
@@ -29,7 +29,35 @@
</
h6
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1 mt-5"
>
<
div
class
=
"btn-group dropup"
>
<
button
type
=
"button"
class
=
"btn btn-primary dropdown-toggle"
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
Filtro
@
isset
(
$column
)
-
{{
$column
}}
@
endisset
</
button
>
<
div
class
=
"dropdown-menu"
aria
-
labelledby
=
"dropdownMenuLink"
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
])}}"
>
Todos
</
a
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
, 'column' => 'aprovado'])}}"
>
Aprovados
</
a
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
, 'column' => 'reprovado'])}}"
>
Reprovados
</
a
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
, 'column' => 'submetido'])}}"
>
Submetidos
</
a
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
, 'column' => 'avaliado'])}}"
>
Avaliados
</
a
>
<
a
class
=
"dropdown-item"
href
=
"{{route('admin.analisar', ['evento_id' =>
$evento->id
, 'column' => 'corrigido'])}}"
>
Corrigidos
</
a
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
@@ -50,7 +78,7 @@
@
if
(
$trabalho
->
status
==
"aprovado"
)
<
img
src
=
"
{
{asset('img/icons/aprovado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;"
alt
=
""
>
@
elseif
(
$trabalho
->
status
==
"reprovado"
)
<
img
src
=
"
{
{asset('img/icons/negado.png')}
}
"
style
=
"width:
60
%;margin: auto;display: flex;margin-top: 5px;justify-content: center;align-items: center;"
alt
=
""
>
<
img
src
=
"
{
{asset('img/icons/negado.png')}
}
"
style
=
"width:
23
%;margin: auto;display: flex;margin-top: 5px;justify-content: center;align-items: center;"
alt
=
""
>
@
elseif
(
$trabalho
->
status
==
"corrigido"
)
<
img
src
=
"
{
{asset('img/icons/parcialmenteAprovado.png')}
}
"
style
=
"width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;"
alt
=
""
>
@
else
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
8060f9e6
...
...
@@ -206,7 +206,7 @@ Route::prefix('usuarios')->name('admin.')->group(function(){
Route
::
get
(
'/visualizarParecer'
,
'AdministradorController@visualizarParecer'
)
->
name
(
'visualizarParecer'
);
Route
::
get
(
'/visualizarParecerInterno'
,
'AdministradorController@visualizarParecerInterno'
)
->
name
(
'visualizarParecerInterno'
);
Route
::
get
(
'/pareceresProjetos'
,
'AdministradorController@pareceres'
)
->
name
(
'pareceres'
);
Route
::
get
(
'/analisarProjetos
'
,
'AdministradorController@analisar'
)
->
name
(
'analisar'
);
Route
::
get
(
'/analisarProjetos
/{column?}'
,
'AdministradorController@analisar'
)
->
name
(
'analisar'
);
Route
::
get
(
'/analisarProposta'
,
'AdministradorController@analisarProposta'
)
->
name
(
'analisarProposta'
);
Route
::
get
(
'/showProjetos'
,
'AdministradorController@showProjetos'
)
->
name
(
'showProjetos'
);
Route
::
get
(
'/showResultados'
,
'AdministradorController@showResultados'
)
->
name
(
'showResultados'
);
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help