Unverified Commit edb8bac8 authored by GuilhermeGz's avatar GuilhermeGz Committed by GitHub
Browse files

Merge pull request #224 from GuilhermeGz/master

Atualização da semana 
parents bf9c24ab a3cd5ff7
...@@ -175,7 +175,7 @@ ...@@ -175,7 +175,7 @@
@if(Auth::user()->avaliadors->tipo == "Interno") @if(Auth::user()->avaliadors->tipo == "Interno")
<a href="" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);pointer-events: none;" >Comissão Interna</a> <a href="" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);pointer-events: none;" >Comissão Interna</a>
@elseif(Auth::user()->avaliadors->tipo == "Externo") @elseif(Auth::user()->avaliadors->tipo == "Externo")
<a href="" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);pointer-events: none;" >Comissão Externa</a> <a href="" class="btn navbar-text negrito " style="color: rgb(0, 140, 255);pointer-events: none;" >Comissão <i>Ad Hoc</i></a>
@endif @endif
@endif @endif
......
...@@ -13,21 +13,24 @@ ...@@ -13,21 +13,24 @@
<div class="row justify-content-center titulo-menu mb-0"> <div class="row justify-content-center titulo-menu mb-0">
<h4>Planos de Trabalho </h4> <h4>Planos de Trabalho </h4>
</div> </div>
<div class="card-body" style="width: 75% !important;margin: auto;"> <div style=" !important;margin: auto;">
<table class="table table-bordered table-hover" style="display: block; overflow-x: visible; white-space: nowrap; border-radius:10px; margin-bottom:0px"> <table class="table table-bordered table-hover" style="display: block; overflow-x: visible; white-space: nowrap; border-radius:10px; margin-bottom:0px">
<thead> <thead>
<tr> <tr>
<th scope="col" style="width:400px; text-align: center;">Título</th> <th scope="col" style="width:400px; text-align: center;">Projeto</th>
<th scope="col" style="width:400px; text-align: center;">Proponente</th>
<th scope="col" style="width:400px; text-align: center;">Título do Plano</th>
<th scope="col" style="width:200px; text-align: center;">Discente</th> <th scope="col" style="width:200px; text-align: center;">Discente</th>
<th scope="col" style="width:200px; text-align: center;">Relatório Parcial</th> <th scope="col" style="width:200px; text-align: center;">Relatório Parcial</th>
<th scope="col" style="width:200px; text-align: center;">Relatório Final</th> <th scope="col" style="width:200px; text-align: center;">Relatório Final</th>
</tr> </tr>
</thead> </thead>
@foreach($arquivos as $arquivo) @foreach($arquivos as $arquivo)
<tbody> <tbody>
<td style="text-align: center;" title="{{$arquivo->trabalho->titulo}}">{{$arquivo->trabalho->titulo}}</td>
<td style="text-align: center;" title="{{$arquivo->trabalho->proponente->user->name}}">{{$arquivo->trabalho->proponente->user->name}}</td>
<td style="text-align: center;" title="{{$arquivo->titulo}}">{{$arquivo->titulo}}</td> <td style="text-align: center;" title="{{$arquivo->titulo}}">{{$arquivo->titulo}}</td>
<td style="text-align: center;" title="{{$arquivo->participante->user->name}}" id="td-nomeAluno">{{$arquivo->participante->user->name}}</td> <td style="text-align: center;" title="{{$arquivo->participante->user->name}}" id="td-nomeAluno">{{$arquivo->participante->user->name}}</td>
<td style="text-align: center;"> <td style="text-align: center;">
...@@ -225,7 +228,7 @@ ...@@ -225,7 +228,7 @@
<style> <style>
td { td {
max-width: 40ch; max-width: 25ch;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
......
...@@ -131,78 +131,70 @@ ...@@ -131,78 +131,70 @@
@endcomponent @endcomponent
</div> </div>
<div class="col-md-12"><h5>Endereço</h5></div> <div class="col-md-12"><h5>Endereço</h5></div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'CEP']) @component('componentes.input', ['label' => 'CEP'])
<input type="text" class="form-control cep" value="{{old('cep')[$i] ?? ($participante->user->endereco->cep ?? "") }}" name="cep[{{$i}}]" placeholder="CEP" /> <input name="cep[{{$i}}]" type="text" id="cep{{$i}}"
value="{{ old('cep')[$i] ?? ($participante->user->endereco->cep ?? '') }}" class="form-control cep"
onblur="pesquisacep(this.value, {{$i}})" />
@error('cep.'.$i) @error('cep.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.select', ['label' => 'Estado']) @component('componentes.input', ['label' => 'Estado'])
<select name="uf[{{$i}}]" id="estado" class="form-control" style="visibility: visible" > <input name="uf[{{$i}}]" type="text" class="form-control"
<option value="" selected>-- Selecione uma opção --</option> value="{{ old('uf')[$i] ?? ($participante->user->endereco->uf ?? '') }}" id="uf{{$i}}" />
@foreach ($estados as $sigla => $nome)
<option @if(old('uf')[$i] ?? ($participante->user->endereco->uf ?? "") ) == $sigla ) selected @endif value="{{ $sigla }}">{{ $nome }}</option>
@endforeach
</select>
@error('uf.'.$i) @error('uf.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Cidade']) @component('componentes.input', ['label' => 'Cidade'])
<input type="text" class="form-control" value="{{old('cidade')[$i] ?? ($participante->user->endereco->cidade ?? "") }}" name="cidade[{{$i}}]" placeholder="Cidade" maxlength="50" id="cidade{{$i}}" /> <input name="cidade[{{$i}}]" type="text" id="cidade{{$i}}" class="form-control"
<span style="color: red; font-size: 12px" id="caracsRestantescidade{{$i}}"> value="{{ old('cidade')[$i] ?? ($participante->user->endereco->cidade ?? '') }}" />
</span>
@error('cidade.'.$i) @error('cidade.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Bairro']) @component('componentes.input', ['label' => 'Bairro'])
<input type="text" class="form-control" value="{{old('bairro')[$i] ?? ($participante->user->endereco->bairro ?? "") }}" name="bairro[{{$i}}]" placeholder="Bairro" maxlength="50" id="bairro{{$i}}" /> <input name="bairro[{{$i}}]" type="text" id="bairro{{$i}}" class="form-control"
<span style="color: red; font-size: 12px" id="caracsRestantesbairro{{$i}}"> value="{{ old('bairro')[$i] ?? ($participante->user->endereco->bairro ?? '') }}" />
</span>
@error('bairro.'.$i) @error('bairro.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Rua']) @component('componentes.input', ['label' => 'Rua'])
<input type="text" class="form-control" value="{{old('rua')[$i] ?? ($participante->user->endereco->rua ?? "")}}" name="rua[{{$i}}]" placeholder="Rua" maxlength="100" id="rua{{$i}}" /> <input name="rua[{{$i}}]" type="text" id="rua{{$i}}" class="form-control"
<span style="color: red; font-size: 12px" id="caracsRestantesrua{{$i}}"> value="{{ old('rua')[$i] ?? ($participante->user->endereco->rua ?? '') }}" />
</span>
@error('rua.'.$i) @error('rua.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-6"> <div class="col-6">
@component('componentes.input', ['label' => 'Número']) @component('componentes.input', ['label' => 'Número'])
<input type="text" class="form-control" value="{{old('numero')[$i] ?? ($participante->user->endereco->numero ?? "") }}" name="numero[{{$i}}]" placeholder="Número" /> <input name="numero[{{$i}}]" type="text" class="form-control"
value="{{ old('numero')[$i] ?? ($participante->user->endereco->numero ?? '') }}" />
@error('numero.'.$i) @error('numero.'.$i)
<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></span>
<strong>{{ $message }}</strong>
</span>
@enderror @enderror
@endcomponent @endcomponent
</div> </div>
<div class="col-12"> <div class="col-12">
<div class="form-group"> <div class="form-group">
<label class=" control-label" for="firstname">Complemento</label> <label class=" control-label" for="firstname">Complemento</label>
...@@ -418,7 +410,77 @@ ...@@ -418,7 +410,77 @@
</div> </div>
</div> </div>
<script> <script>
function limpa_formulário_cep(id) {
//Limpa valores do formulário de cep.
document.getElementById(`rua${id}`).value=("");
document.getElementById(`bairro${id}`).value=("");
document.getElementById(`cidade${id}`).value=("");
document.getElementById(`uf${id}`).value=("");
//document.getElementById('ibge').value=("");
}
let cont = 0; //Esse cont representa a adição de cada aluno
function meu_callback(conteudo) {
if (!("erro" in conteudo)) {
//Atualiza os campos com os valores.
document.getElementById(`rua${cont}`).value=(conteudo.logradouro);
document.getElementById(`bairro${cont}`).value=(conteudo.bairro);
document.getElementById(`cidade${cont}`).value=(conteudo.localidade);
document.getElementById(`uf${cont}`).value=(conteudo.uf);
//document.getElementById('ibge').value=(conteudo.ibge);
} //end if.
else {
//CEP não Encontrado.
limpa_formulário_cep(cont);
alert("CEP não encontrado.");
}
}
function pesquisacep(valor, id) {
//Nova variável "cep" somente com dígitos.
var cep = valor.replace(/\D/g, '');
//Verifica se campo cep possui valor informado.
if (cep != "") {
//Expressão regular para validar o CEP.
var validacep = /^[0-9]{8}$/;
//Valida o formato do CEP.
if(validacep.test(cep)) {
//Preenche os campos com "..." enquanto consulta webservice.
document.getElementById(`rua${id}`).value="...";
document.getElementById(`bairro${id}`).value="...";
document.getElementById(`cidade${id}`).value="...";
document.getElementById(`uf${id}`).value="...";
//document.getElementById('ibge').value="...";
//Cria um elemento javascript.
var script = document.createElement('script');
//Sincroniza com o callback.
cont = id
script.src = 'https://viacep.com.br/ws/'+ cep + '/json/?callback=meu_callback';
//Insere script no documento e carrega o conteúdo.
document.body.appendChild(script);
} //end if.
else {
//cep é inválido.
limpa_formulário_cep(id);
alert("Formato de CEP inválido.");
}
} //end if.
else {
//cep sem valor, limpa formulário.
limpa_formulário_cep(id);
}
};
</script> </script>
<!--X Participantes X-->
...@@ -257,31 +257,6 @@ ...@@ -257,31 +257,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 () {
$('#nomeParticipante').keyup(function () {
$('#display').text($(this).val());
if($('#nomeParticipante').val() == ""){
$('#display').hide();
$('#pontos').hide();
}else{
$('#display').show();
$('#pontos').show();
}
});
$.validator.addMethod("alpha", function(value, element) { $.validator.addMethod("alpha", function(value, element) {
return this.optional(element) || value == value.match(/^[A-Za-záàâãéèêíïóôõöúçñÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ ]+$/); return this.optional(element) || value == value.match(/^[A-Za-záàâãéèêíïóôõöúçñÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ ]+$/);
......
...@@ -19,9 +19,10 @@ ...@@ -19,9 +19,10 @@
>{{ App\Proponente::where('id', $projeto->proponente_id)->first()->linkLattes }}</a> >{{ App\Proponente::where('id', $projeto->proponente_id)->first()->linkLattes }}</a>
@endif @endif
</div> </div>
@if( (Auth::user()->avaliadors != null) && (Auth::user()->avaliadors->tipo != 'Externo' || Auth::user()->avaliadors->tipo == null)) @if( (Auth::user()->avaliadors != null) && (Auth::user()->avaliadors->tipo != 'Externo' || Auth::user()->avaliadors->tipo == null)
&& ($edital->natureza_id != 3 || $projeto->status != "rascunho"))
<!-- só pagar oq tem dps do || para funcionar para submetido e rascunho! EXTENSÃO(3)!!! -->
<div class="col-md-12"> <div class="col-md-12">
<br> <br>
<b style="color: #4D4D4D;">Grupo de Pesquisa: </b> <b style="color: #4D4D4D;">Grupo de Pesquisa: </b>
...@@ -36,6 +37,15 @@ ...@@ -36,6 +37,15 @@
<a style="color: #4D4D4D;">{{$projeto->pontuacaoPlanilha}}</a> <a style="color: #4D4D4D;">{{$projeto->pontuacaoPlanilha}}</a>
</div> </div>
@endif @endif
@if($edital->natureza_id == 3)
<div class="col-md-12">
<br>
<b style="color: #4D4D4D;">Área Temática:</b>
<a style="color: #4D4D4D;">{{App\AreaTematica::where('id', $projeto->area_tematica_id)->first()->nome}}</a>
</div>
@endif
@if($projeto->modalidade!=null) @if($projeto->modalidade!=null)
<div class="col-md-12"> <div class="col-md-12">
<br> <br>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
['edital' => $edital, 'projeto' => $projeto]) ['edital' => $edital, 'projeto' => $projeto])
@endcomponent @endcomponent
@component('projeto.formularioVisualizar.proponente2', ['projeto' => $projeto]) @component('projeto.formularioVisualizar.proponente2', ['projeto' => $projeto, 'edital' => $edital, 'areasTematicas' => $areasTematicas])
@endcomponent @endcomponent
@component('projeto.formularioVisualizar.anexos2', ['edital' => $edital,'projeto' => $projeto]) @component('projeto.formularioVisualizar.anexos2', ['edital' => $edital,'projeto' => $projeto])
......
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