From 14ca4d3973caa7b6ee184b17e26124b7c4711dce Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 30 Jun 2022 11:46:47 -0300 Subject: [PATCH] =?UTF-8?q?Adi=C3=A7=C3=A3o=20de=20campo=20obrigatorio=20C?= =?UTF-8?q?PF=20e=20RG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ParticipanteController.php | 1 + ...dd_anexo_cpf_rg_to_participantes_table.php | 32 +++++++++++++++ .../documentacaoComplementar/listar.blade.php | 39 ++++++++++++++----- 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 database/migrations/2022_06_30_110525_add_anexo_cpf_rg_to_participantes_table.php diff --git a/app/Http/Controllers/ParticipanteController.php b/app/Http/Controllers/ParticipanteController.php index 2830e5c..cf6d7db 100755 --- a/app/Http/Controllers/ParticipanteController.php +++ b/app/Http/Controllers/ParticipanteController.php @@ -112,6 +112,7 @@ class ParticipanteController extends Controller $editalTipo = $request->eventoTipo; $participante->anexoTermoCompromisso = Storage::putFileAs($pasta, $request->termoCompromisso, "Termo_de_Compromisso.pdf"); $participante->anexoComprovanteMatricula = Storage::putFileAs($pasta, $request->comprovanteMatricula, "Comprovante_de_Matricula.pdf"); + $participante->anexo_cpf_rg = Storage::putFileAs($pasta, $request->anexo_cpf_rg, "Anexo_CPF_RG." . $request->file('anexo_cpf_rg')->getClientOriginalExtension()); if($request->eventoTipo != "PIBEX"){ $participante->anexoLattes = Storage::putFileAs($pasta, $request->pdfLattes, "Curriculo_Lattes.pdf"); diff --git a/database/migrations/2022_06_30_110525_add_anexo_cpf_rg_to_participantes_table.php b/database/migrations/2022_06_30_110525_add_anexo_cpf_rg_to_participantes_table.php new file mode 100644 index 0000000..266897e --- /dev/null +++ b/database/migrations/2022_06_30_110525_add_anexo_cpf_rg_to_participantes_table.php @@ -0,0 +1,32 @@ +string('anexo_cpf_rg')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('participantes', function (Blueprint $table) { + $table->dropColumn('anexo_cpf_rg'); + }); + } +} diff --git a/resources/views/documentacaoComplementar/listar.blade.php b/resources/views/documentacaoComplementar/listar.blade.php index 0a7e049..9b7d762 100644 --- a/resources/views/documentacaoComplementar/listar.blade.php +++ b/resources/views/documentacaoComplementar/listar.blade.php @@ -61,7 +61,7 @@
-
-
+ +
+ + +
+ status!="aprovado")disabled="disabled" @endif type="file" class="input-group-text" value="" name="anexo_cpf_rg" accept=".pdf" id="anexo_cpf_rg{{$participante->id}}" required" + /> + @error('anexo_cpf_rg') + + {{ $message }} + + @enderror +
+
+ @if($trabalho->evento->tipo != "PIBEX") -
-