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
191127b0
"vscode:/vscode.git/clone" did not exist on "6ec36cc377ffa965a3dde80a3e9359c1f5128dc6"
Commit
191127b0
authored
Jul 11, 2023
by
unknown
Browse files
Correção da listagem de avaliadores do projeto
parent
9e1745be
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
191127b0
...
...
@@ -93,14 +93,14 @@ class AvaliadorController extends Controller
}
else
{
foreach
(
$aval
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
as
$trab
){
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
2
||
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
3
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Interno"
)){
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
2
||
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
3
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Interno"
)){
array_push
(
$trabalhosIn
,
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
());
}
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
1
||
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
3
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
()
->
pivot
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Externo"
)){
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
1
||
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
3
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Externo"
)){
array_push
(
$trabalhosEx
,
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
());
}
}
...
...
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