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
049b0aa7
Commit
049b0aa7
authored
Jun 28, 2023
by
Yuri Resende
Browse files
Colocando os avaliadores em ordem alfabetica
parent
76c1ff84
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
049b0aa7
...
@@ -859,8 +859,13 @@ class AdministradorController extends Controller
...
@@ -859,8 +859,13 @@ class AdministradorController extends Controller
$avalSelecionados
=
$evento
->
avaliadors
;
$avalSelecionados
=
$evento
->
avaliadors
;
$avalNaoSelecionadosId
=
$evento
->
avaliadors
->
pluck
(
'id'
);
$avalNaoSelecionadosId
=
$evento
->
avaliadors
->
pluck
(
'id'
);
$trabalhos
=
$evento
->
trabalhos
->
whereNotIn
(
'status'
,
'rascunho'
);
$trabalhos
=
$evento
->
trabalhos
->
whereNotIn
(
'status'
,
'rascunho'
);
$avaliadores
=
Avaliador
::
whereNotIn
(
'id'
,
$avalNaoSelecionadosId
)
->
get
();
$avaliadores
=
Avaliador
::
whereNotIn
(
'id'
,
$avalNaoSelecionadosId
)
->
with
(
'user'
)
->
get
()
->
sortBy
(
function
(
$aval
){
return
$aval
->
user
->
name
;
});
//$avaliadores = Avaliador::join('naturezas_avaliadors', 'avaliadors.id', '=' ,'naturezas_avaliadors.avaliador_id')->whereNotIn('avaliadors.id', $avalNaoSelecionadosId)
//$avaliadores = Avaliador::join('naturezas_avaliadors', 'avaliadors.id', '=' ,'naturezas_avaliadors.avaliador_id')->whereNotIn('avaliadors.id', $avalNaoSelecionadosId)
// ->where('naturezas_avaliadors.natureza_id', $evento->natureza_id)
// ->where('naturezas_avaliadors.natureza_id', $evento->natureza_id)
// ->get();
// ->get();
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
049b0aa7
...
@@ -238,7 +238,7 @@
...
@@ -238,7 +238,7 @@
class="
form
-
control
" id="
exampleFormControlSelect2
"
class="
form
-
control
" id="
exampleFormControlSelect2
"
style="
height
:
200
px
;
font
-
size
:
15
px
">
style="
height
:
200
px
;
font
-
size
:
15
px
">
@foreach (
$trabalho->avaliadors
as
$avaliador
)
@foreach (
$trabalho->avaliadors
->sortBy(function(
$aval
){ return
$aval->user
->name;})
as
$avaliador
)
@if((
$avaliador->tipo
== "
Interno
" &&
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 1) ||
@if((
$avaliador->tipo
== "
Interno
" &&
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 1) ||
((
$avaliador->user
->instituicao == "
UFAPE
" ||
$avaliador->user
->instituicao == "
Universidade
Federal
do
Agreste
de
Pernambuco
") && (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null ||
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 1) ))
((
$avaliador->user
->instituicao == "
UFAPE
" ||
$avaliador->user
->instituicao == "
Universidade
Federal
do
Agreste
de
Pernambuco
") && (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null ||
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 1) ))
<option value="
{{
$avaliador
->
id
}}
">{{
$avaliador->user
->name }}
<option value="
{{
$avaliador
->
id
}}
">{{
$avaliador->user
->name }}
...
@@ -247,7 +247,7 @@
...
@@ -247,7 +247,7 @@
>
{
{$avaliador->user->email}
}
</option>
>
{
{$avaliador->user->email}
}
</option>
@endif
@endif
@endforeach
@endforeach
@foreach (
$trabalho->aval
as
$avaliador
)
@foreach (
$trabalho->aval
->sortBy(function(
$aval
){ return
$aval->user
->name;})
as
$avaliador
)
@if(
$avaliador->tipo
== "
Interno
" ||
$avaliador->user
->instituicao == "
UFAPE
" ||
$avaliador->user
->instituicao == "
Universidade
Federal
do
Agreste
de
Pernambuco
")
@if(
$avaliador->tipo
== "
Interno
" ||
$avaliador->user
->instituicao == "
UFAPE
" ||
$avaliador->user
->instituicao == "
Universidade
Federal
do
Agreste
de
Pernambuco
")
<option value="
{{
$avaliador
->
id
}}
"> {{
$avaliador->user
->name }}
<option value="
{{
$avaliador
->
id
}}
"> {{
$avaliador->user
->name }}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
...
@@ -268,7 +268,7 @@
...
@@ -268,7 +268,7 @@
<select name="
avaliadores_externos_id
[]
" multiple
<select name="
avaliadores_externos_id
[]
" multiple
class="
form
-
control
" id="
exampleFormControlSelect3
"
class="
form
-
control
" id="
exampleFormControlSelect3
"
style="
height
:
200
px
;
font
-
size
:
15
px
">
style="
height
:
200
px
;
font
-
size
:
15
px
">
@foreach (
$trabalho->avaliadors
as
$avaliador
)
@foreach (
$trabalho->avaliadors
->sortBy(function(
$aval
){ return
$aval->user
->name;})
as
$avaliador
)
@if(
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 2 || (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null &&
$avaliador->tipo
== "
Interno
"))
@if(
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == 2 || (
$avaliador->trabalhos
()->where("
trabalho_id
",
$trabalho->id
)->first()->pivot->acesso == null &&
$avaliador->tipo
== "
Interno
"))
<option value="
{{
$avaliador
->
id
}}
">{{
$avaliador->user
->name }}
<option value="
{{
$avaliador
->
id
}}
">{{
$avaliador->user
->name }}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
...
@@ -276,7 +276,7 @@
...
@@ -276,7 +276,7 @@
>
{
{$avaliador->user->email}
}
</option>
>
{
{$avaliador->user->email}
}
</option>
@endif
@endif
@endforeach
@endforeach
@foreach (
$trabalho->aval
as
$avaliador
)
@foreach (
$trabalho->aval
->sortBy(function(
$aval
){ return
$aval->user
->name;})
as
$avaliador
)
<option value="
{{
$avaliador
->
id
}}
"> {{
$avaliador->user
->name }}
<option value="
{{
$avaliador
->
id
}}
"> {{
$avaliador->user
->name }}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
> {{$avaliador->user->instituicao ?? 'Instituição Indefinida'}}
> {{$avaliador->area->nome ?? 'Indefinida'}}
> {{$avaliador->area->nome ?? 'Indefinida'}}
...
...
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