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
efb6d9ce
Commit
efb6d9ce
authored
Nov 23, 2022
by
S-Nathalia
Browse files
merge
parents
40a31de8
69dcbf71
Changes
3
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
efb6d9ce
...
...
@@ -33,6 +33,8 @@ use Illuminate\Support\Facades\Storage;
use
Illuminate\Support\Str
;
use
Illuminate\Validation\Rule
;
use
PDF
;
use
DB
;
class
AdministradorController
extends
Controller
{
...
...
@@ -639,8 +641,11 @@ class AdministradorController extends Controller
$grandeAreas
=
GrandeArea
::
orderBy
(
'nome'
)
->
get
();
$avalSelecionados
=
$evento
->
avaliadors
;
$avalNaoSelecionadosId
=
$evento
->
avaliadors
->
pluck
(
'id'
);
$avaliadores
=
Avaliador
::
whereNotIn
(
'id'
,
$avalNaoSelecionadosId
)
->
get
();
$trabalhos
=
$evento
->
trabalhos
->
whereNotIn
(
'status'
,
'rascunho'
);
$avaliadores
=
Avaliador
::
join
(
'naturezas_avaliadors'
,
'avaliadors.id'
,
'='
,
'naturezas_avaliadors.avaliador_id'
)
->
whereNotIn
(
'avaliadors.id'
,
$avalNaoSelecionadosId
)
->
where
(
'naturezas_avaliadors.natureza_id'
,
$evento
->
natureza_id
)
->
get
();
if
((
Auth
::
user
()
->
id
!=
$coordenador_id
->
user_id
)
&&
(
$user
->
tipo
!=
'administrador'
))
{
return
redirect
()
->
back
();
...
...
@@ -958,12 +963,17 @@ class AdministradorController extends Controller
$avaliador
->
area
()
->
associate
(
$area
);
$avaliador
->
user
()
->
associate
(
$user
);
$avaliador
->
eventos
()
->
attach
(
$evento
);
if
(
$evento
->
natureza_id
==
3
){
$avaliador
->
naturezas
()
->
sync
(
$evento
->
natureza_id
);
}
$user
->
save
();
$avaliador
->
save
();
}
else
{
$avaliador
=
$user
->
avaliadors
;
$avaliador
->
eventos
()
->
attach
(
$evento
);
if
(
$evento
->
natureza_id
==
3
){
$avaliador
->
naturezas
()
->
sync
(
$evento
->
natureza_id
);
}
$user
->
save
();
$avaliador
->
save
();
}
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
efb6d9ce
...
...
@@ -1584,6 +1584,7 @@
</select>
</div>
@if(
$evento->natureza_id
!= 3)
<div class="
form
-
group
">
<label for="
exampleFormControlSelect1
">Instituição <span
style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
...
...
@@ -1594,6 +1595,7 @@
<option value="
outra
">Outra</option>
</select>
</div>
@endif
<div class="
form
-
group
" id="
div
-
outra
"
style="
@
if
(
old
(
'instituicao'
)
!=
null
&&
old
(
'instituicao'
)
==
"outra"
)
display
:
block
;
@
else
display
:
none
;
@
endif
">
...
...
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
efb6d9ce
...
...
@@ -273,6 +273,7 @@
</select>
</div>
@if(
$evento->natureza_id
!= 3)
<div class="
form
-
group
">
<label for="
exampleFormControlSelect1
">Instituição <span style="
color
:
red
;
font
-
weight
:
bold
">*</span></label>
<select class="
form
-
control
" name="
instituicao
" id="
membro
" required onchange="
mostrarDiv
(
this
)
">
...
...
@@ -281,6 +282,7 @@
<option value="
outra
" >Outra</option>
</select>
</div>
@endif
<div class="
form
-
group
" id="
div
-
outra
" style="
@
if
(
old
(
'instituicao'
)
!=
null
&&
old
(
'instituicao'
)
==
"outra"
)
display
:
block
;
@
else
display
:
none
;
@
endif
">
<label for="
outra
">{{ __('Digite o nome da instituição') }}<span style="
color
:
red
;
font
-
weight
:
bold
;
"> *</span></label>
...
...
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