Unverified Commit 292ba98e authored by Gabriel Antônio da Silva's avatar Gabriel Antônio da Silva Committed by GitHub
Browse files

Merge pull request #67 from lmts-ufape/editarProjeto

add de planos de trabalho em avaliador e restricao em editar projeto
parents 7ccae9d4 6804f40a
...@@ -86,8 +86,11 @@ class ProponenteController extends Controller ...@@ -86,8 +86,11 @@ class ProponenteController extends Controller
$proponente = Proponente::where('user_id', Auth()->user()->id)->first(); $proponente = Proponente::where('user_id', Auth()->user()->id)->first();
$projetos = Trabalho::where('proponente_id', $proponente->id)->get(); $projetos = Trabalho::where('proponente_id', $proponente->id)->get();
$hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString();
return view('proponente.projetos')->with(['projetos' => $projetos]); return view('proponente.projetos')->with(['projetos' => $projetos, 'hoje'=>$hoje]);
} }
public function projetosEdital($id) { public function projetosEdital($id) {
$edital = Evento::find($id); $edital = Evento::find($id);
......
...@@ -38,7 +38,7 @@ class UserController extends Controller ...@@ -38,7 +38,7 @@ class UserController extends Controller
public function inicial() public function inicial()
{ {
$eventos = Evento::all(); $eventos = Evento::all();
$hoje = Carbon::today('America/Recife'); $hoje = Carbon::today('America/Recife');
$hoje = $hoje->toDateString(); $hoje = $hoje->toDateString();
return view('index', ['eventos' => $eventos, 'hoje' => $hoje]); return view('index', ['eventos' => $eventos, 'hoje' => $hoje]);
...@@ -48,7 +48,7 @@ class UserController extends Controller ...@@ -48,7 +48,7 @@ class UserController extends Controller
function perfil(){ function perfil(){
$user = User::find(Auth::user()->id); $user = User::find(Auth::user()->id);
return view('user.perfilUser',['user'=>$user]); return view('user.perfilUser',['user'=>$user]);
} }
function editarPerfil(Request $request){ function editarPerfil(Request $request){
...@@ -85,34 +85,41 @@ class UserController extends Controller ...@@ -85,34 +85,41 @@ class UserController extends Controller
'bolsistaProdutividade' => Rule::requiredIf((isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando')), 'bolsistaProdutividade' => Rule::requiredIf((isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando')),
'nivel' => ['required_if:bolsistaProdutividade,sim'], 'nivel' => ['required_if:bolsistaProdutividade,sim'],
//'nivel' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'required':''], //'nivel' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'required':''],
'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'], 'linkLattes' => ['required_with:titulacaoMaxima,anoTitulacao,areaFormacao,bolsistaProdutividade'],
'linkLattes' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'required':''], 'linkLattes' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'required':''],
'linkLattes' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'link_lattes':''], 'linkLattes' => [(isset($request['cargo']) && $request['cargo'] !== 'Estudante') || (isset($request['cargo']) && $request['cargo'] === 'Estudante' && isset($request['vinculo']) && $request['vinculo'] === 'Pós-doutorando') ? 'link_lattes':''],
]); ]);
} }
if ($request->alterarSenhaCheckBox != null) { if ($request->alterarSenhaCheckBox != null) {
if (!(Hash::check($request->senha_atual, $user->password))) { if (!(Hash::check($request->senha_atual, $user->password))) {
return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']); return redirect()->back()->withErrors(['senha_atual' => 'Senha atual não correspondente']);
} }
if (!($request->nova_senha === $request->confirmar_senha)) { if (!($request->nova_senha === $request->confirmar_senha)) {
return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']); return redirect()->back()->withErrors(['nova_senha' => 'Senhas diferentes']);
} }
} }
if(Auth()->user()->avaliadors != null && $request->area != null && Auth()->user()->tipo != "avaliador"){
$avaliador = Avaliador::where('user_id', '=', $id)->first();
$avaliador->user_id = $user->id;
$avaliador->area_id = $request->area;
$avaliador->update();
}
switch ($request->tipo) { switch ($request->tipo) {
case "administradorResponsavel": case "administradorResponsavel":
$adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first();
$adminResp->user_id = $user->id; $adminResp->user_id = $user->id;
$adminResp->update(); $adminResp->update();
break; break;
case "avaliador": case "avaliador":
$avaliador = Avaliador::where('user_id', '=', $id)->first(); $avaliador = Avaliador::where('user_id', '=', $id)->first();
$avaliador->user_id = $user->id; $avaliador->user_id = $user->id;
$avaliador->area_id = $request->area;
$avaliador->update(); $avaliador->update();
break; break;
case "proponente": case "proponente":
$proponente = Proponente::where('user_id', '=', $id)->first(); $proponente = Proponente::where('user_id', '=', $id)->first();
if ($request->SIAPE != null) { if ($request->SIAPE != null) {
$proponente->SIAPE = $request->SIAPE; $proponente->SIAPE = $request->SIAPE;
...@@ -138,8 +145,8 @@ class UserController extends Controller ...@@ -138,8 +145,8 @@ class UserController extends Controller
$proponente->update(); $proponente->update();
break; break;
case "participante": case "participante":
$participante = Participante::where('user_id', '=', $id)->first(); $participante = Participante::where('user_id', '=', $id)->first();
//$participante = $user->participantes->where('user_id', Auth::user()->id)->first(); //$participante = $user->participantes->where('user_id', Auth::user()->id)->first();
$participante->user_id = $user->id; $participante->user_id = $user->id;
//dd($participante); //dd($participante);
if($user->usuarioTemp == true){ if($user->usuarioTemp == true){
...@@ -187,7 +194,7 @@ class UserController extends Controller ...@@ -187,7 +194,7 @@ class UserController extends Controller
public function minhaConta() { public function minhaConta() {
$id = Auth::user()->id; $id = Auth::user()->id;
$user = User::find($id); $user = User::find($id);
$adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first(); $adminResp = AdministradorResponsavel::where('user_id', '=', $id)->first();
$avaliador = Avaliador::where('user_id', '=', $id)->first(); $avaliador = Avaliador::where('user_id', '=', $id)->first();
$proponente = Proponente::where('user_id', '=', $id)->first(); $proponente = Proponente::where('user_id', '=', $id)->first();
......
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<div class="container" > <div class="container" >
<div class="row" > <div class="row" >
<div class="col-sm-12"> <div class="col-sm-12">
<h3>Meus Editais</h3> <h3>Meus Editais</h3>
</div> </div>
</div> </div>
</div> </div>
<hr> <hr>
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Edital</th> <th scope="col">Nome do Edital</th>
<th scope="col">Data de Inicio da Revisão</th> <th scope="col">Data de Inicio da Revisão</th>
<th scope="col">Data de Fim da Revisão</th> <th scope="col">Data de Fim da Revisão</th>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<tbody> <tbody>
@foreach ($eventos as $evento) @foreach ($eventos as $evento)
<tr> <tr>
<td> <td>
{{ $evento->nome }} {{ $evento->nome }}
</td> </td>
<td>{{ date('d/m/Y', strtotime($evento->inicioRevisao)) }}</td> <td>{{ date('d/m/Y', strtotime($evento->inicioRevisao)) }}</td>
...@@ -32,15 +32,15 @@ ...@@ -32,15 +32,15 @@
<td> <td>
<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">
</a> </a>
<div class="dropdown-menu"> <div class="dropdown-menu">
@if(!is_null(Auth::user()->avaliadors->eventos->where('id', 1)->first()->pivot->convite) && Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite == true ) @if(!is_null(Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite) && Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite == true )
<a href="{{ route('avaliador.visualizarTrabalho', ['evento_id' => $evento->id]) }}" class="dropdown-item"> <a href="{{ route('avaliador.visualizarTrabalho', ['evento_id' => $evento->id]) }}" class="dropdown-item">
<img src="{{asset('img/icons/eye-regular.svg')}}" class="icon-card" alt=""> <img src="{{asset('img/icons/eye-regular.svg')}}" class="icon-card" alt="">
Projetos para avaliar Projetos para avaliar
</a> </a>
@elseif(!is_null(Auth::user()->avaliadors->eventos->where('id', 1)->first()->pivot->convite) && Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite == false) @elseif(!is_null(Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite) && Auth::user()->avaliadors->eventos->where('id', $evento->id)->first()->pivot->convite == false)
<button disabled="disabled" class="dropdown-item"> <button disabled="disabled" class="dropdown-item">
Convite recusado Convite recusado
</button> </button>
...@@ -54,10 +54,10 @@ ...@@ -54,10 +54,10 @@
Recusar Convite Recusar Convite
</a> </a>
@endif @endif
</div> </div>
</div> </div>
</td> </td>
...@@ -71,6 +71,6 @@ ...@@ -71,6 +71,6 @@
@section('javascript') @section('javascript')
<script> <script>
</script> </script>
@endsection @endsection
...@@ -7,17 +7,18 @@ ...@@ -7,17 +7,18 @@
<div class="container" > <div class="container" >
<div class="row" > <div class="row" >
<div class="col-sm-10"> <div class="col-sm-10">
<h3>Trabalhos do Edital: {{ $evento->nome }}</h3> <h3>Trabalhos do Edital: {{ $evento->nome }}</h3>
</div> </div>
</div> </div>
</div> </div>
<hr> <hr>
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do Projeto</th> <th scope="col">Nome do Projeto</th>
<th scope="col">Data de Criação</th> <th scope="col">Data de Criação</th>
<th scope="col">Baixar</th> <th scope="col">Projeto</th>
<th scope="col">Plano de Trabalho</th>
<th scope="col">Parecer</th> <th scope="col">Parecer</th>
</tr> </tr>
</thead> </thead>
...@@ -32,6 +33,24 @@ ...@@ -32,6 +33,24 @@
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px"> <img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a> </a>
</td> </td>
<td>
@foreach( $trabalho->participantes as $participante)
@php
if( App\Arquivo::where('participanteId', $participante->pivot->participante_id)->first() != null){
$planoTrabalho = App\Arquivo::where('participanteId', $participante->pivot->participante_id)->first()->nome;
}else{
$planoTrabalho = null;
}
@endphp
@if ($planoTrabalho != null)
<a href="{{route('download', ['file' => $planoTrabalho])}}" target="_new" style="font-size: 20px; color: #114048ff;" >
<img class="" src="{{asset('img/icons/file-download-solid.svg')}}" style="width:20px">
</a>
@else
Não planos de trabalho.
@endif
@endforeach
</td>
<td> <td>
<div class="row"> <div class="row">
<form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST"> <form action="{{ route('avaliador.parecer', ['evento' => $evento]) }}" method="POST">
...@@ -40,7 +59,7 @@ ...@@ -40,7 +59,7 @@
<button type="submit" class="btn btn-primary mr-2 ml-2" > <button type="submit" class="btn btn-primary mr-2 ml-2" >
Parecer Parecer
</button> </button>
</form> </form>
</div> </div>
</td> </td>
...@@ -54,6 +73,6 @@ ...@@ -54,6 +73,6 @@
@section('javascript') @section('javascript')
<script> <script>
</script> </script>
@endsection @endsection
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
<div class="container" > <div class="container" >
<div class="row" > <div class="row" >
<div class="col-sm-12"> <div class="col-sm-12">
<h3>Meus Projetos</h3> <h3>Meus Projetos</h3>
</div> </div>
</div> </div>
</div> </div>
<hr> <hr>
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
<th scope="col">Nome do projeto</th> <th scope="col">Nome do projeto</th>
<th scope="col">Status</th> <th scope="col">Status</th>
<th scope="col">Data de Criação</th> <th scope="col">Data de Criação</th>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</thead> </thead>
<tbody> <tbody>
@foreach ($projetos as $projeto) @foreach ($projetos as $projeto)
<tr> <tr>
<td> <td>
{{ $projeto->titulo }} {{ $projeto->titulo }}
...@@ -42,16 +42,19 @@ ...@@ -42,16 +42,19 @@
@elseif($projeto->status == 'Rascunho') @elseif($projeto->status == 'Rascunho')
<td style="color: rgb(0, 0, 0)">Rascunho</td> <td style="color: rgb(0, 0, 0)">Rascunho</td>
@endif @endif
<td>{{ date('d-m-Y', strtotime($projeto->updated_at)) }}</td> <td>{{ date('d-m-Y', strtotime($projeto->updated_at)) }}</td>
<td> <td>
<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">
</a> </a>
<div class="dropdown-menu"> <div class="dropdown-menu">
@if($projeto->evento->inicioSubmissao <= $hoje && $hoje <= $projeto->evento->fimSubmissao)
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;"> <a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar projeto Editar projeto
</a> </a>
@else
@endif
<a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center"> <a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Visualizar projeto Visualizar projeto
</a> </a>
...@@ -61,13 +64,13 @@ ...@@ -61,13 +64,13 @@
<a href="" class="dropdown-item" style="text-align: center"> <a href="" class="dropdown-item" style="text-align: center">
Resultado Resultado
</a> --}} </a> --}}
@if($projeto->status == 'Submetido') @if($projeto->status == 'Submetido')
<!-- Button trigger modal --> <!-- Button trigger modal -->
<button type="button" class="dropdown-item" style="text-align: center" data-toggle="modal" data-target="#modal{{$projeto->id}}"> <button type="button" class="dropdown-item" style="text-align: center" data-toggle="modal" data-target="#modal{{$projeto->id}}">
Excluir projeto Excluir projeto
</button> </button>
@endif @endif
</div> </div>
</div> </div>
</td> </td>
...@@ -105,4 +108,4 @@ ...@@ -105,4 +108,4 @@
<script> <script>
</script> </script>
@endsection @endsection
\ No newline at end of file
...@@ -66,9 +66,12 @@ ...@@ -66,9 +66,12 @@
<img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px"> <img src="{{asset('img/icons/ellipsis-v-solid.svg')}}" style="width:8px">
</a> </a>
<div class="dropdown-menu"> <div class="dropdown-menu">
@if($edital->inicioSubmissao <= $hoje && $hoje <= $edital->fimSubmissao)
<a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;"> <a href="{{ route('trabalho.editar', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center;">
Editar projeto Editar projeto
</a> </a>
@else
@endif
<a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center"> <a href="{{ route('trabalho.show', ['id' => $projeto->id]) }}" class="dropdown-item" style="text-align: center">
Visualizar projeto Visualizar projeto
</a> </a>
......
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
<option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option> <option @if( $user->instituicao == "UFAPE") selected @endif value="UFAPE">Universidade Federal do Agreste de Pernambuco - UFAPE</option>
<option @if(old('instituicaoSelect') == "Outra") selected @endif value="Outra">Outra</option> <option @if(old('instituicaoSelect') == "Outra") selected @endif value="Outra">Outra</option>
</select> </select>
@error('instituicaoSelect') @error('instituicaoSelect')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class='col-md-4' style="display: none;"> <div class='col-md-4' style="display: none;">
<label for="instituicao" class="col-form-label">{{ __('Digite a Instituição*') }}</label> <label for="instituicao" class="col-form-label">{{ __('Digite a Instituição*') }}</label>
<input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autocomplete="instituicao" autofocus> <input id="instituicao" type="text" class="form-control @error('instituicao') is-invalid @enderror" name="instituicao" value="{{ old('instituicao') }}" placeholder="Digite o nome da Instituição" autocomplete="instituicao" autofocus>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-2"> <div class="col-md-2">
<label for="celular" class="col-form-label">{{ __('Celular*') }}</label> <label for="celular" class="col-form-label">{{ __('Celular*') }}</label>
...@@ -95,6 +95,38 @@ ...@@ -95,6 +95,38 @@
</span> </span>
@enderror @enderror
</div> </div>
@if(Auth()->user()->avaliadors)
<div class="col-md-4">
<label for="area" class="col-form-label">{{ __('Área:') }}</label>
<select style="display: inline" class="form-control @error('area') is-invalid @enderror" name="area" id="area">
@if(Auth()->user()->avaliadors->area_id == null)
<option value="" selected>Indefinida</option>
@foreach (App\Area::all() as $area)
@if(Auth()->user()->avaliadors->area_id == $area->id)
<option value="{{ $area->id }}" selected>{{ $area->nome }}</option>
@else
<option value="{{ $area->id }}" >{{ $area->nome }}</option>
@endif
@endforeach
@else
@foreach (App\Area::all() as $area)
@if(Auth()->user()->avaliadors->area_id == $area->id)
<option value="{{ $area->id }}" selected>{{ $area->nome }}</option>
@else
<option value="{{ $area->id }}" >{{ $area->nome }}</option>
@endif
@endforeach
@endif
</select>
@error('area')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
@endif
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
...@@ -137,7 +169,7 @@ ...@@ -137,7 +169,7 @@
@enderror @enderror
</div> </div>
</div> </div>
@if(isset($proponente)) @if(isset($proponente))
<div id="proponente" style="display: block;"> <div id="proponente" style="display: block;">
...@@ -153,14 +185,14 @@ ...@@ -153,14 +185,14 @@
<option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option> <option @if( $proponente->cargo =='Técnico' ) selected @endif value="Técnico">Técnico</option>
<option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option> <option @if( $proponente->cargo =='Estudante' ) selected @endif value="Estudante">Estudante</option>
</select> </select>
@error('cargo') @error('cargo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label> <label for="vinculo" class="col-form-label">{{ __('Vínculo*') }}</label>
<select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()"> <select name="vinculo" id="vinculo" class="form-control @error('vinculo') is-invalid @enderror" onchange="outroVinculo()">
...@@ -174,18 +206,18 @@ ...@@ -174,18 +206,18 @@
<option value="{{ $proponente->vinculo }}" selected >{{ $proponente->vinculo }}</option> <option value="{{ $proponente->vinculo }}" selected >{{ $proponente->vinculo }}</option>
@endif @endif
</select> </select>
@error('vinculo') @error('vinculo')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-4" style="display: none;" id="divOutro"> <div class="col-md-4" style="display: none;" id="divOutro">
<label for="outro" class="col-form-label">{{ __('Qual?*') }}</label> <label for="outro" class="col-form-label">{{ __('Qual?*') }}</label>
<input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" value="{{ old('outro') }}"> <input id="outro" type="text" class="form-control @error('outro') is-invalid @enderror" name="outro" value="{{ old('outro') }}">
@error('outro') @error('outro')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
...@@ -193,7 +225,7 @@ ...@@ -193,7 +225,7 @@
@enderror @enderror
</div> </div>
</div> </div>
<div style="display: block;"> <div style="display: block;">
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
...@@ -206,18 +238,18 @@ ...@@ -206,18 +238,18 @@
<option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option> <option @if( $proponente->titulacaoMaxima =='Graduação' ) selected @endif value="Graduação">Graduação</option>
<option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option> <option @if( $proponente->titulacaoMaxima =='Técnico' ) selected @endif value="Técnico">Técnico</option>
</select> </select>
@error('titulacaoMaxima') @error('titulacaoMaxima')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label> <label for="anoTitulacao" class="col-form-label">{{ __('Ano da Titulação*') }}</label>
<input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ $proponente->anoTitulacao }}" autocomplete="nome"> <input id="anoTitulacao" type="text" class="form-control @error('anoTitulacao') is-invalid @enderror" name="anoTitulacao" value="{{ $proponente->anoTitulacao }}" autocomplete="nome">
@error('anoTitulacao') @error('anoTitulacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
...@@ -227,7 +259,7 @@ ...@@ -227,7 +259,7 @@
<div class="col-md-4"> <div class="col-md-4">
<label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label> <label for="areaFormacao" class="col-form-label">{{ __('Área de Formação*') }}</label>
<input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ $proponente->areaFormacao }}" autocomplete="nome"> <input id="areaFormacao" type="text" class="form-control @error('areaFormacao') is-invalid @enderror" name="areaFormacao" value="{{ $proponente->areaFormacao }}" autocomplete="nome">
@error('areaFormacao') @error('areaFormacao')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
...@@ -235,31 +267,31 @@ ...@@ -235,31 +267,31 @@
@enderror @enderror
</div> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<div class="col-md-4"> <div class="col-md-4">
<label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label> <label for="SIAPE" class="col-form-label">{{ __('SIAPE') }}</label>
<input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ $proponente->SIAPE }}" autocomplete="nome"> <input id="SIAPE" type="text" class="form-control @error('SIAPE') is-invalid @enderror" name="SIAPE" value="{{ $proponente->SIAPE }}" autocomplete="nome">
@error('SIAPE') @error('SIAPE')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label> <label for="linkLattes" class="col-form-label">{{ __('Link do currículo Lattes*') }}</label>
<input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ $proponente->linkLattes }}" autocomplete="nome"> <input id="linkLattes" type="text" class="form-control @error('linkLattes') is-invalid @enderror" name="linkLattes" value="{{ $proponente->linkLattes }}" autocomplete="nome">
@error('linkLattes') @error('linkLattes')
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong> <strong>{{ $message }}</strong>
</span> </span>
@enderror @enderror
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br> <label for="bolsistaProdutividade" class="col-form-label">{{ __('Bolsista de Produtividade*') }}</label><br>
<select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()"> <select name="bolsistaProdutividade" id="bolsistaProdutividade" class="form-control @error('bolsistaProdutividade') is-invalid @enderror" onchange="mudarNivel()">
...@@ -273,12 +305,12 @@ ...@@ -273,12 +305,12 @@
</span> </span>
@enderror @enderror
</div> </div>
@if ($proponente->bolsistaProdutividade =='sim') @if ($proponente->bolsistaProdutividade =='sim')
<div class="col-md-1" id="nivelInput" style="display: block;"> <div class="col-md-1" id="nivelInput" style="display: block;">
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> <option value="" disabled selected hidden></option>
<option @if( $proponente->nivel =='1A' ) selected @endif value="1A">1A</option> <option @if( $proponente->nivel =='1A' ) selected @endif value="1A">1A</option>
<option @if( $proponente->nivel =='1B' ) selected @endif value="1B">1B</option> <option @if( $proponente->nivel =='1B' ) selected @endif value="1B">1B</option>
<option @if( $proponente->nivel =='1C' ) selected @endif value="1C">1C</option> <option @if( $proponente->nivel =='1C' ) selected @endif value="1C">1C</option>
...@@ -295,7 +327,7 @@ ...@@ -295,7 +327,7 @@
<div class="col-md-1" id="nivelInput" style="display: none;"> <div class="col-md-1" id="nivelInput" style="display: none;">
<label for="nivel" class="col-form-label">{{ __('Nível*') }}</label> <label for="nivel" class="col-form-label">{{ __('Nível*') }}</label>
<select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror"> <select name="nivel" id="nivel" class="form-control @error('nivel') is-invalid @enderror">
<option value="" disabled selected hidden></option> <option value="" disabled selected hidden></option>
<option value="1A">1A</option> <option value="1A">1A</option>
<option value="1B">1B</option> <option value="1B">1B</option>
<option value="1C">1C</option> <option value="1C">1C</option>
...@@ -315,10 +347,10 @@ ...@@ -315,10 +347,10 @@
</div> </div>
@endif @endif
</form> </form>
<div class="container"> <div class="container">
<div class="row justify-content-center" style="margin: 20px 0 20px 0"> <div class="row justify-content-center" style="margin: 20px 0 20px 0">
<div class="col-md-6" style="padding-left:0"> <div class="col-md-6" style="padding-left:0">
<a class="btn btn-secondary botao-form" href="{{ route('home') }}" style="width:100%">Cancelar</a> <a class="btn btn-secondary botao-form" href="{{ route('home') }}" style="width:100%">Cancelar</a>
</div> </div>
...@@ -393,14 +425,14 @@ ...@@ -393,14 +425,14 @@
function mudar() { function mudar() {
var divProponente = document.getElementById('proponente'); var divProponente = document.getElementById('proponente');
var comboBoxTipo = document.getElementById('tipo'); var comboBoxTipo = document.getElementById('tipo');
if (comboBoxTipo.value == "proponente") { if (comboBoxTipo.value == "proponente") {
divProponente.style.display = "block"; divProponente.style.display = "block";
} else { } else {
divProponente.style.display = "none"; divProponente.style.display = "none";
} }
} }
function outroVinculo() { function outroVinculo() {
var comboBoxVinculo = document.getElementById('vinculo'); var comboBoxVinculo = document.getElementById('vinculo');
...@@ -432,7 +464,7 @@ ...@@ -432,7 +464,7 @@
// instituicaoSelect.style.display = "none"; // instituicaoSelect.style.display = "none";
// instituicao.style.display = "inline"; // instituicao.style.display = "inline";
// } // }
if(instituicaoSelect.value === "Outra"){ if(instituicaoSelect.value === "Outra"){
instituicaoSelect.parentElement.className = 'col-md-2'; instituicaoSelect.parentElement.className = 'col-md-2';
instituicao.parentElement.style.display = ''; instituicao.parentElement.style.display = '';
}else if(instituicaoSelect.value === "UFAPE"){ }else if(instituicaoSelect.value === "UFAPE"){
......
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