Commit ab2542c7 authored by unknown's avatar unknown
Browse files

Adição de novo anexo (Carta de Anuencia) para projetos do tipo PIBITI

parent cf0abe0e
...@@ -409,6 +409,11 @@ class TrabalhoController extends Controller ...@@ -409,6 +409,11 @@ class TrabalhoController extends Controller
$trabalho->anexo_acao_afirmativa = Storage::putFileAs($pasta, $request->anexo_acao_afirmativa, "Anexo_Acao_Afirmativa." . $request->file('anexo_acao_afirmativa')->extension()); $trabalho->anexo_acao_afirmativa = Storage::putFileAs($pasta, $request->anexo_acao_afirmativa, "Anexo_Acao_Afirmativa." . $request->file('anexo_acao_afirmativa')->extension());
} }
//Anexo Carta de Anuência
if (isset($request->anexo_carta_anuencia)) {
$trabalho->anexo_carta_anuencia = Storage::putFileAs($pasta, $request->anexo_carta_anuencia, "anexo_carta_anuencia." . $request->file('anexo_carta_anuencia')->extension());
}
return $trabalho; return $trabalho;
} }
...@@ -792,6 +797,16 @@ class TrabalhoController extends Controller ...@@ -792,6 +797,16 @@ class TrabalhoController extends Controller
return abort(404); return abort(404);
} }
public function baixarCartaAnuencia($id)
{
$projeto = Trabalho::find($id);
if (Storage::disk()->exists($projeto->anexo_carta_anuencia)) {
ob_end_clean();
return Storage::download($projeto->anexo_carta_anuencia);
}
return abort(404);
}
public function baixarAnexoGrupoPesquisa($id) public function baixarAnexoGrupoPesquisa($id)
{ {
$projeto = Trabalho::find($id); $projeto = Trabalho::find($id);
...@@ -1350,7 +1365,7 @@ class TrabalhoController extends Controller ...@@ -1350,7 +1365,7 @@ class TrabalhoController extends Controller
->create($request->except([ ->create($request->except([
'anexoProjeto', 'anexoDecisaoCONSU', 'anexoPlanilhaPontuacao', 'anexoProjeto', 'anexoDecisaoCONSU', 'anexoPlanilhaPontuacao',
'anexoLattesCoordenador', 'anexoGrupoPesquisa', 'anexoAutorizacaoComiteEtica', 'anexoLattesCoordenador', 'anexoGrupoPesquisa', 'anexoAutorizacaoComiteEtica',
'justificativaAutorizacaoEtica','modalidade','anexo_docExtra', 'anexo_SIPAC', 'anexo_acao_afirmativa' 'justificativaAutorizacaoEtica','modalidade','anexo_docExtra', 'anexo_SIPAC', 'anexo_acao_afirmativa', 'anexo_carta_anuencia'
])); ]));
} }
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCartaAnuenciaToTrabalhosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('trabalhos', function (Blueprint $table) {
$table->string('anexo_carta_anuencia')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('trabalhos', function (Blueprint $table) {
$table->dropColumn('anexo_carta_anuencia');
});
}
}
...@@ -538,6 +538,12 @@ ...@@ -538,6 +538,12 @@
<a href="{{ route('baixar.anexo.acao.afirmativa', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a> <a href="{{ route('baixar.anexo.acao.afirmativa', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div> </div>
@endif @endif
@if($evento->tipo == 'PIBITI' && $evento->natureza_id == 2)
<div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexo_carta_anuencia" class="col-form-label font-tam" style="font-weight: bold">{{ __('Carta de Anuência: ') }}</label>
<a href="{{ route('baixar.anexo.carta.anuencia', ['id' => $trabalho->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div>
@endif
@if($evento->nome_docExtra != null) @if($evento->nome_docExtra != null)
{{-- Documento Extra --}} {{-- Documento Extra --}}
<div class="col-sm-4"> <div class="col-sm-4">
......
...@@ -148,7 +148,8 @@ ...@@ -148,7 +148,8 @@
<a href="https://forms.gle/cAND8Z3z1yVr9u6a6" target="_blank" style="margin: 0px;">(endereço eletrônico de acesso)</a> <a href="https://forms.gle/cAND8Z3z1yVr9u6a6" target="_blank" style="margin: 0px;">(endereço eletrônico de acesso)</a>
</div> </div>
@endif
@if($edital->tipo == "PIBIC" && $edital->natureza_id == 2)
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold">{{ __('Possui estudante(s) de ações afirmativas?') }} </label> <label for="botao" class="col-form-label font-tam @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="font-weight: bold">{{ __('Possui estudante(s) de ações afirmativas?') }} </label>
...@@ -170,6 +171,17 @@ ...@@ -170,6 +171,17 @@
</div> </div>
</div> </div>
@endif @endif
@if($edital->tipo == "PIBITI" && $edital->natureza_id == 2)
<div class="form-group col-md-6">
<label title="Carta de Anuência" for="anexo_carta_anuencia" class="col-form-label font-tam" style="font-weight: bold">{{ __('Carta de Anuência: ') }}</label>
<input type="file" class="input-group-text" name="anexo_carta_anuencia" accept=".pdf" />
@error('anexo_carta_anuencia')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label> <label title="{{$edital->nome_docExtra}}" for="anexo_docExtra" class="col-form-label font-tam" style="font-weight: bold">{{$edital->nome_docExtra}}: @if($edital->obrigatoriedade_docExtra == true) <span style="color: red; font-weight:bold">*</span> @endif</label>
......
...@@ -76,6 +76,13 @@ ...@@ -76,6 +76,13 @@
</div> </div>
@endif @endif
@if($edital->tipo == 'PIBITI' && $edital->natureza_id == 2)
<div class="col-sm-4">
<label title="Decisão da Câmara ou Conselho Pertinente" for="anexo_carta_anuencia" class="col-form-label font-tam" style="font-weight: bold">{{ __('Carta de Anuência: ') }}</label>
<a href="{{ route('baixar.anexo.carta.anuencia', ['id' => $projeto->id]) }}"><img class="" src="{{asset('img/icons/pdf.ico')}}" style="width:40px" alt=""></a>
</div>
@endif
@if($edital->nome_docExtra != null) @if($edital->nome_docExtra != null)
{{-- Documento Extra --}} {{-- Documento Extra --}}
<div class="col-sm-4"> <div class="col-sm-4">
......
...@@ -214,6 +214,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () { ...@@ -214,6 +214,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function () {
Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto'); Route::get('/baixar/anexo-projeto/{id}', 'TrabalhoController@baixarAnexoProjeto')->name('baixar.anexo.projeto');
Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu'); Route::get('/baixar/anexo-consu/{id}', 'TrabalhoController@baixarAnexoConsu')->name('baixar.anexo.consu');
Route::get('/baixar/anexo-acao-afirmativa/{id}', 'TrabalhoController@baixarAcaoAfirmativa')->name('baixar.anexo.acao.afirmativa'); Route::get('/baixar/anexo-acao-afirmativa/{id}', 'TrabalhoController@baixarAcaoAfirmativa')->name('baixar.anexo.acao.afirmativa');
Route::get('/baixar/anexo-carta-anuencia/{id}', 'TrabalhoController@baixarCartaAnuencia')->name('baixar.anexo.carta.anuencia');
Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite'); Route::get('/baixar/anexo-comite/{id}', 'TrabalhoController@baixarAnexoComite')->name('baixar.anexo.comite');
Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa'); Route::get('/baixar/anexo-justificativa/{id}', 'TrabalhoController@baixarAnexoJustificativa')->name('baixar.anexo.justificativa');
Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes'); Route::get('/baixar/anexo-lattes/{id}', 'TrabalhoController@baixarAnexoLattes')->name('baixar.anexo.lattes');
......
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