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
a9095453
Commit
a9095453
authored
Jul 12, 2023
by
unknown
Browse files
agora vai
parent
191127b0
Changes
1
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
a9095453
...
@@ -93,14 +93,14 @@ class AvaliadorController extends Controller
...
@@ -93,14 +93,14 @@ class AvaliadorController extends Controller
}
else
{
}
else
{
foreach
(
$aval
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
as
$trab
){
foreach
(
$aval
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
as
$trab
){
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
2
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
wherePivot
(
'acesso'
,
2
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
||
$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
)
->
wherePivot
(
'acesso'
,
3
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Interno"
)){
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
wherePivot
(
'acesso'
,
null
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
&&
$aval
->
tipo
==
"Interno"
)){
array_push
(
$trabalhosIn
,
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
());
array_push
(
$trabalhosIn
,
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
());
}
}
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
1
||
if
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
wherePivot
(
'acesso'
,
1
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
||
$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
)
->
wherePivot
(
'acesso'
,
3
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
||
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
->
acesso
==
null
&&
$aval
->
tipo
==
"Externo"
)){
(
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
wherePivot
(
'avaliador_id'
,
$aval
->
id
)
->
wherePivot
(
'acesso'
,
null
)
->
orderBy
(
'created_at'
,
'DESC'
)
->
first
()
&&
$aval
->
tipo
==
"Externo"
)){
array_push
(
$trabalhosEx
,
$aval
->
trabalhos
()
->
where
(
"trabalho_id"
,
$trab
->
id
)
->
first
());
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