Commit 1333df16 authored by carlos's avatar carlos
Browse files

projetos de um proponente

parent 9fedf7dc
......@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Rule;
use Auth;
use App\User;
use App\Trabalho;
use App\Proponente;
use App\Evento;
......@@ -77,4 +78,12 @@ class ProponenteController extends Controller
}
public function projetosDoProponente() {
$proponente = Proponente::where('user_id', Auth()->user()->id)->first();
$projetos = Trabalho::where('proponente_id', $proponente->id)->get();
return view('proponente.projetos')->with(['projetos' => $projetos]);
}
}
......@@ -148,7 +148,7 @@
<tr>
<th>Título</th>
<th style="text-align:center">Baixar</th>
<th style="text-align:center">Nova Versão</th>
{{-- <th style="text-align:center">Nova Versão</th> --}}
</tr>
</thead>
<tbody>
......@@ -164,11 +164,11 @@
}
@endphp
@endforeach
<a href="{{route('download', ['file' => $arquivo])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<a href="{{route('baixar.anexo.projeto', ['id' => $trabalho->id])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a>
</td>
<td style="text-align:center">
{{-- <td style="text-align:center">
@if($evento->inicioSubmissao <= $mytime)
@if($mytime < $evento->fimSubmissao)
<a href="#" onclick="changeTrabalho({{$trabalho->id}})" data-toggle="modal" data-target="#modalTrabalho" style="color:#114048ff">
......@@ -176,7 +176,7 @@
</a>
@endif
@endif
</td>
</td> --}}
</tr>
@endforeach
</tbody>
......
......@@ -19,7 +19,7 @@
</div>
<div class="col-sm-3 d-flex justify-content-center">
<a href="#" style="text-decoration:none; color: inherit;">
<a href="{{ route('proponente.projetos') }}" style="text-decoration:none; color: inherit;">
<div class="card text-center " style="border-radius: 30px; width: 13rem;height: 15rem;">
<div class="card-body d-flex justify-content-center">
<h2 style="padding-top:15px">Projetos</h2>
......
@extends('layouts.app')
@section('content')
<div class="container" style="margin-top: 100px;">
<div class="container" >
<div class="row" >
<div class="col-sm-12">
<h3>Projetos submetidos</h3>
</div>
</div>
</div>
<hr>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do projeto</th>
<th scope="col">Status</th>
<th scope="col">Data de Criação</th>
<th scope="col">Opção</th>
</tr>
</thead>
<tbody>
@foreach ($projetos as $projeto)
<tr>
<td>
{{ $projeto->titulo }}
</td>
@if($projeto->status == 'Avaliado')
<td style="color: rgb(6, 85, 6)">Avaliado</td>
@elseif($projeto->status == 'Submetido')
<td style="color: rgb(0, 0, 0)">Submetido</td>
@endif
<td>{{ date('d-m-Y', strtotime($projeto->updated_at)) }}</td>
<td>
<div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
</a>
<div class="dropdown-menu">
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar projeto
</a>
<a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Visualizar projeto
</a>
<a href="" class="dropdown-item" style="text-align: center">
Recorrer
</a>
<a href="" class="dropdown-item" style="text-align: center">
Resultado
</a>
@if($projeto->status == 'Submetido')
<a href="{{ route('trabalho.destroy', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Excluir projeto
</a>
@endif
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endsection
@section('javascript')
<script>
</script>
@endsection
\ No newline at end of file
......@@ -99,8 +99,9 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route::get( '/projeto/{id}/visualizar', 'TrabalhoController@show' )->name('trabalho.show');
Route::get( '/projeto/{id}/editar', 'TrabalhoController@edit' )->name('trabalho.editar');
Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@update' )->name('trabalho.update');
Route::get( '/projeto/{id}/excluir', 'TrabalhoController@destroy' )->name('trabalho.destroy');
Route::get( '/projeto/{id}/excluirParticipante', 'TrabalhoController@excluirParticipante')->name('trabalho.excluirParticipante');
Route::get( '/projeto/{id}/excluir', 'TrabalhoController@destroy' )->name('trabalho.destroy');
Route::get( '/projeto/{id}/excluirParticipante','TrabalhoController@excluirParticipante')->name('trabalho.excluirParticipante');
Route::get( '/projetos-submetidos', 'ProponenteController@projetosDoProponente' )->name('proponente.projetos');
//######### Atribuição #######################################
Route::get( '/atribuir', 'AtribuicaoController@distribuicaoAutomatica' )->name('distribuicao');
......
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