Unverified Commit 4d2fc1a3 authored by Antônio Durval's avatar Antônio Durval Committed by GitHub
Browse files

Merge pull request #898 from antonioDurval/master

CORREÇÃO!
parents da59993f f0b9f901
......@@ -7,6 +7,7 @@ use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Auth;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use App\User;
class StoreTrabalho extends FormRequest
{
......@@ -52,7 +53,7 @@ class StoreTrabalho extends FormRequest
$rules['instituicao.' . $value] = ['required', 'string'];
$rules['cpf.' . $value] = ['required', 'string'];
$rules['celular.' . $value] = ['required', 'string'];
if ($this->estudante[$value] == true) {
if (User::where('cpf', $this->cpf[$value])->first()->tipo == "participante") {
//endereco
$rules['rua.' . $value] = ['required', 'string'];
$rules['numero.' . $value] = ['required', 'string'];
......
......@@ -205,7 +205,7 @@
let modal_id = Number(document.getElementById('quantidadeModais').value);
function exibirUsuarioAdicionado(data) {
console.log(data[0])
$('#modalIntegrante').modal('hide');
document.getElementById(`nome${modal_id}`).value = data[0]['name'];
document.getElementById(`nome${modal_id}`).setAttribute("readonly", "");
......@@ -265,11 +265,9 @@
document.getElementById(`curso[${modal_id}]`).value = data[2].curso;
document.getElementById(`curso[${modal_id}]`).setAttribute("readonly", "");
console.log(document.getElementById(`funcaoParticipante${modal_id}`));
document.getElementById(`funcaoParticipante${modal_id}`).value = data[1]['nome'];
if (data[1].nome != "Bolsista" && data[1].nome != "Voluntário") {
console.log(document.getElementById(`plano-titulo${modal_id}`));
document.getElementById(`plano-titulo${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-nome${modal_id}`).setAttribute('hidden', "");
document.getElementById(`plano-anexo${modal_id}`).setAttribute('hidden', "");
......
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