Commit d5d47167 authored by alinetenorio's avatar alinetenorio
Browse files

titulo e anexo do plano de trabalho

parent 0f2ddd9b
...@@ -277,10 +277,8 @@ class TrabalhoController extends Controller ...@@ -277,10 +277,8 @@ class TrabalhoController extends Controller
{ {
// //
$projeto = Trabalho::find($id); $projeto = Trabalho::find($id);
$edital = Evento::find($projeto->evento_id); $edital = Evento::find($projeto->evento_id);
//dd($projeto); $grandeArea = GrandeArea::where('id', $projeto->grande_area_id)->select('nome')->first();
$grandeArea = GrandeArea::where('id', $projeto->grande_area_id)->select('nome')->first();
//dd($grandeArea->nome);
$area = Area::where('id', $projeto->area_id)->select('nome')->first(); $area = Area::where('id', $projeto->area_id)->select('nome')->first();
$subarea = Subarea::where('id', $projeto->sub_area_id)->select('nome')->first(); $subarea = Subarea::where('id', $projeto->sub_area_id)->select('nome')->first();
$proponente = Proponente::find($projeto->proponente_id); $proponente = Proponente::find($projeto->proponente_id);
...@@ -289,7 +287,6 @@ class TrabalhoController extends Controller ...@@ -289,7 +287,6 @@ class TrabalhoController extends Controller
$participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get(); $participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get();
$users = User::whereIn('id', $participantesUsersIds)->get(); $users = User::whereIn('id', $participantesUsersIds)->get();
$arquivos = Arquivo::where('trabalhoId', $id)->get(); $arquivos = Arquivo::where('trabalhoId', $id)->get();
return view('projeto.visualizar')->with(['projeto' => $projeto, return view('projeto.visualizar')->with(['projeto' => $projeto,
'grandeArea' => $grandeArea, 'grandeArea' => $grandeArea,
'area' => $area, 'area' => $area,
......
...@@ -255,12 +255,9 @@ ...@@ -255,12 +255,9 @@
</select> </select>
</div> </div>
</div> </div>
<h5>Dados do plano de trabalho</h5> <h5>Dados do plano de trabalho</h5>
@foreach ($arquivos as $arquivo) @foreach($arquivos as $arquivo)
@if($arquivo->participanteId === $participante->id) @if($arquivo->participanteId === $participante->id)
<a href="{{ route('baixar.plano', ['id' => $arquivo->id]) }}">Plano de trabalho atual</a>
@endif
@endforeach
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div id="planoTrabalho"> <div id="planoTrabalho">
...@@ -279,32 +276,31 @@ ...@@ -279,32 +276,31 @@
</div> </div>
{{-- Arquivo --}} {{-- Arquivo --}}
<div class="col-sm-7"> <div class="col-sm-7">
<label for="nomeTrabalho">Anexo</label> <label for="nomeTrabalho">Anexo</label>
<p>
<a href="{{ route('baixar.plano', ['id' => $arquivo->id]) }}">Plano de trabalho atual</a>
</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endif
@endforeach
</div> </div>
@endif @endif
@endforeach @endforeach
@endforeach @endforeach
</div> </div>
<a href="#" class="btn btn-primary" id="addCoautor" style="width:100%;margin-top:10px">Participantes +</a>
</div> </div>
</div> </div>
</p> </p>
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-6"> <div class="col-md-12">
<a href="{{route('evento.visualizar',['id'=>$edital->id])}}" class="btn btn-secondary" style="width:100%">Cancelar</a> <a href="{{route('participante.edital',['id'=>$edital->id])}}" class="btn btn-secondary" style="width:100%">Voltar</a>
</div>
<div class="col-md-6">
<button type="submit" class="btn btn-primary" style="width:100%">
{{ __('Enviar') }}
</button>
</div> </div>
</div> </div>
</div> </div>
......
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