Commit 0abe3d8e authored by Guilherme Silva's avatar Guilherme Silva
Browse files

Resolução de conflito

parents 26294eaf 63c67f68
...@@ -18,7 +18,7 @@ class Evento extends Model ...@@ -18,7 +18,7 @@ class Evento extends Model
'numMaxTrabalhos', 'numMaxCoautores', 'hasResumo', 'criador_id', 'numParticipantes', 'numMaxTrabalhos', 'numMaxCoautores', 'hasResumo', 'criador_id', 'numParticipantes',
'dt_inicioRelatorioParcial', 'dt_fimRelatorioParcial', 'dt_inicioRelatorioFinal', 'dt_fimRelatorioFinal', 'dt_inicioRelatorioParcial', 'dt_fimRelatorioParcial', 'dt_inicioRelatorioFinal', 'dt_fimRelatorioFinal',
'formAvaliacaoExterno', 'formAvaliacaoInterno', 'formAvaliacaoExterno', 'formAvaliacaoInterno',
'cotaDoutor' 'cotaDoutor', 'inicioProjeto', 'fimProjeto'
]; ];
public function endereco(){ public function endereco(){
......
...@@ -36,6 +36,7 @@ use Illuminate\Support\Collection; ...@@ -36,6 +36,7 @@ use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Facades\Notification; use Illuminate\Support\Facades\Notification;
use App\Notifications\AtribuicaoAvaliadorExternoNotification; use App\Notifications\AtribuicaoAvaliadorExternoNotification;
use Carbon\Carbon;
class AdministradorController extends Controller class AdministradorController extends Controller
{ {
...@@ -73,18 +74,28 @@ class AdministradorController extends Controller ...@@ -73,18 +74,28 @@ class AdministradorController extends Controller
public function analisar(Request $request){ public function analisar(Request $request){
$evento = Evento::find($request->evento_id); $evento = Evento::find($request->evento_id);
$status = ['submetido', 'avaliado', 'aprovado', 'reprovado', 'corrigido']; $status = ['submetido', 'avaliado', 'aprovado', 'reprovado', 'corrigido'];
$aux = Trabalho::where('evento_id', $evento->id)
->whereIn('status', $status)
->pluck('grande_area_id');
$idArea = Trabalho::where('evento_id', $evento->id)
->whereIn('status', $status)
->pluck('area_id');
$trabalhos = Trabalho::where('evento_id', $evento->id) $trabalhos = Trabalho::where('evento_id', $evento->id)
->whereIn('status', $status) ->whereIn('status', $status)
->orderBy('titulo') ->orderBy('titulo')
->paginate(10); ->paginate(10);
$grandesAreas = GrandeArea::whereIn('id', $aux)->get();
$areas = Area::whereIn('id', $idArea)->get();
$funcaoParticipantes = FuncaoParticipantes::all(); $funcaoParticipantes = FuncaoParticipantes::all();
// $participantes = Participante::where('trabalho_id', $id)->get(); // $participantes = Participante::where('trabalho_id', $id)->get();
// $participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get(); // $participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get();
// $participantes = User::whereIn('id', $participantesUsersIds)->get(); // $participantes = User::whereIn('id', $participantesUsersIds)->get();
return view('administrador.analisar')->with(['trabalhos' => $trabalhos, 'evento' => $evento, 'funcaoParticipantes' => $funcaoParticipantes, 'column' => $request->column]); return view('administrador.analisar')->with(['trabalhos' => $trabalhos, 'evento' => $evento, 'funcaoParticipantes' => $funcaoParticipantes, 'column' => $request->column, 'grandesAreas' => $grandesAreas, 'areas' => $areas]);
} }
// Utilizado para paginação de Collection // Utilizado para paginação de Collection
...@@ -118,6 +129,9 @@ class AdministradorController extends Controller ...@@ -118,6 +129,9 @@ class AdministradorController extends Controller
// //
$grandeAreas = GrandeArea::orderBy('nome')->get(); $grandeAreas = GrandeArea::orderBy('nome')->get();
$hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString();
return view('administrador.analisarProposta')->with( return view('administrador.analisarProposta')->with(
[ 'trabalho' => $trabalho, [ 'trabalho' => $trabalho,
'funcaoParticipantes' => $funcaoParticipantes, 'funcaoParticipantes' => $funcaoParticipantes,
...@@ -127,7 +141,8 @@ class AdministradorController extends Controller ...@@ -127,7 +141,8 @@ class AdministradorController extends Controller
'grandeAreas' => $grandeAreas, 'grandeAreas' => $grandeAreas,
'AvalRelatParcial' => $AvalRelatParcial, 'AvalRelatParcial' => $AvalRelatParcial,
'AvalRelatFinal' => $AvalRelatFinal, 'AvalRelatFinal' => $AvalRelatFinal,
]); 'hoje' => $hoje,]);
} }
public function showProjetos(Request $request){ public function showProjetos(Request $request){
......
...@@ -104,7 +104,9 @@ class EventoController extends Controller ...@@ -104,7 +104,9 @@ class EventoController extends Controller
$request->fimSubmissao == null || $request->fimSubmissao == null ||
$request->inicioRevisao == null || $request->inicioRevisao == null ||
$request->fimRevisao == null || $request->fimRevisao == null ||
$request->resultado == null $request->resultado == null ||
$request->inicioProjeto == null ||
$request->fimProjeto == null
){ ){
$validatedData = $request->validate([ $validatedData = $request->validate([
...@@ -128,6 +130,8 @@ class EventoController extends Controller ...@@ -128,6 +130,8 @@ class EventoController extends Controller
'dt_fimRelatorioFinal' => ['required', 'date'], 'dt_fimRelatorioFinal' => ['required', 'date'],
'pdfFormAvalExterno' => [($request->pdfFormAvalExternoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfFormAvalExterno' => [($request->pdfFormAvalExternoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'inicioProjeto' => ['required', 'date'],
'fimProjeto' => ['required', 'date'],
//'modeloDocumento' => [], //'modeloDocumento' => [],
]); ]);
} }
...@@ -157,6 +161,8 @@ class EventoController extends Controller ...@@ -157,6 +161,8 @@ class EventoController extends Controller
'dt_fimRelatorioFinal' => ['required', 'date', 'after_or_equal:dt_inicioRelatorioFinal'], 'dt_fimRelatorioFinal' => ['required', 'date', 'after_or_equal:dt_inicioRelatorioFinal'],
'pdfFormAvalExterno' => [($request->pdfFormAvalExternoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfFormAvalExterno' => [($request->pdfFormAvalExternoPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => [($request->pdfEditalPreenchido!=='sim'?'required':''), 'file', 'mimes:pdf', 'max:2048'],
'inicioProjeto' => ['required', 'date', 'after:yesterday'],
'fimProjeto' => ['required', 'date', 'after_or_equal:fimSubmissao'],
//'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'], //'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
]); ]);
...@@ -183,6 +189,8 @@ class EventoController extends Controller ...@@ -183,6 +189,8 @@ class EventoController extends Controller
$evento['consu'] = $request->has('consu'); $evento['consu'] = $request->has('consu');
$evento['cotaDoutor'] = $request->has('cotaDoutor'); $evento['cotaDoutor'] = $request->has('cotaDoutor');
$evento['anexosStatus'] = 'final'; $evento['anexosStatus'] = 'final';
$evento['inicioProjeto'] = $request->inicioProjeto;
$evento['fimProjeto'] = $request->fimProjeto;
//dd($evento); //dd($evento);
// $user = User::find($request->coordenador_id); // $user = User::find($request->coordenador_id);
...@@ -376,7 +384,9 @@ class EventoController extends Controller ...@@ -376,7 +384,9 @@ class EventoController extends Controller
$request->fimSubmissao == null || $request->fimSubmissao == null ||
$request->inicioRevisao == null || $request->inicioRevisao == null ||
$request->fimRevisao == null || $request->fimRevisao == null ||
$request->resultado == null $request->resultado == null ||
$request->inicioProjeto == null ||
$request->fimProjeto == null
){ ){
$validatedData = $request->validate([ $validatedData = $request->validate([
...@@ -400,6 +410,8 @@ class EventoController extends Controller ...@@ -400,6 +410,8 @@ class EventoController extends Controller
'pdfEdital' => ['file', 'mimes:pdf', 'max:2048'], 'pdfEdital' => ['file', 'mimes:pdf', 'max:2048'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'], 'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
'pdfFormAvalExterno' => ['file', 'mimes:pdf', 'max:2048'], 'pdfFormAvalExterno' => ['file', 'mimes:pdf', 'max:2048'],
'inicioProjeto' => ['required', 'date'],
'fimProjeto' => ['required', 'date'],
]); ]);
} }
...@@ -423,6 +435,8 @@ class EventoController extends Controller ...@@ -423,6 +435,8 @@ class EventoController extends Controller
'dt_fimRelatorioFinal' => ['required', 'date', 'after_or_equal:dt_inicioRelatorioFinal'], 'dt_fimRelatorioFinal' => ['required', 'date', 'after_or_equal:dt_inicioRelatorioFinal'],
'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'], 'modeloDocumento' => ['file', 'mimes:zip,doc,docx,odt,pdf', 'max:2048'],
'pdfFormAvalExterno' => ['file', 'mimes:pdf', 'max:2048'], 'pdfFormAvalExterno' => ['file', 'mimes:pdf', 'max:2048'],
'inicioProjeto' => ['required', 'date', 'after:resultado_final'],
'fimProjeto' => ['required', 'date', 'after:inicioProjeto'],
]); ]);
$evento->nome = $request->nome; $evento->nome = $request->nome;
...@@ -445,6 +459,8 @@ class EventoController extends Controller ...@@ -445,6 +459,8 @@ class EventoController extends Controller
$evento->coordenadorId = $request->coordenador_id; $evento->coordenadorId = $request->coordenador_id;
$evento->consu = $request->has('consu'); $evento->consu = $request->has('consu');
$evento->cotaDoutor = $request->has('cotaDoutor'); $evento->cotaDoutor = $request->has('cotaDoutor');
$evento->inicioProjeto = $request->inicioProjeto;
$evento->fimProjeto = $request->fimProjeto;
if($request->pdfEdital != null){ if($request->pdfEdital != null){
$pdfEdital = $request->pdfEdital; $pdfEdital = $request->pdfEdital;
$path = 'pdfEdital/' . $evento->id . '/'; $path = 'pdfEdital/' . $evento->id . '/';
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddInicioProjetoToEventosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eventos', function (Blueprint $table) {
$table->date('inicioProjeto')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('eventos', function (Blueprint $table) {
$table->dropColumn('inicioProjeto');
});
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFimProjetoToEventosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('eventos', function (Blueprint $table) {
$table->date('fimProjeto')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('eventos', function (Blueprint $table) {
$table->dropColumn('fimProjeto');
});
}
}
...@@ -5,43 +5,48 @@ ...@@ -5,43 +5,48 @@
<div class="row justify-content-center" style="margin-top: 100px;"> <div class="row justify-content-center" style="margin-top: 100px;">
<div class="col-md-11"> <div class="col-md-11">
<div class="row"> <div class="row">
<div class="col-sm-7"> <div class="col-sm-4">
<div class="card-body" style="padding-top: 0.2rem;"> <div class="card-body" style="padding-top: 0.2rem;">
<div class="container"> <div class="container">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #1492E6; font-size: 20px;">Edital - {{$evento->nome}}</h5></div> <div class="col-md-12"><h5 style="color: #1492E6; font-size: 20px;">Edital - {{$evento->nome}}</h5></div>
<div class="col-md-12"><h6 style="color: #234B8B; margin-bottom:-0.4rem; font-weight: bold; font-size: 14px;">Propostas Submetidas</h6><br></div> <div class="col-md-12"><h6 style="color: #234B8B; margin-bottom:-0.4rem; font-weight: bold; font-size: 14px;">Propostas Submetidas</h6><br></div>
<div class="col-md-12"> <div class="col-md-12">
<div class="btn-group dropup"> <select id="" class="form-control select-submeta" onchange="teste(this)" style="width: 200px;">
<button type="button" style="text-transform: capitalize;" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <option value="todos" selected>Todos</option>
Filtro @isset ($column) - {{$column}} @endisset <option value="aprovado">Recomendados</option>
</button> <option value="reprovado">Não Recomendados</option>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink"> <option value="submetido">Submetidos</option>
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id])}}"> <option value="avaliado">Avaliados</option>
Todos <option value="corrigido">Parcialmente Recomendados</option>
</a>
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id, 'column' => 'aprovado'])}}">
Recomendados @foreach($grandesAreas as $grandeArea)
</a>
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id, 'column' => 'reprovado'])}}"> <option value="{{$grandeArea->nome}}">
Não Recomendados Grande Área: {{ $grandeArea->nome }}
</a> </option>
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id, 'column' => 'submetido'])}}"> @foreach($areas as $area)
Submetidos @if($grandeArea->id == $area->grande_area_id)
</a> <option value="{{$area->nome}}">
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id, 'column' => 'avaliado'])}}"> &nbsp;&nbsp; - Área: {{ $area->nome }}
Avaliado </option>
</a> @endif
<a class="dropdown-item" href="{{route('admin.analisar', ['evento_id' => $evento->id, 'column' => 'corrigido'])}}"> @endforeach
Parcialmente Recomendados @endforeach
</a>
</div>
</select>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-3" style="display:flex; align-items: end;">
<input type="text" class="form-control form-control-edit" placeholder="Título do projeto ou nome do Proponente" onkeyup="buscar(this)"> <img src="{{asset('img/icons/logo_lupa.png')}}" alt="">
</div> </div>
<div class="col-sm-5" style="top: 40px; text-align: end;"> <div class="col-sm-5" style="top: 40px; text-align: end;">
<h6 style="color: #234B8B; font-weight: bold;font-size: 13px; text-align: right;padding-bottom: 35px"> <h6 style="color: #234B8B; font-weight: bold;font-size: 13px; text-align: right;padding-bottom: 35px">
<img src="{{asset('img/icons/pendente.png')}}" style="width: 22px"/> <img src="{{asset('img/icons/pendente.png')}}" style="width: 22px"/>
...@@ -58,20 +63,20 @@ ...@@ -58,20 +63,20 @@
</div> </div>
</div> </div>
</div> </div>
<div id="projetos">
@foreach( $trabalhos as $trabalho ) @foreach( $trabalhos as $trabalho )
<!--Informações Proponente--> <!--Informações Proponente-->
<div class="row justify-content-center" style="margin-top: 20px;"> <div class="row justify-content-center allTrab apareceu {{$trabalho->status}} {{$trabalho->grandeArea->nome}} {{$trabalho->area->nome}}" style="margin-top: 20px;" >
<br> <br>
<div class="col-md-11 " onclick="myFunc({{$trabalho->id}})"> <div class="col-md-11" onclick="myFunc({{$trabalho->id}})">
<a href="{{route('admin.analisarProposta',['id'=>$trabalho->id])}}" id="vizuProposta{{$trabalho->id}}" hidden></a> <a href="{{route('admin.analisarProposta',['id'=>$trabalho->id])}}" id="vizuProposta{{$trabalho->id}}" hidden></a>
<div class="card" style="border-radius: 5px;margin-left: 25px;margin-right: 25 px"> <div class="card" style="border-radius: 5px;margin-left: 25px;margin-right: 25 px">
<div class="card-body" style="padding-top: 0.2rem; padding-left: 25px;padding-right: 25px;"> <div class="card-body" style="padding-top: 0.2rem; padding-left: 25px;padding-right: 25px;">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-10"><h5 style="color: #234B8B; font-weight: bold">Título: {{ $trabalho->titulo }}</h5></div> <div class="col-md-10 tituloProj"><h5 style="color: #234B8B; font-weight: bold; margin-top: 15px;">Título: {{ $trabalho->titulo }}</h5></div>
<div class="col-md-2"> <div class="col-md-2">
@if($trabalho->status == "aprovado") @if($trabalho->status == "aprovado")
<img src="{{asset('img/icons/aprovado.png')}}" style="width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;" alt=""> <img src="{{asset('img/icons/aprovado.png')}}" style="width: 23%;margin: auto;display: flex;margin-top: 0px;justify-content: center;align-items: center;" alt="">
...@@ -87,7 +92,7 @@ ...@@ -87,7 +92,7 @@
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-12"> <div class="col-md-12">
<p style="color: #4D4D4D; padding: 0px"><b>Proponente:</b> {{ App\Proponente::find($trabalho->proponente_id)->user->name }}</p> <p class="proponenteProj" style="color: #4D4D4D; padding: 0px"><b>Proponente:</b> {{ App\Proponente::find($trabalho->proponente_id)->user->name }}</p>
</div> </div>
<div class="col-md-12"> <p style="color: #4D4D4D; padding: 0px"><b>Discentes:</b> <div class="col-md-12"> <p style="color: #4D4D4D; padding: 0px"><b>Discentes:</b>
...@@ -108,6 +113,7 @@ ...@@ -108,6 +113,7 @@
</div> </div>
</div> </div>
@endforeach @endforeach
</div>
<div class="row justify-content-center" > <div class="row justify-content-center" >
...@@ -128,6 +134,61 @@ ...@@ -128,6 +134,61 @@
function myFunc(i){ function myFunc(i){
document.getElementById("vizuProposta"+i).click(); document.getElementById("vizuProposta"+i).click();
} }
function buscar(input) {
let trabalhos = document.getElementById("projetos").children;
//console.log(trabalhos)
if(input.value.length > 2) {
for(let i = 0; i < trabalhos.length; i++){
if(trabalhos[i].classList.contains("apareceu")){
let tituloProjeto = trabalhos[i].getElementsByClassName("tituloProj")[0].textContent
let nomeProponente = trabalhos[i].getElementsByClassName("proponenteProj")[0].textContent
if(tituloProjeto.toLowerCase().substr(0).indexOf(input.value.toLowerCase()) >= 0 || nomeProponente.toLowerCase().substr(0).indexOf(input.value.toLowerCase()) >= 0) {
trabalhos[i].style.display = "";
}else {
trabalhos[i].style.display = "none";
}
}
}
}else {
for(let i = 0; i < trabalhos.length; i++) {
if(trabalhos[i].classList.contains("apareceu")){
trabalhos[i].style.display = "";
}
}
}
}
function teste(select) {
let todos = document.getElementsByClassName("allTrab");
let selecionados = document.getElementsByClassName(select.value);
if(select.value == "todos"){
for(let i = 0; i < todos.length; i++){
todos[i].style.display = ""
if(!todos[i].classList.contains("apareceu")){
todos[i].classList.add("apareceu");
}
}
}else {
for(let j = 0; j < todos.length; j++){
todos[j].style.display = "none";
todos[j].classList.remove("apareceu");
}
for(let k = 0; k < selecionados.length; k++){
selecionados[k].style.display = "";
selecionados[k].classList.add("apareceu");
}
}
}
</script> </script>
@endsection @endsection
<style> <style>
......
...@@ -699,12 +699,14 @@ ...@@ -699,12 +699,14 @@
<div class="container"> <div class="container">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-11"><h5 style="color: #234B8B; font-weight: bold">Avaliadores</h5></div> <div class="col-md-11"><h5 style="color: #234B8B; font-weight: bold">Avaliadores</h5></div>
@if($hoje <= $evento->fimSubmissao)
<div class="col-md-1 text-sm-right"> <div class="col-md-1 text-sm-right">
<a type="button" value="{{ $trabalho->id }}" id="atribuir1" data-toggle="modal" <a type="button" value="{{ $trabalho->id }}" id="atribuir1" data-toggle="modal" data-target="#avaliadorModalCenter">
data-target="#avaliadorModalCenter">
<img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt=""> <img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt="">
</a> </a>
</div> </div>
@endif
<!-- Modal --> <!-- Modal -->
<div class="modal fade" id="avaliadorModalCenter" data-bs-backdrop="static" <div class="modal fade" id="avaliadorModalCenter" data-bs-backdrop="static"
data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel"
......
...@@ -9,7 +9,13 @@ ...@@ -9,7 +9,13 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="row justify-content-between"> <div class="row justify-content-between">
<div class="col-sm"></div> <div class="col-sm">
<select id="" class="form-control select-submeta" onchange="exibirEditais(this)" style="width: 140px;">
<option value="todos" selected>Todos</option>
<option value="aberto">Aberto(s)</option>
<option value="encerrado">Encerrado(s)</option>
</select>
</div>
<div class="col-sm" style="margin-bottom: 10px"> <div class="col-sm" style="margin-bottom: 10px">
@if($flag == 'false') @if($flag == 'false')
@if(count($eventos)>0) @if(count($eventos)>0)
...@@ -46,9 +52,17 @@ ...@@ -46,9 +52,17 @@
@foreach ($eventos as $evento) @foreach ($eventos as $evento)
@if (Auth::check()) @if (Auth::check())
<a href="{{ route('evento.visualizar',['id'=> $evento->id]) }}" style="text-decoration: none"> @if($evento->fimSubmissao >= $hoje)
<a href="{{ route('evento.visualizar',['id'=> $evento->id]) }}" style="text-decoration: none" class="aberto">
@else
<a href="{{ route('evento.visualizar',['id'=> $evento->id]) }}" style="text-decoration: none" class="encerrado">
@endif
@else @else
<a href="{{ route('evento.visualizarNaoLogado', ['id'=>$evento->id]) }}" style="text-decoration: none"> @if($evento->fimSubmissao >= $hoje)
<a href="{{ route('evento.visualizarNaoLogado', ['id'=>$evento->id]) }}" style="text-decoration: none" class="aberto">
@else
<a href="{{ route('evento.visualizarNaoLogado', ['id'=>$evento->id]) }}" style="text-decoration: none" class="encerrado">
@endif
@endif @endif
<div class="card" style="width: 18rem; border-radius:12px; border-width:0px; margin:10px"> <div class="card" style="width: 18rem; border-radius:12px; border-width:0px; margin:10px">
@if(isset($evento->fotoEvento)) @if(isset($evento->fotoEvento))
...@@ -64,7 +78,7 @@ ...@@ -64,7 +78,7 @@
<div class="col-sm-12"> <div class="col-sm-12">
<h3 style="color: #01487E; font-family:Arial, Helvetica, sans-serif; font-size:30px; font-weight:bold">{{$evento->nome}}</h3> <h3 style="color: #01487E; font-family:Arial, Helvetica, sans-serif; font-size:30px; font-weight:bold">{{$evento->nome}}</h3>
{{-- @if(Auth::user()->tipo == "administrador" || Auth::user()->tipo == "administradorResponsavel") --}} {{-- @if(Auth::user()->tipo == "administrador" || Auth::user()->tipo == "administradorResponsavel") --}}
@can('isCoordenador', $evento) {{-- @can('isCoordenador', $evento)
<div class="btn-group dropright dropdown-options"> <div class="btn-group dropright dropdown-options">
<a id="options" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <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"> <img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
...@@ -89,7 +103,7 @@ ...@@ -89,7 +103,7 @@
</form> </form>
</div> </div>
</div> </div>
@endcan @endcan --}}
{{-- @endif --}} {{-- @endif --}}
</div> </div>
...@@ -182,3 +196,40 @@ ...@@ -182,3 +196,40 @@
</div> </div>
@endsection @endsection
@section('javascript')
<script>
function exibirEditais(select) {
let abertos = document.getElementsByClassName("aberto");
let encerrados = document.getElementsByClassName("encerrado");
if(select.value == "todos"){
for(let i = 0; i < abertos.length; i++ ){
abertos[i].style.display = "";
}
for(let j = 0; j < encerrados.length; j++ ){
encerrados[j].style.display = "";
}
}else if(select.value == "aberto") {
for(let i = 0; i < abertos.length; i++){
abertos[i].style.display = "";
}
for(let j = 0; j < encerrados.length; j++ ){
encerrados[j].style.display = "none";
}
}else {
for(let i = 0; i < abertos.length; i++){
abertos[i].style.display = "none";
}
for(let j = 0; j < encerrados.length; j++ ){
encerrados[j].style.display = "";
}
}
}
</script>
@endsection
\ No newline at end of file
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
</tr> </tr>
</thead> </thead>
<tbody id="projetos"> <tbody id="projetos">
@foreach($coordenadors as $coordenador) @foreach($coordenadors as $coordenador)
<tr> <tr>
<td>{{$coordenador->user->name}}</td> <td>{{$coordenador->user->name}}</td>
...@@ -292,6 +293,33 @@ ...@@ -292,6 +293,33 @@
@enderror @enderror
</div> </div>
</div> </div>
<!-- AKI -->
<div class="row justify-content-left">
<div class="col-sm-6">
<label for="inicioProjeto" class="col-form-label">{{ __('Início do Projeto*:') }}</label>
<input id="inicioProjeto" type="date" class="form-control @error('inicioProjeto') is-invalid @enderror" name="inicioProjeto" value="{{ old('inicioProjeto') }}" required autocomplete="inicioProjeto" autofocus>
@error('inicioProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<label for="fimProjeto" class="col-form-label">{{ __('Fim do Projeto*:') }}</label>
<input id="fimProjeto" type="date" class="form-control @error('fimProjeto') is-invalid @enderror" name="fimProjeto" value="{{ old('fimProjeto') }}" required autocomplete="fimProjeto" autofocus>
@error('fimProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<hr> <hr>
<div class="row subtitulo"> <div class="row subtitulo">
<div class="col-sm-12"> <div class="col-sm-12">
......
...@@ -277,6 +277,32 @@ ...@@ -277,6 +277,32 @@
@enderror @enderror
</div> </div>
</div> </div>
<!-- AKI -->
<div class="row justify-content-left">
<div class="col-sm-6">
<label for="inicioProjeto" class="col-form-label">{{ __('Início do Projeto*:') }}</label>
<input id="inicioProjeto" type="date" value="{{ $evento->inicioProjeto }}"class="form-control @error('inicioProjeto') is-invalid @enderror" name="inicioProjeto" value="{{ old('inicioProjeto') }}" required autocomplete="inicioProjeto" autofocus>
@error('inicioProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message . date('d/m/Y', strtotime($ontem ?? '')) . '.' }}</strong>
</span>
@enderror
</div>
<div class="col-sm-6">
<label for="fimProjeto" class="col-form-label">{{ __('Fim do Projeto*:') }}</label>
<input id="fimProjeto" type="date" value="{{ $evento->fimProjeto }}" class="form-control @error('fimProjeto') is-invalid @enderror" name="fimProjeto" value="{{ old('fimProjeto') }}" required autocomplete="fimProjeto" autofocus>
@error('fimProjeto')
<span class="invalid-feedback" role="alert">
<strong>{{ $message . date('d/m/Y', strtotime($ontem ?? '')) . '.' }}</strong>
</span>
@enderror
</div>
</div>
<hr> <hr>
<div class="row subtitulo"> <div class="row subtitulo">
<div class="col-sm-12"> <div class="col-sm-12">
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
{{-- Arquivo --}} {{-- Arquivo --}}
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="anexoProjeto" class="col-form-label font-tam" style="font-weight: bold">{{ __('Projeto: ') }}</label> <label for="anexoProjeto" class="col-form-label font-tam" style="font-weight: bold">{{ __('Projeto: ') }}<span style="color: red; font-weight:bold">*</span></label>
<input type="file" class="input-group-text" name="anexoProjeto" placeholder="nomeProjeto" accept="application/pdf" /> <input type="file" class="input-group-text" name="anexoProjeto" placeholder="nomeProjeto" accept="application/pdf" />
@error('anexoProjeto') @error('anexoProjeto')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX")
<div class="form-group col-md-6" style="margin-top: 10px"> <div class="form-group col-md-6" style="margin-top: 10px">
<label for="anexoLatterCoordenador" class="col-form-label font-tam" style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}</label> <label for="anexoLatterCoordenador" class="col-form-label font-tam" style="font-weight: bold">{{ __('Lattes do Coordenador: ') }}<span style="color: red; font-weight:bold">*</span></label>
<input type="file" class="input-group-text" name="anexoLattesCoordenador" placeholder="anexoPlanoTrabalho" accept=".pdf" /> <input type="file" class="input-group-text" name="anexoLattesCoordenador" placeholder="anexoPlanoTrabalho" accept=".pdf" />
@error('anexoLattesCoordenador') @error('anexoLattesCoordenador')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX")
<div class="form-group col-md-6"> <div class="form-group col-md-6">
<label for="anexoPlanilhaPontuacao" class="col-form-label font-tam" style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}</label> <label for="anexoPlanilhaPontuacao" class="col-form-label font-tam" style="font-weight: bold">{{ __('Planilha de Pontuação: ') }}<span style="color: red; font-weight:bold">*</span></label>
<input type="file" class="input-group-text" name="anexoPlanilhaPontuacao" placeholder="anexoPlanilhaPontuacao" accept=".xlsx, .xls, .ods" /> <input type="file" class="input-group-text" name="anexoPlanilhaPontuacao" placeholder="anexoPlanilhaPontuacao" accept=".xlsx, .xls, .ods" />
@error('anexoPlanilhaPontuacao') @error('anexoPlanilhaPontuacao')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX")
<div class="form-group col-md-6" style="margin-top: 10px"> <div class="form-group col-md-6" style="margin-top: 10px">
<label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label> <label for="nomeTrabalho" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}<span style="color: red; font-weight:bold">*</span></label>
<input type="file" class="input-group-text" name="anexoGrupoPesquisa" placeholder="Anexo do Grupo de Pesquisa" accept="application/pdf" /> <input type="file" class="input-group-text" name="anexoGrupoPesquisa" placeholder="Anexo do Grupo de Pesquisa" accept="application/pdf" />
@error('anexoGrupoPesquisa') @error('anexoGrupoPesquisa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
......
...@@ -4,7 +4,12 @@ ...@@ -4,7 +4,12 @@
<div class="card-body" style="padding-top: 0.2rem;"> <div class="card-body" style="padding-top: 0.2rem;">
<div class="container"> <div class="container">
<div class="form-row mt-3"> <div class="form-row mt-3">
<div class="col-md-12"><h5 style="color: #234B8B; font-weight: bold">Participantes</h5></div> <div class="col-md-11"><h5 style="color: #234B8B; font-weight: bold">Participantes</h5></div>
<div class="col-md-1 text-sm-right">
<a type="button" value="{{ $edital->id }}" id="atribuir1" data-toggle="modal" data-target="#exampleModal0">
<img class="" src="{{asset('img/icons/add.ico')}}" style="width:30px" alt="">
</a>
</div>
</div> </div>
<hr style="border-top: 1px solid#1492E6"> <hr style="border-top: 1px solid#1492E6">
<div class="row-cols-sm-12 justify-content-start"> <div class="row-cols-sm-12 justify-content-start">
...@@ -13,13 +18,18 @@ ...@@ -13,13 +18,18 @@
<div style="margin-bottom:15px"> <div style="margin-bottom:15px">
<div id="participante" class="row"> <div id="participante" class="row">
@for($i = 0; $i < $edital->numParticipantes; $i++) @for($i = 0; $i < $edital->numParticipantes; $i++)
<div class="form-row mb-1 col-md-3" style="margin-top: 10px">
<div class="col-md-12"> <div @if(!isset(old('marcado')[$i])) hidden @endif class="form-row mb-1 col-md-3" style="margin-top: 10px" id="part{{$i}}">
<button type="button" class="btn btn-primary justify-content-center" data-toggle="modal" id="button" data-target="#exampleModal{{$i}}"> <div class="col-sm-4" style="display: flex; align-items: center;">
<img src="{{asset('img/icons/usuario.svg')}}" style="width:60px" alt="">
</div>
<div class="col-sm-8" style="display: flex; align-items: center;">
<a href="" style="" class="justify-content-center" data-toggle="modal" data-target="#exampleModal{{$i}}" id="nomePart{{$i+1}}">
Participante {{$i+1}} Participante {{$i+1}}
</button> </a>
</div> </div>
</div> </div>
<div class="modal fade" id="exampleModal{{$i}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal fade" id="exampleModal{{$i}}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl"> <div class="modal-dialog modal-dialog-centered modal-xl">
<div class="modal-content"> <div class="modal-content">
...@@ -33,9 +43,10 @@ ...@@ -33,9 +43,10 @@
<div class="modal-body"> <div class="modal-body">
<div class="col-1" style="margin-top:9.3px" hidden> <div class="col-1" style="margin-top:9.3px" hidden>
{{-- <button type="button" class="btn btn-danger shadow-sm" id="buttonRemover" onclick="removerPart(this)" >X</button> --}} {{-- <button type="button" class="btn btn-danger shadow-sm" id="buttonRemover" onclick="removerPart(this)" >X</button> --}}
<input type="checkbox" id="checkB{{$i}}" aria-label="Checkbox for following text input" @if(old('name')[$i] ?? "" == $i) checked @endif name="marcado[]" value="{{ $i }}"> <input type="checkbox" id="checkB{{$i}}" aria-label="Checkbox for following text input" @if(isset(old('marcado')[$i])) checked @endif name="marcado[]" value="{{ $i }}">
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
...@@ -355,7 +366,7 @@ ...@@ -355,7 +366,7 @@
<button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})">Cancelar</button> <button data-dismiss="modal" type="button" id="cancelar{{$i}}" class=" btn btn-danger" style="font-size: 16px" onclick="desmarcar({{$i}})">Cancelar</button>
</div> </div>
<div class="col-6"> <div class="col-6">
<button data-dismiss="modal" type="button" id="adicionar{{$i}}" class="btn btn-success float-right" style="font-size: 16px" onclick="marcar({{$i}})">Adicionar</button> <button data-dismiss="modal" type="button" id="guardar{{$i}}" class="btn btn-success float-right" style="font-size: 16px" onclick="marcar({{$i}})">Salvar</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -385,13 +396,36 @@ ...@@ -385,13 +396,36 @@
</div> </div>
<script> <script>
$("input.rg:text").mask('00.000.000-0'); $("input.rg:text").mask('00.000.000-0');
function marcar(id){ function marcar(id){
let nome = document.getElementById("nome"+id);
let linkNome = document.getElementById("nomePart"+(id+1));
let linkTituloProj = document.getElementById("tituloProj"+(id+1));
let planoTrabalho = document.getElementById("nomePlanoTrabalho"+id);
if(nome.value != ""){
if(planoTrabalho.value != ""){
linkNome.innerText = `Nome: ${nome.value} \n Título do Plano: ${planoTrabalho.value}`;
}else {
linkNome.innerText = `Nome: ${nome.value}`;
}
}
document.getElementById("checkB"+id).checked = true; document.getElementById("checkB"+id).checked = true;
$("#atribuir1").attr('data-target','#exampleModal'+(id+1));
document.getElementById("part"+id).removeAttribute("hidden");
document.getElementById("exampleModal"+id).modal('hide'); document.getElementById("exampleModal"+id).modal('hide');
} }
function desmarcar(id){ function desmarcar(id){
document.getElementById("checkB"+id).checked = false; document.getElementById("checkB"+id).checked = false;
document.getElementById("part"+id).setAttribute("hidden",true);
$("#atribuir1").attr('data-target','#exampleModal'+(id));
document.getElementById("exampleModal"+id).modal('hide'); document.getElementById("exampleModal"+id).modal('hide');
} }
</script> </script>
<!--X Participantes X--> <!--X Participantes X-->
...@@ -11,9 +11,8 @@ ...@@ -11,9 +11,8 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12" style="margin-top: 10px"> <div class="form-group col-md-12" style="margin-top: 10px">
<label for="titulo" class="col-form-label" style="font-weight: bold">{{ __('Nome do Projeto') }} <span style="color: red; font-weight:bold">*</span></label> <label for="titulo" class="col-form-label" style="font-weight: bold">{{ __('Nome do Projeto') }} <span style="color: red; font-weight:bold">*</span></label>
<input id="titulo" type="text" class="form-control @error('titulo') is-invalid @enderror" name="titulo" placeholder="Digite o nome do projeto" value="" autocomplete="titulo" maxlength="255" > <input id="titulo" type="text" class="form-control @error('titulo') is-invalid @enderror" name="titulo" placeholder="Digite o nome do projeto" value="{{old('titulo')}}" autocomplete="titulo" maxlength="255" >
<span style="color: red; font-size: 12px" id="caracsRestantestitulo">
</span>
@error('titulo') @error('titulo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX")
<div class="col-md-2"> <div class="col-md-2">
<br> <br>
<label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}</label> <label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Grupo de Pesquisa: ') }}<span style="color: red; font-weight:bold">*</span></label>
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<br> <br>
<input class="form-control @error('linkGrupoPesquisa') is-invalid @enderror" type="url" name="linkGrupoPesquisa" <input class="form-control @error('linkGrupoPesquisa') is-invalid @enderror" type="url" name="linkGrupoPesquisa"
value="" > value="{{ old('linkGrupoPesquisa') }}" >
@error('linkGrupoPesquisa') @error('linkGrupoPesquisa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
@if($edital->tipo != "PIBEX") @if($edital->tipo != "PIBEX")
<div class="col-md-3"> <div class="col-md-3">
<br> <br>
<label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Valor da Planilha de Pontuação: ') }}</label> <label for="lattes" class="col-form-label font-tam" style="font-weight: bold">{{ __('Valor da Planilha de Pontuação: ') }}<span style="color: red; font-weight:bold">*</span></label>
</div> </div>
<div class="col-md-9"> <div class="col-md-9">
<br> <br>
<input class="form-control @error('pontuacaoPlanilha') is-invalid @enderror" type="number" min="0" step=".01" name="pontuacaoPlanilha" <input class="form-control @error('pontuacaoPlanilha') is-invalid @enderror" type="number" min="0" step=".01" name="pontuacaoPlanilha"
value="" style="width: 100px"> value="{{ old('pontuacaoPlanilha') }}" style="width: 100px">
@error('pontuacaoPlanilha') @error('pontuacaoPlanilha')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block"> <span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
......
...@@ -9,23 +9,6 @@ ...@@ -9,23 +9,6 @@
<input type="hidden" name="editalId" value="{{$edital->id}}"> <input type="hidden" name="editalId" value="{{$edital->id}}">
<div class="container"> <div class="container">
{{-- @dd($errors->get('name.*')) --}}
{{-- @dd($errors->has('cpf.*')) --}}
{{-- @dd($errors->getBags()['default']->keys()) --}}
@if (session('mensagem'))
<div class="alert alert-warning" role="alert">
{{ session('mensagem') }}
</div>
@endif
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
<div class="row justify-content-center" style="margin-top: 35px"> <div class="row justify-content-center" style="margin-top: 35px">
...@@ -208,18 +191,6 @@ ...@@ -208,18 +191,6 @@
<script> <script>
$('input').on("input", function(){
var maxlength = $(this).attr("maxlength");
var currentLength = $(this).val().length;
var idInput = $(this).attr("id");
if( currentLength >= maxlength ){
$("#caracsRestantes"+idInput).html("Caracteres restantes: " + (maxlength - this.value.length));
}else if(currentLength == 0){
$("#caracsRestantes"+idInput).html("");
}else{
$("#caracsRestantes"+idInput).html("Caracteres restantes: " + (maxlength - this.value.length));
}
});
$( document ).ready( function () { $( document ).ready( function () {
......
...@@ -68,10 +68,10 @@ ...@@ -68,10 +68,10 @@
</div> </div>
</div> </div>
@else @else
@if($hoje <= $edital->fimSubmissao) @if($hoje <= $edital->fimSubmissao)
<a href="{{ route('trabalho.index', ['id' => $edital->id]) }}" class="btn btn-info" style="position:relative; float: right;">Criar proposta</a> <a href="{{ route('trabalho.index', ['id' => $edital->id]) }}" class="btn btn-info" style="position:relative; float: right;">Criar proposta</a>
@endif @endif
@endif
</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