diff --git a/app/Area.php b/app/Area.php index d03974502d983599d474e05d19c2b538c1b32fa0..ef259d40e35ea16060862774ba0134ca06150be6 100644 --- a/app/Area.php +++ b/app/Area.php @@ -37,4 +37,7 @@ class Area extends Model public function avaliador(){ return $this->hasMany('App\Area'); } + public function grandeArea() { + return $this->belongsTo('App\GrandeArea', 'grande_area_id'); + } } diff --git a/app/FuncaoParticipantes.php b/app/FuncaoParticipantes.php index e5632fdb1df7b2f15ba89fa4739113cf363b4239..bb8a5cd7667ce25abf8268c5f695516f34dd1450 100644 --- a/app/FuncaoParticipantes.php +++ b/app/FuncaoParticipantes.php @@ -6,5 +6,7 @@ use Illuminate\Database\Eloquent\Model; class FuncaoParticipantes extends Model { - // + public function participantes() { + return $this->hasMany("\App\Participante", 'funcao_participante_id'); + } } diff --git a/app/Http/Controllers/AdministradorController.php b/app/Http/Controllers/AdministradorController.php index 85a8ccb74d574a2f7361a9f4a6e221e536d38c7b..88403f0cb630b8f59b35153a077ee55fdac9dac0 100644 --- a/app/Http/Controllers/AdministradorController.php +++ b/app/Http/Controllers/AdministradorController.php @@ -29,7 +29,8 @@ class AdministradorController extends Controller } public function naturezas(){ $naturezas = Natureza::orderBy('nome')->get(); - return view('naturezas.index')->with(['naturezas' => $naturezas]); + $funcoesParticipante = FuncaoParticipantes::orderBy('nome')->get(); + return view('naturezas.index')->with(['naturezas' => $naturezas, 'funcoes' => $funcoesParticipante]); } public function usuarios(){ $users = User::orderBy('name')->get(); diff --git a/app/Http/Controllers/ParticipanteController.php b/app/Http/Controllers/ParticipanteController.php index 3aa4525543bd876ab29f6bb7c13c8d016260b5f4..f490373cad092313e08ed878bbe1e0c4c22d027e 100644 --- a/app/Http/Controllers/ParticipanteController.php +++ b/app/Http/Controllers/ParticipanteController.php @@ -6,6 +6,7 @@ use Illuminate\Http\Request; use App\Evento; use App\Trabalho; use App\Participante; +use App\FuncaoParticipantes; use Auth; class ParticipanteController extends Controller @@ -33,4 +34,45 @@ class ParticipanteController extends Controller return view('participante.projetos')->with(['edital' => $edital, 'projetos' => $projetos]); } + + public function storeFuncao(Request $request) { + $validated = $request->validate([ + 'newFuncao' => 'required', + 'nome_da_função' => 'required', + ]); + + $funcao = new FuncaoParticipantes(); + $funcao->nome = $request->input('nome_da_função'); + + $funcao->save(); + + return redirect()->back()->with(['mensagem' => 'Função de participante cadastrada com sucesso!']); + } + + public function updateFuncao(Request $request, $id) { + $validated = $request->validate([ + 'editFuncao' => 'required', + 'nome_da_função'.$id => 'required', + ]); + + $funcao = FuncaoParticipantes::find($id); + if ($funcao->participantes->count() > 0) { + return redirect()->back()->with(['error' => 'Essa função não pode ser editada pois participantes estão vinculados a ela!']); + } + + $funcao->nome = $request->input('nome_da_função'.$id); + $funcao->update(); + + return redirect()->back()->with(['mensagem' => 'Função de participante salva com sucesso!']); + } + + public function destroyFuncao($id) { + $funcao = FuncaoParticipantes::find($id); + if ($funcao->participantes->count() > 0) { + return redirect()->back()->with(['error' => 'Essa função não pode ser excluída pois participantes estão vinculados a ela!']); + } + + $funcao->delete(); + return redirect()->back()->with(['mensagem' => 'Função de participante deletada com sucesso!']); + } } diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index af9f879add6bc43c924a87317e31a4159e208ea7..b0d4e0afce9360bc5b8f26d13b013cba9e72b137 100644 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -104,7 +104,7 @@ class TrabalhoController extends Controller } //--Salvando os dados da submissão temporariamente - $trabalho = $this->armazenarInfoTemp($request, $proponente); + // $trabalho = $this->armazenarInfoTemp($request, $proponente); //O anexo de Decisão do CONSU dependo do tipo de edital if( $evento->tipo == 'PIBIC' || $evento->tipo == 'PIBIC-EM'){ @@ -134,9 +134,9 @@ class TrabalhoController extends Controller 'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'], ]); - if(gettype($this->validarAnexosRascunho($request, $trabalho)) != 'integer'){ - return $this->validarAnexosRascunho($request, $trabalho); - } + // if(gettype($this->validarAnexosRascunho($request, $trabalho)) != 'integer'){ + // return $this->validarAnexosRascunho($request, $trabalho); + // } //$trabalho = Trabalho::create([ $trabalho['titulo'] = $request->nomeProjeto; @@ -181,9 +181,9 @@ class TrabalhoController extends Controller 'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'], ]); - if(gettype($this->validarAnexosRascunho($request, $trabalho)) != 'integer'){ - return $this->validarAnexosRascunho($request, $trabalho); - } + // if(gettype($this->validarAnexosRascunho($request, $trabalho)) != 'integer'){ + // return $this->validarAnexosRascunho($request, $trabalho); + // } //$trabalho = Trabalho::create([ $trabalho['titulo'] = $request->nomeProjeto; $trabalho['coordenador_id'] = $coordenador->id; diff --git a/database/seeds/AvaliadorSeeder.php b/database/seeds/AvaliadorSeeder.php index e2d072b62d34eae858d5e5baf29aae57e11efeef..a5c48b9d712b573ef81b2d12f6d0a10eaa8a1220 100644 --- a/database/seeds/AvaliadorSeeder.php +++ b/database/seeds/AvaliadorSeeder.php @@ -47,7 +47,7 @@ class AvaliadorSeeder extends Seeder // $aval->eventos()->attach($evento); // $aval->save(); - // $user_id = DB::table('users')->where('name','Avaliador3')->pluck('id'); + $user_id = DB::table('users')->where('name','Avaliador3')->pluck('id'); DB::table('avaliadors')->insert([ 'user_id' => $user_id[0], diff --git a/public/css/layout.css b/public/css/layout.css index 1713c94cca8bf116ae2f4721c42b8142ec63615f..79a2b6a558ca27ad468a10ab023d77c469428ce7 100644 --- a/public/css/layout.css +++ b/public/css/layout.css @@ -199,6 +199,7 @@ body{ background-color: rgb(0, 140, 255); margin-top: 8px; margin-bottom: 8px; + border-radius: 3px; } .li-editais { @@ -216,7 +217,8 @@ body{ .flexcroll{ width:500px; height:400px; - overflow:scroll; + overflow-y:inherit; + overflow-x:hidden; } .flexcroll{ @@ -237,14 +239,14 @@ body{ /* Track */ .flexcroll::-webkit-scrollbar-track { box-shadow: inset 0 0 6px rgba(0,0,0,0.3); - -webkit-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 5px; + border-radius: 5px; } /* Handle */ .flexcroll::-webkit-scrollbar-thumb { - -webkit-border-radius: 10px; - border-radius: 10px; + -webkit-border-radius: 5px; + border-radius: 5px; background: rgb(0, 140, 255); box-shadow: currentColor 0 0 6px rgba(0,0,0,0.5); } @@ -286,3 +288,176 @@ section { position: relative; margin: 10px; } + +.card-menu { + color: rgb(0, 140, 255); + border-radius: 15px; + width: 14rem; + height: 16rem; + border-color: rgb(0, 140, 255); +} + +.titulo-menu { + color: rgb(0, 140, 255);; + margin-top: 50px; + margin-bottom: 50px; +} + +.titulo-card-menu { + margin-bottom: 10px; +} + +.info-card { + margin-top: 45px; +} + +.quant-titulo-card { + font-size: 60px; +} + +.btn-info { + border-radius: 5px; + background-color: rgb(55, 187, 55); + color: white; + font-weight: bolder; + border-color: rgb(55, 187, 55); +} + +.btn-info:hover { + border-radius: 5px; + background-color: rgb(172, 172, 172); + color: black; + font-weight: bolder; + border-color: rgb(172, 172, 172); +} + +.btn-primary { + border-radius: 5px; + font-weight: bolder; +} + +.btn-secondary { + border-radius: 5px; + font-weight: bolder; +} + +.btn-danger { + border-radius: 5px; + font-weight: bolder; +} + +.btn-success { + border-radius: 5px; + font-weight: bolder; +} + +.dropdown-item { + color: rgb(0, 140, 255); +} + +.dropdown-item:hover { + color: rgb(0, 140, 255); +} + +.dropdown-item-delete { + background-color: red; + width: 155px; + border-radius: 5px; + margin-left: 10px; + margin-right: 10px; + color: white; +} + +.dropdown-item-delete:hover { + background-color: rgb(207, 0, 0); + color: white; +} + +.dropdown-options a:hover { + text-decoration: none; +} + +.dropdown-hr { + margin-top: 0px; + margin-bottom: 0px; + width: 80%; +} + +.titulo-table { + color: rgb(0, 140, 255); +} + +.table th { + color: rgb(0, 140, 255); +} + +.form-control-edit { + border-top: none; + border-left: none; + border-right: none; + border-radius: 0px; + border-color: rgb(0, 140, 255); +} + +.form-control-edit:focus { + border-color: none; + box-shadow: none; + border-top: none; + border-left: none; + border-right: none; + border-radius: 0px; +} + +.form-control-edit:hover { + border-color: none; + box-shadow: none; + border-top: none; + border-left: none; + border-right: none; + border-radius: 0px; + border-color: rgb(0, 140, 255); +} + +.modal-header-submeta { + border-bottom: 1px solid rgb(0, 140, 255); + padding-bottom: 5px; + margin-left: 20px; + margin-right: 20px; +} + +.labels-blue label { + color: rgb(0, 140, 255); + font-weight: 500; +} + +.modal-submeta { + border-radius: 20px; + border-color: rgba(204, 204, 204, 0.555); +} + +.texto-info { + color: rgba(102, 102, 102, 0.555); + text-align: justify; + font-size: 12px; + padding-top: 0px; + margin-bottom: 40px; + border-top: 1px solid rgba(102, 102, 102, 0.555) ; +} + + +button.close { + padding: 0; + font-size: 35px; + background-color: transparent; + border: none; + -webkit-appearance: none; +} + +.close:hover, .close:focus { + color: none; + text-decoration: none; + text-shadow: none; + box-shadow: none; + border: none; +} + diff --git a/resources/views/administrador/atribuirAvaliadores.blade.php b/resources/views/administrador/atribuirAvaliadores.blade.php index 9694771388c54c5d9262d697376ce836d7fba254..778fe370f3034dcab59070df219b3a953ac0b10a 100644 --- a/resources/views/administrador/atribuirAvaliadores.blade.php +++ b/resources/views/administrador/atribuirAvaliadores.blade.php @@ -4,37 +4,69 @@