Commit 12d84e97 authored by Gabriel-31415's avatar Gabriel-31415
Browse files

submissao e rascunho e visualizar

Showing with 1506 additions and 664 deletions
+1506 -664
......@@ -12,7 +12,7 @@ class Arquivo extends Model
* @var array
*/
protected $fillable = [
'nome', 'versao', 'versaoFinal', 'data', 'trabalhoId', 'participanteId'
'nome','titulo', 'versao', 'versaoFinal', 'data', 'trabalhoId', 'participanteId'
];
public function trabalho(){
......
This diff is collapsed.
......@@ -33,7 +33,6 @@ class StoreTrabalho extends FormRequest
'titulo' => ['required', 'string'],
'grande_area_id' => ['required', 'string'],
'area_id' => ['required', 'string'],
'sub_area_id' => ['required', 'string'],
'linkLattesEstudante' => ['required', 'string'],
'pontuacaoPlanilha' => ['required', 'string'],
'linkGrupoPesquisa' => ['required', 'string'],
......@@ -80,7 +79,6 @@ class StoreTrabalho extends FormRequest
}
}
// dd($rules);
if ($this->has('rascunho')) {
return [
......
......@@ -2,7 +2,10 @@
namespace App\Http\Requests;
use App\Trabalho;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class UpdateTrabalho extends FormRequest
{
......@@ -13,7 +16,7 @@ class UpdateTrabalho extends FormRequest
*/
public function authorize()
{
return false;
return true;
}
/**
......@@ -23,8 +26,69 @@ class UpdateTrabalho extends FormRequest
*/
public function rules()
{
return [
//
$projeto = Trabalho::find($this->id);
$rules = [
'editalId' => ['required', 'string'],
'marcado.*' => ['required'],
'titulo' => ['required', 'string'],
'grande_area_id' => ['required', 'string'],
'area_id' => ['required', 'string'],
'linkLattesEstudante' => ['required', 'string'],
'pontuacaoPlanilha' => ['required', 'string'],
'linkGrupoPesquisa' => ['required', 'string'],
'anexoProjeto' => [[Rule::requiredIf(!$this->has('rascunho') && $projeto->anexoProjeto == null)], 'mimes:pdf'],
'anexoDecisaoCONSU' => ['mimes:pdf'],
'anexoPlanilhaPontuacao' => [[Rule::requiredIf(!$this->has('rascunho') && $projeto->anexoPlanilhaPontuacao == null)]],
'anexoLattesCoordenador' => [[Rule::requiredIf(!$this->has('rascunho') && $projeto->anexoLattesCoordenador == null)], 'mimes:pdf'],
'anexoGrupoPesquisa' => [[Rule::requiredIf(!$this->has('rascunho') && $projeto->anexoGrupoPesquisa == null)], 'mimes:pdf'],
'anexoAutorizacaoComiteEtica' => [
Rule::requiredIf((!$this->has('rascunho') && $projeto->anexoAutorizacaoComiteEtica == null) )
],
'justificativaAutorizacaoEtica' => [
Rule::requiredIf((!$this->has('rascunho') && $projeto->anexoAutorizacaoComiteEtica == null))
],
];
if($this->has('marcado')){
foreach ($this->get('marcado') as $key => $value) {
if( intval($value) == $key){
//user
$rules['name.'.$value] = ['required', 'string'];
$rules['email.'.$value] = ['required', 'string'];
$rules['instituicao.'.$value] = ['required', 'string'];
$rules['cpf.'.$value] = ['required', 'string'];
$rules['celular.'.$value] = ['required', 'string'];
//endereco
$rules['rua.'.$value] = ['required', 'string'];
$rules['numero.'.$value] = ['required', 'string'];
$rules['bairro.'.$value] = ['required', 'string'];
$rules['cidade.'.$value] = ['required', 'string'];
$rules['uf.'.$value] = ['required', 'string'];
$rules['cep.'.$value] = ['required', 'string'];
$rules['complemento.'.$value] = ['required', 'string'];
//participante
$rules['rg.'.$value] = ['required', 'string'];
$rules['data_de_nascimento.'.$value] = ['required', 'string'];
$rules['curso.'.$value] = ['required', 'string'];
$rules['turno.'.$value] = ['required', 'string'];
$rules['ordem_prioridade.'.$value] = ['required', 'string'];
$rules['periodo_atual.'.$value] = ['required', 'string'];
$rules['total_periodos.'.$value] = ['required', 'string'];
$rules['media_do_curso.'.$value] = ['required', 'string'];
$rules['nomePlanoTrabalho.'.$value] = ['required', 'string'];
}
}
}
// dd($this->all());
if ($this->has('rascunho')) {
return [
];
}else{
return $rules;
}
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterTableArquivos extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('arquivos', function (Blueprint $table) {
$table->string('nome')->nullable()->change();
$table->string('titulo')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('arquivos', function (Blueprint $table) {
//
});
}
}
@php
$class = $class ?? " ";
$obrigatorio = $obrigatorio ?? " ";
// $obrigatorio = $obrigatorio ?? " ";
@endphp
<div class="form-group">
<label class=" control-label {{ $class }}" for="firstname">{{ $label }} @if($obrigatorio) <span style="color: red; font-weight:bold">*</span> @endif</label>
<label class=" control-label {{ $class }}" for="firstname">{{ $label }} <span style="color: red; font-weight:bold">*</span></label>
{{ $slot }}
<div class="">
{{ $slot }}
</div>
</div>
......@@ -42,14 +42,13 @@
@endcomponent
</div>
<div class="form-group col-md-6">
@component('componentes.input', ['label' => 'Decisão do CONSU (.pdf)'])
<input type="file" class="input-group-text" name="anexoDecisaoCONSU" placeholder="anexoDecisaoCONSU" accept=".pdf" />
<label class=" control-label" for="firstname">Decisão do CONSU (.pdf)</label>
<input type="file" class="input-group-text" name="anexoDecisaoCONSU" accept=".pdf" />
@error('anexoDecisaoCONSU')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
@enderror
</div>
<div class="form-group col-md-6" style="margin-top: 10px">
......
......@@ -70,13 +70,8 @@
</div>
<div class="col-6">
@component('componentes.input', ['label' => 'CPF'])
<input type="text" class="form-control cpf" value="{{old('cpf')[$i] ?? "" }}" name="cpf[{{$i}}]" placeholder="CPF" onchange="checarCPFdoCampo(this)" onkeyup="mascaraCPF(this)"/>
<span id="cpf-invalido-1" class="invalid-feedback cpf-invalido" role="alert" style="overflow: visible; display:none">
<span style="font-style: italic;">CPF inválido.</span>
</span>
<span id="cpf-valido-1" class="valid-feedback" role="alert" style="overflow: visible; display:none">
<span style="font-style: italic;">CPF válido.</span>
</span>
<input type="text" class="form-control cpf" value="{{old('cpf')[$i] ?? "" }}" name="cpf[{{$i}}]" placeholder="CPF" />
@error('cpf.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
......@@ -107,7 +102,7 @@
<div class="col-md-12"><h5>Endereço</h5></div>
<div class="col-6">
@component('componentes.input', ['label' => 'CEP'])
<input type="number" class="form-control" value="{{old('cep')[$i] ?? "" }}" name="cep[{{$i}}]" placeholder="CEP" />
<input type="text" class="form-control" value="{{old('cep')[$i] ?? "" }}" name="cep[{{$i}}]" placeholder="CEP" />
@error('cep.'.$i)
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
......
......@@ -13,12 +13,23 @@
<div class="row justify-content-center">
<div class="col-12">
@component('componentes.input', ['label' => 'Projeto (.pdf)'])
<input type="file" class="input-group-text" name="anexoProjeto" placeholder="nomeProjeto" accept="application/pdf" />
<input type="file" class="input-group-text" name="anexoProjeto" accept="application/pdf" />
@error('anexoProjeto')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-3 ">
<a href="{{ route('baixar.anexo.projeto', ['id' => $projeto->id])}}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoProjeto)
<div class="col-3 ">
<a href="{{ route('baixar.anexo.projeto', ['id' => $projeto->id])}}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
{{-- Anexo do currículo --}}
......@@ -26,12 +37,23 @@
<div class="row justify-content-center">
<div class="col-12">
@component('componentes.input', ['label' => 'Currículo Lattes do Proponente (.pdf)'])
<input type="file" class="input-group-text" name="anexoLattesCoordenador" placeholder="anexoPlanoTrabalho" accept=".pdf" />
<input type="file" class="input-group-text" name="anexoLattesCoordenador" accept=".pdf" />
@error('anexoLattesCoordenador')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-3 ">
<a href="{{ route('baixar.anexo.lattes', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoLattesCoordenador)
<div class="col-3 ">
<a href="{{ route('baixar.anexo.lattes', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
{{-- Anexo da Planilha de Pontuação --}}
......@@ -39,12 +61,24 @@
<div class="row justify-content-center">
<div class="col-12">
@component('componentes.input', ['label' => 'Planilha de Pontuação (.xlsx,.xls,.ods)'])
<input type="file" class="input-group-text" name="anexoPlanilha" placeholder="anexoPlanoTrabalho" accept=".xlsx, .xls, .ods" />
<input type="file" class="input-group-text" name="anexoPlanilhaPontuacao" accept=".xlsx, .xls, .ods" />
@error('anexoPlanilhaPontuacao')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-3 ">
<a href="{{ route('baixar.anexo.planilha', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoPlanilhaPontuacao)
<div class="col-3 ">
<a href="{{ route('baixar.anexo.planilha', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
......@@ -52,13 +86,28 @@
<div class="form-group col-md-6" style="margin-top: 10px">
<div class="row justify-content-center">
<div class="col-12">
@component('componentes.input', ['label' => 'Decisão do CONSU (.pdf)'])
<input type="file" class="input-group-text" name="anexoConsuPreenchido" placeholder="anexoConsuPreenchido" accept=".pdf" />
@endcomponent
</div>
<div class="col-3 ">
<a href="{{ route('baixar.anexo.consu', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
<div class="form-group">
<label class=" control-label" for="firstname">Decisão do CONSU (.pdf)</label>
<input type="file" class="input-group-text" name="anexoDecisaoCONSU" accept=".pdf" />
@error('anexoDecisaoCONSU')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
@if($projeto->anexoDecisaoCONSU)
<div class="col-3 ">
<a href="{{ route('baixar.anexo.consu', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
......@@ -68,20 +117,32 @@
<div class="col-12">
@component('componentes.input', ['label' => 'Grupo de Pesquisa (.pdf)'])
<input type="file" class="input-group-text" name="anexoGrupoPesquisa" placeholder="Anexo do Grupo de Pesquisa" accept="application/pdf" />
@error('anexoGrupoPesquisa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="col-3 ">
<a href="{{ route('baixar.anexoGrupoPesquisa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoGrupoPesquisa)
<div class="col-3 ">
<a href="{{ route('baixar.anexoGrupoPesquisa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
<div class="form-group col-md-6">
<label for="botao" class="col-form-label @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="margin-right: 15px;">{{ __('Possui autorizações especiais?') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="radio" checked id="radioSim" onchange="displayAutorizacoesEspeciais('sim')">
<input type="radio" checked id="radioSim" name="sim" onchange="displayAutorizacoesEspeciais('sim')">
<label for="radioSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="radioNao" onchange="displayAutorizacoesEspeciais('nao')">
<input type="radio" id="radioNao" name="nao" onchange="displayAutorizacoesEspeciais('nao')">
<label for="radioNao" style="margin-right: 5px">Não</label><br>
<span id="idAvisoAutorizacaoEspecial" class="invalid-feedback" role="alert" style="overflow: visible; display:none">
<strong>Selecione a autorização e envie o arquivo!</strong>
......@@ -89,20 +150,52 @@
<div class="form-group" id="displaySim" style="display: block; margin-top:-1rem">
@component('componentes.input', ['label' => 'Sim, declaro que necessito de autorizações especiais (.pdf)'])
<input type="file" class="input-group-text" name="anexoComiteEtica" placeholder="anexoComiteEtica" accept=".pdf" />
<input type="file" class="input-group-text" name="anexoAutorizacaoComiteEtica" accept=".pdf" />
<div class="row justify-content-center">
@if($projeto->justificativaAutorizacaoEtica || $projeto->anexoAutorizacaoComiteEtica )
<div class="row justify-content-center">
<div class="col-3 mt-2">
<a href="{{ route('baixar.anexo.comite', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
@error('anexoAutorizacaoComiteEtica')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="form-group" id="displayNao" style="display: none; margin-top:-1rem">
@component('componentes.input', ['label' => 'Declaração de que não necessito de autorização especiais (.pdf)'])
<input type="file" class="input-group-text" name="inputJustificativa" placeholder="inputJustificativa" accept=".pdf" />
@endcomponent
</div>
<div class="row justify-content-center">
<div class="col-3 ">
<a href="{{ route('baixar.anexo.justificativa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
<input type="file" class="input-group-text" name="justificativaAutorizacaoEtica" accept=".pdf" />
@if($projeto->justificativaAutorizacaoEtica || $projeto->anexoAutorizacaoComiteEtica )
<div class="row justify-content-center">
<div class="col-3 mt-2">
<a href="{{ route('baixar.anexo.justificativa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
@error('justificativaAutorizacaoEtica')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
</div>
......
......@@ -12,7 +12,8 @@
<div class=" d-flex justify-content-between align-items-center" style="margin-top: 15px; margin-bottom:18px">
<h6 style="font-family:Arial, Helvetica, sans-serif; margin-right:15px"><span style="color: red; font-weight:bold">*</span> Campos obrigatórios</h6>
<button id="submeterFormProposta" type="submit" style="display: none;"></button>
<button type="button" class="btn btn-success" id="idButtonSubmitProjeto" onclick="submeterProposta()">{{ __('Atualizar Projeto') }}</button>
<button type="submit" class="btn btn-primary " id="idButtonSubmitRascunho" >{{ __('Atualizar rascunho') }}</button>
<button type="submit" class="btn btn-success" id="idButtonSubmitProjeto" >{{ __('Atualizar Proposta') }}</button>
</div>
</div>
</div>
......
......@@ -11,24 +11,24 @@
<div class="col-md-12" style="margin-bottom: -0.8rem;"><hr style="border-top: 1px solid#1492E6"></div>
<div class="form-group col-md-12" style="margin-top: 10px">
<label for="nomeProjeto" class="col-form-label">{{ __('Nome do Projeto') }} <span style="color: red; font-weight:bold">*</span></label>
<input id="nomeProjeto" type="text" class="form-control @error('nomeProjeto') is-invalid @enderror" name="nomeProjeto" placeholder="Digite o nome do projeto" value="{{ $projeto->titulo }}" autocomplete="nomeProjeto" required >
@error('nomeProjeto')
<label for="titulo" class="col-form-label">{{ __('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="{{old('titulo') ?? $projeto->titulo}}" autocomplete="titulo" >
@error('titulo')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
{{-- @dd($projeto->grandeArea->nome) --}}
<div class="form-group col-md-4">
<label for="grandeArea" class="col-form-label">{{ __('Grande Área') }} <span style="color: red; font-weight:bold">*</span></label>
<select class="form-control @error('grandeArea') is-invalid @enderror" id="grandeArea" name="grandeArea" onchange="areas()" required>
<select class="form-control @error('grandeArea') is-invalid @enderror" id="grandeArea" name="grande_area_id" onchange="areas()" >
<option value="" disabled selected hidden>-- Grande Área --</option>
@foreach($grandeAreas as $grandeArea)
<option @if($projeto->grandeArea->id ?? "" == $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
<option @if($projeto->grande_area_id == $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
@endforeach
</select>
@error('grandeArea')
@error('grande_area_id')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
......@@ -37,13 +37,12 @@
<div class="form-group col-md-4">
<label for="area" class="col-form-label">{{ __('Área') }} <span style="color: red; font-weight:bold">*</span></label>
<input type="hidden" id="oldArea" value="{{ old('area') }}" >
<select class="form-control @error('area') is-invalid @enderror" id="area" name="area" onchange="subareas()" required>
<select class="form-control @error('area') is-invalid @enderror" id="area" name="area_id" onchange="subareas()" >
@foreach($areas as $area)
<option @if($projeto->area->id ?? "" == $area->id ) selected @endif value="{{$area->id}}">{{$area->nome}}</option>
<option @if($projeto->area_id == $area->id ) selected @endif value="{{$area->id}}">{{$area->nome}}</option>
@endforeach
</select>
@error('area')
@error('area_id')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
......@@ -52,16 +51,15 @@
<div class="form-group col-md-4">
<label for="subArea" class="col-form-label">{{ __('Subárea') }} </label>
<input type="hidden" id="oldSubArea" value="{{ old('subArea') }}" >
<select class="form-control @error('subArea') is-invalid @enderror" id="subArea" name="subArea" >
<option value="" disabled selected hidden>-- Subárea --</option>
@if ($projeto->subarea != null)
@foreach($subareas as $subarea)
<option @if($projeto->subarea->id ?? "" == $subarea->id ) selected @endif value="{{$subarea->id}}">{{$subarea->nome}}</option>
<select class="form-control @error('subArea') is-invalid @enderror" id="subArea" name="sub_area_id" >
<@if ($projeto->subarea != null)
@foreach($subAreas as $subarea)
<option @if($projeto->sub_area_id == $subarea->id ) selected @endif value="{{$subarea->id}}">{{$subarea->nome}}</option>
@endforeach
@endif
</select>
@error('subArea')
@error('sub_area_id')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
......
......@@ -22,7 +22,7 @@
value="{{ Auth()->user()->proponentes->linkLattes }}"
@else
value=""
@endif required >
@endif >
<small>Ex.: http://lattes.cnpq.br/8363536830656923</small>
@error('linkLattesEstudante')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
......@@ -32,12 +32,12 @@
</div>
<div class="form-group col-md-6">
<label for="linkGrupo">Link do grupo de pesquisa</label>
<input class="form-control @error('linkGrupo') is-invalid @enderror" type="url" name="linkGrupo"
value="{{ $projeto->linkGrupoPesquisa }}" required>
<label for="linkGrupoPesquisa">Link do grupo de pesquisa</label>
<input class="form-control @error('linkGrupoPesquisa') is-invalid @enderror" type="url" name="linkGrupoPesquisa"
value="{{ $projeto->linkGrupoPesquisa }}" >
<small>Ex.: http://dgp.cnpq.br/dgp/espelhogrupo/228363</small>
@error('linkGrupo')
@error('linkGrupoPesquisa')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
......@@ -46,7 +46,7 @@
<div class="form-group col-md-6">
<label for="pontuacaoPlanilha">Valor da planilha de pontuação <span style="color: red; font-weight:bold">*</span></label>
<input class="form-control @error('pontuacaoPlanilha') is-invalid @enderror" type="number" min="0" name="pontuacaoPlanilha"
value="{{ $projeto->pontuacaoPlanilha }}" required>
value="{{ $projeto->pontuacaoPlanilha }}" >
@error('pontuacaoPlanilha')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
......
......@@ -4,34 +4,46 @@
<div>
{{-- action="{{route('trabalho.store')}}" --}}
<form method="POST" id="criarProjetoForm" action="{{route('trabalho.update', ['id' => $projeto->id])}}" enctype="multipart/form-data" >
<form method="POST" id="updateProjetoForm" action="{{route('trabalho.update', ['id' => $projeto->id])}}" enctype="multipart/form-data" >
@csrf
<input type="hidden" name="editalId" value="{{$edital->id}}">
<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">
@component('projeto.editaFormulario.projeto',
['grandeAreas' => $grandeAreas, 'projeto' => $projeto,
'areas' => $areas, 'subareas' => $subAreas])
@endcomponent
@include('projeto.editaFormulario.projeto')
@include('projeto.editaFormulario.proponente')
@component('projeto.editaFormulario.proponente', ['projeto' => $projeto])
@endcomponent
@component('projeto.editaFormulario.anexos', ['projeto' => $projeto])
@endcomponent
@include('projeto.editaFormulario.anexos')
@component('projeto.editaFormulario.participantes', ['estados' => $estados, 'enum_turno' => $enum_turno, 'projeto' => $projeto, 'participantes' => $participantes, 'arquivos' =>$arquivos])
@endcomponent
@component('projeto.editaFormulario.finalizar', ['projeto' => $projeto])
@endcomponent
@include('projeto.editaFormulario.participantes')
{{-- @include('projeto.editaFormulario.participantes', ['estados' => $estados, 'enum_turno' => $enum_turno, 'edital'=>$edital, 'projeto' => $projeto])
--}}
@include('projeto.editaFormulario.finalizar')
</div>
</div>
......@@ -93,8 +105,10 @@
<script>
let buttonSubmit = document.getElementById('idButtonSubmitProjeto');
let buttonRascunho = document.getElementById('idButtonSubmitRascunho');
let parts = document.getElementById('participante');
let partsFirst = document.getElementById('participanteFirst');
const participante = partsFirst.firstElementChild;
......@@ -102,6 +116,12 @@
buttonSubmit.addEventListener('click', (e)=>{
$('.collapse').addClass('show')
})
buttonRascunho.addEventListener('click', (e)=>{
$('.collapse').addClass('show')
const input = '<input id="input_rascunho" type="hidden" name="rascunho" value="true">';
$("#updateProjetoForm").append(input);
})
function gerarPeriodo(e){
......@@ -123,7 +143,7 @@
}else{
parts.removeChild(e.parentElement.parentElement);
contador--;
//contador--;
}
}
......@@ -142,19 +162,19 @@
cln.children[2].firstElementChild.setAttribute('id', id + contador);
cln.children[0].firstElementChild.setAttribute('href', "#collapseParticipante" + contador);
cln.children[0].firstElementChild.setAttribute('id', id2 + contador);
for (i = 0; i < cln.children.length; i++) {
for (let index = 0; index < cln.children[i].querySelectorAll('input').length; index++) {
let input = cln.children[i].querySelectorAll('input')[index];
let name = input.getAttributeNode("name").value;
name = name.replace("[]", "");
// input.getAttributeNode("name").value = name + '['+ contador +']';
input.getAttributeNode("name").value = name + '['+ contador +']';
let select = cln.children[i].querySelectorAll('select')[index];
if(select){
let selectName = select.getAttributeNode("name").value;
selectName = selectName.replace("[", "");
selectName = selectName.replace("]", "");
// select.getAttributeNode("name").value = selectName + '['+ contador +']';
select.getAttributeNode("name").value = selectName + '['+ contador +']';
}
}
......@@ -168,9 +188,7 @@
}
};
parts.appendChild(cln);
// console.log(cln);
$(cln).find(".cpf").val("").mask("000.000.000-00");
// $("input.cpf:text").val("").mask("000.000.000-00");
$("input.cpf:text").val("").mask("000.000.000-00");
$("input.celular:text").val("").mask(SPMaskBehavior, spOptions);
$("input.cep:text").val("").mask("00000-000");
......@@ -228,145 +246,144 @@
$.validator.setDefaults( {
// $.validator.setDefaults( {
submitHandler: function (form) {
form.submit();
}
} );
jQuery.extend(jQuery.validator.messages, {
required: "Este campo &eacute; requerido.",
remote: "Por favor, corrija este campo.",
email: "Por favor, forne&ccedil;a um endere&ccedil;o eletr&ocirc;nico v&aacute;lido.",
url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
dateISO: "Por favor, forne&ccedil;a uma data v&aacute;lida (ISO).",
number: "Por favor, forne&ccedil;a um n&uacute;mero v&aacute;lido.",
digits: "Por favor, forne&ccedil;a somente d&iacute;gitos.",
creditcard: "Por favor, forne&ccedil;a um cart&atilde;o de cr&eacute;dito v&aacute;lido.",
equalTo: "Por favor, forne&ccedil;a o mesmo valor novamente.",
accept: "Por favor, forne&ccedil;a um valor com uma extens&atilde;o v&aacute;lida.",
maxlength: jQuery.validator.format("Por favor, forne&ccedil;a n&atilde;o mais que {0} caracteres."),
minlength: jQuery.validator.format("Por favor, forne&ccedil;a ao menos {0} caracteres."),
rangelength: jQuery.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1} caracteres de comprimento."),
range: jQuery.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1}."),
max: jQuery.validator.format("Por favor, forne&ccedil;a um valor menor ou igual a {0}."),
min: jQuery.validator.format("Por favor, forne&ccedil;a um valor maior ou igual a {0}.")
});
$( "#criarProjetoForm" ).validate( {
ignore: false,
lang: 'PT_BR',
rules: {
firstname: "required",
username: {
required: true,
minlength: 2
},
password: {
required: true,
minlength: 5
},
confirm_password: {
required: true,
minlength: 5,
equalTo: "#password"
},
email: {
required: true,
email: true,
// submitHandler: function (form) {
// form.submit();
// }
// } );
// jQuery.extend(jQuery.validator.messages, {
// required: "Este campo &eacute; requerido.",
// remote: "Por favor, corrija este campo.",
// email: "Por favor, forne&ccedil;a um endere&ccedil;o eletr&ocirc;nico v&aacute;lido.",
// url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
// date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
// dateISO: "Por favor, forne&ccedil;a uma data v&aacute;lida (ISO).",
// number: "Por favor, forne&ccedil;a um n&uacute;mero v&aacute;lido.",
// digits: "Por favor, forne&ccedil;a somente d&iacute;gitos.",
// creditcard: "Por favor, forne&ccedil;a um cart&atilde;o de cr&eacute;dito v&aacute;lido.",
// equalTo: "Por favor, forne&ccedil;a o mesmo valor novamente.",
// accept: "Por favor, forne&ccedil;a um valor com uma extens&atilde;o v&aacute;lida.",
// maxlength: jQuery.validator.format("Por favor, forne&ccedil;a n&atilde;o mais que {0} caracteres."),
// minlength: jQuery.validator.format("Por favor, forne&ccedil;a ao menos {0} caracteres."),
// rangelength: jQuery.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1} caracteres de comprimento."),
// range: jQuery.validator.format("Por favor, forne&ccedil;a um valor entre {0} e {1}."),
// max: jQuery.validator.format("Por favor, forne&ccedil;a um valor menor ou igual a {0}."),
// min: jQuery.validator.format("Por favor, forne&ccedil;a um valor maior ou igual a {0}.")
// });
// $( "#criarProjetoForm" ).validate( {
// lang: 'PT_BR',
// rules: {
// firstname: "required",
// username: {
// required: true,
// minlength: 2
// },
// password: {
// required: true,
// minlength: 5
// },
// confirm_password: {
// required: true,
// minlength: 5,
// equalTo: "#password"
// },
// email: {
// required: true,
// email: true,
},
"complemento[]":{
// },
// "complemento[]":{
},
"nomeParticipante[]":{
required:true,
alpha:true,
},
'rg[]':{
required: true,
maxlength: 12,
},
// },
// "nomeParticipante[]":{
// alpha:true,
// },
// 'rg[]':{
// maxlength: 12,
// },
agree: "required"
},
messages: {
// nomeProjeto: "O nome do projeto é obrigatório.",
// agree: "required"
// },
// messages: {
// // nomeProjeto: "O nome do projeto é obrigatório.",
// 'emailParticipante[]': "Este campo é obrigatório.",
// 'data_de_nascimento[]': "Este campo é obrigatório.",
// 'cpf[]': "Este campo é obrigatório.",
// 'rg[]': {
// required: "Este campo é obrigatório.",
// maxlength: "Este campo deve conter no máximo 8 números."
// },
// 'celular[]': "Este campo é obrigatório.",
// 'cep[]': "Este campo é obrigatório.",
// 'uf[]': "Este campo é obrigatório.",
// 'cidade[]': "Este campo é obrigatório.",
// 'bairro[]': "Este campo é obrigatório.",
// 'rua[]': "Este campo é obrigatório.",
// 'numero[]': "Este campo é obrigatório.",
// 'complemento[]': "Este campo é obrigatório.",
// 'universidade[]': "Este campo é obrigatório.",
// 'curso[]': "Este campo é obrigatório.",
// 'turno[]': "Este campo é obrigatório.",
// 'total_periodos[]': "Este campo é obrigatório.",
// 'periodo_atual[]': "Este campo é obrigatório.",
// 'ordem_prioridade[]': "Este campo é obrigatório.",
// 'media_geral_curso[]': "Este campo é obrigatório.",
// 'nomePlanoTrabalho[]': "Este campo é obrigatório.",
// 'anexoPlanoTrabalho[]': "Este campo é obrigatório.",
// grandeArea: "Escolha uma grande área.",
// area: "Escolha uma área.",
// linkGrupo: "Este campo é obrigatório.",
// pontuacaoPlanilha: "Este campo é obrigatório.",
// anexoProjeto: "Este campo é obrigatório.",
// anexoLattesCoordenador: "Este campo é obrigatório.",
// anexoConsuPreenchido: "Este campo é obrigatório.",
// anexoGrupoPesquisa: "Este campo é obrigatório.",
// anexoPlanilha: "Este campo é obrigatório.",
// anexoComiteEtica: "Este campo é obrigatório.",
// inputJustificativa: "Este campo é obrigatório.",
// "nomeParticipante[]": {
// required: "O nome do participante é obrigatório.",
// alpha: "Não é permitido números."
// },
// username: {
// required: "Please enter a username",
// minlength: "Your username must consist of at least 2 characters"
// },
// password: {
// required: "Please provide a password",
// minlength: "Your password must be at least 5 characters long"
// },
// confirm_password: {
// required: "Please provide a password",
// minlength: "Your password must be at least 5 characters long",
// equalTo: "Please enter the same password as above"
// },
// email: "Please enter a valid email address",
// agree: "Please accept our policy"
},
errorElement: "em",
errorPlacement: function ( error, element ) {
// Add the `help-block` class to the error element
error.addClass( "invalid-feedback" );
if ( element.prop( "type" ) === "checkbox" ) {
error.insertAfter( element.parent( "label" ) );
} else {
error.insertAfter( element );
}
},
highlight: function ( element, errorClass, validClass ) {
$( element ).parents( ".col-sm-5" ).addClass( "has-error" ).removeClass( "has-success" );
},
unhighlight: function (element, errorClass, validClass) {
$( element ).parents( ".col-sm-5" ).addClass( "has-success" ).removeClass( "has-error" );
}
} );
// // 'emailParticipante[]': "Este campo é obrigatório.",
// // 'data_de_nascimento[]': "Este campo é obrigatório.",
// // 'cpf[]': "Este campo é obrigatório.",
// // 'rg[]': {
// // required: "Este campo é obrigatório.",
// // maxlength: "Este campo deve conter no máximo 8 números."
// // },
// // 'celular[]': "Este campo é obrigatório.",
// // 'cep[]': "Este campo é obrigatório.",
// // 'uf[]': "Este campo é obrigatório.",
// // 'cidade[]': "Este campo é obrigatório.",
// // 'bairro[]': "Este campo é obrigatório.",
// // 'rua[]': "Este campo é obrigatório.",
// // 'numero[]': "Este campo é obrigatório.",
// // 'complemento[]': "Este campo é obrigatório.",
// // 'universidade[]': "Este campo é obrigatório.",
// // 'curso[]': "Este campo é obrigatório.",
// // 'turno[]': "Este campo é obrigatório.",
// // 'total_periodos[]': "Este campo é obrigatório.",
// // 'periodo_atual[]': "Este campo é obrigatório.",
// // 'ordem_prioridade[]': "Este campo é obrigatório.",
// // 'media_geral_curso[]': "Este campo é obrigatório.",
// // 'nomePlanoTrabalho[]': "Este campo é obrigatório.",
// // 'anexoPlanoTrabalho[]': "Este campo é obrigatório.",
// // grandeArea: "Escolha uma grande área.",
// // area: "Escolha uma área.",
// // linkGrupo: "Este campo é obrigatório.",
// // pontuacaoPlanilha: "Este campo é obrigatório.",
// // anexoProjeto: "Este campo é obrigatório.",
// // anexoLattesCoordenador: "Este campo é obrigatório.",
// // anexoConsuPreenchido: "Este campo é obrigatório.",
// // anexoGrupoPesquisa: "Este campo é obrigatório.",
// // anexoPlanilha: "Este campo é obrigatório.",
// // anexoComiteEtica: "Este campo é obrigatório.",
// // inputJustificativa: "Este campo é obrigatório.",
// // "nomeParticipante[]": {
// // required: "O nome do participante é obrigatório.",
// // alpha: "Não é permitido números."
// // },
// // username: {
// // required: "Please enter a username",
// // minlength: "Your username must consist of at least 2 characters"
// // },
// // password: {
// // required: "Please provide a password",
// // minlength: "Your password must be at least 5 characters long"
// // },
// // confirm_password: {
// // required: "Please provide a password",
// // minlength: "Your password must be at least 5 characters long",
// // equalTo: "Please enter the same password as above"
// // },
// // email: "Please enter a valid email address",
// // agree: "Please accept our policy"
// },
// errorElement: "em",
// errorPlacement: function ( error, element ) {
// // Add the `help-block` class to the error element
// error.addClass( "invalid-feedback" );
// if ( element.prop( "type" ) === "checkbox" ) {
// error.insertAfter( element.parent( "label" ) );
// } else {
// error.insertAfter( element );
// }
// },
// highlight: function ( element, errorClass, validClass ) {
// $( element ).parents( ".col-sm-5" ).addClass( "has-error" ).removeClass( "has-success" );
// },
// unhighlight: function (element, errorClass, validClass) {
// $( element ).parents( ".col-sm-5" ).addClass( "has-success" ).removeClass( "has-error" );
// }
// } );
} );
</script>
......@@ -650,11 +667,11 @@
}
function submeterProposta() {
if (checarCpfs()) {
document.getElementById("submeterFormProposta").click();
// if (checarCpfs()) {
// } else {
// $("#modalCpfInvalido").modal('show');
// }
} else {
$("#modalCpfInvalido").modal('show');
}
}
function mascaraCPF(input) {
......@@ -680,4 +697,4 @@
input.value = resultado;
}
</script>
@endsection
@endsection
\ No newline at end of file
......@@ -15,9 +15,15 @@
@component('componentes.input', ['label' => 'Projeto (.pdf)'])
@endcomponent
</div>
<div class="col-2 ">
<a href="{{ route('baixar.anexo.projeto', ['id' => $projeto->id])}}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoProjeto)
<div class="col-3 ">
<a href="{{ route('baixar.anexo.projeto', ['id' => $projeto->id])}}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
{{-- Anexo do currículo --}}
......@@ -28,9 +34,15 @@
@endcomponent
</div>
<div class="col-2 ">
<a href="{{ route('baixar.anexo.lattes', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoLattesCoordenador)
<div class="col-2 ">
<a href="{{ route('baixar.anexo.lattes', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-2 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
{{-- Anexo da Planilha de Pontuação --}}
......@@ -41,9 +53,15 @@
@endcomponent
</div>
<div class="col-2 ">
<a href="{{ route('baixar.anexo.planilha', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoPlanilhaPontuacao)
<div class="col-2 ">
<a href="{{ route('baixar.anexo.planilha', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-2 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
......@@ -51,13 +69,24 @@
<div class="form-group col-md-6" style="margin-top: 10px">
<div class="row justify-content-start">
<div class="col-10">
@component('componentes.input', ['label' => 'Decisão do CONSU (.pdf)'])
<div class="form-group">
<label class=" control-label" for="firstname">Decisão do CONSU (.pdf)</label>
@endcomponent
</div>
<div class="col-2 ">
<a href="{{ route('baixar.anexo.consu', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
<div class="">
</div>
</div>
</div>
@if($projeto->anexoDecisaoCONSU)
<div class="col-2 ">
<a href="{{ route('baixar.anexo.consu', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-2 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
......@@ -69,9 +98,15 @@
@endcomponent
</div>
<div class="col-2 ">
<a href="{{ route('baixar.anexoGrupoPesquisa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@if($projeto->anexoGrupoPesquisa)
<div class="col-3 ">
<a href="{{ route('baixar.anexoGrupoPesquisa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
{{-- Anexo da autorizações especiais --}}
......@@ -84,9 +119,9 @@
<label for="botao" class="col-form-label @error('botao') is-invalid @enderror" data-toggle="tooltip" data-placement="bottom" title="Se possuir, coloque todas em único arquivo pdf." style="margin-right: 15px;">{{ __('Possui autorizações especiais?') }} <span style="color: red; font-weight:bold">*</span></label>
</div>
<div class="col-12">
<input type="radio" checked id="radioSim" disabled onchange="displayAutorizacoesEspeciais('sim')">
<input type="radio" checked id="radioSim" onchange="displayAutorizacoesEspeciais('sim')">
<label for="radioSim" style="margin-right: 5px">Sim</label>
<input type="radio" id="radioNao" disabled onchange="displayAutorizacoesEspeciais('nao')">
<input type="radio" id="radioNao" onchange="displayAutorizacoesEspeciais('nao')">
<label for="radioNao" style="margin-right: 5px">Não</label><br>
</div>
</div>
......@@ -97,18 +132,52 @@
<div class="form-group" id="displaySim" style="display: block; margin-top:-1rem">
@component('componentes.input', ['label' => 'Sim, declaro que necessito de autorizações especiais (.pdf)'])
<div class="row justify-content-center">
@if($projeto->anexoAutorizacaoComiteEtica )
<div class="col-3 mt-2">
<a href="{{ route('baixar.anexo.comite', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
@error('anexoAutorizacaoComiteEtica')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
<div class="form-group" id="displayNao" style="display: none; margin-top:-1rem">
@component('componentes.input', ['label' => 'Declaração de que não necessito de autorização especiais (.pdf)'])
@endcomponent
@if($projeto->justificativaAutorizacaoEtica )
<div class="row justify-content-center">
<div class="col-3 mt-2">
<a href="{{ route('baixar.anexo.justificativa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
</div>
@else
<div class="row justify-content-center">
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
</div>
@endif
@error('justificativaAutorizacaoEtica')
<span class="invalid-feedback" role="alert" style="overflow: visible; display:block">
<strong>{{ $message }}</strong>
</span>
@enderror
@endcomponent
</div>
</div>
<div class="col-2 mt-2">
<a href="{{ route('baixar.anexo.justificativa', ['id' => $projeto->id]) }}"><i class="fas fa-file-pdf fa-2x"></i></a>
</div>
</div>
</div>
......
......@@ -75,7 +75,7 @@
<div class="col-md-12"><h5>Endereço</h5></div>
<div class="col-6">
@component('componentes.input', ['label' => 'CEP'])
<input type="number" class="form-control" value="{{ $p->user->endereco->cep }}" name="cep[]" placeholder="CEP" disabled/>
<input type="text" class="form-control" value="{{ $p->user->endereco->cep }}" name="cep[]" placeholder="CEP" disabled/>
@endcomponent
</div>
......@@ -189,11 +189,18 @@
</div>
</div>
<div class="row justify-content-center">
<div class="col-3 ">
<a href="{{ route('baixar.plano', ['id' => $p->planoTrabalho->id]) }}">
<i class="fas fa-file-pdf fa-2x"></i></a>
@if($p->planoTrabalho)
<div class="col-3 ">
<a href="{{ route('baixar.plano', ['id' => $p->planoTrabalho->id]) }}">
<i class="fas fa-file-pdf fa-2x"></i></a>
</div>
</div>
</div>
@else
<div class="col-3 text-danger">
<p><i class="fas fa-times-circle fa-2x"></i></p>
</div>
@endif
</div>
</div>
</div>
......
......@@ -25,7 +25,7 @@
<select class="form-control @error('grandeArea') is-invalid @enderror" id="grandeArea" name="grandeArea" onchange="areas()" disabled>
<option value="" disabled selected hidden>-- Grande Área --</option>
@foreach($grandeAreas as $grandeArea)
<option @if($projeto->grandeArea->id == $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
<option @if($projeto->grande_area_id == $grandeArea->id ) selected @endif value="{{$grandeArea->id}}">{{$grandeArea->nome}}</option>
@endforeach
</select>
@error('grandeArea')
......@@ -39,7 +39,7 @@
<input type="hidden" id="oldArea" value="{{ old('area') }}" >
<select class="form-control @error('area') is-invalid @enderror" id="area" name="area" onchange="subareas()" disabled>
@foreach($areas as $area)
<option @if($projeto->area->id == $area->id ) selected @endif value="{{$area->id}}">{{$area->nome}}</option>
<option @if($projeto->area_id == $area->id ) selected @endif value="{{$area->id}}">{{$area->nome}}</option>
@endforeach
</select>
......@@ -56,7 +56,7 @@
<option value="" disabled selected hidden>-- Subárea --</option>
@if ($projeto->subarea != null)
@foreach($subareas as $subarea)
<option @if($projeto->subarea->id == $subarea->id ) selected @endif value="{{$subarea->id}}">{{$subarea->nome}}</option>
<option @if($projeto->sub_area_id == $subarea->id ) selected @endif value="{{$subarea->id}}">{{$subarea->nome}}</option>
@endforeach
@endif
</select>
......
<?php
<?php
use App\Http\Middleware\checkCoordenador;
use App\Trabalho;
......@@ -33,21 +33,21 @@ Auth::routes(['verify' => true]);
//######### Proponente ########################################
Route::get( '/proponente/index', 'ProponenteController@index' )->name('proponente.index');
Route::get( '/proponente/cadastro', 'ProponenteController@create' )->name('proponente.create');
Route::post('/proponente/cadastro', 'ProponenteController@store' )->name('proponente.store');
Route::get( '/proponente/editais', 'ProponenteController@editais' )->name('proponente.editais');
Route::get( '/projetos-submetidos', 'ProponenteController@projetosDoProponente' )->name('proponente.projetos');
Route::get( '/projetos-edital/{id}', 'ProponenteController@projetosEdital' )->name('proponente.projetosEdital')->middleware('auth');
//######### Rotas Administrador #################################
Route::get('/perfil-usuario', 'UserController@minhaConta' )->name('user.perfil')->middleware(['auth', 'verified']);
Route::post('/perfil-usuario', 'UserController@editarPerfil' )->name('perfil.edit')->middleware(['auth', 'verified']);
Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//######### Proponente ########################################
Route::get( '/proponente/index', 'ProponenteController@index' )->name('proponente.index');
Route::get( '/proponente/cadastro', 'ProponenteController@create' )->name('proponente.create');
Route::post('/proponente/cadastro', 'ProponenteController@store' )->name('proponente.store');
Route::get( '/proponente/editais', 'ProponenteController@editais' )->name('proponente.editais');
Route::get( '/projetos-submetidos', 'ProponenteController@projetosDoProponente' )->name('proponente.projetos');
Route::get( '/projetos-edital/{id}', 'ProponenteController@projetosEdital' )->name('proponente.projetosEdital')->middleware('auth');
//######### Rotas Administrador #################################
Route::get('/perfil-usuario', 'UserController@minhaConta' )->name('user.perfil')->middleware(['auth', 'verified']);
Route::post('/perfil-usuario', 'UserController@editarPerfil' )->name('perfil.edit')->middleware(['auth', 'verified']);
//######## Rotas Avaliador ####################################
Route::prefix('avaliador')->name('avaliador.')->group(function(){
......@@ -123,7 +123,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route::get( '/edital/{id}/projetos', 'TrabalhoController@projetosDoEdital' )->name('projetos.edital');
Route::get( '/projeto/visualizar/{id}', 'TrabalhoController@show' )->name('trabalho.show');
Route::get( '/projeto/{id}/editar', 'TrabalhoController@edit' )->name('trabalho.editar');
Route::post( '/projeto/{id}/atualizar', 'TrabalhoController@atualizar' )->name('trabalho.update');
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/exportar/{id}','TrabalhoController@exportProjeto' )->name('exportar.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