diff --git a/README.md b/README.md index c744fec32c5322f3145072d85c73a1e3cf32da9a..e2825d54887341c04c29755166044777fc625e34 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# EventosCientificos_ModuloTrabalhos + diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index af5fc23354062251f2cfde62cf76215a94bdbb3d..af9f879add6bc43c924a87317e31a4159e208ea7 100644 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -33,6 +33,7 @@ use App\Mail\SubmissaoTrabalho; use App\Mail\EventoCriado; use Illuminate\Support\Facades\Validator; use Illuminate\Validation\Rule; +use App\OutrasInfoParticipante; class TrabalhoController extends Controller { @@ -45,7 +46,7 @@ class TrabalhoController extends Controller { $edital = Evento::find($id); $grandeAreas = GrandeArea::orderBy('nome')->get(); - $funcaoParticipantes = FuncaoParticipantes::all(); + $funcaoParticipantes = FuncaoParticipantes::orderBy('nome')->get(); $proponente = Proponente::where('user_id', Auth::user()->id)->first(); if($proponente == null){ @@ -61,7 +62,8 @@ class TrabalhoController extends Controller 'edital' => $edital, 'grandeAreas' => $grandeAreas, 'funcaoParticipantes'=> $funcaoParticipantes, - 'rascunho' => $rascunho + 'rascunho' => $rascunho, + 'enum_turno' => OutrasInfoParticipante::ENUM_TURNO ]); } @@ -82,7 +84,7 @@ class TrabalhoController extends Controller * @return \Illuminate\Http\Response */ public function store(Request $request){ - // dd($request->all()); + dd($request); $mytime = Carbon::now('America/Recife'); $mytime = $mytime->toDateString(); $evento = Evento::find($request->editalId); @@ -128,10 +130,10 @@ class TrabalhoController extends Controller 'anexoComiteEtica' => [($request->anexoComitePreenchido!=='sim'&&$request->anexoJustificativaPreenchido!=='sim'?'required_without:justificativaAutorizacaoEtica':''), 'file', 'mimes:pdf', 'max:2048'], 'justificativaAutorizacaoEtica' => [($request->anexoJustificativaPreenchido!=='sim'&&$request->anexoComitePreenchido!=='sim'?'required_without:anexoComiteEtica':''), 'file', 'mimes:pdf', 'max:2048'], 'anexoLattesCoordenador' => [($request->anexoLattesPreenchido!=='sim'?'required': ''), 'file', 'mimes:pdf', 'max:2048'], - 'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls,xlsx', 'max:2048'], + 'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:xls,xlsx,ods', 'max:2048'], 'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'], ]); - + if(gettype($this->validarAnexosRascunho($request, $trabalho)) != 'integer'){ return $this->validarAnexosRascunho($request, $trabalho); } @@ -175,7 +177,7 @@ class TrabalhoController extends Controller 'nomePlanoTrabalho.*' => ['nullable', 'string'], 'anexoProjeto' => [($request->anexoProjetoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'anexoLattesCoordenador' => [($request->anexoLattesPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], - 'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf,xls,xlsx', 'max:2048'], + 'anexoPlanilha' => [($request->anexoPlanilhaPreenchido!=='sim'?'required':''), 'file', 'mimes:xls,xlsx,ods', 'max:2048'], 'anexoPlanoTrabalho.*' => ['nullable', 'file', 'mimes:pdf', 'max:2048'], ]); diff --git a/app/OutrasInfoParticipante.php b/app/OutrasInfoParticipante.php new file mode 100644 index 0000000000000000000000000000000000000000..49f3ab3c18e05eda6fb2c069ad2462ac70ecce11 --- /dev/null +++ b/app/OutrasInfoParticipante.php @@ -0,0 +1,11 @@ +bigIncrements('id'); + $table->string("rg"); + $table->date("data_de_nascimento"); + $table->string("curso"); + $table->enum("turno", OutrasInfoParticipante::ENUM_TURNO)->nullable(true); + $table->integer("ordem_prioridade")->nullable(true); + $table->string("periodo_atual")->nullable(true); + $table->string("total_periodos")->nullable(true); + $table->double("media_do_curso", 3, 2)->nullable(true); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('outras_info_participantes'); + } +} diff --git a/database/migrations/2021_05_05_163601_add_column_participante.php b/database/migrations/2021_05_05_163601_add_column_participante.php new file mode 100644 index 0000000000000000000000000000000000000000..b61675bbb317508b895d4d87999e035a09bbd503 --- /dev/null +++ b/database/migrations/2021_05_05_163601_add_column_participante.php @@ -0,0 +1,31 @@ +unsignedBigInteger('outras_info_participante_id')->nullable(true); + $table->foreign('outras_info_participante_id')->references('id')->on('outras_info_participantes'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} diff --git a/database/seeds/FuncaoParticipanteSeeder.php b/database/seeds/FuncaoParticipanteSeeder.php index 9fd486b63f53f4256c83e18eee4c28eb16a216b2..319e5bc112f5cb5268a24a5176a5a29a357e43dc 100644 --- a/database/seeds/FuncaoParticipanteSeeder.php +++ b/database/seeds/FuncaoParticipanteSeeder.php @@ -34,6 +34,11 @@ class FuncaoParticipanteSeeder extends Seeder DB::table('funcao_participantes')->insert([ 'nome'=>'Voluntário', + ]); + + DB::table('funcao_participantes')->insert([ + 'nome'=>'Pesquisador', + ]); } } diff --git a/resources/views/evento/submeterTrabalho.blade.php b/resources/views/evento/submeterTrabalho.blade.php index b90d50e573473b353b57a2838c06fbc5250fc211..3ff70ff76ad630ceb48b21e3eee44398bfde6370 100644 --- a/resources/views/evento/submeterTrabalho.blade.php +++ b/resources/views/evento/submeterTrabalho.blade.php @@ -89,13 +89,13 @@
-

Coordenador

+

Proponente

{{-- Coordenador --}}
- +
@@ -169,7 +169,7 @@
- + @if(old('anexoLattesPreenchido') != null || (isset($rascunho) && $rascunho->anexoLattesCoordenador != "")) Arquivo atual @@ -236,7 +236,7 @@
- +
@error('anexoPlanilha') @@ -252,7 +252,7 @@
- + @if(old('anexoJustificativaPreenchido') != null || (isset($rascunho) && $rascunho->justificativaAutorizacaoEtica != "" && $rascunho->justificativaAutorizacaoEtica != null)) Arquivo atual @@ -323,10 +323,11 @@

Dados do participante

+
Dados pessoais
- + @error('nomeParticipante.'.$i) {{ $message }} @@ -335,7 +336,7 @@
- + @error('emailParticipante.'.$i) {{ $message }} @@ -344,7 +345,7 @@
- @foreach($funcaoParticipantes as $funcaoParticipante) @@ -357,6 +358,170 @@ @enderror
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
Endereço do participante
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
+
+
Dados do curso do participante
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+
Possui plano de trabalho?
@@ -395,20 +560,14 @@ @enderror
-
- {{-- - - --}} -
- @if($i != 0) - Remover participante - @endif + + {{-- @@ -418,7 +577,7 @@ @endif - Adicionar participante + @@ -453,14 +612,30 @@ @endsection