diff --git a/main.js b/main.js index 2d2638c2c8516d1acf1e0c998e038df0bd73b5aa..157f5081ec8f302573d092eed633fb5dfc6ad496 100644 --- a/main.js +++ b/main.js @@ -206,6 +206,11 @@ function alertConjuntoEmpresa(empresa, cardapio){ } $("#checkBoxesConjunto").html(htmlCheckBoxes+"</ul>"); +} + +$("#adicionaEmpresa").click(function(){ + + } $("#adicionaCardapioEmpresa").click(function(){ @@ -344,20 +349,8 @@ $("#editaPublicoEmpresa").click( function(){ } - idades = [] - numFaixas = $("#tidades").children().length; - console.log(numFaixas); - idade =[] - for(var i = 0; i < numFaixas; i++) - { - idade.push(document.getElementById( "idadeMinima"+i ).value); - idade.push(document.getElementById( "idadeMaxima"+i ).value); - console.log(idade); - idades.push(idade); - console.log(idades); - idade =[] - } - necessidadesNutr = new NecessidadesNutr(tabelasDados, refeicoesDados, idades) + + necessidadesNutr = new NecessidadesNutr(tabelasDados, refeicoesDados) dados.setNecessidadesNutr(necessidadesNutr); atualizaEmpresas(); diff --git a/prototipo.html b/prototipo.html index 8892857099cad71b697f6065d18318dfd57b1407..ab447f83295f7e5ec794745585a579f689611592 100644 --- a/prototipo.html +++ b/prototipo.html @@ -104,17 +104,7 @@ </div> - - - <table><tr> - <td><input type=text id="nomeEmpresa" placeholder="Nome"></td> - <td><input type=text id="cnpj" placeholder="CNPJ"></td> - <td><input type=text id="telefone" placeholder="Telefone"></td> - <td><input type=text id="responsavel" placeholder="Responsável"></td> - <td><button onClick=cadastraEmpresa();>Cadastrar Empresa</button></td> - </tr></table> - <table> - + <tr><td><button id="adicionaEmpresa" >Adicionar Empresa</button></td></tr> <thead> <tr> <td> Dados da empresa </td>