Commit 34fe30a1 authored by S-Nathalia's avatar S-Nathalia
Browse files

Merge branch 'master' of github.com:lmtsufape/submeta

parents 2d499473 51e764ce
......@@ -93,6 +93,8 @@ class StoreTrabalho extends FormRequest
$rules['area_id'] = [Rule::requiredIf($evento->natureza_id != 3), 'string'];
if($evento->natureza_id == 3){
$rules['area_tematica_id'] = ['required', 'string'];
$rules['ods'] = ['required'];
}
$rules['linkLattesEstudante'] = ['required', 'string'];
......
......@@ -110,6 +110,7 @@ class UpdateTrabalho extends FormRequest
if($evento->natureza_id == 3){
$rules['area_tematica_id'] = ['required', 'string'];
$rules['ods'] = ['required'];
}
$rules['linkLattesEstudante'] = ['required', 'string'];
......
......@@ -112,9 +112,15 @@
<td style="color: red;">Recusado</td>
@endif
<!-- ANTOIM -->
@if($avaliador->trabalhos->where('evento_id', $evento->id)->count() == 0)
<td><button data-toggle="modal" class="btn btn-primary" style="color:white;
" data-target="#avaliadorModalCenter{{$avaliador->id}}" @if($avaliador->trabalhos->where('evento_id', $evento->id)->count() == 0) disabled="disabled" @endif>Visualizar</button></td>
" data-target="#avaliadorModalCenter1{{$avaliador->id}}">Visualizar</button></td>
@else
<td><button data-toggle="modal" class="btn btn-primary" style="color:white;
" data-target="#avaliadorModalCenter{{$avaliador->id}}">Visualizar</button></td>
@endif
<!-- MODAL Projetos -->
<div class="modal fade" id="avaliadorModalCenter{{$avaliador->id}}" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true" style="overflow-y: hidden">
......@@ -149,6 +155,32 @@
</div>
</div>
<div class="modal fade" id="avaliadorModalCenter1{{$avaliador->id}}" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true" style="overflow-y: hidden">
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
<div class="modal-content modal-submeta modal-xl">
<div class="modal-header modal-header-submeta">
<div class="col-md-8" style="padding-left: 0px">
<h5 class="modal-title titulo-table" id="avaliacaoModalLongTitle">
Projetos do Avaliador</h5>
</div>
<div class="col-md-4" style="text-align: right">
<button type="button" class="close" aria-label="Close"
data-dismiss="modal" style="color: rgb(182, 182, 182);padding-right: 0px;">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
<div class="modal-body" style="margin-left: 20px; margin-right: 20px;">
Esse Avaliador não possui projetos. <a href="{{route('admin.analisar', ['evento_id' => $evento->id])}}">Clique aqui</a> e verifique os projetos disponíveis.
</div>
</div>
</div>
</div>
<td @if($avaliador->eventos->where('id', $evento->id)->first()->pivot->convite != null) style="text-align:center" @endif style="text-align:center; display:flex; justify-content: space-evenly">
<form action="{{ route('admin.remover') }}" method="POST">
@csrf
......
......@@ -12,8 +12,9 @@
Voltar
</a>
</div>
<div class="col-md-10" style="text-align: center;">
<h3 class="titulo-table">Lista de Projetos do Edital: <span style="color: black;">{{ $evento->nome }}</span> </h3>
<h3 class="titulo-table">Status dos Projetos em Avaliação do edital: <span style="color: black;">{{ $evento->nome }}</span> </h3>
</div>
<div class="col-md-1">
<!-- Button trigger modal -->
......@@ -22,6 +23,100 @@
</button> --}}
</div>
</div>
<hr>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do Usuário</th>
<th scope="col">Tipo de Avaliação</th>
<th scope="col">E-mail</th>
<th scope="col">Titulo do projeto</th>
<th scope="col">Status avaliação</th>
<th scope="col" style="text-align:center">Ação</th>
</tr>
</thead>
<tbody>
@foreach($trabalhos as $trabalho)
@foreach($trabalho->avaliadors as $avaliador)
{{-- Avaliação Interna --}}
@if(($avaliador->tipo == 'Interno' && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 1))
|| (($avaliador->user->instituicao == "UFAPE" || $avaliador->user->instituicao == "Universidade Federal do Agreste de Pernambuco") && $avaliador->tipo == null && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 1)))
<tr>
<td>{{ $avaliador->user->name }}</td>
<td> Interno </td>
<td>{{ $avaliador->user->email }}</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
@php
$parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first();
@endphp
<td>@if($parecerInterno == null) Pendente @else Avaliado @endif</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">
@if($parecerInterno != null)
<a href="{{ route('admin.visualizarParecerInterno', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Vizualizar Parecer
</a>
@endif
<a href="{{ route('admin.removerProjAval', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id,'flag'=>1]) }}" class="dropdown-item text-center">
Desatribuir Avaliador
</a>
</div>
</div>
</td>
</tr>
@endif
{{-- Avaliação Ad Hoc --}}
@if( ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null && $avaliador->tipo == "Externo") || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 2
|| (($avaliador->user->instituicao != "UFAPE" && $avaliador->user->instituicao != "Universidade Federal do Agreste de Pernambuco") && $avaliador->tipo == null && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 2)))
<tr>
<td>{{ $avaliador->user->name }}</td>
<td> Ad Hoc </td>
<td>{{ $avaliador->user->email }}</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
<td>@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == false) Pendente @else Avaliado @endif</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">
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == true)
<a href="{{ route('admin.visualizarParecer', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Vizualizar Parecer
</a>
@endif
<a href="{{ route('admin.removerProjAval', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id,'flag'=>0]) }}" class="dropdown-item text-center">
Desatribuir Avaliador
</a>
</div>
</div>
</td>
</tr>
@endif
@endforeach
@endforeach
</tbody>
</table>
<div class="container" style="margin-top: 50px;">
<div class="row justify-content-center d-flex align-items-center" >
<h3 class="titulo-table">Lista de Projetos do Edital: <span style="color: black;">{{ $evento->nome }}</span> </h3>
</div>
</div>
<div class="row">
<div class="col-md-8">
<div class="row">
......@@ -199,98 +294,6 @@
</tbody>
</table>
<div class="container" style="margin-top: 50px;">
<div class="row justify-content-center d-flex align-items-center" >
<h3 class="titulo-table">Status dos Projetos em Avaliação do edital: <span style="color: black;">{{ $evento->nome }}</span> </h3>
</div>
</div>
<hr>
<table class="table table-bordered">
<thead>
<tr>
<th scope="col">Nome do Usuário</th>
<th scope="col">Tipo de Avaliação</th>
<th scope="col">E-mail</th>
<th scope="col">Titulo do projeto</th>
<th scope="col">Status avaliação</th>
<th scope="col" style="text-align:center">Ação</th>
</tr>
</thead>
<tbody>
@foreach($trabalhos as $trabalho)
@foreach($trabalho->avaliadors as $avaliador)
{{-- Avaliação Interna --}}
@if(($avaliador->tipo == 'Interno' && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 1))
|| (($avaliador->user->instituicao == "UFAPE" || $avaliador->user->instituicao == "Universidade Federal do Agreste de Pernambuco") && $avaliador->tipo == null && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 1)))
<tr>
<td>{{ $avaliador->user->name }}</td>
<td> Interno </td>
<td>{{ $avaliador->user->email }}</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
@php
$parecerInterno = App\ParecerInterno::where([['avaliador_id',$avaliador->id],['trabalho_id',$trabalho->id]])->first();
@endphp
<td>@if($parecerInterno == null) Pendente @else Avaliado @endif</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">
@if($parecerInterno != null)
<a href="{{ route('admin.visualizarParecerInterno', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Vizualizar Parecer
</a>
@endif
<a href="{{ route('admin.removerProjAval', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id,'flag'=>1]) }}" class="dropdown-item text-center">
Desatribuir Avaliador
</a>
</div>
</div>
</td>
</tr>
@endif
{{-- Avaliação Ad Hoc --}}
@if( ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null && $avaliador->tipo == "Externo") || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 2
|| (($avaliador->user->instituicao != "UFAPE" && $avaliador->user->instituicao != "Universidade Federal do Agreste de Pernambuco") && $avaliador->tipo == null && ($avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso == null || $avaliador->trabalhos()->where("trabalho_id",$trabalho->id)->first()->pivot->acesso != 2)))
<tr>
<td>{{ $avaliador->user->name }}</td>
<td> Ad Hoc </td>
<td>{{ $avaliador->user->email }}</td>
<td style="max-width:100px; overflow-x:hidden; text-overflow:ellipsis">{{ $trabalho->titulo }}</td>
<td>@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == false) Pendente @else Avaliado @endif</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">
@if($avaliador->trabalhos->where('id', $trabalho->id)->first()->pivot->status == true)
<a href="{{ route('admin.visualizarParecer', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id]) }}" class="dropdown-item text-center">
Vizualizar Parecer
</a>
@endif
<a href="{{ route('admin.removerProjAval', ['trabalho_id' => $trabalho->id, 'avaliador_id' => $avaliador->id,'flag'=>0]) }}" class="dropdown-item text-center">
Desatribuir Avaliador
</a>
</div>
</div>
</td>
</tr>
@endif
@endforeach
@endforeach
</tbody>
</table>
<!-- Modal enviar convite e atribuir -->
<div class="modal fade" id="modalConviteAval" tabindex="-1" role="dialog"
......
......@@ -88,18 +88,18 @@
<div class="row col-md-12">
<div class="form-group col-md-12">
<label for="ods" class="col-form-label" style="font-weight: bold">{{ __('Objetivo de Densenvolvimento Sustentável') }} <span style="color: red; font-weight:bold">*</span></label><br>
<label for="ods_id" class="col-form-label" style="font-weight: bold">{{ __('Objetivo de Densenvolvimento Sustentável') }} <span style="color: red; font-weight:bold">*</span></label><br>
<div class="row col-md-12">
@foreach($ods as $od)
<div class="col-md-6">
<input type="checkbox" name="ods[]" id="ods{{$od->id}}" value="{{$od->id}}">
<input type="checkbox" name="ods[]" id="ods{{$od->id}}" class="@error('ods_id') is-invalid @enderror" value="{{$od->id}}" @if(!empty(old('ods')) && in_array($od->id, old('ods'))) checked @endif>
<label class="form-check-label" for="ods{{$od->id}}">
{{ $od->nome }}
</label>
</div>
@endforeach
</div>
@error('ods_id')
@error('ods')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
......
......@@ -93,13 +93,18 @@
<div class="row col-md-12">
@foreach($listaOds as $ods)
<div class="col-md-6">
<input type="checkbox" name="ods[]" id="ods{{$ods->id}}" value="{{$ods->id}}" @if($projeto->ods->contains($ods->id)) checked @endif >
<input type="checkbox" name="ods[]" id="ods{{$ods->id}}" value="{{$ods->id}}" @if((empty(old('ods')) && $projeto->ods->contains($ods->id)) || (!empty(old('ods')) && in_array($ods->id, old('ods')))) checked @endif >
<label class="form-check-label" for="ods{{$ods->id}}">
{{ $ods->nome }}
</label>
</div>
@endforeach
</div>
@error('ods')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
@endif
......
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