Commit 36ff9516 authored by alinetenorio's avatar alinetenorio
Browse files

resolvendo conflitos

parents 81be6383 3fd94b26
......@@ -174,8 +174,8 @@ class EventoController extends Controller
$evento->modeloDocumento = $path . $nome;
}
$evento->save();
$evento->update();
// $user = Auth::user();
// $subject = "Evento Criado";
......@@ -287,8 +287,15 @@ class EventoController extends Controller
public function edit($id)
{
// dd($id);
$evento = Evento::find($id);
return view('evento.editarEvento',['evento'=>$evento]);
$evento = Evento::find($id);
$coordenadors = CoordenadorComissao::with('user')->get();
$naturezas = Natureza::orderBy('nome')->get();
$yesterday = Carbon::yesterday('America/Recife');
$yesterday = $yesterday->toDateString();
return view('evento.editarEvento',['evento'=>$evento,
'coordenadores'=>$coordenadors,
'naturezas'=>$naturezas,
'ontem'=>$yesterday]);
}
/**
......@@ -302,15 +309,55 @@ class EventoController extends Controller
{
//dd($request);
$evento = Evento::find($id);
$yesterday = Carbon::yesterday('America/Recife');
$yesterday = $yesterday->toDateString();
if(
$request->inicioSubmissao == null ||
$request->fimSubmissao == null ||
$request->inicioRevisao == null ||
$request->fimRevisao == null ||
$request->resultado == null
){
$validatedData = $request->validate([
'nome' => ['required', 'string'],
'descricao' => ['required', 'string'],
'tipo' => ['required', 'string'],
'natureza' => ['required'],
'inicioSubmissao' => ['required', 'date'],
'fimSubmissao' => ['required', 'date'],
'inicioRevisao' => ['required', 'date'],
'fimRevisao' => ['required', 'date'],
'resultado' => ['required', 'date'],
'pdfEdital' => ['file', 'mimes:pdf', 'max:2000000'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2000000'],
]);
}
$validated = $request->validate([
'nome' => ['required', 'string'],
'descricao' => ['required', 'string'],
'tipo' => ['required', 'string'],
'natureza' => ['required'],
'inicioSubmissao' => ['required', 'date', 'after:' . $yesterday],
'fimSubmissao' => ['required', 'date', 'after:' . $request->inicioSubmissao],
'inicioRevisao' => ['required', 'date', 'after:' . $yesterday],
'fimRevisao' => ['required', 'date', 'after:' . $request->inicioRevisao],
'resultado' => ['required', 'date', 'after:' . $yesterday],
'pdfEdital' => ['file', 'mimes:pdf', 'max:2000000'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2000000'],
]);
$evento->nome = $request->nome;
$evento->descricao = $request->descricao;
$evento->tipo = $request->tipo;
$evento->tipo = $request->tipo;
$evento->natureza_id = $request->natureza;
$evento->inicioSubmissao = $request->inicioSubmissao;
$evento->fimSubmissao = $request->fimSubmissao;
$evento->inicioRevisao = $request->inicioRevisao;
$evento->fimRevisao = $request->fimRevisao;
$evento->resultado = $request->resultado;
$evento->resultado = $request->resultado;
$evento->coordenadorId = $request->coordenador_id;
if($request->pdfEdital != null){
$pdfEdital = $request->pdfEdital;
......@@ -328,7 +375,7 @@ class EventoController extends Controller
$evento->modeloDocumento = $path . $nome;
}
$evento->save();
$evento->update();
$eventos = Evento::all();
return view('coordenador.home',['eventos'=>$eventos]);
......@@ -509,6 +556,21 @@ class EventoController extends Controller
public function baixarEdital($id) {
$evento = Evento::find($id);
return Storage::download($evento->pdfEdital);
if (Storage::disk()->exists($evento->pdfEdital)) {
return Storage::download($evento->pdfEdital);
}
return abort(404);
}
public function baixarModelos($id) {
$evento = Evento::find($id);
if (Storage::disk()->exists($evento->modeloDocumento)) {
return Storage::download($evento->modeloDocumento);
}
return abort(404);
}
}
......@@ -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]);
}
}
......@@ -369,9 +369,6 @@ class TrabalhoController extends Controller
// Anexo Projeto
if( (!isset($request->anexoProjeto) && $request->anexoProjetoPreenchido == 'sim') || isset($request->anexoProjeto)){
// dd(!isset($request->anexoProjeto)) ;
// dd($request->anexoProjetoPreenchido) ;
// dd(isset($request->anexoProjeto));
$trabalho->anexoProjeto = Storage::putFileAs($pasta, $request->anexoProjeto, 'Projeto.pdf');
}
......@@ -573,7 +570,6 @@ class TrabalhoController extends Controller
foreach ($users as $user) {
array_push($emailParticipantes, $user->email);
}
foreach ($request->emailParticipante as $key => $value) {
// criando novos participantes que podem ter sido adicionados
if (!(in_array($request->emailParticipante[$key], $emailParticipantes, false))) {
......@@ -912,7 +908,12 @@ class TrabalhoController extends Controller
public function baixarAnexoJustificativa($id) {
$projeto = Trabalho::find($id);
return Storage::download($projeto->justificativaAutorizacaoEtica);
if (Storage::disk()->exists($projeto->justificativaAutorizacaoEtica)) {
return Storage::download($projeto->justificativaAutorizacaoEtica);
}
return abort(404);
}
public function baixarAnexoTemp($eventoId, $nomeAnexo) {
......
......@@ -14,6 +14,7 @@ use App\Endereco;
use App\Trabalho;
use App\Coautor;
use App\Evento;
use Carbon\Carbon;
use Illuminate\Support\Facades\Log;
class UserController extends Controller
......@@ -27,7 +28,9 @@ class UserController extends Controller
return redirect()->route('home');
}
Log::debug('UserController index');
return view('index', ['eventos' => $eventos]);
$hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString();
return view('index', ['eventos' => $eventos, 'hoje' => $hoje]);
//return view('auth.login');
}
......
......@@ -234,16 +234,16 @@
},
{
"name": "egulias/email-validator",
"version": "2.1.17",
"version": "2.1.18",
"source": {
"type": "git",
"url": "https://github.com/egulias/EmailValidator.git",
"reference": "ade6887fd9bd74177769645ab5c474824f8a418a"
"reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a",
"reference": "ade6887fd9bd74177769645ab5c474824f8a418a",
"url": "https://api.github.com/repos/egulias/EmailValidator/zipball/cfa3d44471c7f5bfb684ac2b0da7114283d78441",
"reference": "cfa3d44471c7f5bfb684ac2b0da7114283d78441",
"shasum": ""
},
"require": {
......@@ -267,7 +267,7 @@
},
"autoload": {
"psr-4": {
"Egulias\\EmailValidator\\": "EmailValidator"
"Egulias\\EmailValidator\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
......@@ -288,7 +288,7 @@
"validation",
"validator"
],
"time": "2020-02-13T22:36:52+00:00"
"time": "2020-06-16T20:11:17+00:00"
},
{
"name": "fideloper/proxy",
......@@ -397,16 +397,16 @@
},
{
"name": "guzzlehttp/guzzle",
"version": "6.5.4",
"version": "6.5.5",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
"reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d"
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
"reference": "a4a1b6930528a8f7ee03518e6442ec7a44155d9d",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"reference": "9d4290de1cfd701f38099ef7e183b64b4b7b0c5e",
"shasum": ""
},
"require": {
......@@ -414,7 +414,7 @@
"guzzlehttp/promises": "^1.0",
"guzzlehttp/psr7": "^1.6.1",
"php": ">=5.5",
"symfony/polyfill-intl-idn": "1.17.0"
"symfony/polyfill-intl-idn": "^1.17.0"
},
"require-dev": {
"ext-curl": "*",
......@@ -460,7 +460,7 @@
"rest",
"web service"
],
"time": "2020-05-25T19:35:05+00:00"
"time": "2020-06-16T21:01:06+00:00"
},
{
"name": "guzzlehttp/promises",
......@@ -586,16 +586,16 @@
},
{
"name": "laravel/framework",
"version": "v6.18.19",
"version": "v6.18.20",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
"reference": "69321afec31f4a908112e5dc8995fc91024fd971"
"reference": "2862a9857533853bb2851bac39d65e3bfb8ba6cd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/69321afec31f4a908112e5dc8995fc91024fd971",
"reference": "69321afec31f4a908112e5dc8995fc91024fd971",
"url": "https://api.github.com/repos/laravel/framework/zipball/2862a9857533853bb2851bac39d65e3bfb8ba6cd",
"reference": "2862a9857533853bb2851bac39d65e3bfb8ba6cd",
"shasum": ""
},
"require": {
......@@ -677,6 +677,7 @@
"suggest": {
"aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
"ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
......@@ -729,7 +730,7 @@
"framework",
"laravel"
],
"time": "2020-06-09T13:59:34+00:00"
"time": "2020-06-16T13:21:33+00:00"
},
{
"name": "laravel/tinker",
......@@ -1215,16 +1216,16 @@
},
{
"name": "opis/closure",
"version": "3.5.4",
"version": "3.5.5",
"source": {
"type": "git",
"url": "https://github.com/opis/closure.git",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b"
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/opis/closure/zipball/1d0deef692f66dae5d70663caee2867d0971306b",
"reference": "1d0deef692f66dae5d70663caee2867d0971306b",
"url": "https://api.github.com/repos/opis/closure/zipball/dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"reference": "dec9fc5ecfca93f45cd6121f8e6f14457dff372c",
"shasum": ""
},
"require": {
......@@ -1272,7 +1273,7 @@
"serialization",
"serialize"
],
"time": "2020-06-07T11:41:29+00:00"
"time": "2020-06-17T14:59:55+00:00"
},
{
"name": "paragonie/random_compat",
......@@ -5407,16 +5408,16 @@
},
{
"name": "webmozart/assert",
"version": "1.8.0",
"version": "1.9.0",
"source": {
"type": "git",
"url": "https://github.com/webmozart/assert.git",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6"
"reference": "9dc4f203e36f2b486149058bade43c851dd97451"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6",
"url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451",
"reference": "9dc4f203e36f2b486149058bade43c851dd97451",
"shasum": ""
},
"require": {
......@@ -5424,6 +5425,7 @@
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"phpstan/phpstan": "<0.12.20",
"vimeo/psalm": "<3.9.1"
},
"require-dev": {
......@@ -5451,7 +5453,7 @@
"check",
"validate"
],
"time": "2020-04-18T12:12:48+00:00"
"time": "2020-06-16T10:16:42+00:00"
}
],
"aliases": [],
......
......@@ -8,8 +8,9 @@
<div class="row" >
<div class="col-sm-10">
<h3>Meus Editais</h3>
</div>
<a href="{{route('evento.criar')}}" class="btn btn-primary">Criar Edital</a>
</div>
<div class="col-sm-2">
<a href="{{route('evento.criar')}}" class="btn btn-primary" style="float: right;">Criar Edital</a>
</div>
</div>
<hr>
......@@ -37,7 +38,7 @@
<img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
</a>
<div class="dropdown-menu">
<a href="{{ route('coord.detalhesEvento', ['eventoId' => $evento->id]) }}" class="dropdown-item text-center">
<a href="{{ route('evento.editar', ['id' => $evento->id]) }}" class="dropdown-item text-center">
Editar Edital
</a>
......
......@@ -8,7 +8,7 @@
<div class="row justify-content-center d-flex align-items-center">
<div class="col-sm-3 d-flex justify-content-center ">
<a href="{{route('admin.editais')}}" style="text-decoration:none; color: inherit;">
<a href="{{ route('admin.editais') }}" 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">Editais</h2>
......
......@@ -10,7 +10,7 @@
<h3>Usuários</h3>
</div>
<div class="col-sm-2">
<a href="{{route('admin.user.create')}}" class="btn btn-primary">{{ __('Criar usuário') }}</a>
<a href="{{route('admin.user.create')}}" class="btn btn-primary" style="float: right;">{{ __('Criar usuário') }}</a>
</div>
</div>
<div class="row">
......
......@@ -75,7 +75,11 @@
</p>
<p>
<a href="{{ route('evento.visualizar',['id'=>$evento->id]) }}" class="visualizarEvento">Visualizar edital</a>
@if (Auth::check())
<a href="{{ route('evento.visualizar',['id'=> $evento->id]) }}" class="visualizarEvento">Visualizar edital</a>
@else
<a href="{{ route('evento.visualizarNaoLogado', ['id'=>$evento->id]) }}" class="visualizarEvento">Visualizar edital</a>
@endif
</p>
</div>
......
......@@ -200,7 +200,7 @@
<div class="row justify-content-center" style="margin: 20px 0 20px 0">
<div class="col-md-6" style="padding-left:0">
<a class="btn btn-secondary botao-form" href="{{route('evento.listar')}}" style="width:100%">Cancelar</a>
<a class="btn btn-secondary botao-form" href="{{ route('admin.editais') }}" style="width:100%">Cancelar</a>
</div>
<div class="col-md-6" style="padding-right:0">
<button type="submit" class="btn btn-primary botao-form" style="width:100%">
......
......@@ -15,8 +15,8 @@
</div>
{{-- nome | Tipo--}}
<div class="row justify-content-center">
<div class="col-sm-9">{{--Nome do evento--}}
<label for="nome" class="col-form-label">{{ __('Nome') }}</label>
<div class="col-sm-6">{{--Nome do evento--}}
<label for="nome" class="col-form-label">{{ __('Nome*:') }}</label>
<input value="{{$evento->nome}}" id="nome" type="text" class="form-control @error('nome') is-invalid @enderror" name="nome" value="{{ old('nome') }}" required autocomplete="nome" autofocus>
@error('nome')
......@@ -28,7 +28,7 @@
{{-- Tipo do evento --}}
<div class="col-sm-3">
<label for="tipo" class="col-form-label">{{ __('Tipo') }}</label>
<label for="tipo" class="col-form-label">{{ __('Tipo*:') }}</label>
<!-- <input value="{{$evento->tipo}}" id="tipo" type="text" class="form-control @error('tipo') is-invalid @enderror" name="tipo" value="{{ old('tipo') }}" required autocomplete="tipo" autofocus> -->
<select id="tipo" type="text" class="form-control @error('tipo') is-invalid @enderror" name="tipo" required>
<option value="PIBIC" {{ $evento->tipo == "PIBIC" ? 'selected' :'' }}>PIBIC</option>
......@@ -41,13 +41,32 @@
</span>
@enderror
</div>{{-- Tipo do evento --}}
<div class="col-sm-3">
<label for="natureza" class="col-form-label">{{ __('Natureza*:') }}</label>
<select id="natureza" type="text" class="form-control @error('natureza') is-invalid @enderror" name="natureza" value="{{ old('natureza') }}" required>
@foreach ($naturezas as $natureza)
@if ($natureza->id === $evento->natureza_id)
<option value="{{ $natureza->id }}" selected>{{ $natureza->nome }}</option>
@else
<option value="{{ $natureza->id }}">{{ $natureza->nome }}</option>
@endif
@endforeach
</select>
@error('natureza')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>{{-- end nome | Participantes | Tipo--}}
{{-- Descricao Evento --}}
<div class="row justify-content-center">
<div class="col-sm-12">
<div class="form-group">
<label for="exampleFormControlTextarea1">Descrição</label>
<label for="exampleFormControlTextarea1">Descrição*:</label>
<textarea class="form-control @error('descricao') is-invalid @enderror" value="{{ $evento->descricao }}" id="descricao" name="descricao" rows="3">{{$evento->descricao}}</textarea>
@error('descricao')
<span class="invalid-feedback" role="alert">
......@@ -57,7 +76,22 @@
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-sm-12">
<label for="coordenador_id" class="col-form-label">{{ __('Coordenador*:') }}</label>
<select class="form-control @error('funcaoParticipante') is-invalid @enderror" id="coordenador_id" name="coordenador_id">
<option value="" disabled selected hidden>-- Coordenador da Comissão Avaliadora --</option>
@foreach($coordenadores as $coordenador)
@if ($coordenador->id === $evento->coordenadorId)
<option value="{{$coordenador->id}}" selected>{{$coordenador->user->name}}</option>
@else
<option value="{{$coordenador->id}}">{{$coordenador->user->name}}</option>
@endif
@endforeach
</select>
</div>
</div>
<hr>
<div class="row subtitulo">
<div class="col-sm-12">
<p>Projetos</p>
......@@ -68,45 +102,45 @@
{{-- Início da Submissão --}}
<div class="col-sm-6">
<label for="inicioSubmissao" class="col-form-label">{{ __('Início da Submissão') }}</label>
<label for="inicioSubmissao" class="col-form-label">{{ __('Início da Submissão*:') }}</label>
<input value="{{$evento->inicioSubmissao}}" id="inicioSubmissao" type="date" class="form-control @error('inicioSubmissao') is-invalid @enderror" name="inicioSubmissao" value="{{ old('inicioSubmissao') }}" required autocomplete="inicioSubmissao" autofocus>
@error('inicioSubmissao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
<strong>{{ $message . date('d/m/Y', strtotime($ontem ?? '')) . '.' }}</strong>
</span>
@enderror
</div>{{-- end Início da Submissão --}}
{{-- Fim da submissão --}}
<div class="col-sm-6">
<label for="fimSubmissao" class="col-form-label">{{ __('Fim da Submissão') }}</label>
<label for="fimSubmissao" class="col-form-label">{{ __('Fim da Submissão*:') }}</label>
<input value="{{$evento->fimSubmissao}}" id="fimSubmissao" type="date" class="form-control @error('fimSubmissao') is-invalid @enderror" name="fimSubmissao" value="{{ old('fimSubmissao') }}" required autocomplete="fimSubmissao" autofocus>
@error('fimSubmissao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
<strong>{{ $message . date('d/m/Y', strtotime(old('inicioSubmissao'))) . '.' }}</strong>
</span>
@enderror
</div>{{-- end Fim da submissão --}}
</div>{{-- end dataInicio | dataFim | inicioSubmissao | fimSubmissao --}}
<div class="row justify-content-center">
<div class="col-sm-6">
<label for="inicioRevisao" class="col-form-label">{{ __('Início da Revisão') }}</label>
<label for="inicioRevisao" class="col-form-label">{{ __('Início da Avaliação*:') }}</label>
<input value="{{$evento->inicioRevisao}}" id="inicioRevisao" type="date" class="form-control @error('inicioRevisao') is-invalid @enderror" name="inicioRevisao" value="{{ old('inicioRevisao') }}" required autocomplete="inicioRevisao" autofocus>
@error('inicioRevisao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
<strong>{{ $message . date('d/m/Y', strtotime($ontem ?? '')) . '.' }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<label for="fimRevisao" class="col-form-label">{{ __('Fim da Revisão') }}</label>
<label for="fimRevisao" class="col-form-label">{{ __('Fim da Avaliação*:') }}</label>
<input value="{{$evento->fimRevisao}}" id="fimRevisao" type="date" class="form-control @error('fimRevisao') is-invalid @enderror" name="fimRevisao" value="{{ old('fimRevisao') }}" required autocomplete="fimRevisao" autofocus>
@error('fimRevisao')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
<strong>{{ $message . date('d/m/Y', strtotime( old('inicioRevisao') )) . '.' }}</strong>
</span>
@enderror
</div>
......@@ -116,17 +150,17 @@
<div class="row justify-content-left">
<div class="col-sm-6">
<label for="resultado" class="col-form-label">{{ __('Data do Resultado') }}</label>
<label for="resultado" class="col-form-label">{{ __('Data do Resultado*:') }}</label>
<input value="{{$evento->resultado}}" id="resultado" type="date" class="form-control @error('resultado') is-invalid @enderror" name="resultado" value="{{ old('resultado') }}" required autocomplete="resultado" autofocus>
@error('resultado')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
<strong>{{ $message . date('d/m/Y', strtotime($ontem ?? '')) . '.' }}</strong>
</span>
@enderror
</div>
</div>{{-- end inicioRevisao | fimRevisao | inicioResultado | fimResultado--}}
<hr>
<div class="row subtitulo">
<div class="col-sm-12">
<p>Documentos</p>
......@@ -137,12 +171,12 @@
<div class="row justify-content-center" style="margin-top:10px">
<div class="col-sm-6">
<div class="form-group">
<label for="pdfEdital">PDF do Edital</label>
<label for="pdfEdital">PDF do Edital*:</label>
<a href="{{route('download', ['file' => $evento->pdfEdital])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a>
<input type="file" class="form-control-file @error('pdfEdital') is-invalid @enderror" name="pdfEdital" value="{{ old('pdfEdital') }}" id="pdfEdital">
<small>O arquivo selecionado deve ser no formato PDF de até xmb.</small>
<small>O arquivo selecionado deve ser no formato PDF de até 2mb.</small>
@error('pdfEdital')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
......@@ -153,12 +187,12 @@
<div class="col-sm-6">
<div class="form-group">
<label for="modeloDocumento">Arquivo com os modelos de documentos do edital</label>
<label for="modeloDocumento">Arquivo com os modelos de documentos do edital:</label>
<a href="{{route('download', ['file' => $evento->modeloDocumento])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a>
<input type="file" class="form-control-file @error('modeloDocumento') is-invalid @enderror" name="modeloDocumento" value="{{ old('modeloDocumento') }}" id="modeloDocumento">
<small>O arquivo selecionado deve ter até xmb.</small>
<small>O arquivo selecionado deve ter até 2mb.</small>
@error('modeloDocumento')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
......@@ -170,12 +204,13 @@
<div class="row justify-content-center" style="margin: 20px 0 20px 0">
<div class="col-md-6" style="padding-left:0">
<a class="btn btn-secondary botao-form" href="{{route('coord.home')}}">Voltar</a>
<a class="btn btn-secondary botao-form" href="{{ route('admin.editais') }}" style="width:100%">Cancelar</a>
</div>
<div class="col-md-6" style="padding-ridht:0">
<button type="submit" class="btn btn-primary botao-form">
{{ __('Salvar Edital') }}
<div class="col-md-6" style="padding-right:0">
<button type="submit" class="btn btn-primary botao-form" style="width:100%">
{{ __('Salvar') }}
</button>
</div>
</div>
......
......@@ -123,6 +123,38 @@
</div>
</div>
<div class="row justify-content-center">
<div class="col-sm-12">
<table class="table table-responsive-lg table-hover">
<thead>
<tr>
<th style="text-align:center">Edital</th>
<th style="text-align:center">Modelos</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">
<a href="{{route('baixar.edital', ['id' => $evento->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">
@if($evento->modeloDocumento != null)
<a href="{{route('baixar.modelos', ['id' => $evento->id])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a>
@else
O criador do edital não disponibilizou modelos
@endif
</td>
</tr>
</tbody>
</table>
</div>
</div>
@if($hasFile == true)
<div class="row margin">
<div class="col-sm-12">
......@@ -148,7 +180,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 +196,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 +208,7 @@
</a>
@endif
@endif
</td>
</td> --}}
</tr>
@endforeach
</tbody>
......
......@@ -16,35 +16,39 @@
</p>
</div>
<div class="row position-text">
<button class="btn btn-opcoes-edital" style="margin-bottom: 20px;">
{{-- <button class="btn btn-opcoes-edital" style="margin-bottom: 20px;">
Leia mais
</button>
</button> --}}
</div>
</div>
<br>
<div class="col-sm-6" style=" position: relative; top: 50px; padding: 25px;">
<h4 style="color: rgb(0, 140, 255);">Editais</h4>
<div id="editais">
<ul class="list-editais flexcroll" style="list-style-type: none;">
<ul class="col-sm-12 list-editais flexcroll" style="list-style-type: none;">
@foreach ($eventos as $evento)
<li class="li-editais">
<div class="container">
<div class="row">
<div class="col-sm-1">
<img class="img-arquivo" src="{{ asset('img/icons/logo_arquivo.png') }}" alt="">
</div>
<div class="col-sm-8">
<div>{{$evento->nome}}</div>
<div class="color-subtitle-edital">Submissão até o dia {{ date('d/m/Y', strtotime($evento->fimSubmissao)) }}</div>
</div>
<div class="col-sm-3">
<button class="btn btn-opcoes-edital" style="margin-left: 15px;">
Opções
</button>
@if (\Carbon\Carbon::create($evento->fimSubmissao) > \Carbon\Carbon::create($hoje))
<li class="col-sm-12 li-editais">
<div class="container">
<div class="row">
<div class="col-sm-1">
<img class="img-arquivo" src="{{ asset('img/icons/logo_arquivo.png') }}" alt="">
</div>
<div class="col-sm-8">
<div>{{$evento->nome}}</div>
<div class="color-subtitle-edital">Submissão até o dia {{ date('d/m/Y', strtotime($evento->fimSubmissao)) }}</div>
</div>
<div class="col-sm-3">
<a href="{{ route('evento.visualizarNaoLogado', ['id' => $evento->id]) }}">
<button class="btn btn-opcoes-edital" style="float: left;">
Visualizar
</button>
</a>
</div>
</div>
</div>
</div>
</li>
</li>
@endif
@endforeach
</div>
</div>
......
......@@ -36,7 +36,7 @@
</div>
<div class="navbar-text">
@guest
<a href="#" class="btn navbar-text negrito" style="color: rgb(0, 140, 255);">Editais</a>
<a href="{{ route('coord.home') }}" class="btn navbar-text negrito" style="color: rgb(0, 140, 255);">Editais</a>
<a href="#" class="btn dropdown-toggle negrito" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color: rgb(0, 140, 255);">Login</a>
<div class="dropdown-menu dropdown-menu-right negrito" aria-labelledby="dropdownMenuLink" style="right: 15%; width: 300px; height: 380px;">
<form method="POST" action="{{ route('login') }}">
......
......@@ -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
......@@ -16,6 +16,7 @@ Route::get('/', 'UserController@index'
Route::get('/home', 'HomeController@index' )->name('home')->middleware('verified');
Route::get('/evento/visualizar/naologado/{id}','EventoController@showNaoLogado' )->name('evento.visualizarNaoLogado');
Route::get('/editais/home' ,'EventoController@index' )->name('coord.home');
Auth::routes(['verify' => true]);
......@@ -49,7 +50,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route::get('/home/edital', 'EventoController@index' )->name('visualizarEvento');
// ######## rotas de teste #####################################
Route::get('/editais/home', 'EventoController@index' )->name('coord.home');
Route::get('/coordenador/evento/detalhes', 'EventoController@detalhes' )->name('coord.detalhesEvento');
//####### Visualizar trabalhos do usuário ######################
......@@ -99,8 +100,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');
......@@ -116,6 +118,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//########## Rotas de download de documentos ###########################
Route::get('/baixar/edital/{id}', 'EventoController@baixarEdital' )->name('baixar.edital');
Route::get('/baixar/modelos/{id}', 'EventoController@baixarModelos' )->name('baixar.modelos');
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-comite/{id}', 'TrabalhoController@baixarAnexoComite' )->name('baixar.anexo.comite');
......
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