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
8ee140bf
"resources/views/proponente/projetosEdital.blade.php" did not exist on "8e9f859bcdfab7c0e03f1c70ea14af441113565d"
Commit
8ee140bf
authored
Aug 12, 2022
by
Guilherme Silva
Browse files
Alteração na verficação de substituição pendente
parent
2f4f40ff
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
8ee140bf
...
...
@@ -130,9 +130,9 @@ class AdministradorController extends Controller
}
// Verficação de pendencia de substituição
$aux
=
count
(
Arquivo
::
whereIn
(
'participante
I
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participante
Substituido_i
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
$flagSubstituicao
=
1
;
if
(
$aux
!=
count
(
$trabalho
->
participantes
->
pluck
(
'id'
))
){
if
(
$aux
!=
0
){
$flagSubstituicao
=
-
1
;
}
...
...
app/Http/Controllers/ArquivoController.php
View file @
8ee140bf
...
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use
App\Arquivo
;
use
App\Notificacao
;
use
App\Substituicao
;
use
App\Trabalho
;
use
App\User
;
use
Auth
;
...
...
@@ -125,8 +126,8 @@ class ArquivoController extends Controller
$participantes
=
$trabalho
->
participantes
;
// Verficação de pendencia de substituição
$aux
=
count
(
Arquivo
::
whereIn
(
'participante
I
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
if
(
$aux
!=
count
(
$trabalho
->
participantes
->
pluck
(
'id'
))
){
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participante
Substituido_i
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
if
(
$aux
!=
0
){
return
redirect
()
->
back
()
->
withErrors
(
"A proposta "
.
$trabalho
->
titulo
.
" possui substituições pendentes"
);
}
...
...
app/Http/Controllers/AvaliadorController.php
View file @
8ee140bf
...
...
@@ -9,6 +9,7 @@ use App\GrandeArea;
use
App\ParecerInterno
;
use
App\Participante
;
use
App\SubArea
;
use
App\Substituicao
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Auth
;
use
App\Trabalho
;
...
...
@@ -108,9 +109,9 @@ class AvaliadorController extends Controller
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
// Verficação de pendencia de substituição
$aux
=
count
(
Arquivo
::
whereIn
(
'participante
I
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
if
(
$aux
!=
count
(
$trabalho
->
participantes
->
pluck
(
'id'
))
){
// Verficação de pendencia de substituição
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participante
Substituido_i
d'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
if
(
$aux
!=
0
){
return
redirect
()
->
back
()
->
withErrors
(
"A proposta "
.
$trabalho
->
titulo
.
" possui substituições pendentes"
);
}
...
...
app/Http/Controllers/TrabalhoController.php
View file @
8ee140bf
...
...
@@ -396,9 +396,9 @@ class TrabalhoController extends Controller
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
// Verficação de pendencia de substituição
$aux
=
count
(
Arquivo
::
whereIn
(
'participante
I
d'
,
$projeto
->
participantes
->
pluck
(
'id'
))
->
get
());
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participante
Substituido_i
d'
,
$projeto
->
participantes
->
pluck
(
'id'
))
->
get
());
$flagSubstituicao
=
1
;
if
(
$aux
!=
count
(
$projeto
->
participantes
->
pluck
(
'id'
))
){
if
(
$aux
!=
0
){
$flagSubstituicao
=
-
1
;
}
...
...
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