diff --git a/app/Http/Controllers/TrabalhoController.php b/app/Http/Controllers/TrabalhoController.php index e44cf684789acbbeb09b0f06e8b7ff055f7f8db5..ed8bc043852beadc0c935ce4d58fd9f65c78ee21 100755 --- a/app/Http/Controllers/TrabalhoController.php +++ b/app/Http/Controllers/TrabalhoController.php @@ -178,7 +178,7 @@ class TrabalhoController extends Controller $trabalho->status = 'Rascunho'; $stringKeys = ['titulo','linkGrupoPesquisa', 'linkLattesEstudante','pontuacaoPlanilha','anexoProjeto', - 'anexoPlanilhaPontuacao', 'anexoLattesCoordenador']; + 'anexoPlanilhaPontuacao', 'anexoLattesCoordenador', 'conflitosInteresse']; $intKeys = ['grande_area_id','area_id','sub_area_id','coordenador_id']; $trabalho->fill( @@ -205,6 +205,9 @@ class TrabalhoController extends Controller if(!(is_null($request->linkGrupo))){ $trabalho->linkGrupoPesquisa = $request->linkGrupo; } + if(!(is_null($request->conflitosInteresse))){ + $trabalho->conflitosInteresse = $request->conflitosInteresse; + } //Anexos do projeto @@ -1218,6 +1221,7 @@ class TrabalhoController extends Controller $projeto->evento_id = $request->editalId; $projeto->status = 'submetido'; $projeto->proponente_id = $proponente->id; + $projeto->conflitosInteresse = $request->conflitosInteresse; // Salvando anexos no storage $projeto->save(); diff --git a/app/Trabalho.php b/app/Trabalho.php index cc199d4d83a1fc14187dda928622d7f3cfe07336..174d9c1cf5a756b79e2e642ec8ab7220e6d4b391 100755 --- a/app/Trabalho.php +++ b/app/Trabalho.php @@ -21,6 +21,7 @@ class Trabalho extends Model 'linkLattesEstudante', 'comentario', 'modalidade', + 'conflitosInteresse', 'anexoDecisaoCONSU', 'anexoAutorizacaoComiteEtica', diff --git a/database/migrations/2022_11_08_162425_add_conflitos_interesse_to_trabalhos_table.php b/database/migrations/2022_11_08_162425_add_conflitos_interesse_to_trabalhos_table.php new file mode 100644 index 0000000000000000000000000000000000000000..69d21a1feb2608d73a5412e49003a8d169fe2d8a --- /dev/null +++ b/database/migrations/2022_11_08_162425_add_conflitos_interesse_to_trabalhos_table.php @@ -0,0 +1,32 @@ +text('conflitosInteresse')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('trabalhos', function (Blueprint $table) { + $table->dropColumn('conflitosInteresse'); + }); + } +} diff --git a/resources/views/administrador/analisarProposta.blade.php b/resources/views/administrador/analisarProposta.blade.php index d99487ece1f83954be6871adf850b266e949cc13..0ef9a1d29d9dc47b4bb6fe8c703435a7626ccbbd 100644 --- a/resources/views/administrador/analisarProposta.blade.php +++ b/resources/views/administrador/analisarProposta.blade.php @@ -140,6 +140,13 @@ {{$trabalho->modalidade}} @endif + @if ($trabalho->conflitosInteresse != null) +
+
+ Conflitos de Interesse: + {{ $trabalho->conflitosInteresse }} +
+ @endif diff --git a/resources/views/evento/formulario/proponente.blade.php b/resources/views/evento/formulario/proponente.blade.php index d0ce5ecd9cd223fa4201160e10db1451093b7819..676f4b71300719b3b27e4cd9fb250e6042a264d1 100755 --- a/resources/views/evento/formulario/proponente.blade.php +++ b/resources/views/evento/formulario/proponente.blade.php @@ -85,9 +85,21 @@ @endif - - - +
+
+ +
+
+
+ + @error('conflitosInteresse') + + {{ $message }} + + @enderror +
diff --git a/resources/views/projeto/editaFormulario/proponente.blade.php b/resources/views/projeto/editaFormulario/proponente.blade.php index b34e14a5b1541b8636f76a1a28ae46a087e1e73f..afc2ebe2d8d75852f9f549c14216b62768b243cb 100755 --- a/resources/views/projeto/editaFormulario/proponente.blade.php +++ b/resources/views/projeto/editaFormulario/proponente.blade.php @@ -96,9 +96,21 @@ @endif - - - +
+
+ +
+
+
+ + @error('conflitosInteresse') + + {{ $message }} + + @enderror +
diff --git a/resources/views/projeto/formularioVisualizar/proponente.blade.php b/resources/views/projeto/formularioVisualizar/proponente.blade.php index 98dcb60074d5695a0ed06b89564f8b1604dfc31c..084090a5e15da53e34adb56da2bf582c4f559f1b 100755 --- a/resources/views/projeto/formularioVisualizar/proponente.blade.php +++ b/resources/views/projeto/formularioVisualizar/proponente.blade.php @@ -49,6 +49,17 @@ @enderror + + @if ($projeto->conflitosInteresse != null && + (Auth::user()->tipo == 'administrador' || + Auth::user()->tipo == 'administradorResponsavel' || + Auth::user()->tipo == 'coordenador')) +
+ + +
+ @endif diff --git a/resources/views/projeto/formularioVisualizar/proponente2.blade.php b/resources/views/projeto/formularioVisualizar/proponente2.blade.php index 60ea1d2f188262a9e012a6bf909366523e68c866..678eac0b66668e1d82eb72f1c12fb8690d37b75d 100644 --- a/resources/views/projeto/formularioVisualizar/proponente2.blade.php +++ b/resources/views/projeto/formularioVisualizar/proponente2.blade.php @@ -76,6 +76,18 @@ @endif + @if ($projeto->conflitosInteresse != null && + (Auth::user()->tipo == 'administrador' || + Auth::user()->tipo == 'administradorResponsavel' || + Auth::user()->tipo == 'coordenador' || + Auth::user()->id == $projeto->proponente->user->id)) +
+
+ Conflitos de Interesse: + {{ $projeto->conflitosInteresse }} +
+ @endif +