Commit 23076444 authored by carlos's avatar carlos
Browse files

ao mudar o status do usuario

parent 349c9a02
...@@ -5,6 +5,7 @@ namespace App\Http\Controllers; ...@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Administrador; use App\Administrador;
use App\User; use App\User;
use App\Area;
use App\Avaliador; use App\Avaliador;
use App\AdministradorResponsavel; use App\AdministradorResponsavel;
use App\Participante; use App\Participante;
...@@ -15,6 +16,7 @@ use App\FuncaoParticipantes; ...@@ -15,6 +16,7 @@ use App\FuncaoParticipantes;
use Illuminate\Support\Str; use Illuminate\Support\Str;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
use App\Evento; use App\Evento;
use Illuminate\Support\Facades\Storage;
use App\CoordenadorComissao; use App\CoordenadorComissao;
use Illuminate\Validation\Rule; use Illuminate\Validation\Rule;
use App\Mail\EmailParaUsuarioNaoCadastrado; use App\Mail\EmailParaUsuarioNaoCadastrado;
...@@ -189,21 +191,36 @@ class AdministradorController extends Controller ...@@ -189,21 +191,36 @@ class AdministradorController extends Controller
public function edit($id) { public function edit($id) {
$user = User::find($id); $user = User::find($id);
$editalParticipante = null;
$editais = Evento::all();
$funcaoParticipantes = FuncaoParticipantes::all();
$projetos = Trabalho::all();
$areas = Area::all();
$adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first();
$avaliador = Avaliador::where('user_id', '=', $id)->first(); $avaliador = Avaliador::where('user_id', '=', $id)->first();
$proponente = Proponente::where('user_id', '=', $id)->first(); $proponente = Proponente::where('user_id', '=', $id)->first();
$participante = Participante::where('user_id', '=', $id)->first(); $participante = Participante::where('user_id', '=', $id)->first();
if ($participante != null) {
$editalParticipante = Evento::where('id', Trabalho::where('id', $participante->trabalho_id)->first()->evento_id)->first();
}
return view ('administrador.editar_user')->with(['user' => $user, return view ('administrador.editar_user')->with(['user' => $user,
'avaliador' => $avaliador,
'adminResp' => $adminResp, 'adminResp' => $adminResp,
'proponente' => $proponente, 'proponente' => $proponente,
'participante' => $participante,]); 'participante' => $participante,
'editais' => $editais,
'funcaoParticipantes' => $funcaoParticipantes,
'projetos' => $projetos,
'editalParticipante' => $editalParticipante,
'areas' => $areas,]);
} }
public function update(Request $request, $id) { public function update(Request $request, $id) {
$user = User::find($id); $user = User::find($id);
//validação de dados
if ($request->tipo != "proponente") { if ($request->tipo != "proponente") {
$validated = $request->validate([ $validated = $request->validate([
'name' => ['required', 'string', 'max:255'], 'name' => ['required', 'string', 'max:255'],
...@@ -214,35 +231,151 @@ class AdministradorController extends Controller ...@@ -214,35 +231,151 @@ class AdministradorController extends Controller
'celular' => ['required', 'string', 'telefone'], 'celular' => ['required', 'string', 'telefone'],
'cpf' => ['required', 'cpf'], 'cpf' => ['required', 'cpf'],
]); ]);
} else if ($request->tipo === "participante") {
$validated = $request->validate([
'name' => ['required', 'string', 'max:255'],
'tipo' => ['required'],
'email' => ['required', 'string', 'email', 'max:255'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
'instituicaoSelect' => ['required_without:instituicao'],
'celular' => ['required', 'string', 'telefone'],
'cpf' => ['required', 'cpf'],
'edital' => 'required',
'projeto' => 'required',
'funcaoParticipante' => 'required',
]);
} else if ($request->tipo === "avaliador") {
$validated = $request->validate([
'name' => ['required', 'string', 'max:255'],
'tipo' => ['required'],
'email' => ['required', 'string', 'email', 'max:255'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
'instituicaoSelect' => ['required_without:instituicao'],
'celular' => ['required', 'string', 'telefone'],
'cpf' => ['required', 'cpf'],
'area' => 'required',
]);
} else { } else {
$validated = $request->validate([ $validated = $request->validate([
'name' => ['required', 'string', 'max:255'], 'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'email', 'max:255'], 'email' => ['required', 'string', 'email', 'max:255'],
'tipo' => ['required'], 'cpf' => ['required', 'cpf'],
'cpf' => ['required', 'cpf',], 'celular' => ['required', 'string', 'telefone'],
'celular' => ['required', 'string', 'telefone'], 'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'],
'instituicao' => ['required_if:instituicaoSelect,Outra', 'max:255'], 'instituicaoSelect' => ['required_without:instituicao'],
'instituicaoSelect' => ['required_without:instituicao'], 'cargo' => ['required'],
'cargo' => ['required'], 'vinculo' => ['required'],
'vinculo' => ['required'], 'outro' => ['required_if:vinculo,Outro'],
'outro' => ['required_if:vinculo,Outro'], 'titulacaoMaxima' => ['required_with:anoTitulacao,areaFormacao,bolsistaProdutividade'],
'titulacaoMaxima' => ['required_with:anoTitulacao,areaFormacao,bolsistaProdutividade'], 'titulacaoMaxima' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')),
'titulacaoMaxima' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')), 'anoTitulacao' => ['required_with:titulacaoMaxima,areaFormacao,bolsistaProdutividade,linkLattes'],
'anoTitulacao' => ['required_with:titulacaoMaxima,areaFormacao,bolsistaProdutividade,linkLattes'], 'anoTitulacao' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')),
'anoTitulacao' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')), 'areaFormacao' => ['required_with:titulacaoMaxima,anoTitulacao,bolsistaProdutividade,linkLattes'],
'areaFormacao' => ['required_with:titulacaoMaxima,anoTitulacao,bolsistaProdutividade,linkLattes'], 'areaFormacao' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')),
'areaFormacao' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')), 'bolsistaProdutividade' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'],
'bolsistaProdutividade' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,linkLattes'], 'bolsistaProdutividade' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')),
'bolsistaProdutividade' => Rule::requiredIf((isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando')), 'nivel' => ['required_if:bolsistaProdutividade,sim'],
'nivel' => ['required_if:bolsistaProdutividade,sim'], //'nivel' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'required':''],
//'nivel' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'required':''], 'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'],
'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'], 'linkLattes' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'required':''],
'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'], 'linkLattes' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'link_lattes':''],
'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'],
'linkLattes' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'required':''],
'linkLattes' => [(isset($data['cargo']) && $data['cargo'] !== 'Estudante') || (isset($data['cargo']) && $data['cargo'] === 'Estudante' && isset($data['vinculo']) && $data['vinculo'] === 'Pós-doutorando') ? 'link_lattes':''],
]); ]);
} }
//validação de mudança de tipo se confirmar a mudança exclui os dados do usuário atual e adiciona o novo perfil
if ($user->tipo != $request->tipo && $request->confirmarMudançaDeTipo == null) {
return redirect()->back()->withErrors(['tipo' => 'A mudança de tipo irá excluir tudo associado ao tipo atual do usuário!']);
} else if ($request->confirmarMudançaDeTipo != null) {
// dd($request);
switch ($user->tipo) {
case "administradorResponsavel":
$adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first();
$adminResp->delete();
break;
case "coordenador":
$coordenador = CoordenadorComissao::where('user_id', '=', $id)->first();
$projetos = Trabalho::where('coordenador_id', $coordenador->id)->get();
foreach ($projetos as $projeto) {
Storage::deleteDirectory('trabalhos/' . $projeto->evento->id . '/' . $projeto->id );
$projeto->delete();
}
// PENDENTE: chave estrangeira (trabalhos) não deixa apagar o coordenador mesmo que o mesmo não esteja vinculado a nenhum projeto
$coordenador->delete();
break;
case "avaliador":
$avaliador = Avaliador::where('user_id', '=', $id)->first();
$avaliador->delete();
break;
case "proponente":
$proponente = Proponente::where('user_id', '=', $id)->first();
$projetos = Trabalho::where('proponente_id', $proponente->id)->get();
foreach ($projetos as $projeto) {
Storage::deleteDirectory('trabalhos/' . $projeto->evento->id . '/' . $projeto->id );
$projeto->delete();
}
$proponente->delete();
break;
case "participante":
$participante = Participante::where('user_id', '=', $id)->first();
$participante->delete();
break;
}
switch ($request->tipo) {
case "administradorResponsavel":
$adminResp = new AdministradorResponsavel();
$adminResp->user_id = $user->id;
$adminResp->save();
break;
case "coordenador":
$coordenador = new CoordenadorComissao();
$coordenador->user_id = $user->id;
$coordenador->save();
break;
case "avaliador":
$avaliador = new Avaliador();
$avaliador->user_id = $user->id;
$avaliador->area_id = $request->area;
$avaliador->save();
break;
case "proponente":
$proponente = new Proponente();
if ($request->SIAPE != null) {
$proponente->SIAPE = $request->SIAPE;
}
$proponente->cargo = $request->cargo;
if ($request->vinculo != 'Outro') {
$proponente->vinculo = $request->vinculo;
} else {
$proponente->vinculo = $request->outro;
}
$proponente->titulacaoMaxima = $request->titulacaoMaxima;
$proponente->anoTitulacao = $request->anoTitulacao;
$proponente->areaFormacao = $request->areaFormacao;
$proponente->bolsistaProdutividade = $request->bolsistaProdutividade;
if ($request->bolsistaProdutividade == 'sim') {
$proponente->nivel = $request->nivel;
}
$proponente->linkLattes = $request->linkLattes;
$proponente->user_id = $user->id;
$proponente->save();
break;
case "participante":
$participante = new Participante();
$participante->user_id = $user->id;
$participante->trabalho_id = $request->projeto;
$participante->funcao_participante_id = $request->funcaoParticipante;
$participante->save();
break;
}
}
// if (!(Hash::check($request->senha_atual, $user->password))) { // if (!(Hash::check($request->senha_atual, $user->password))) {
// return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']); // return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']);
...@@ -252,52 +385,54 @@ class AdministradorController extends Controller ...@@ -252,52 +385,54 @@ class AdministradorController extends Controller
// return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']); // return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']);
// } // }
switch ($request->tipo) { if ($request->confirmarMudançaDeTipo == null) {
case "administradorResponsavel": switch ($request->tipo) {
$adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); case "administradorResponsavel":
$adminResp->user_id = $user->id; $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first();
$adminResp->update(); $adminResp->user_id = $user->id;
break; $adminResp->update();
case "coordenador": break;
$coordenador = CoordenadorComissao::where('user_id', '=', $id)->first(); case "coordenador":
$coordenador->user_id = $user->id; $coordenador = CoordenadorComissao::where('user_id', '=', $id)->first();
$coordenador->update(); $coordenador->user_id = $user->id;
break; $coordenador->update();
case "avaliador": break;
$avaliador = Avaliador::where('user_id', '=', $id)->first(); case "avaliador":
$avaliador->user_id = $user->id; $avaliador = Avaliador::where('user_id', '=', $id)->first();
$avaliador->update(); $avaliador->user_id = $user->id;
break; $avaliador->update();
case "proponente": break;
$proponente = Proponente::where('user_id', '=', $id)->first(); case "proponente":
if ($request->SIAPE != null) { $proponente = Proponente::where('user_id', '=', $id)->first();
$proponente->SIAPE = $request->SIAPE; if ($request->SIAPE != null) {
} $proponente->SIAPE = $request->SIAPE;
$proponente->cargo = $request->cargo; }
$proponente->cargo = $request->cargo;
if ($request->vinculo != 'Outro') {
$proponente->vinculo = $request->vinculo; if ($request->vinculo != 'Outro') {
} else { $proponente->vinculo = $request->vinculo;
$proponente->vinculo = $request->outro; } else {
} $proponente->vinculo = $request->outro;
}
$proponente->titulacaoMaxima = $request->titulacaoMaxima;
$proponente->anoTitulacao = $request->anoTitulacao; $proponente->titulacaoMaxima = $request->titulacaoMaxima;
$proponente->areaFormacao = $request->areaFormacao; $proponente->anoTitulacao = $request->anoTitulacao;
$proponente->bolsistaProdutividade = $request->bolsistaProdutividade; $proponente->areaFormacao = $request->areaFormacao;
if ($request->bolsistaProdutividade == 'sim') { $proponente->bolsistaProdutividade = $request->bolsistaProdutividade;
$proponente->nivel = $request->nivel; if ($request->bolsistaProdutividade == 'sim') {
} $proponente->nivel = $request->nivel;
$proponente->linkLattes = $request->linkLattes; }
$proponente->linkLattes = $request->linkLattes;
$proponente->user_id = $user->id;
$proponente->update(); $proponente->user_id = $user->id;
break; $proponente->update();
case "participante": break;
$participante = Participante::where('user_id', '=', $id)->first(); case "participante":
$participante->user_id = $user->id; $participante = Participante::where('user_id', '=', $id)->first();
$participante->update(); $participante->user_id = $user->id;
break; $participante->update();
break;
}
} }
$user->name = $request->name; $user->name = $request->name;
......
...@@ -122,6 +122,6 @@ class AreaController extends Controller ...@@ -122,6 +122,6 @@ class AreaController extends Controller
$id = json_decode($request->id) ; $id = json_decode($request->id) ;
$areas = Area::where('grande_area_id', $id)->orderBy('nome')->get(); $areas = Area::where('grande_area_id', $id)->orderBy('nome')->get();
return response()->json($areas); return response()->json($areas);
return $areas->toJson(); // return $areas->toJson();
} }
} }
...@@ -94,9 +94,9 @@ class EventoController extends Controller ...@@ -94,9 +94,9 @@ class EventoController extends Controller
// validar datas nulas antes, pois pode gerar um bug // validar datas nulas antes, pois pode gerar um bug
if( if(
$request->inicioSubmissao == null || $request->inícioDaSubmissão == null ||
$request->fimSubmissao == null || $request->fimDaSubmissão == null ||
$request->inicioRevisao == null || $request->inícioDaRevisão == null ||
$request->fimRevisao == null || $request->fimRevisao == null ||
$request->resultado == null $request->resultado == null
...@@ -107,12 +107,12 @@ class EventoController extends Controller ...@@ -107,12 +107,12 @@ class EventoController extends Controller
'tipo' => ['required', 'string'], 'tipo' => ['required', 'string'],
'natureza' => ['required'], 'natureza' => ['required'],
'coordenador_id' => ['required'], 'coordenador_id' => ['required'],
'inicioSubmissao' => ['required', 'date'], 'inícioDaSubmissão' => ['required', 'date'],
'fimSubmissao' => ['required', 'date'], 'fimDaSubmissão' => ['required', 'date'],
'inicioRevisao' => ['required', 'date'], 'inícioDaRevisão' => ['required', 'date'],
'fimRevisao' => ['required', 'date'], 'fimDaRevisão' => ['required', 'date'],
'inicio_recurso' => ['required', 'date'], 'início_do_recurso' => ['required', 'date'],
'fim_recurso' => ['required', 'date'], 'fim_do_recurso' => ['required', 'date'],
'resultado_final' => ['required', 'date'], 'resultado_final' => ['required', 'date'],
'resultado_preliminar'=> ['required', 'date'], 'resultado_preliminar'=> ['required', 'date'],
'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
...@@ -308,11 +308,13 @@ class EventoController extends Controller ...@@ -308,11 +308,13 @@ class EventoController extends Controller
$coordenadors = CoordenadorComissao::with('user')->get(); $coordenadors = CoordenadorComissao::with('user')->get();
$naturezas = Natureza::orderBy('nome')->get(); $naturezas = Natureza::orderBy('nome')->get();
$yesterday = Carbon::yesterday('America/Recife'); $yesterday = Carbon::yesterday('America/Recife');
// $today = Carbon::toDay('America/Recife')->toDateString();
$yesterday = $yesterday->toDateString(); $yesterday = $yesterday->toDateString();
return view('evento.editarEvento',['evento'=>$evento, return view('evento.editarEvento',['evento'=>$evento,
'coordenadores'=>$coordenadors, 'coordenadores'=>$coordenadors,
'naturezas'=>$naturezas, 'naturezas'=>$naturezas,
'ontem'=>$yesterday]); 'ontem'=>$yesterday,
/* 'hoje' =>$today*/]);
} }
/** /**
...@@ -341,13 +343,13 @@ class EventoController extends Controller ...@@ -341,13 +343,13 @@ class EventoController extends Controller
'descricao' => ['required', 'string'], 'descricao' => ['required', 'string'],
'tipo' => ['required', 'string'], 'tipo' => ['required', 'string'],
'natureza' => ['required'], 'natureza' => ['required'],
'inicioSubmissao' => ['required', 'date'], 'inícioDaSubmissão' => ['required', 'date'],
'fimSubmissao' => ['required', 'date'], 'fimDaSubmissão' => ['required', 'date'],
'inicioRevisao' => ['required', 'date', 'after:yesterday'], 'inícioDaRevisão' => ['required', 'date'],
'fimRevisao' => ['required', 'date'], 'fimDaRevisão' => ['required', 'date'],
'resultado_preliminar'=> ['required', 'date'], 'início_do_recurso' => ['required', 'date'],
'inicio_recurso' => ['required', 'date'], 'fim_do_recurso' => ['required', 'date'],
'fim_recurso' => ['required', 'date'], 'resultado_preliminar'=> ['required', 'date'],
'resultado_final' => ['required', 'date'], 'resultado_final' => ['required', 'date'],
'pdfEdital' => ['file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => ['file', 'mimes:pdf', 'max:2048'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'], 'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
...@@ -359,13 +361,13 @@ class EventoController extends Controller ...@@ -359,13 +361,13 @@ class EventoController extends Controller
'descricao' => ['required', 'string', 'max:1500'], 'descricao' => ['required', 'string', 'max:1500'],
'tipo' => ['required', 'string'], 'tipo' => ['required', 'string'],
'natureza' => ['required'], 'natureza' => ['required'],
'inicioSubmissao' => ['required', 'date', 'after:yesterday'], 'inícioDaSubmissão' => ['required', 'date', 'after:yesterday'],
'fimSubmissao' => ['required', 'date', 'after_or_equal:inicioSubmissao'], 'fimDaSubmissão' => ['required', 'date', 'after_or_equal:inicioSubmissao'],
'inicioRevisao' => ['required', 'date', 'after:yesterday'], 'inícioDaRevisão' => ['required', 'date', 'after:yesterday'],
'fimRevisao' => ['required', 'date', 'after:inicioRevisao', 'after:fimSubmissao'], 'fimDaRevisão' => ['required', 'date', 'after:inicioRevisao', 'after:fimSubmissao'],
'resultado_preliminar'=> ['required', 'date', 'after_or_equal:fimRevisao'], 'resultado_preliminar'=> ['required', 'date', 'after_or_equal:fimRevisao'],
'inicio_recurso' => ['required', 'date', 'after_or_equal:resultado_preliminar'], 'início_do_recurso' => ['required', 'date', 'after_or_equal:resultado_preliminar'],
'fim_recurso' => ['required', 'date', 'after:inicio_recurso'], 'fim_do_recurso' => ['required', 'date', 'after:inicio_recurso'],
'resultado_final' => ['required', 'date', 'after:fim_recurso'], 'resultado_final' => ['required', 'date', 'after:fim_recurso'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'], 'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
]); ]);
...@@ -374,12 +376,12 @@ class EventoController extends Controller ...@@ -374,12 +376,12 @@ class EventoController extends Controller
$evento->descricao = $request->descricao; $evento->descricao = $request->descricao;
$evento->tipo = $request->tipo; $evento->tipo = $request->tipo;
$evento->natureza_id = $request->natureza; $evento->natureza_id = $request->natureza;
$evento->inicioSubmissao = $request->inicioSubmissao; $evento->inicioSubmissao = $request->inícioDaSubmissão;
$evento->fimSubmissao = $request->fimSubmissao; $evento->fimSubmissao = $request->fimDaSubmissão;
$evento->inicioRevisao = $request->inicioRevisao; $evento->inicioRevisao = $request->inícioDaRevisão;
$evento->fimRevisao = $request->fimRevisao; $evento->fimRevisao = $request->fimDaRevisão;
$evento->inicio_recurso = $request->inicio_recurso; $evento->inicio_recurso = $request->início_do_recurso;
$evento->fim_recurso = $request->fim_recurso; $evento->fim_recurso = $request->fim_do_recurso;
$evento->resultado_preliminar = $request->resultado_preliminar; $evento->resultado_preliminar = $request->resultado_preliminar;
$evento->resultado_final = $request->resultado_final; $evento->resultado_final = $request->resultado_final;
$evento->coordenadorId = $request->coordenador_id; $evento->coordenadorId = $request->coordenador_id;
...@@ -403,7 +405,7 @@ class EventoController extends Controller ...@@ -403,7 +405,7 @@ class EventoController extends Controller
$evento->update(); $evento->update();
$eventos = Evento::all(); $eventos = Evento::all();
return view('coordenador.home',['eventos'=>$eventos]); return redirect( route('admin.editais') );
} }
/** /**
......
...@@ -968,4 +968,9 @@ class TrabalhoController extends Controller ...@@ -968,4 +968,9 @@ class TrabalhoController extends Controller
return abort(404); return abort(404);
} }
public function consulta(Request $request) {
$id = json_decode($request->id) ;
$projetos = Trabalho::where('evento_id', $id)->orderBy('titulo')->get();
return response()->json($projetos);
}
} }
...@@ -2467,16 +2467,16 @@ ...@@ -2467,16 +2467,16 @@
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" "reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", "reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2488,7 +2488,7 @@ ...@@ -2488,7 +2488,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2525,20 +2525,20 @@ ...@@ -2525,20 +2525,20 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-iconv", "name": "symfony/polyfill-iconv",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-iconv.git", "url": "https://github.com/symfony/polyfill-iconv.git",
"reference": "ba6c9c18db36235b859cc29b8372d1c01298c035" "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ba6c9c18db36235b859cc29b8372d1c01298c035", "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36",
"reference": "ba6c9c18db36235b859cc29b8372d1c01298c035", "reference": "6c2f78eb8f5ab8eaea98f6d414a5915f2e0fce36",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2550,7 +2550,7 @@ ...@@ -2550,7 +2550,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2588,25 +2588,26 @@ ...@@ -2588,25 +2588,26 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-intl-idn", "name": "symfony/polyfill-intl-idn",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git", "url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "a57f8161502549a742a63c09f0a604997bf47027" "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a57f8161502549a742a63c09f0a604997bf47027", "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
"reference": "a57f8161502549a742a63c09f0a604997bf47027", "reference": "bc6549d068d0160e0f10f7a5a23c7d1406b95ebe",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3", "php": ">=5.3.3",
"symfony/polyfill-mbstring": "^1.3", "symfony/polyfill-intl-normalizer": "^1.10",
"symfony/polyfill-php70": "^1.10",
"symfony/polyfill-php72": "^1.10" "symfony/polyfill-php72": "^1.10"
}, },
"suggest": { "suggest": {
...@@ -2615,7 +2616,7 @@ ...@@ -2615,7 +2616,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2639,6 +2640,10 @@ ...@@ -2639,6 +2640,10 @@
"name": "Laurent Bassin", "name": "Laurent Bassin",
"email": "laurent@bassin.info" "email": "laurent@bassin.info"
}, },
{
"name": "Trevor Rowbotham",
"email": "trevor.rowbotham@pm.me"
},
{ {
"name": "Symfony Community", "name": "Symfony Community",
"homepage": "https://symfony.com/contributors" "homepage": "https://symfony.com/contributors"
...@@ -2654,20 +2659,87 @@ ...@@ -2654,20 +2659,87 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
"reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
"reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"ext-intl": "For best performance"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for intl's Normalizer class and related functions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"intl",
"normalizer",
"polyfill",
"portable",
"shim"
],
"time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7" "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a",
"reference": "7110338d81ce1cbc3e273136e4574663627037a7", "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2679,7 +2751,7 @@ ...@@ -2679,7 +2751,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2717,20 +2789,83 @@ ...@@ -2717,20 +2789,83 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
},
{
"name": "symfony/polyfill-php70",
"version": "v1.18.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php70.git",
"reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
"reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3",
"shasum": ""
},
"require": {
"paragonie/random_compat": "~1.0|~2.0|~9.99",
"php": ">=5.3.3"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
],
"classmap": [
"Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"polyfill",
"portable",
"shim"
],
"time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-php72", "name": "symfony/polyfill-php72",
"version": "v1.17.0", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php72.git", "url": "https://github.com/symfony/polyfill-php72.git",
"reference": "f048e612a3905f34931127360bdd2def19a5e582" "reference": "639447d008615574653fb3bc60d1986d7172eaae"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/f048e612a3905f34931127360bdd2def19a5e582", "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae",
"reference": "f048e612a3905f34931127360bdd2def19a5e582", "reference": "639447d008615574653fb3bc60d1986d7172eaae",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2739,7 +2874,11 @@ ...@@ -2739,7 +2874,11 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
},
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
} }
}, },
"autoload": { "autoload": {
...@@ -2772,20 +2911,20 @@ ...@@ -2772,20 +2911,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-05-12T16:47:27+00:00" "time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-php73", "name": "symfony/polyfill-php73",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php73.git", "url": "https://github.com/symfony/polyfill-php73.git",
"reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
"reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2794,7 +2933,7 @@ ...@@ -2794,7 +2933,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2834,20 +2973,20 @@ ...@@ -2834,20 +2973,20 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
"version": "v1.17.1", "version": "v1.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -2856,7 +2995,7 @@ ...@@ -2856,7 +2995,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.17-dev" "dev-master": "1.18-dev"
}, },
"thanks": { "thanks": {
"name": "symfony/polyfill", "name": "symfony/polyfill",
...@@ -2900,7 +3039,7 @@ ...@@ -2900,7 +3039,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2020-06-06T08:46:27+00:00" "time": "2020-07-14T12:35:20+00:00"
}, },
{ {
"name": "symfony/process", "name": "symfony/process",
...@@ -3305,26 +3444,26 @@ ...@@ -3305,26 +3444,26 @@
}, },
{ {
"name": "tijsverkoyen/css-to-inline-styles", "name": "tijsverkoyen/css-to-inline-styles",
"version": "2.2.2", "version": "2.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
"reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15" "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/dda2ee426acd6d801d5b7fd1001cde9b5f790e15", "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5",
"reference": "dda2ee426acd6d801d5b7fd1001cde9b5f790e15", "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-libxml": "*", "ext-libxml": "*",
"php": "^5.5 || ^7.0", "php": "^5.5 || ^7.0 || ^8.0",
"symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -3350,26 +3489,26 @@ ...@@ -3350,26 +3489,26 @@
], ],
"description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
"time": "2019-10-24T08:53:34+00:00" "time": "2020-07-13T06:12:54+00:00"
}, },
{ {
"name": "vlucas/phpdotenv", "name": "vlucas/phpdotenv",
"version": "v3.6.6", "version": "v3.6.7",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/vlucas/phpdotenv.git", "url": "https://github.com/vlucas/phpdotenv.git",
"reference": "4669484ccbc38fe7c4e0c50456778f2010566aad" "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/4669484ccbc38fe7c4e0c50456778f2010566aad", "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/2065beda6cbe75e2603686907b2e45f6f3a5ad82",
"reference": "4669484ccbc38fe7c4e0c50456778f2010566aad", "reference": "2065beda6cbe75e2603686907b2e45f6f3a5ad82",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.4 || ^7.0 || ^8.0", "php": "^5.4 || ^7.0 || ^8.0",
"phpoption/phpoption": "^1.5.2", "phpoption/phpoption": "^1.5.2",
"symfony/polyfill-ctype": "^1.16" "symfony/polyfill-ctype": "^1.17"
}, },
"require-dev": { "require-dev": {
"ext-filter": "*", "ext-filter": "*",
...@@ -3413,7 +3552,7 @@ ...@@ -3413,7 +3552,7 @@
"env", "env",
"environment" "environment"
], ],
"time": "2020-06-02T14:08:54+00:00" "time": "2020-07-14T19:04:52+00:00"
} }
], ],
"packages-dev": [ "packages-dev": [
...@@ -3475,16 +3614,16 @@ ...@@ -3475,16 +3614,16 @@
}, },
{ {
"name": "facade/flare-client-php", "name": "facade/flare-client-php",
"version": "1.3.2", "version": "1.3.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/facade/flare-client-php.git", "url": "https://github.com/facade/flare-client-php.git",
"reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004" "reference": "0eeb0de4fc1078433f0915010bd8f41e998adcb4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/facade/flare-client-php/zipball/db1e03426e7f9472c9ecd1092aff00f56aa6c004", "url": "https://api.github.com/repos/facade/flare-client-php/zipball/0eeb0de4fc1078433f0915010bd8f41e998adcb4",
"reference": "db1e03426e7f9472c9ecd1092aff00f56aa6c004", "reference": "0eeb0de4fc1078433f0915010bd8f41e998adcb4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -3492,9 +3631,11 @@ ...@@ -3492,9 +3631,11 @@
"illuminate/pipeline": "^5.5|^6.0|^7.0", "illuminate/pipeline": "^5.5|^6.0|^7.0",
"php": "^7.1", "php": "^7.1",
"symfony/http-foundation": "^3.3|^4.1|^5.0", "symfony/http-foundation": "^3.3|^4.1|^5.0",
"symfony/mime": "^3.4|^4.0|^5.1",
"symfony/var-dumper": "^3.4|^4.0|^5.0" "symfony/var-dumper": "^3.4|^4.0|^5.0"
}, },
"require-dev": { "require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"larapack/dd": "^1.1", "larapack/dd": "^1.1",
"phpunit/phpunit": "^7.5.16", "phpunit/phpunit": "^7.5.16",
"spatie/phpunit-snapshot-assertions": "^2.0" "spatie/phpunit-snapshot-assertions": "^2.0"
...@@ -3525,20 +3666,20 @@ ...@@ -3525,20 +3666,20 @@
"flare", "flare",
"reporting" "reporting"
], ],
"time": "2020-03-02T15:52:04+00:00" "time": "2020-07-13T23:25:57+00:00"
}, },
{ {
"name": "facade/ignition", "name": "facade/ignition",
"version": "1.16.1", "version": "1.16.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/facade/ignition.git", "url": "https://github.com/facade/ignition.git",
"reference": "af05ac5ee8587395d7474ec0681c08776a2cb09d" "reference": "19674150bb46a4de0ba138c747f538fe7be11dbc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/facade/ignition/zipball/af05ac5ee8587395d7474ec0681c08776a2cb09d", "url": "https://api.github.com/repos/facade/ignition/zipball/19674150bb46a4de0ba138c747f538fe7be11dbc",
"reference": "af05ac5ee8587395d7474ec0681c08776a2cb09d", "reference": "19674150bb46a4de0ba138c747f538fe7be11dbc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
...@@ -3596,25 +3737,30 @@ ...@@ -3596,25 +3737,30 @@
"laravel", "laravel",
"page" "page"
], ],
"time": "2020-03-05T12:39:07+00:00" "time": "2020-07-13T15:54:05+00:00"
}, },
{ {
"name": "facade/ignition-contracts", "name": "facade/ignition-contracts",
"version": "1.0.0", "version": "1.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/facade/ignition-contracts.git", "url": "https://github.com/facade/ignition-contracts.git",
"reference": "f445db0fb86f48e205787b2592840dd9c80ded28" "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/facade/ignition-contracts/zipball/f445db0fb86f48e205787b2592840dd9c80ded28", "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/aeab1ce8b68b188a43e81758e750151ad7da796b",
"reference": "f445db0fb86f48e205787b2592840dd9c80ded28", "reference": "aeab1ce8b68b188a43e81758e750151ad7da796b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^7.1" "php": "^7.1"
}, },
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
"phpunit/phpunit": "^7.5|^8.0",
"vimeo/psalm": "^3.12"
},
"type": "library", "type": "library",
"autoload": { "autoload": {
"psr-4": { "psr-4": {
...@@ -3640,7 +3786,7 @@ ...@@ -3640,7 +3786,7 @@
"flare", "flare",
"ignition" "ignition"
], ],
"time": "2019-08-30T14:06:08+00:00" "time": "2020-07-14T10:10:28+00:00"
}, },
{ {
"name": "filp/whoops", "name": "filp/whoops",
...@@ -5403,23 +5549,23 @@ ...@@ -5403,23 +5549,23 @@
}, },
{ {
"name": "theseer/tokenizer", "name": "theseer/tokenizer",
"version": "1.1.3", "version": "1.2.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/theseer/tokenizer.git", "url": "https://github.com/theseer/tokenizer.git",
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" "reference": "75a63c33a8577608444246075ea0af0d052e452a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a",
"reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", "reference": "75a63c33a8577608444246075ea0af0d052e452a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-dom": "*", "ext-dom": "*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"ext-xmlwriter": "*", "ext-xmlwriter": "*",
"php": "^7.0" "php": "^7.2 || ^8.0"
}, },
"type": "library", "type": "library",
"autoload": { "autoload": {
...@@ -5439,7 +5585,7 @@ ...@@ -5439,7 +5585,7 @@
} }
], ],
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
"time": "2019-06-13T22:48:21+00:00" "time": "2020-07-12T23:59:07+00:00"
}, },
{ {
"name": "webmozart/assert", "name": "webmozart/assert",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<div class="col-md-8"> <div class="col-md-8">
<label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label> <label for="name" class="col-form-label">{{ __('Nome Completo*') }}</label>
<input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ $user->name }}" required autocomplete="name" autofocus> <input id="name" type="text" class="form-control @error('name') is-invalid @enderror" name="name" value="{{ old('name') != null ? old('name') : $user->name }}" required autocomplete="name" autofocus>
@error('name') @error('name')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="cpf" class="col-form-label">{{ __('CPF*') }}</label> <label for="cpf" class="col-form-label">{{ __('CPF*') }}</label>
<input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" value="{{ $user->cpf }}" required autocomplete="cpf" autofocus> <input id="cpf" type="text" class="form-control @error('cpf') is-invalid @enderror" name="cpf" value="{{ old('cpf') != null ? old('cpf') : $user->cpf }}" required autocomplete="cpf" autofocus>
@error('cpf') @error('cpf')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -66,19 +66,38 @@ ...@@ -66,19 +66,38 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="tipo" class="col-form-label">{{ __('Tipo*') }}</label> <label for="tipo" class="col-form-label">{{ __('Tipo*') }}</label>
<select name="tipo" id="tipo" onchange="mudar()" class="form-control"> <select name="tipo" id="tipo" onchange="mudar()" class="form-control @error('tipo') is-invalid @enderror">
@if(auth()->user()->tipo == 'administrador') @if (old('tipo') != null)
<option @if($user->tipo =='administradorResponsavel' ) selected @endif value="administradorResponsavel">Administrador responsável</option> @if(auth()->user()->tipo == 'administrador')
<option @if ( old('tipo') == 'administradorResponsavel') selected @endif value="administradorResponsavel">Administrador responsável</option>
@endif
<option @if ( old('tipo') == 'coordenador') selected @endif value="coordenador">Coordenador</option>
<option @if ( old('tipo') == 'avaliador') selected @endif value="avaliador">Avaliador</option>
<option @if ( old('tipo') == 'proponente') selected @endif value="proponente">Proponente</option>
<option @if ( old('tipo') == 'participante') selected @endif value="participante">Participante</option>
@else
@if(auth()->user()->tipo == 'administrador')
<option @if($user->tipo == 'administradorResponsavel') selected @endif value="administradorResponsavel">Administrador responsável</option>
@endif
<option @if($user->tipo == 'coordenador') selected @endif value="coordenador">Coordenador</option>
<option @if($user->tipo == 'avaliador') selected @endif value="avaliador">Avaliador</option>
<option @if($user->tipo == 'proponente') selected @endif value="proponente">Proponente</option>
<option @if($user->tipo == 'participante') selected @endif value="participante">Participante</option>
@endif @endif
<option @if($user->tipo =='coordenador' ) selected @endif value="coordenador">Coordenador</option>
<option @if($user->tipo =='avaliador' ) selected @endif value="avaliador">Avaliador</option>
<option @if($user->tipo =='proponente' ) selected @endif value="proponente">Proponente</option>
<option @if($user->tipo =='participante' ) selected @endif value="participante">Participante</option>
</select> </select>
@error('tipo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
<input type="checkbox" id="confirmarMudançaDeTipo" name="confirmarMudançaDeTipo" @error('tipo') @else style="display: none;" @enderror>
<label for="confirmarMudançaDeTipo" @error('tipo') @else style="display: none;" @enderror>Desejo alterar o tipo do usuário mesmo assim</label>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<label for="celular" class="col-form-label">{{ __('Celular*') }}</label> <label for="celular" class="col-form-label">{{ __('Celular*') }}</label>
<input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" value="{{ $user->celular }}" required autocomplete="celular" autofocus> <input id="celular" type="text" class="form-control @error('celular') is-invalid @enderror" name="celular" value="{{ old('celular') != null ? old('celular') : $user->celular }}" required autocomplete="celular" autofocus>
@error('celular') @error('celular')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -89,10 +108,10 @@ ...@@ -89,10 +108,10 @@
</div> </div>
{{-- Email | Senha | Confirmar Senha --}} {{-- Email --}}
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-3">
<label for="email" class="col-form-label">{{ __('E-Mail*') }}</label> <label for="email" class="col-form-label">{{ __('E-Mail*') }}</label>
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $user->email }}" required autocomplete="email"> <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ $user->email }}" required autocomplete="email">
...@@ -103,6 +122,104 @@ ...@@ -103,6 +122,104 @@
@enderror @enderror
</div> </div>
<div id="divEditais" class="col-md-3" @if($participante != null) style="display: block; border: none;" @else style="display: none; border: none;" @endif>
<label for="edital" class="col-form-label">{{ __('Edital*') }}</label>
<select id="edital" name="edital" class="form-control @error('edital') is-invalid @enderror" onchange="projetosTeste()">
<option value="" disabled selected hidden>-- Edital --</option>
@if ($participante != null)
{{-- Se for do do tipo participante --}}
@if (old('edital') != null)
@foreach ($editais as $edital)
<option @if( old('edital') == $edital->id ) selected @endif value="{{ $edital->id }}">{{ $edital->nome }}</option>
@endforeach
@else
@foreach ($editais as $edital)
<option @if( $editalParticipante->id == $edital->id ) selected @endif value="{{ $edital->id }}">{{ $edital->nome }}</option>
@endforeach
@endif
@elseif(old('edital') != null)
@foreach ($editais as $edital)
<option @if( old('edital') == $edital->id ) selected @endif value="{{ $edital->id }}">{{ $edital->nome }}</option>
@endforeach
@else
@foreach ($editais as $edital)
<option @if( old('edital') == $edital->id ) selected @endif value="{{ $edital->id }}">{{ $edital->nome }}</option>
@endforeach
@endif
</select>
@error('edital')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div id="divProjetos" class="col-md-3" @if($participante != null) style="display: block; border: none;" @else style="display: none; border: none;" @endif>
<label for="projeto" class="col-form-label">{{ __('Projeto*') }}</label>
<select id="projeto" name="projeto" class="form-control @error('projeto') is-invalid @enderror" onchange="">
@if($participante != null)
@foreach ($projetos as $projeto)
<option @if($participante->trabalho_id == $projeto->id) selected @endif value="{{ $projeto->id }}">{{ $projeto->titulo }}</option>
@endforeach
@else
<option value="" disabled selected>-- Projeto --</option>
@endif
</select>
@error('projeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div id="divAreas" class="col-md-3" @if($avaliador != null) style="display: block; border: none;" @else style="display: none; border: none;" @endif>
<label for="area" class="col-form-label">{{ __('Área*') }}</label>
<select id="area" name="area" class="form-control @error('area') is-invalid @enderror" onchange="">
@if(old('area') != null)
@foreach ($areas as $area)
<option @if(old('area') == $area->id) selected @endif value="{{ $area->id }}">{{ $area->nome }}</option>
@endforeach
@elseif ($avaliador != null)
@foreach ($areas as $area)
<option @if($avaliador->area_id == $area->id) selected @endif value="{{ $area->id }}">{{ $area->nome }}</option>
@endforeach
@else
@foreach ($areas as $area)
<option value="{{ $area->id }}">{{ $area->nome }}</option>
@endforeach
@endif
</select>
@error('area')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div id="divFuncaoParticipante" class="col-md-3" @if($participante != null) style="display: block; border: none;" @else style="display: none; border: none;" @endif>
<label for="funcaoParticipante" class="col-form-label">{{ __('Função de participante*') }}</label>
<select id="funcaoParticipante" name="funcaoParticipante" class="form-control @error('funcaoParticipante') is-invalid @enderror" onchange="">
<option value="" disabled selected hidden>-- Função de Participante --</option>
@if ($participante != null)
@foreach($funcaoParticipantes as $funcaoParticipante)
<option @if ($participante->funcao_participante_id == $funcaoParticipante->id) selected @endif value="{{ $funcaoParticipante->id }}">{{ $funcaoParticipante->nome }}</option>
@endforeach
@else
@foreach($funcaoParticipantes as $funcaoParticipante)
<option @if (old('funcaoParticipante') == $funcaoParticipante->id) selected @endif value="{{ $funcaoParticipante->id }}">{{ $funcaoParticipante->nome }}</option>
@endforeach
@endif
</select>
@error('funcaoParticipante')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div> </div>
@if(!(is_null($proponente))) @if(!(is_null($proponente)))
...@@ -116,9 +233,15 @@ ...@@ -116,9 +233,15 @@
<label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label> <label for="cargo" class="col-form-label">{{ __('Cargo*') }}</label>
<select id="cargo" name="cargo" class="form-control @error('cargo') is-invalid @enderror" onchange=""> <select id="cargo" name="cargo" class="form-control @error('cargo') is-invalid @enderror" onchange="">
<option value="" disabled selected hidden>-- Cargo --</option> <option value="" disabled selected hidden>-- Cargo --</option>
<option @if( $proponente->cargo =='Professor' ) selected @endif value="Professor">Professor</option> @if (old('cargo') != null)
<option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option> <option @if( old('cargo') =='Professor' ) selected @endif value="Professor">Professor</option>
<option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option> <option @if( old('cargo') =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( old('cargo') =='Estudante' ) selected @endif value="Estudante">Estudante</option>
@else
<option @if( $proponente->cargo =='Professor' ) selected @endif value="Professor">Professor</option>
<option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option>
@endif
</select> </select>
@error('cargo') @error('cargo')
...@@ -131,14 +254,26 @@ ...@@ -131,14 +254,26 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label> <label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label>
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()"> <select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()">
<option value="" disabled selected hidden>-- Vínculo --</option> @if (old('vinculo') != null)
<option @if($proponente->vinculo =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option> <option value="" disabled selected hidden>-- Vínculo --</option>
<option @if($proponente->vinculo =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option> <option @if(old('vinculo') =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option>
<option @if($proponente->vinculo =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option> <option @if(old('vinculo') =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option> <option @if(old('vinculo') =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option>
<option @if($proponente->vinculo =='Outro' ) selected @endif value="Outro">Outro</option> <option @if(old('vinculo') =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option>
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro') <option @if(old('vinculo') =='Outro' ) selected @endif value="Outro">Outro</option>
<option value="{{ $proponente->vinculo }}" selected >{{ $proponente->vinculo }}</option> @if (old('vinculo') !='Servidor na ativa' && old('vinculo') !='Servidor aposentado' && old('vinculo') !='Professor visitante' && old('vinculo') !='Pós-doutorando' && old('vinculo') !='Outro')
<option value="{{ old('vinculo') }}" selected >{{ old('vinculo') }}</option>
@endif
@else
<option value="" disabled selected hidden>-- Vínculo --</option>
<option @if($proponente->vinculo =='Servidor na ativa' ) selected @endif value="Servidor na ativa">Servidor na ativa</option>
<option @if($proponente->vinculo =='Servidor aposentado' ) selected @endif value="Servidor aposentado">Servidor aposentado</option>
<option @if($proponente->vinculo =='Professor visitante' ) selected @endif value="Professor visitante">Professor visitante</option>
<option @if($proponente->vinculo =='Pós-doutorando' ) selected @endif value="Pós-doutorando">Pós-doutorando</option>
<option @if($proponente->vinculo =='Outro' ) selected @endif value="Outro">Outro</option>
@if ($proponente->vinculo !='Servidor na ativa' && $proponente->vinculo !='Servidor aposentado' && $proponente->vinculo !='Professor visitante' && $proponente->vinculo !='Pós-doutorando' && $proponente->vinculo !='Outro')
<option value="{{ $proponente->vinculo }}" selected >{{ $proponente->vinculo }}</option>
@endif
@endif @endif
</select> </select>
...@@ -165,13 +300,22 @@ ...@@ -165,13 +300,22 @@
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
<label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label> <label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label>
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome"> <select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="titulacaoMaxima">
<option value="" disabled selected hidden>-- Titulação --</option> @if (old('titulacaoMaxima') != null)
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option> <option value="" disabled selected hidden>-- Titulação --</option>
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> <option @if( old('titulacaoMaxima') =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option>
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected @endif value="Especialização">Especialização</option> <option @if( old('titulacaoMaxima') =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option> <option @if( old('titulacaoMaxima') =='Especialização' ) selected @endif value="Especialização">Especialização</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option> <option @if( old('titulacaoMaxima') =='Graduação' ) selected @endif value="Graduação">Graduação</option>
<option @if( old('titulacaoMaxima') =='Técnico' ) selected @endif value="Técnico">Técnico</option>
@else
<option value="" disabled selected hidden>-- Titulação --</option>
<option @if( $proponente->titulacaoMaxima =='Doutorado' ) selected @endif value="Doutorado">Doutorado</option>
<option @if( $proponente->titulacaoMaxima =='Mestrado' ) selected @endif value="Mestrado">Mestrado</option>
<option @if( $proponente->titulacaoMaxima =='Especialização' ) selected @endif value="Especialização">Especialização</option>
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option>
@endif
</select> </select>
@error('titulacaoMaxima') @error('titulacaoMaxima')
...@@ -183,7 +327,7 @@ ...@@ -183,7 +327,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label> <label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label>
<input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ $proponente->anoTitulacao }}" autocomplete="nome"> <input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ old('anoTitulacao') != null ? old('anoTitulacao') : $proponente->anoTitulacao }}" autocomplete="anoTitulacao">
@error('anoTitulacao') @error('anoTitulacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -193,7 +337,7 @@ ...@@ -193,7 +337,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label> <label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ $proponente->areaFormacao }}" autocomplete="nome"> <input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ old('areaFormacao') != null ? old('areaFormacao') : $proponente->areaFormacao }}" autocomplete="areaFormacao">
@error('areaFormacao') @error('areaFormacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -207,7 +351,7 @@ ...@@ -207,7 +351,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label> <label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ $proponente->SIAPE }}" autocomplete="nome"> <input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ old('SIAPE') != null ? old('SIAPE') : $proponente->SIAPE }}" autocomplete="SIAPE">
@error('SIAPE') @error('SIAPE')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -218,7 +362,7 @@ ...@@ -218,7 +362,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label> <label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ $proponente->linkLattes }}" autocomplete="nome"> <input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ old('linkLattes') != null ? old('linkLattes') : $proponente->linkLattes }}" autocomplete="linkLattes">
@error('linkLattes') @error('linkLattes')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -230,9 +374,15 @@ ...@@ -230,9 +374,15 @@
<div class="col-md-3"> <div class="col-md-3">
<label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br> <label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br>
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> <select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()">
<option value="" disabled selected hidden>-- Bolsista --</option> @if (old('bolsistaProdutividade') != null)
<option @if( $proponente->bolsistaProdutividade =='nao' ) selected @endif value="nao">Não</option> <option value="" disabled selected hidden>-- Bolsista --</option>
<option @if( $proponente->bolsistaProdutividade =='sim' ) selected @endif value="sim">Sim</option> <option @if( old('bolsistaProdutividade') =='nao' ) selected @endif value="nao">Não</option>
<option @if( old('bolsistaProdutividade') =='sim' ) selected @endif value="sim">Sim</option>
@else
<option value="" disabled selected hidden>-- Bolsista --</option>
<option @if( $proponente->bolsistaProdutividade =='nao' ) selected @endif value="nao">Não</option>
<option @if( $proponente->bolsistaProdutividade =='sim' ) selected @endif value="sim">Sim</option>
@endif
</select> </select>
@error('bolsistaProdutividade') @error('bolsistaProdutividade')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -241,8 +391,8 @@ ...@@ -241,8 +391,8 @@
@enderror @enderror
</div> </div>
@if ($proponente->bolsistaProdutividade =='sim') @if (old('nivel') == null)
<div class="col-md-1" id="nivelInput" style="display: block;"> <div class="col-md-1" id="nivelInput" @if ($proponente->bolsistaProdutividade =='sim') style="display: block;" @else style="display: none;" @endif>
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> <option value="" disabled selected hidden></option>
...@@ -259,15 +409,15 @@ ...@@ -259,15 +409,15 @@
@enderror @enderror
</div> </div>
@else @else
<div class="col-md-1" id="nivelInput" style="display: none;"> <div class="col-md-1" id="nivelInput" @if (old('bolsistaProdutividade') =='sim') style="display: block;" @else style="display: none;" @endif>
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> <option value="" disabled selected hidden></option>
<option value="1A">1A</option> <option @if( old('nivel') == '1A') selected @endif value="1A">1A</option>
<option value="1B">1B</option> <option @if( old('nivel') == '1B') selected @endif value="1B">1B</option>
<option value="1C">1C</option> <option @if( old('nivel') == '1C') selected @endif value="1C">1C</option>
<option value="1D">1D</option> <option @if( old('nivel') == '1D') selected @endif value="1D">1D</option>
<option value="2">2</option> <option @if( old('nivel') == '2') selected @endif value="2">2</option>
</select> </select>
@error('nivel') @error('nivel')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -348,7 +498,7 @@ ...@@ -348,7 +498,7 @@
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
<label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label> <label for="titulacaoMaxima" class="col-form-label">{{ __('Titulação Máxima*') }}</label>
<select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="nome"> <select id="titulacaoMaxima" class="form-control @error('titulacaoMaxima') is-invalid @enderror" name="titulacaoMaxima" value="{{ old('titulacaoMaxima') }}" autocomplete="titulacaoMaxima">
<option value="" disabled selected hidden>-- Titulação --</option> <option value="" disabled selected hidden>-- Titulação --</option>
<option @if(old('titulacaoMaxima')=='Doutorado' ) selected @endif value="Doutorado">Doutorado</option> <option @if(old('titulacaoMaxima')=='Doutorado' ) selected @endif value="Doutorado">Doutorado</option>
<option @if(old('titulacaoMaxima')=='Mestrado' ) selected @endif value="Mestrado">Mestrado</option> <option @if(old('titulacaoMaxima')=='Mestrado' ) selected @endif value="Mestrado">Mestrado</option>
...@@ -366,7 +516,7 @@ ...@@ -366,7 +516,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label> <label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label>
<input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ old('anoTitulacao') }}" autocomplete="nome"> <input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ old('anoTitulacao') }}" autocomplete="anoTitulacao">
@error('anoTitulacao') @error('anoTitulacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -376,7 +526,7 @@ ...@@ -376,7 +526,7 @@
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label> <label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ old('areaFormacao') }}" autocomplete="nome"> <input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ old('areaFormacao') }}" autocomplete="areaFormacao">
@error('areaFormacao') @error('areaFormacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -390,7 +540,7 @@ ...@@ -390,7 +540,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label> <label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ old('SIAPE') }}" autocomplete="nome"> <input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ old('SIAPE') }}" autocomplete="SIAPE">
@error('SIAPE') @error('SIAPE')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -401,7 +551,7 @@ ...@@ -401,7 +551,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label> <label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ old('linkLattes') }}" autocomplete="nome"> <input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ old('linkLattes') }}" autocomplete="linkLattes">
@error('linkLattes') @error('linkLattes')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -424,15 +574,15 @@ ...@@ -424,15 +574,15 @@
@enderror @enderror
</div> </div>
<div class="col-md-1" id="nivelInput" style="display: none;"> <div class="col-md-1" id="nivelInput" @if (old('bolsistaProdutividade') =='sim') style="display: block;" @else style="display: none;" @endif>
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> <option value="" disabled selected hidden></option>
<option value="1A">1A</option> <option @if( old('nivel') == '1A') selected @endif value="1A">1A</option>
<option value="1B">1B</option> <option @if( old('nivel') == '1B') selected @endif value="1B">1B</option>
<option value="1C">1C</option> <option @if( old('nivel') == '1C') selected @endif value="1C">1C</option>
<option value="1D">1D</option> <option @if( old('nivel') == '1D') selected @endif value="1D">1D</option>
<option value="2">2</option> <option @if( old('nivel') == '2') selected @endif value="2">2</option>
</select> </select>
@error('nivel') @error('nivel')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
...@@ -482,11 +632,35 @@ ...@@ -482,11 +632,35 @@
function mudar() { function mudar() {
var divProponente = document.getElementById('proponente'); var divProponente = document.getElementById('proponente');
var comboBoxTipo = document.getElementById('tipo'); var comboBoxTipo = document.getElementById('tipo');
var comboBoxEditais = document.getElementById('divEditais');
var comboBoxProjetos = document.getElementById('divProjetos');
var comboBoxFuncaoParticipante = document.getElementById('divFuncaoParticipante');
var comboBoxAreas = document.getElementById('divAreas');
if (comboBoxTipo.value == "proponente") { if (comboBoxTipo.value == "proponente") {
divProponente.style.display = "block"; divProponente.style.display = "block";
comboBoxEditais.style.display = "none";
comboBoxProjetos.style.display = "none";
comboBoxFuncaoParticipante.style.display = "none";
comboBoxAreas.style.display = "none";
} else if (comboBoxTipo.value == "participante") {
comboBoxEditais.style.display = "block";
comboBoxProjetos.style.display = "block";
divProponente.style.display = "none";
comboBoxFuncaoParticipante.style.display = "block";
comboBoxAreas.style.display = "none";
} else if (comboBoxTipo.value == "avaliador") {
divProponente.style.display = "none";
comboBoxEditais.style.display = "none";
comboBoxProjetos.style.display = "none";
comboBoxFuncaoParticipante.style.display = "none";
comboBoxAreas.style.display = "block";
} else { } else {
divProponente.style.display = "none"; divProponente.style.display = "none";
comboBoxEditais.style.display = "none";
comboBoxProjetos.style.display = "none";
comboBoxFuncaoParticipante.style.display = "none";
comboBoxAreas.style.display = "none";
} }
} }
...@@ -529,6 +703,42 @@ ...@@ -529,6 +703,42 @@
instituicao.parentElement.style.display = 'none'; instituicao.parentElement.style.display = 'none';
} }
} }
function projetosTeste() {
var edital = $('#edital').val();
$.ajax({
type: 'POST',
url: '{{ route('trabalho.consulta') }}',
data: 'id='+edital ,
headers:
{
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: (dados) => {
console.log(dados);
if (dados.length > 0) {
if($('#projeto').val() == null || $('#projeto').val() == ""){
var option = '<option selected disabled>-- Projeto --</option>';
}
$.each(dados, function(i, obj) {
if($('#projeto').val() != null && $('#projeto').val() == obj.id){
option += '<option selected value="' + obj.id + '">' + obj.titulo + '</option>';
}else{
option += '<option value="' + obj.id + '">' + obj.titulo + '</option>';
}
})
} else {
var option = "<option selected disabled>-- Projeto --</option>";
}
$('#projeto').html(option).show();
},
error: (data) => {
console.log(data);
}
})
}
window.onload = showInstituicao(); window.onload = showInstituicao();
</script> </script>
@endsection @endsection
\ No newline at end of file
...@@ -66,12 +66,12 @@ ...@@ -66,12 +66,12 @@
<label for="tipo" class="col-form-label">{{ __('Tipo*') }}</label> <label for="tipo" class="col-form-label">{{ __('Tipo*') }}</label>
<select name="tipo" id="tipo" onchange="mudar()" class="form-control"> <select name="tipo" id="tipo" onchange="mudar()" class="form-control">
@if(auth()->user()->tipo == 'administrador') @if(auth()->user()->tipo == 'administrador')
<option @if ( old('tipo') == "administradorResponsavel" ) required @endif value="administradorResponsavel">Administrador responsável</option> <option @if ( old('tipo') == "administradorResponsavel" ) selected @endif value="administradorResponsavel">Administrador responsável</option>
@endif @endif
<option @if ( old('tipo') == "coordenador" ) required @endif value="coordenador">Coordenador</option> <option @if ( old('tipo') == "coordenador" ) selected @endif value="coordenador">Coordenador</option>
<option @if ( old('tipo') == "avaliador" ) required @endif value="avaliador">Avaliador</option> <option @if ( old('tipo') == "avaliador" ) selected @endif value="avaliador">Avaliador</option>
<option @if ( old('tipo') == "proponente" ) required @endif value="proponente">Proponente</option> <option @if ( old('tipo') == "proponente" ) selected @endif value="proponente">Proponente</option>
<option @if ( old('tipo') == "participante" ) required @endif value="participante">Participante</option> <option @if ( old('tipo') == "participante" ) selected @endif value="participante">Participante</option>
</select> </select>
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
......
...@@ -105,6 +105,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){ ...@@ -105,6 +105,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@update' )->name('trabalho.update'); Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@update' )->name('trabalho.update');
Route::get( '/projeto/{id}/excluir', 'TrabalhoController@destroy' )->name('trabalho.destroy'); Route::get( '/projeto/{id}/excluir', 'TrabalhoController@destroy' )->name('trabalho.destroy');
Route::get( '/projeto/{id}/excluirParticipante','TrabalhoController@excluirParticipante')->name('trabalho.excluirParticipante'); Route::get( '/projeto/{id}/excluirParticipante','TrabalhoController@excluirParticipante')->name('trabalho.excluirParticipante');
Route::post( '/projetos/', 'TrabalhoController@consulta' )->name('trabalho.consulta');
//######### Atribuição ####################################### //######### Atribuição #######################################
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment