diff --git a/app/Avaliador.php b/app/Avaliador.php index 305c62313d13761337e151bfc9357711f30214a4..a286af9017ed53781f9c1f81786a12a668707f87 100755 --- a/app/Avaliador.php +++ b/app/Avaliador.php @@ -13,6 +13,7 @@ class Avaliador extends Model 'parecer', 'AnexoParecer', 'pivot', + 'tipo', ]; public function user(){ return $this->belongsTo('App\User'); @@ -29,5 +30,8 @@ class Avaliador extends Model public function area(){ return $this->belongsTo('App\Area'); } + public function parecer_internos(){ + return $this->hasMany(ParecerInterno::class, 'avali_id', 'id'); + } } diff --git a/app/Http/Controllers/AdministradorController.php b/app/Http/Controllers/AdministradorController.php index 9e998967d756457cd3fa8e244b6ee4189c08b72d..8a5f37c844f88ee6e6149411910645dd89058b14 100755 --- a/app/Http/Controllers/AdministradorController.php +++ b/app/Http/Controllers/AdministradorController.php @@ -2,9 +2,11 @@ namespace App\Http\Controllers; +use App\Substituicao; use Illuminate\Http\Request; use App\Administrador; use App\User; +use App\ParecerInterno; use App\Avaliador; use App\AdministradorResponsavel; use App\Area; @@ -63,7 +65,12 @@ class AdministradorController extends Controller $evento = Evento::where('id', $request->evento_id)->first(); $trabalhosSubmetidos = $evento->trabalhos->where('status', 'submetido'); $trabalhosAvaliados = $evento->trabalhos->Where('status', 'avaliado'); - $trabalhos = $trabalhosSubmetidos->merge($trabalhosAvaliados)->sortBy('titulo'); + $trabalhosAprovados = $evento->trabalhos->Where('status', 'aprovado'); + $trabalhosReprovados = $evento->trabalhos->Where('status', 'reprovado'); + $trabalhosCorrigidos = $evento->trabalhos->Where('status', 'corrigido'); + $trabalhos = $trabalhosSubmetidos + ->merge($trabalhosAvaliados)->merge($trabalhosAprovados) + ->merge($trabalhosReprovados)->merge($trabalhosCorrigidos)->sortBy('titulo'); $funcaoParticipantes = FuncaoParticipantes::all(); // $participantes = Participante::where('trabalho_id', $id)->get(); @@ -73,13 +80,33 @@ class AdministradorController extends Controller return view('administrador.analisar')->with(['trabalhos' => $trabalhos, 'evento' => $evento, 'funcaoParticipantes' => $funcaoParticipantes]); } + public function analisarProposta(Request $request){ + + $trabalho = Trabalho::where('id',$request->id)->first(); + $evento = Evento::where('id', $trabalho->evento_id)->first(); + $funcaoParticipantes = FuncaoParticipantes::all(); + $substituicoesProjeto = Substituicao::where('trabalho_id', $trabalho->id)->orderBy('created_at', 'DESC')->get(); + $substituicoesPendentes = Substituicao::where('trabalho_id', $trabalho->id)->where('status', 'Em Aguardo')->orderBy('created_at', 'DESC')->get(); + + $avalSelecionadosId = $trabalho->avaliadors->pluck('id'); + $avalProjeto = Avaliador::whereNotIn('id', $avalSelecionadosId)->get(); + $trabalho->aval = $avalProjeto; + + + return view('administrador.analisarProposta')->with( + [ 'trabalho' => $trabalho, + 'funcaoParticipantes' => $funcaoParticipantes, + 'evento' => $evento, + 'substituicoesPendentes' => $substituicoesPendentes, + 'substituicoesProjeto' => $substituicoesProjeto,]); + } + public function showProjetos(Request $request){ - $evento = Evento::where('id', $request->evento_id)->first(); - $editais = Evento::with('trabalhos')->get(); - $projetos = Trabalho::all(); + $projetos = Trabalho::all()->where('status','<>','rascunho'); + $funcaoParticipantes = FuncaoParticipantes::all(); - return view('administrador.listaProjetos', compact('projetos', 'evento','editais')); + return view('administrador.listaProjetos')->with(['projetos'=>$projetos,'funcaoParticipantes'=>$funcaoParticipantes]); } public function showResultados(Request $request){ @@ -99,6 +126,17 @@ class AdministradorController extends Controller return view('administrador.visualizarParecer')->with(['trabalho' => $trabalho, 'parecer' => $parecer, 'avaliador' => $avaliador]); } + public function visualizarParecerInterno(Request $request){ + + $avaliador = Avaliador::find($request->avaliador_id); + $trabalho = $avaliador->trabalhos->where('id', $request->trabalho_id)->first(); + $parecerInterno = ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); + $evento = Evento::find($trabalho->evento_id); + + //dd($parecer); + return view('administrador.visualizarParecerInterno')->with(['parecer' => $parecerInterno, 'avaliador' => $avaliador,'trabalho' => $trabalho,'evento' => $evento]); + } + public function create() { return view('administrador.novo_user'); } @@ -182,6 +220,7 @@ class AdministradorController extends Controller case "avaliador": $avaliador = new Avaliador(); $avaliador->user_id = $user->id; + $avaliador->tipo = $request->tipoAvaliador; $avaliador->save(); break; case "proponente": diff --git a/app/Http/Controllers/AvaliadorController.php b/app/Http/Controllers/AvaliadorController.php index efb2558891e5a1a0abaf1b1756bc02a12fe715d3..801c765250589479a272ca81946e1395bdc7f353 100755 --- a/app/Http/Controllers/AvaliadorController.php +++ b/app/Http/Controllers/AvaliadorController.php @@ -2,6 +2,13 @@ namespace App\Http\Controllers; +use App\Area; +use App\Arquivo; +use App\FuncaoParticipantes; +use App\GrandeArea; +use App\ParecerInterno; +use App\Participante; +use App\SubArea; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use App\Trabalho; @@ -14,6 +21,36 @@ use Illuminate\Support\Facades\Storage; class AvaliadorController extends Controller { + public $estados = array( + 'AC' => 'Acre', + 'AL' => 'Alagoas', + 'AP' => 'Amapá', + 'AM' => 'Amazonas', + 'BA' => 'Bahia', + 'CE' => 'Ceará', + 'DF' => 'Distrito Federal', + 'ES' => 'Espirito Santo', + 'GO' => 'Goiás', + 'MA' => 'Maranhão', + 'MS' => 'Mato Grosso do Sul', + 'MT' => 'Mato Grosso', + 'MG' => 'Minas Gerais', + 'PA' => 'Pará', + 'PB' => 'Paraíba', + 'PR' => 'Paraná', + 'PE' => 'Pernambuco', + 'PI' => 'Piauí', + 'RJ' => 'Rio de Janeiro', + 'RN' => 'Rio Grande do Norte', + 'RS' => 'Rio Grande do Sul', + 'RO' => 'Rondônia', + 'RR' => 'Roraima', + 'SC' => 'Santa Catarina', + 'SP' => 'São Paulo', + 'SE' => 'Sergipe', + 'TO' => 'Tocantins', + ); + public function index(){ return view('avaliador.index'); @@ -50,6 +87,86 @@ class AvaliadorController extends Controller return view('avaliador.parecer', ['trabalho'=>$trabalho, 'evento'=>$evento]); } + public function parecerInterno(Request $request){ + + $user = User::find(Auth::user()->id); + $avaliador = $user->avaliadors->where('user_id',$user->id)->first(); + $trabalho = $avaliador->trabalhos->find($request->trabalho_id); + $evento = Evento::find($request->evento); + $parecerInterno = ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); + //Gerais + $grandeAreas = GrandeArea::all(); + $areas = Area::all(); + $subareas = Subarea::all(); + // + $participantes = $trabalho->participantes; + $arquivos = Arquivo::where('trabalhoId', $trabalho->id)->get(); + + return view('avaliador.parecerInterno', + ['trabalho'=>$trabalho, + 'evento'=>$evento, + 'parecer'=>$parecerInterno, + 'grandeAreas' => $grandeAreas, + 'areas' => $areas, + 'subAreas' => $subareas, + 'participantes' => $participantes, + 'enum_turno' => Participante::ENUM_TURNO, + 'arquivos' => $arquivos, + 'estados' => $this->estados, + ]); + } + + public function enviarParecerInterno(Request $request){ + $user = User::find(Auth::user()->id); + $evento = Evento::where('id', $request->evento_id)->first(); + $trabalhos = $user->avaliadors->where('user_id',$user->id)->first()->trabalhos->where('evento_id', $request->evento_id); + $avaliador = $user->avaliadors->where('user_id',$user->id)->first(); + $trabalho = $avaliador->trabalhos->find($request->trabalho_id); + $parecerInterno = ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); + $statusParecer = "NAO-RECOMENDADO"; + if( + $request->anexoLinkLattes=='aceito' && $request->anexoGrupoPesquisa=='aceito' && $request->anexoProjeto=='aceito' && + $request->anexoConsu=='aceito' && $request->anexoPlanilha=='aceito' && $request->anexoLattesCoordenador=='aceito' && + $request->anexoGrupoPesquisa=='aceito' && $request->anexoComiteEtica=='aceito' && $request->anexoJustificativa=='aceito' && + $request->anexoPlano=='aceito'){ + $statusParecer = "RECOMENDADO"; + } + if($parecerInterno == null) { + + $parecerInterno = ParecerInterno::create([ + 'statusLinkLattesProponente' => $request->anexoLinkLattes, + 'statusLinkGrupoPesquisa' => $request->anexoGrupoPesquisa, + 'statusAnexoProjeto' => $request->anexoProjeto, + 'statusAnexoDecisaoCONSU' => $request->anexoConsu, + 'statusAnexoPlanilhaPontuacao' => $request->anexoPlanilha, + 'statusAnexoLattesCoordenador' => $request->anexoLattesCoordenador, + 'statusAnexoGrupoPesquisa' => $request->anexoGrupoPesquisa, + 'statusAnexoAtuorizacaoComiteEtica' => $request->anexoComiteEtica, + 'statusJustificativaAutorizacaoEtica' => $request->anexoJustificativa, + 'statusPlanoTrabalho' => $request->anexoPlano, + 'statusParecer' => $statusParecer, + 'trabalho_id' => $request->trabalho_id, + 'avaliador_id' => $request->avaliador_id, + ]); + $parecerInterno->save(); + }else{ + $parecerInterno->statusLinkLattesProponente = $request->anexoLinkLattes; + $parecerInterno->statusLinkGrupoPesquisa = $request->anexoGrupoPesquisa; + $parecerInterno->statusAnexoProjeto = $request->anexoProjeto; + $parecerInterno->statusAnexoDecisaoCONSU = $request->anexoConsu; + $parecerInterno->statusAnexoPlanilhaPontuacao = $request->anexoPlanilha; + $parecerInterno->statusAnexoLattesCoordenador = $request->anexoLattesCoordenador; + $parecerInterno->statusAnexoGrupoPesquisa = $request->anexoLinkLattes; + $parecerInterno->statusAnexoAtuorizacaoComiteEtica = $request->anexoComiteEtica; + $parecerInterno->statusJustificativaAutorizacaoEtica = $request->anexoJustificativa; + $parecerInterno->statusPlanoTrabalho = $request->anexoPlano; + $parecerInterno->statusParecer = $statusParecer; + $parecerInterno->update(); + } + + return view('avaliador.listarTrabalhos', ['trabalhos'=>$trabalhos, 'evento'=>$evento]); + } + public function parecerPlano(Request $request){ $user = User::find(Auth::user()->id); diff --git a/app/Http/Controllers/NotificacaoController.php b/app/Http/Controllers/NotificacaoController.php new file mode 100644 index 0000000000000000000000000000000000000000..fc8ca17e4e269b1bdeed7f2a487c26f4cd5bb20f --- /dev/null +++ b/app/Http/Controllers/NotificacaoController.php @@ -0,0 +1,99 @@ +sortByDesc('created_at'); + return view('notificacao.listar',['notificacoes'=>$notificacoes]); + } + + public function listarTrab() + { + $destinatarios = Notificacao::where('destinatario_id',Auth()->user()->id)->get(); + $remetentes = Notificacao::where('remetente_id',Auth()->user()->id)->get(); + $notificacoes = $destinatarios->merge($remetentes)->sortByDesc('created_at'); + return view('notificacao.listar',['notificacoes'=>$notificacoes]); + } +} diff --git a/app/Http/Controllers/ParecerInternoController.php b/app/Http/Controllers/ParecerInternoController.php new file mode 100644 index 0000000000000000000000000000000000000000..118989ad5d2663e30f6b1093455e44d16f90123b --- /dev/null +++ b/app/Http/Controllers/ParecerInternoController.php @@ -0,0 +1,85 @@ +with(['participantes' => $participantes, 'trabalhos' => $trabalhos]); + } + + public function alterarBolsa($id,$tipo){ + $participante = Participante::find($id); + if($participante->tipoBolsa ==null){ + if($tipo==1){ + $participante->tipoBolsa = "Voluntario"; + }else{ + $participante->tipoBolsa = "Bolsista"; + } + }else{ + if($participante->tipoBolsa == "Bolsista"){ + $participante->tipoBolsa = "Voluntario"; + }else{ + $participante->tipoBolsa = "Bolsista"; + } + } + $participante->save(); + return redirect()->back()->with(['mensagem' => 'Alteração da bolsa realizada com sucesso!']); + } } diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index 5e3f57ca4a1a5c39429bebf502c44de861c96f71..dd2ab0ff4c57df3b4d231850bb295261f8f0a798 100755 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -958,6 +958,7 @@ class TrabalhoController extends Controller // $participante = Participante::create($data); // } $participante = Participante::create($data); + $participante->data_entrada = $participante->created_at; $user->participantes()->save($participante); $participante->trabalho_id = $trabalho->id; @@ -981,8 +982,18 @@ class TrabalhoController extends Controller } } - $evento->trabalhos()->save($trabalho); - + $notificacao = App\Notificacao::create([ + 'remetente_id' => Auth::user()->id, + 'destinatario_id' => $evento->coordenadorComissao->user_id, + 'trabalho_id' => $trabalho->id, + 'lido' => false, + 'tipo' => 1, + ]); + $notificacao->save(); + + + $evento->trabalhos()->save($trabalho); + $pasta = 'trabalhos/' . $evento->id . '/' . $trabalho->id; $trabalho = $this->armazenarAnexosFinais($request, $pasta, $trabalho, $evento); $trabalho->save(); @@ -1388,6 +1399,7 @@ class TrabalhoController extends Controller $data['email'] = $request->email; $data['password'] = bcrypt($passwordTemporario); $data['data_de_nascimento'] = $request->data_de_nascimento; + $data['data_entrada'] = $request->data_entrada; $data['cpf'] = $request->cpf; $data['tipo'] = 'participante'; $data['funcao_participante_id'] = 4; @@ -1452,6 +1464,11 @@ class TrabalhoController extends Controller //$participanteSubstituido->delete(); $substituicao = new Substituicao(); $substituicao->observacao = $request->textObservacao; + if($participanteSubstituido->data_entrada > $request->data_entrada){ + return redirect(route('trabalho.trocaParticipante', ['evento_id' => $evento->id, 'projeto_id' => $trabalho->id]))->with(['erro' => "Escolha uma data de entrada posterior a entrada do discente substituído"]); + } + + $participanteSubstituido->data_saida = $request->data_entrada; \App\Validator\CpfValidator::validate ($request->all()); $user = User::where('email' , $data['email'])->first(); @@ -1464,6 +1481,7 @@ class TrabalhoController extends Controller $participante = $user->participantes->where('trabalho_id', $trabalho->id)->first(); if (!$participante){ $participante = Participante::create($data); + $participanteSubstituido->save(); } $pasta = 'participantes/' . $participante->id; @@ -1526,10 +1544,18 @@ class TrabalhoController extends Controller $evento->trabalhos()->save($trabalho); $trabalho->save(); + $notificacao = App\Notificacao::create([ + 'remetente_id' => Auth::user()->id, + 'destinatario_id' => $evento->coordenadorComissao->user_id, + 'trabalho_id' => $trabalho->id, + 'lido' => false, + 'tipo' => 2, + ]); + $notificacao->save(); + DB::commit(); Mail::to($evento->coordenadorComissao->user->email)->send(new SolicitacaoSubstituicao($evento, $trabalho)); - return redirect(route('trabalho.trocaParticipante', ['evento_id' => $evento->id, 'projeto_id' => $trabalho->id]))->with(['sucesso' => 'Pedido de substituição enviado com sucesso!']); }catch (\App\Validator\ValidationException $th){ DB::rollback(); @@ -1636,4 +1662,12 @@ class TrabalhoController extends Controller } -} \ No newline at end of file + public function aprovarProposta(Request $request,$id){ + $trabalho = Trabalho::find($id); + $trabalho->status = $request->statusProp; + $trabalho->comentario = $request->comentario; + $trabalho->save(); + + return redirect()->back()->with(['sucesso' => 'Proposta avaliada com sucesso']); + +}} \ No newline at end of file diff --git a/app/Notificacao.php b/app/Notificacao.php new file mode 100644 index 0000000000000000000000000000000000000000..cd6a717ea35c772145bc1a294f9937a693633a94 --- /dev/null +++ b/app/Notificacao.php @@ -0,0 +1,29 @@ +belongsTo(User::class,'destinatario_id','id'); + } + + public function remetente(){ + return $this->belongsTo(User::class,'remetente_id','id'); + } + + public function trabalho(){ + return $this->belongsTo(Trabalho::class,'trabalho_id','id'); + } +} diff --git a/app/ParecerInterno.php b/app/ParecerInterno.php new file mode 100644 index 0000000000000000000000000000000000000000..122b510335fc3bce81bb7f858b85b4791bb1a959 --- /dev/null +++ b/app/ParecerInterno.php @@ -0,0 +1,33 @@ +belongsTo(Trabalho::class, 'trab_id', 'id'); + } + public function avaliador(){ + return $this->belongsTo(Avaliador::class, 'avali_id', 'id'); + } +} diff --git a/app/Participante.php b/app/Participante.php index 0f6c26a01ce2b534fc4716f84d2e6b55cec4ef0c..a217bb82901e2276a3f342cdcc3579d6f3f915a3 100755 --- a/app/Participante.php +++ b/app/Participante.php @@ -10,7 +10,9 @@ class Participante extends Model use SoftDeletes; public const ENUM_TURNO = ['Matutino', 'Vespertino', 'Noturno', 'Integral']; - protected $fillable = ['rg', 'data_de_nascimento', 'curso', 'participante_id', 'turno', 'ordem_prioridade', 'periodo_atual', 'total_periodos', 'media_do_curso', 'linkLattes']; + protected $fillable = ['rg', 'data_de_nascimento', 'curso', 'participante_id', 'turno', + 'ordem_prioridade', 'periodo_atual', 'total_periodos', 'media_do_curso', 'linkLattes', + 'tipoBolsa', 'data_entrada', 'data_saida']; public function user(){ return $this->belongsTo('App\User'); diff --git a/app/Trabalho.php b/app/Trabalho.php index a7c93c831f890b9e40bfc33520796e272994f044..45752d0b9d2ba63445b727ae4d8977197b3968ad 100755 --- a/app/Trabalho.php +++ b/app/Trabalho.php @@ -18,7 +18,8 @@ class Trabalho extends Model 'decisaoCONSU', 'pontuacaoPlanilha', 'linkGrupoPesquisa', - 'linkLattesEstudante', + 'linkLattesEstudante', + 'comentario', 'anexoDecisaoCONSU', 'anexoAutorizacaoComiteEtica', @@ -101,4 +102,12 @@ class Trabalho extends Model public function substituicaos(){ return $this->hasMany('App\Substituicao'); } + + public function parecer_internos(){ + return $this->hasMany(ParecerInterno::class, 'trab_id', 'id'); + } + + public function notificacoes(){ + return $this->hasMany(Notificacao::class, 'trabalho_id', 'id'); + } } diff --git a/app/User.php b/app/User.php index 43631d042b9e0956c35f0eae589318834c553d75..5f590f25eccefca4d06f30af51d113575c67089c 100755 --- a/app/User.php +++ b/app/User.php @@ -106,4 +106,8 @@ class User extends Authenticatable implements MustVerifyEmail $this->notify(new VerifyNotification()); } + public function notificacoes(){ + return $this->hasMany(Notificacao::class, 'destinatario_id')->orderBy('created_at', 'desc')->take(5); + } + } diff --git a/database/migrations/2021_11_16_101654_alter_table_participantes3.php b/database/migrations/2021_11_16_101654_alter_table_participantes3.php new file mode 100644 index 0000000000000000000000000000000000000000..ee135900e29deeadb7cca6f2d49d992877b1e0b5 --- /dev/null +++ b/database/migrations/2021_11_16_101654_alter_table_participantes3.php @@ -0,0 +1,32 @@ +string('tipoBolsa')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participantes', function (Blueprint $table) { + $table->dropColumn('tipoBolsa'); + }); + } +} diff --git a/database/migrations/2021_11_23_034858_alter_table_avaliadors.php b/database/migrations/2021_11_23_034858_alter_table_avaliadors.php new file mode 100644 index 0000000000000000000000000000000000000000..a6e723737bf7631f431939b259c5e5f7cebad8ef --- /dev/null +++ b/database/migrations/2021_11_23_034858_alter_table_avaliadors.php @@ -0,0 +1,32 @@ +string('tipo')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('avaliadors', function (Blueprint $table) { + $table->dropColumn('tipo'); + }); + } +} diff --git a/database/migrations/2021_11_23_063014_create_parecer_internos_table.php b/database/migrations/2021_11_23_063014_create_parecer_internos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..23030fdd78ec4ae105c457a74fe9f03727ff8bd0 --- /dev/null +++ b/database/migrations/2021_11_23_063014_create_parecer_internos_table.php @@ -0,0 +1,50 @@ +bigIncrements('id'); + $table->timestamps(); + + $table->string('statusLinkGrupoPesquisa'); + $table->string('statusLinkLattesProponente'); + + $table->string('statusAnexoProjeto'); + $table->string('statusAnexoDecisaoCONSU'); + $table->string('statusAnexoPlanilhaPontuacao'); + $table->string('statusAnexoLattesCoordenador'); + $table->string('statusAnexoGrupoPesquisa'); + $table->string('statusAnexoAtuorizacaoComiteEtica'); + $table->string('statusJustificativaAutorizacaoEtica'); + $table->string('statusPlanoTrabalho'); + $table->string('statusParecer'); + + $table->unsignedBigInteger('trabalho_id'); + $table->unsignedBigInteger('avaliador_id'); + $table->foreign('trabalho_id')->references('id')->on('trabalhos'); + $table->foreign('avaliador_id')->references('id')->on('avaliadors'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('parecer_internos'); + } +} diff --git a/database/migrations/2022_01_18_032429_alter_table_participantes_datas.php b/database/migrations/2022_01_18_032429_alter_table_participantes_datas.php new file mode 100644 index 0000000000000000000000000000000000000000..6733ff88752ca02df434148fede4bc0bbee9582b --- /dev/null +++ b/database/migrations/2022_01_18_032429_alter_table_participantes_datas.php @@ -0,0 +1,34 @@ +string('data_entrada')->nullable(); + $table->string('data_saida')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participantes', function (Blueprint $table) { + $table->dropColumn('data_entrada'); + $table->dropColumn('data_saida'); + }); + } +} diff --git a/database/migrations/2022_01_24_222743_create_notificacaos_table.php b/database/migrations/2022_01_24_222743_create_notificacaos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..6c32d8789d7799b373eaabb99524545e578da26d --- /dev/null +++ b/database/migrations/2022_01_24_222743_create_notificacaos_table.php @@ -0,0 +1,41 @@ +bigIncrements('id'); + + $table->integer('remetente_id'); + $table->integer('destinatario_id'); + $table->integer('trabalho_id'); + $table->boolean('lido'); + $table->integer('tipo'); + + $table->foreign('remetente_id')->references('id')->on('users'); + $table->foreign('trabalho_id')->references('id')->on('trabalhos'); + $table->foreign('destinatario_id')->references('id')->on('users'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('notificacaos'); + } +} diff --git a/database/migrations/2022_02_07_035323_add_trabalho_comentario.php b/database/migrations/2022_02_07_035323_add_trabalho_comentario.php new file mode 100644 index 0000000000000000000000000000000000000000..fbb615ca2c27d8f1f79ee614c6d6e8474160cf93 --- /dev/null +++ b/database/migrations/2022_02_07_035323_add_trabalho_comentario.php @@ -0,0 +1,32 @@ +text('comentario')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('trabalhos', function (Blueprint $table) { + $table->dropColumn('comentario'); + }); + } +} diff --git a/database/seeds/AvaliadorSeeder.php b/database/seeds/AvaliadorSeeder.php index a5c48b9d712b573ef81b2d12f6d0a10eaa8a1220..700ed5fe151edb3b352258a4eb0b2e7540d146b1 100755 --- a/database/seeds/AvaliadorSeeder.php +++ b/database/seeds/AvaliadorSeeder.php @@ -17,8 +17,9 @@ class AvaliadorSeeder extends Seeder DB::table('avaliadors')->insert([ 'user_id' => $user_id[0], 'area_id' => 1, + 'tipo' => 'Externo', ]); - + // $aval = App\Avaliador::find(1); // $evento = App\Evento::find(1); // $trabalho = App\Trabalho::find(1); @@ -37,6 +38,7 @@ class AvaliadorSeeder extends Seeder DB::table('avaliadors')->insert([ 'user_id' => $user_id[0], 'area_id' => 1, + 'tipo' => 'Externo', ]); // $aval = App\Avaliador::find(2); // $evento = App\Evento::find(1); @@ -52,6 +54,7 @@ class AvaliadorSeeder extends Seeder DB::table('avaliadors')->insert([ 'user_id' => $user_id[0], 'area_id' => 1, + 'tipo' => 'Externo', ]); // $aval = App\Avaliador::find(2); @@ -65,6 +68,7 @@ class AvaliadorSeeder extends Seeder DB::table('avaliadors')->insert([ 'user_id' => $user_id[0], 'area_id' => 1, + 'tipo' => 'Interno', ]); } } diff --git a/public/img/icons/add.ico b/public/img/icons/add.ico new file mode 100644 index 0000000000000000000000000000000000000000..4eceea9455d2ac1970530e1a47d45884c741ff46 Binary files /dev/null and b/public/img/icons/add.ico differ diff --git a/public/img/icons/aprovado.png b/public/img/icons/aprovado.png new file mode 100644 index 0000000000000000000000000000000000000000..79742d7dd0646d3342c902724f9e52f9732ecb21 Binary files /dev/null and b/public/img/icons/aprovado.png differ diff --git a/public/img/icons/negado.png b/public/img/icons/negado.png new file mode 100644 index 0000000000000000000000000000000000000000..814be282255fbcaded12c615e214ec77fb6cda5f Binary files /dev/null and b/public/img/icons/negado.png differ diff --git a/public/img/icons/pdf.ico b/public/img/icons/pdf.ico new file mode 100644 index 0000000000000000000000000000000000000000..8a3818e1d020374e1b941650a8a00c2129b527c5 Binary files /dev/null and b/public/img/icons/pdf.ico differ diff --git a/public/img/icons/pendente.png b/public/img/icons/pendente.png new file mode 100644 index 0000000000000000000000000000000000000000..242d12df935e5768ccd1dcdeaa413a2c73eb3264 Binary files /dev/null and b/public/img/icons/pendente.png differ diff --git a/public/img/icons/usuario.svg b/public/img/icons/usuario.svg new file mode 100644 index 0000000000000000000000000000000000000000..1e8862977931ce45117dad9f731be5bb5275e6a5 --- /dev/null +++ b/public/img/icons/usuario.svg @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/icons/warning.ico b/public/img/icons/warning.ico new file mode 100644 index 0000000000000000000000000000000000000000..0d3e3529e1f84078e6c05418f1ebe17c9fd161b6 Binary files /dev/null and b/public/img/icons/warning.ico differ diff --git a/public/img/icons/xlsx.ico b/public/img/icons/xlsx.ico new file mode 100644 index 0000000000000000000000000000000000000000..d0901948ff93be3f4c3a081f8ba2fcf73a63bf35 Binary files /dev/null and b/public/img/icons/xlsx.ico differ diff --git a/public/img/seta.png b/public/img/seta.png new file mode 100644 index 0000000000000000000000000000000000000000..b4c93cfbdb7d8542735d79f0b1f9e0b3579ef123 Binary files /dev/null and b/public/img/seta.png differ diff --git a/resources/views/administrador/analisar.blade.php b/resources/views/administrador/analisar.blade.php index a21976acfb5e88a29bf8d3b3484f3c7c50ce4d6a..c53e54b83b2bd80e72974af983680450aa766a65 100755 --- a/resources/views/administrador/analisar.blade.php +++ b/resources/views/administrador/analisar.blade.php @@ -2,319 +2,78 @@ @section('content') -
-
-
-
-

Trabalhos do evento: {{ $evento->nome }}

- {{--
Data inicioSubmissao: {{ date('d/m/Y', strtotime($evento->inicioSubmissao)) }}
-
Data fim da submissao: {{ date('d/m/Y', strtotime($evento->fimSubmissao)) }}
--}} -
Data inicioRevisao: {{ date('d/m/Y', strtotime($evento->inicioRevisao)) }}
-
Data fimRevisao: {{ date('d/m/Y', strtotime($evento->fimRevisao)) }}
-
Data do resultado: {{ date('d/m/Y', strtotime($evento->resultado_final)) }}
-
-
-
-
-
- @foreach( $trabalhos as $trabalho ) -
- - -
-
- {{--
--}} -
-
Visualizar Projeto
-

- - - {{-- Nome do Projeto --}} -

-
- - {{ $trabalho->titulo }} -
-
- - {{-- Grande Area --}} -
-
- - {{App\GrandeArea::where('id', $trabalho->grande_area_id)->first()->nome}} -
-
- - {{App\Area::where('id', $trabalho->area_id)->first()->nome}} -
-
- - @if(App\SubArea::where('id', $trabalho->sub_area_id)->first() != null){{App\SubArea::where('id', $trabalho->sub_area_id)->first()->nome}}@endif -
-
- -
- -

Coordenador

- {{-- Coordenador --}} -
- -
- - {{ App\Proponente::find($trabalho->proponente_id)->user->name }} -
-
- - {{ App\Proponente::find($trabalho->proponente_id)->user->email }} -
- -
- - - @if(App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes != null) - {{ App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes }} - @endif - -
- -
- - {{$trabalho->pontuacaoPlanilha}} -
- -
- - {{ $trabalho->linkGrupoPesquisa }} -
- -
- -
-

Anexos

- - {{-- Anexo do Projeto --}} -
- {{-- Arquivo --}} -
- - Arquivo atual -
- -
- - Arquivo atual -
- -
- - @if($trabalho->anexoAutorizacaoComiteEtica != null) - Arquivo atual - @else - - - @endif -
- -
- - Arquivo atual -
- -
- - @if($trabalho->justificativaAutorizacaoEtica != null) - Arquivo atual - @else - - - @endif -
- - @if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM') - {{-- Decisão do CONSU --}} -
- - Arquivo atual -
- @endif - -
- -
-

Discentes

- - Substituições - - {{-- Participantes --}} -
-
-
- @foreach($trabalho->participantes as $participante) - {{-- @foreach($users as $user) --}} - {{-- @if($participante->user_id === $user->id) --}} -
-
-
Dados do discente
-
-
- - {{ $participante->user->name }} -
- -
- - {{ $participante->user->email }} -
- -
- - -
-
- -
Dados do plano de trabalho
- @php - $arquivos = App\Arquivo::where('trabalhoId', $trabalho->id)->get(); - @endphp - @foreach($arquivos as $arquivo) - @if($arquivo->participanteId === $participante->id) -
-
-
-
-
- - - {{$arquivo->titulo}} - -
- - -
- -

- Plano de trabalho atual -

-
-
-
-
-
- @endif - @endforeach -
Relatórios
-
-
-
-
-
- - - -
-
- - - -
-
-
-
- - - -
-
- - - -
-
-
-
-
- - Lista de Relatórios - +
+
+
+
+
+
+
Edital - {{$evento->nome}}
+
Propostas Submetidas
+
+
+
+
+
+ @foreach( $trabalhos as $trabalho ) +
+ +
+
+
{{ $trabalho->titulo }}
+
Proponente: + @foreach($trabalho->participantes as $participante) + {{$participante->user->name}}; + @endforeach +
+
Data: {{ date('d/m/Y', strtotime($trabalho->created_at)) }}
+
-
-
-
-
- {{-- @endif --}} - {{-- @endforeach --}} - @endforeach -
-
-
-
-

Avaliadores

- - - - - - - - - - - @foreach($trabalho->avaliadors as $avaliador) - - - - - - - @endforeach - -
NomeE-mailStatus avaliaçãoAção
{{$avaliador->user->name}}{{$avaliador->user->email}}@if($avaliador->pivot->parecer == null) Pendente @else Avaliado @endif -
-

-
- {{--
--}} +
+
+ @endforeach +
+
+
+
+
+
+
+
+
+
+
+ + Proposta Pendente
+
+ + Proposta Aprovada
+
+ + Proposta Negada
+
-
- @endforeach -
-
+
+ + @endsection @section('javascript') - @endsection diff --git a/resources/views/administrador/analisarProposta.blade.php b/resources/views/administrador/analisarProposta.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..1d4b361189e7e82a1bd4b60e70f7d6329bb7963c --- /dev/null +++ b/resources/views/administrador/analisarProposta.blade.php @@ -0,0 +1,796 @@ +@extends('layouts.app') + +@section('content') + +
+ +
+ @if (session('sucesso')) +
+ {{ session('sucesso') }} +
+ @endif +
+
+
+
+
{{$trabalho->titulo}}
+
{{$evento->nome}}
+
+
+
+
+
+ +
+
+
+
+
+
Área de Ensino
+
+ {{App\GrandeArea::where('id', $trabalho->grande_area_id)->first()->nome}} > + {{App\Area::where('id', $trabalho->area_id)->first()->nome}} + @if(App\SubArea::where('id', $trabalho->sub_area_id)->first() != null)> {{App\SubArea::where('id', $trabalho->sub_area_id)->first()->nome}}@endif + +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
Informações do Proponente
+
+
+
+
+

Nome: {{ App\Proponente::find($trabalho->proponente_id)->user->name }}

+
+
+ Lattes: + @if(App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes != null) + {{ App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes }} + @endif +
+ +
+
+ Grupo de Pesquisa: + {{ $trabalho->linkGrupoPesquisa }} +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
Discentes
+
+ @if($substituicoesPendentes->count() > 0) + Substituições Pendentes + + @else + Substituições + @endif +
+
+
+ +
+ @foreach($trabalho->participantes as $participante) +
+ +
+
+
{{$participante->user->name}}
+ + Informações + +
+ + Remover + +
+ + + + @foreach($substituicoesProjeto as $subs) + + + + + + + @endforeach + + + + + + + @endforeach +
+
+
+
+
+
+ + +
+
+
+
+
+
+
Anexos
+
+
+ + {{-- Anexo do Projeto --}} +
+ {{-- Arquivo --}} +
+ + + +
+ +
+ + + +
+ +
+ + @if($trabalho->anexoAutorizacaoComiteEtica != null) + + @else + - + @endif +
+ +
+ + + +
+ +
+ + @if($trabalho->justificativaAutorizacaoEtica != null) + + @else + - + @endif +
+ + @if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM') + {{-- Decisão do CONSU --}} +
+ + +
+ @endif + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
Relatórios
+ +
+
+ +
+ {{-- Relatório Parcial --}} +
+ +
+
+ +
+
+ +
+
+ +
+ {{-- Relatório Final --}} +
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+ + +
+
+
+
+
+
+
Avaliadores
+
+ + + +
+ + + +
+
+
+ @foreach($trabalho->avaliadors as $avaliador) +
+ +
+
+
{{$avaliador->user->name}}
+ @if($avaliador->tipo == 'Externo' || $avaliador->tipo == null) + @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) Pendente @else Avaliado @endif + @else + @php + $parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); + @endphp + @if($parecerInterno == null) Pendente @else Avaliado @endif + @endif +
+ + Remover + +
+ @endforeach +
+
+
+
+
+
+ + +
+
+
+
+
+
+
Aprovação
+
+
+
+ @csrf +
+
+ Comentário + +
+ +
+ + +
+
+
+
+
+
+ + + + + + + + + + +@endsection + +@section('javascript') + + + + + + +@endsection diff --git a/resources/views/administrador/editais.blade.php b/resources/views/administrador/editais.blade.php index cc8799097d00b3bb6941ab57ff9deb998826d7c4..b164e5d6dfae42390f33645c08fe558a2a1e985a 100755 --- a/resources/views/administrador/editais.blade.php +++ b/resources/views/administrador/editais.blade.php @@ -20,12 +20,15 @@
-
+

Editais

Criar Edital
+
+ Bolsas +

@if(session('mensagem')) @@ -67,6 +70,10 @@ Editar Edital + + Visualizar Projetos + + Atribuir Avaliadores @@ -75,10 +82,6 @@ Visualizar Pareceres - - Analisar projetos - - Resultados diff --git a/resources/views/administrador/listaProjetos.blade.php b/resources/views/administrador/listaProjetos.blade.php index a39c2f715ed3f445b167e95078e89b37f6155ba7..a24914c0adeebd7c4e53a444fb2dfab8b14b3e0c 100755 --- a/resources/views/administrador/listaProjetos.blade.php +++ b/resources/views/administrador/listaProjetos.blade.php @@ -1,85 +1,329 @@ @extends('layouts.app') @section('content') -
-
-
-

Editais

+
+ +
+
+
+

Projetos

+
+
- -
-
- @if(session('mensagem')) -
-
-
-

{{session('mensagem')}}

+
+ @if(session('mensagem')) +
+
+
+

{{session('mensagem')}}

+
-
- @endif -
- -
- @foreach ($editais as $edital) -
- -
-
-

- -

-
- -
-
+ @endif +
+ +
+ @foreach ($projetos as $trabalho) + @php + $evento = $trabalho->evento + @endphp +
+ +
+
+

+ +

+
+ +
+
+ {{--
--}} +
Visualizar Projeto
+

+ + + {{-- Nome do Projeto --}} +

+
+ + {{ $trabalho->titulo }} +
+
+ + {{-- Grande Area --}} +
+
+ + {{App\GrandeArea::where('id', $trabalho->grande_area_id)->first()->nome}} +
+
+ + {{App\Area::where('id', $trabalho->area_id)->first()->nome}} +
+
+ + @if(App\SubArea::where('id', $trabalho->sub_area_id)->first() != null){{App\SubArea::where('id', $trabalho->sub_area_id)->first()->nome}}@endif +
+
+
+ +

Coordenador

+ {{-- Coordenador --}} +
+ +
+ + {{ App\Proponente::find($trabalho->proponente_id)->user->name }} +
+
+ + {{ App\Proponente::find($trabalho->proponente_id)->user->email }} +
+ +
+ + + @if(App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes != null) + {{ App\Proponente::where('id', $trabalho->proponente_id)->first()->linkLattes }} + @endif + +
+ +
+ + {{$trabalho->pontuacaoPlanilha}} +
+ +
+ + {{ $trabalho->linkGrupoPesquisa }} +
+ +
+
+ +

Anexos

+ + {{-- Anexo do Projeto --}} +
+ {{-- Arquivo --}} +
+ + Arquivo atual +
+ +
+ + Arquivo atual +
+ +
+ + @if($trabalho->anexoAutorizacaoComiteEtica != null) + Arquivo atual + @else + - + @endif +
- - +
+ + Arquivo atual +
+ +
+ + @if($trabalho->justificativaAutorizacaoEtica != null) + Arquivo atual + @else + - + @endif +
+ + @if($evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM') + {{-- Decisão do CONSU --}} +
+ + Arquivo atual +
+ @endif + + +
+ + {{--Discentes--}} +

Discentes

+ + Substituições + + {{-- Participantes --}} +
+
+
+ @foreach($trabalho->participantes as $participante) + {{-- @foreach($users as $user) --}} + {{-- @if($participante->user_id === $user->id) --}} +
+
+
Dados do discente
+
+
+ + {{ $participante->user->name }} +
+ +
+ + {{ $participante->user->email }} +
+ +
+ + +
+
+ +
Dados do plano de trabalho
+ @php + $arquivos = App\Arquivo::where('trabalhoId', $trabalho->id)->get(); + @endphp + @foreach($arquivos as $arquivo) + @if($arquivo->participanteId === $participante->id) +
+
+
+
+
+ + + {{$arquivo->titulo}} + +
+ + +
+ +

+ Plano de trabalho atual +

+
+
+
+
+
+ @endif + @endforeach +
Relatórios
+
+
+
+
+
+ + + +
+
+ + + +
+
+
+
+ + + +
+
+ + + +
+
+
+ +
+
+
+ {{-- @endif --}} + {{-- @endforeach --}} + @endforeach +
+
+
+
+ + {{--Avaliadores--}} +

Avaliadores

+
+ - - - - - - + + + + - - - - @foreach ($edital->trabalhos as $projeto) + + + @foreach($trabalho->avaliadors as $avaliador) + + + - - - - - - - @endforeach - -
Nome da PropostaAutorEmailData de CriaçãoStatusOpçãoNomeE-mailStatus avaliaçãoAção
{{$avaliador->user->name}}{{$avaliador->user->email}}@if($avaliador->pivot->parecer == null) Pendente @else Avaliado @endif - - {{ $projeto->titulo }} - - {{ $projeto->proponente->user->name }}{{ $projeto->proponente->user->email }}{{ date('d/m/Y \à\s H:i\h', strtotime($projeto->created_at)) }}{{ $projeto->status }} - +
+ + + + +
+
+ @endforeach +
-
- @endforeach -
+
-
- +
@endsection \ No newline at end of file diff --git a/resources/views/administrador/listarBolsas.blade.php b/resources/views/administrador/listarBolsas.blade.php new file mode 100644 index 0000000000000000000000000000000000000000..4d55c5b8181bd3af41f5d452d71d915a41784a61 --- /dev/null +++ b/resources/views/administrador/listarBolsas.blade.php @@ -0,0 +1,110 @@ +@extends('layouts.app') + +@section('content') + +
+ +
+

Dados Bolsa

+
+
+ + + + + + + + + + + + @foreach($trabalhos as $trabalho) + @foreach($trabalho->participantes as $participante) + + + + + + + + + + + + @endforeach + @endforeach + +
EditalProjetoStatus ProjetoDiscenteTipo de Bolsa
{{$trabalho->evento->nome}}{{$trabalho->titulo}}{{$trabalho->status}}{{$participante->user->name}} + +
+
+
+ + + +@endsection diff --git a/resources/views/administrador/novo_user.blade.php b/resources/views/administrador/novo_user.blade.php index 989dde9839e00735ed68a55177957ac5b403c0e3..c9107c5760bcf074dd9a6a4e35129acd6c593ddf 100755 --- a/resources/views/administrador/novo_user.blade.php +++ b/resources/views/administrador/novo_user.blade.php @@ -64,7 +64,7 @@
- @if(auth()->user()->tipo == 'administrador') @endif @@ -73,7 +73,16 @@ -
+
+ +
+ + +
+
@@ -357,6 +366,22 @@ instituicao.parentElement.style.display = 'none'; } } + function avaliadorCheck() { + var tipoUser = document.getElementById('tipo'); + var tipoAval = document.getElementById("tipoAvaliador"); + var labAval = document.getElementById("labTipoAvaliador") + if (tipo.value == "avaliador") { + tipoAval.style.display = ""; + labAval.style.display = ""; + tipo.parentElement.className = 'col-md-2' + } else { + tipo.parentElement.className = 'col-md-4' + labAval.parentElement.className = '' + tipoAval.parentElement.className = '' + tipoAval.style.display = "none"; + labAval.style.display = "none"; + } + } window.onload = showInstituicao(); @endsection \ No newline at end of file diff --git a/resources/views/administrador/projetos.blade.php b/resources/views/administrador/projetos.blade.php index 1468daf9c25e83cbfaa802555587d6f5cf47c199..28611d5546645ca99ef9aac45fad00fcbefb2671 100755 --- a/resources/views/administrador/projetos.blade.php +++ b/resources/views/administrador/projetos.blade.php @@ -36,6 +36,7 @@ Avaliador + Tipo E-mail Data Recomendação @@ -46,40 +47,76 @@ @foreach($trabalho->avaliadors as $avaliador) {{ $avaliador->user->name }} + {{ $avaliador->tipo }} {{ $avaliador->user->email }} - - @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) - Indisponível - @else - {{ date('d/m/Y', strtotime($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->created_at)) }} - @endif - - - - @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) - Indisponível - @else - {{ $avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->recomendacao }} - @endif - - - -
- @csrf - - - @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) - + @else - + + @endif + + @else + {{--Data--}} + + @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) + Indisponível + @else + {{ date('d/m/Y', strtotime($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->created_at)) }} + @endif + + {{--Parecer--}} + + @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) + Indisponível + @else + {{ $avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->recomendacao }} @endif -
- - + + + +
+ @csrf + + + @if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->parecer == null) + + @else + + @endif +
+ + + @endif @endforeach diff --git a/resources/views/administrador/selecionarAvaliadores.blade.php b/resources/views/administrador/selecionarAvaliadores.blade.php index 67501cfaf4194d85e12097f00ef23eae7b45c3db..85354f3a9ca3dc1ffe21a3f564af2e0efe1258f0 100755 --- a/resources/views/administrador/selecionarAvaliadores.blade.php +++ b/resources/views/administrador/selecionarAvaliadores.blade.php @@ -44,6 +44,7 @@ Nome do Usuário Email Área + Tipo Ação @@ -60,6 +61,13 @@ @endif + + @if($avaliador->tipo == null) + Externo + @else + {{$avaliador->tipo}} + @endif +
@csrf @@ -83,6 +91,7 @@ Nome do Usuário + Tipo Email Status Ação @@ -92,6 +101,7 @@ @foreach ($avalSelecionados as $avaliador) {{ $avaliador->user->name }} + {{ $avaliador->tipo }} {{ $avaliador->user->email }} @if($avaliador->eventos->where('id', $evento->id)->first()->pivot->convite == true) Aceito diff --git a/resources/views/administrador/selecionarProjetos.blade.php b/resources/views/administrador/selecionarProjetos.blade.php index c1b7ae99afd8c810e9a650597b83e32ce6708112..638389e42a18fe63f2db57077841e48c4f114695 100755 --- a/resources/views/administrador/selecionarProjetos.blade.php +++ b/resources/views/administrador/selecionarProjetos.blade.php @@ -111,6 +111,7 @@ Nome do Usuário + Tipo E-mail Titulo do projeto Status avaliação @@ -126,28 +127,56 @@ @endif {{ $avaliador->user->name }} + {{ $avaliador->tipo }} {{ $avaliador->user->email }} {{ $trabalho->titulo }} {{-- {{ $contador }} / {{ $avaliador->trabalhos->where('evento_id', $evento->id)->count() }} --}} - @if($trabalho->pivot->parecer == null) Pendente @else Avaliado @endif - + @if($avaliador->tipo=="Externo" || $avaliador->tipo=null) + @if($trabalho->pivot->parecer == null) Pendente @else Avaliado @endif + + + + @else + @php + $parecer = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first(); + @endphp + + @if($parecer == null) Pendente @else Avaliado @endif + + - + + @endif @endforeach @endforeach diff --git a/resources/views/administrador/substituirParticipante.blade.php b/resources/views/administrador/substituirParticipante.blade.php index eef28e6a74d6cff26b73455dd47051edec04b97e..b1fb5b9a670f8b86809563f91e94d81ab6f6efa4 100644 --- a/resources/views/administrador/substituirParticipante.blade.php +++ b/resources/views/administrador/substituirParticipante.blade.php @@ -26,7 +26,7 @@
- Nome/Periodo + Nome/Período
@@ -34,11 +34,11 @@

{{$participante->user->name}}

-
{{date('d-m-Y', strtotime($participante->created_at))}} - Atualmente
+
{{date('d-m-Y', strtotime($participante->data_entrada))}} - Atualmente
- -