From a9095453e4fed806a33a23ceeff58260c981c133 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Jul 2023 00:01:16 -0300 Subject: [PATCH] agora vai --- app/Http/Controllers/AvaliadorController.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/AvaliadorController.php b/app/Http/Controllers/AvaliadorController.php index 1b8bb8c..92cef47 100755 --- a/app/Http/Controllers/AvaliadorController.php +++ b/app/Http/Controllers/AvaliadorController.php @@ -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)->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")){ + 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)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() || + ($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()); } - 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")){ + 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)->wherePivot('acesso', 3)->orderBy('created_at','DESC')->first() || + ($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()); } } -- GitLab