Conselhos e Núcleos

NÚCLEO DA MULHER EMPRESÁRIA
NÚCLEO DO JOVEM EMPREENDEDOR
     
", "" ] }); } if ($(".owl-carousel-agenda").size() > 0) { var owl1 = $(".owl-carousel-agenda"); owl1.owlCarousel({ itemsCustom: [ [0, 1], [450, 1], [600, 1], [700, 1], [1000, 1], [1200, 1] ], pagination: true, paginationNumbers: false, autoPlay: 3000, navigation: true, navigationText: [ "", "" ] }); } $("[data-type='icheck']").iCheck({ checkboxClass: 'icheckbox_flat-grey', radioClass: 'iradio_flat-grey' }).on('ifChanged', function(e) { // Get the field name var isChecked = e.currentTarget.checked; if (isChecked == true) { $(e.currentTarget.getAttribute('data-target-text')).prop('readonly', false); } else { $(e.currentTarget.getAttribute('data-target-text')).prop('readonly', true); } }); $('.-body').delegate(".add-cnaeextra", "click", function() { col = $("
").addClass("col-sm-6"); form = $("
").addClass("form-group"); input = $("").attr({ "type": "text", "class": "form-control cnaee inp-ex", "placeholder": "CNAE extra:" }).prop({ "name": "cnaeextra[]", "maxlength": "7" }); col.append(form); form.append(input); $('#appen').append(col); }); $(document).on('keypress', 'input.inp-ex', function(e) { var square = document.getElementById("sonumero"); var key = (window.event) ? event.keyCode : e.which; if ((key > 47 && key < 58)) { return true; } else { return (key == 8 || key == 0) ? true : false; } }); $("#display").delegate(".box-dist", "mouseover", function() { idteste = $(this).attr('data-id'); markers[idteste].setAnimation(google.maps.Animation.BOUNCE); }); $("#display").delegate(".box-dist", "mouseleave", function() { idteste2 = $(this).attr('data-id'); markers[idteste2].setAnimation(null); }); }); function alturafixa() { if ($(".altura-fixa-auto").size() > 0) { altura1 = 0; $(".altura-fixa-auto").css({ "height": "auto" }); $(".altura-fixa-auto").each(function() { if ($(this).height() > altura1) { altura1 = $(this).height(); } }); altura1 += 15; $(".altura-fixa-auto").css({ "height": altura1 + "px" }); } if ($(".altura-fixa-auto2").size() > 0) { altura2 = 0; $(".altura-fixa-auto2").css({ "height": "auto" }); $(".altura-fixa-auto2").each(function() { if ($(this).height() > altura2) { altura2 = $(this).height(); } }); altura2 += 15; $(".altura-fixa-auto2").css({ "height": altura2 + "px" }); } if ($(".altura-fixa-auto3").size() > 0) { altura3 = 0; $(".altura-fixa-auto3").css({ "height": "auto" }); $(".altura-fixa-auto3").each(function() { if ($(this).height() > altura3) { altura3 = $(this).height(); } }); $(".altura-fixa-auto3").css({ "height": altura3 + "px" }); } if ($(".altura-fixa-auto4").size() > 0) { altura4 = 0; $(".altura-fixa-auto4").css({ "height": "auto" }); $(".altura-fixa-auto4").each(function() { if ($(this).height() > altura4) { altura4 = $(this).height(); } }); altura4 += 5; $(".altura-fixa-auto4").css({ "height": altura4 + "px" }); } if ($(".altura-fixa-auto5").size() > 0) { altura5 = 0; $(".altura-fixa-auto5").css({ "height": "auto" }); $(".altura-fixa-auto5").each(function() { if ($(this).height() > altura5) { altura5 = $(this).height(); } }); altura5 += 20; $(".altura-fixa-auto5").css({ "height": altura5 + "px" }); } } alturafixa(); var optionsMaskfCnpj = { onKeyPress: function(fcnpj, e, field, options) { var masks = ['000.000.000-000', '00.000.000/0000-00']; var mask = (fcnpj.length > 14) ? masks[1] : masks[0]; $('.mascarafCnpj').mask(mask, options); } }; $('.mascarafCnpj').mask('000.000.000-000', optionsMaskfCnpj); function ValidarPesquisa(f, caminho) { var fWithoutMask = f.value.replace(/[^\d]/g, ""); if (fWithoutMask == "") { alert("Campo inválido. É necessário informar o F"); f.focus(); f.value = ''; return (false); } if (((fWithoutMask.length == 11) && (fWithoutMask == 11111111111) || (fWithoutMask == 22222222222) || (fWithoutMask == 33333333333) || (fWithoutMask == 44444444444) || (fWithoutMask == 55555555555) || ( fWithoutMask == 66666666666) || (fWithoutMask == 77777777777) || (fWithoutMask == 88888888888) || ( fWithoutMask == 99999999999) || (fWithoutMask == 00000000000))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } if (!((fWithoutMask.length == 11) || (fWithoutMask.length == 14))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } var checkOK = "0123456789"; var checkStr = fWithoutMask; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("Favor preencher somente com dígitos o campo F/CNPJ."); f.focus(); f.value = ''; return (false); } var chkVal = allNum; var prsVal = parseFloat(allNum); if (chkVal != "" && !(prsVal > "0")) { alert("F/CNPJ zerado !"); f.focus(); f.value = ''; return (false); } if (fWithoutMask.length == 11) { var tot = 0; for (i = 2; i <= 10; i++) tot += i * parseInt(checkStr.charAt(10 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(9))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; for (i = 2; i <= 11; i++) tot += i * parseInt(checkStr.charAt(11 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(10))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } else { var tot = 0; var peso = 2; for (i = 0; i <= 11; i++) { tot += peso * parseInt(checkStr.charAt(11 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(12))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; peso = 2; for (i = 0; i <= 12; i++) { tot += peso * parseInt(checkStr.charAt(12 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(13))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } console.log(caminho); // url = caminho + f.value; $.ajax({ url: caminho, method: "get", // data: {f: f.value}, }).done(function(data) { if (data == 1) { alert("F/CNPJ já utilizado para responder essa pesquisa!"); f.value = ''; return (false); } else { return (true); } }); } function ValidarAssocie(f) { if (f.value == "") { alert("Campo inválido. É necessário informar o F"); f.focus(); f.value = ''; return (false); } if (((f.value.length == 11) && (f.value == 11111111111) || (f.value == 22222222222) || (f .value == 33333333333) || (f.value == 44444444444) || (f.value == 55555555555) || (f .value == 66666666666) || (f.value == 77777777777) || (f.value == 88888888888) || (f .value == 99999999999) || (f.value == 00000000000))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } if (!((f.value.length == 11) || (f.value.length == 14))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } var checkOK = "0123456789"; var checkStr = f.value; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("Favor preencher somente com dígitos o campo F/CNPJ."); f.focus(); f.value = ''; return (false); } var chkVal = allNum; var prsVal = parseFloat(allNum); if (chkVal != "" && !(prsVal > "0")) { alert("F/CNPJ zerado !"); f.focus(); f.value = ''; return (false); } if (f.value.length == 11) { var tot = 0; for (i = 2; i <= 10; i++) tot += i * parseInt(checkStr.charAt(10 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(9))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; for (i = 2; i <= 11; i++) tot += i * parseInt(checkStr.charAt(11 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(10))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } else { var tot = 0; var peso = 2; for (i = 0; i <= 11; i++) { tot += peso * parseInt(checkStr.charAt(11 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(12))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; peso = 2; for (i = 0; i <= 12; i++) { tot += peso * parseInt(checkStr.charAt(12 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(13))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } // $.ajax({ // url: "/associe-se1/fcnpj", // method: "get", // data: { // f: f.value // }, // }).done(function(data) { // if (data == 1) { // alert("F/CNPJ já utilizado em outro cadastro, favor utilizar outro!"); // f.value = ''; // return (false); // } else { // return (true); // } // }); } function ValidarAssocief(f) { if (f.value == "") { alert("Campo inválido. É necessário informar o F"); f.focus(); f.value = ''; return (false); } if (((f.value.length == 11) && (f.value == 11111111111) || (f.value == 22222222222) || (f .value == 33333333333) || (f.value == 44444444444) || (f.value == 55555555555) || (f .value == 66666666666) || (f.value == 77777777777) || (f.value == 88888888888) || (f .value == 99999999999) || (f.value == 00000000000))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } if (!((f.value.length == 11) || (f.value.length == 14))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } var checkOK = "0123456789"; var checkStr = f.value; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("Favor preencher somente com dígitos o campo F."); f.focus(); f.value = ''; return (false); } var chkVal = allNum; var prsVal = parseFloat(allNum); if (chkVal != "" && !(prsVal > "0")) { alert("F zerado !"); f.focus(); f.value = ''; return (false); } if (f.value.length == 11) { var tot = 0; for (i = 2; i <= 10; i++) tot += i * parseInt(checkStr.charAt(10 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(9))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } tot = 0; for (i = 2; i <= 11; i++) tot += i * parseInt(checkStr.charAt(11 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(10))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } } else { var tot = 0; var peso = 2; for (i = 0; i <= 11; i++) { tot += peso * parseInt(checkStr.charAt(11 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(12))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } tot = 0; peso = 2; for (i = 0; i <= 12; i++) { tot += peso * parseInt(checkStr.charAt(12 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(13))) { alert("F inválido."); f.focus(); f.value = ''; return (false); } } } function validarTelefone(input, id_pes) { let telefone = input.value.trim(); // Remove caracteres não numéricos telefone = telefone.replace(/\D/g, ''); // \D remove tudo o que não é número const errorDiv = document.getElementById('telefone-error'); if (errorDiv) errorDiv.textContent = ''; if (telefone === '') { if (errorDiv) { errorDiv.textContent = 'O campo telefone é obrigatório.'; } else { alert('O campo telefone é obrigatório.'); } return; } $.ajax({ url: `/verificar-telefone/${id_pes}/telefone/${telefone}`, method: 'POST', dataType: 'json', headers: { 'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').getAttribute('content') }, success: function(data) { if (data.exists) { alert('O número de telefone já está cadastrado.'); input.value = ''; // Limpa o campo } }, error: function(xhr, status, error) { console.error('Erro ao verificar o telefone:', error); if (errorDiv) { errorDiv.textContent = 'Erro ao validar o telefone. Tente novamente mais tarde.'; } else { alert('Erro ao validar o telefone. Tente novamente mais tarde.'); } } }); } function ValidarfCnpj(f) { var fWithoutMask = f.value.replace(/[^\d]/g, ""); if (fWithoutMask == "") { alert("Campo inválido. É necessário informar o F/CNPJ"); f.focus(); f.value = ''; return (false); } if (((fWithoutMask.length == 11) && (fWithoutMask == 11111111111) || (fWithoutMask == 22222222222) || (fWithoutMask == 33333333333) || (fWithoutMask == 44444444444) || (fWithoutMask == 55555555555) || ( fWithoutMask == 66666666666) || (fWithoutMask == 77777777777) || (fWithoutMask == 88888888888) || ( fWithoutMask == 99999999999) || (fWithoutMask == 00000000000))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } if (!((fWithoutMask.length == 11) || (fWithoutMask.length == 14))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } var checkOK = "0123456789"; var checkStr = fWithoutMask; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } allNum += ch; } if (!allValid) { alert("Favor preencher somente com dígitos o campo F/CNPJ."); f.focus(); f.value = ''; return (false); } var chkVal = allNum; var prsVal = parseFloat(allNum); if (chkVal != "" && !(prsVal > "0")) { alert("F/CNPJ zerado !"); f.focus(); f.value = ''; return (false); } if (fWithoutMask.length == 11) { var tot = 0; for (i = 2; i <= 10; i++) tot += i * parseInt(checkStr.charAt(10 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(9))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; for (i = 2; i <= 11; i++) tot += i * parseInt(checkStr.charAt(11 - i)); if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(10))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } else { var tot = 0; var peso = 2; for (i = 0; i <= 11; i++) { tot += peso * parseInt(checkStr.charAt(11 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(12))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } tot = 0; peso = 2; for (i = 0; i <= 12; i++) { tot += peso * parseInt(checkStr.charAt(12 - i)); peso++; if (peso == 10) { peso = 2; } } if ((tot * 10 % 11 % 10) != parseInt(checkStr.charAt(13))) { alert("F/CNPJ inválido."); f.focus(); f.value = ''; return (false); } } } $('#deficiencia').change(function() { var x = 0; var y = 0; $('#deficiencia option:selected').each(function() { if ($(this).val() == 1) { x = 1; } y += 1; }); if ((x == 1) && (y > 1)) { $('.label-deficiencia').removeClass('hidden'); } else { $('.label-deficiencia').addClass('hidden'); } }); if ($(".associado-mapa").size() > 0) { $.getScript( "https://maps.googleapis.com/maps/api/js?key=AIzaSyD-Es-ZSKLplzwcuXwnSOxZke3qWawp3LQ&cache=1747927296" ); //################# MAPA DA HOME #################/// var lista = new Array(); var markers = []; var map = ""; function initMap() { $.getJSON("/mapa/", function(data) { map = new google.maps.Map(document.getElementById('map'), { zoom: 17, center: { lat: (data.EmpLatitude * 1), lng: (data.EmpLongitude * 1) } }); var img = { url: "/default/imgs/map-marker.png", size: new google.maps.Size(30, 45) }; var marker = new google.maps.Marker({ position: { lat: parseFloat(data.EmpLatitude), lng: parseFloat(data.EmpLongitude) }, map: map, icon: img, // shape: shape, animation: google.maps.Animation.DROP, title: data.EmpEmpresa }); }); } window.onload = function() { if ($(".associado-mapa").size() > 0) { initMap(); } }; //############# FIM MAPA HOME #################/// } if ($(".mapa-onde-encontrar").size() > 0) { $.getScript( "https://maps.googleapis.com/maps/api/js?key=AIzaSyD-Es-ZSKLplzwcuXwnSOxZke3qWawp3LQ&cache=1747927296" ); //################# MAPA DA HOME #################/// var lista = new Array(); var markers = []; var map = ""; function initMapOndeEncontrar(busca = "", categoria = "") { caminho = "/mapa-onde-encontrar/buscar?busca=" + busca + "&categoria=" + categoria; map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: { lat: -14.235004, lng: -51.92527999999999 } }); $.getJSON(caminho, function(data) { if (data.length > 1) { var zoom = 12; } else { var zoom = 18; } var lati = parseFloat(data[0].EmpLatitude); var long = parseFloat(data[0].EmpLongitude); map = new google.maps.Map(document.getElementById('map'), { zoom: zoom, center: { lat: lati, lng: long } }); $('#display > *').remove(); $('.carrocel-fotos-empresas > *').remove(); initMapRegistros(data); }); } function initMapRegistros(data) { $.each(data, function(i, item) { var descricao = item.EmpEmpresa + "
" + item.EmpEndereco + ', ' + item.EmpNumero + '
' + item.EmpBairro + ", " + item .municipio .MunMunicipio + ' - ' + item.municipio.MunEstadoUF + "
" + item.EmpTelefone + ((item.EmpTelefone1 != "") ? " | " + item .EmpTelefone1 : "") + "
" + item.EmpEmail + '
'; descricao = descricao + 'Mais Informações'; $('#display').append('
' + descricao + '
'); setMarkers(item.EmpLatitude, item.EmpLongitude, item.MunMunicipio, item .EmpEndereco + ', ' + item.EmpNumero + ', ' + item.MunMunicipio + ', ' + item.MunEstadoUF, "BR", item .EmpCodigo, descricao); }); } function fotos_empresas(id) { $.ajax({ method: "get", url: "/fotos-galeria-empresas", data: { id_cli: id } }).done(function(data) { console.log(data); obj = $('
').html(data); $('.carrocel-fotos-empresas').html(data); if ($(".owl-carousel-fotos-empresas").size() > 0) { $(".owl-carousel-fotos-empresas").owlCarousel({ itemsCustom: [ [0, 1], [450, 1], [600, 1], [700, 1], [1000, 1], [1200, 1] ], }); $(".carrocel-fotos-empresas").lightGallery({ selector: '.box-foto-onde-encontrar' }); } }); } function setMarkers(lat, lng, title, address, region, codigo, descricao) { var contentString = descricao; var infowindow = new google.maps.InfoWindow({ content: contentString }); var marker = new google.maps.Marker({ position: { lat: parseFloat(lat), lng: parseFloat(lng) }, map: map, // icon: image, // shape: shape, animation: google.maps.Animation.DROP, title: title }); marker.addListener('click', function() { infowindow.open(map, marker); }); markers.push(marker); } window.onload = function() { if ($(".mapa-onde-encontrar").size() > 0) { initMapOndeEncontrar(); } }; }