Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
nutricao
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PET Computação
nutricao
Commits
72073a43
Commit
72073a43
authored
Mar 23, 2017
by
mc16
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cadastro de mais de um cardápio por empresa e princípio de edição dos existentes
parent
4776d4e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
prototipo.html
prototipo.html
+25
-14
No files found.
prototipo.html
View file @
72073a43
...
...
@@ -87,9 +87,6 @@ class TipoCardapio{
getConjunto
(){
return
this
.
_conjunto
;}
setConjunto
(
_conjunto
){
this
.
_conjunto
=
_conjunto
;}
getNome
(){
return
this
.
_nome
;}
setNome
(
_nome
){
this
.
_nome
=
_nome
;}
getPrecoRef
(){
return
this
.
_precoRef
}
setPrecoRef
(
_precoRef
){
this
.
_precoRef
=
_precoRef
;}
...
...
@@ -101,7 +98,6 @@ class TipoCardapio{
this
.
setConjunto
(
conjunto
);
this
.
setPrecoRef
(
precoRef
);
this
.
setPrecoTotal
(
precoTotal
);
this
.
setNome
(
nome
);
}
}
...
...
@@ -150,7 +146,7 @@ function atualizaEmpresas(){
var
str
;
for
(
var
empresa
in
ListaEmpresas
){
str
=
"
<tr>
"
;
str
=
"
<tr>
"
;
str
+=
"
<td>
"
+
ListaEmpresas
[
empresa
].
getDados
().
getNome
()
+
"
</td>
"
;
str
+=
"
<td> <button onClick=alertPublicoEmpresa(
"
+
empresa
+
"
);>Ver mais dados</button></td>
"
;
str
+=
"
<td> <button onClick=alertCardapioEmpresa(
"
+
empresa
+
"
);>Ver mais dados</button></td>
"
;
...
...
@@ -195,7 +191,19 @@ function atualizaEmpresas(){
<tr><td>
Preço refeição:
</td><td><input
type=
text
id=
"cardapioEmpresa_precoInd"
></td></tr>
<tr><td>
Preço total:
</td><td><input
type=
text
id=
"cardapioEmpresa_precoTotal"
></td></tr>
<tr><td
colspan=
2
><center><button
id=
"adicionaCardapioEmpresa"
>
Adicionar Cardápio
</button>
</center></td>
</tr>
<tr><td
colspan=
2
id=
"checkBoxesCardapios"
></td></tr>
<table>
<thead>
<tr>
<td>
Nome
</td>
<td>
Ingredientes
</td>
<td>
Ações
</td>
</tr>
</thead>
<tbody
id =
"tcardapio"
>
</tbody>
</table>
<tr><td
colspan=
2
><center><button
id=
"editaCardapioEmpresa"
>
Salvar
</button>
<button
class=
"cancelaEditaEmpresa"
>
Cancelar
</button></center></td>
</tr>
</table>
</div>
...
...
@@ -309,33 +317,36 @@ function alertCardapioEmpresa(e){
$
(
"
#cardapioEmpresa_precoInd
"
).
val
(
dados
.
getTiposCardapios
().
getPrecoRef
());
$
(
"
#cardapioEmpresa_precoTotal
"
).
val
(
dados
.
getTiposCardapios
().
getPrecoTotal
());
}
htmlCheckBoxes
=
"
<tr><td>
"
;
document
.
getElementById
(
"
tcardapio
"
).
innerHTML
=
""
;
var
colunas
=
"
<td><td>
"
;
if
(
dados
.
getTiposCardapios
())
{
tabs
=
dados
.
getTiposCardapios
().
getConjunto
()
for
(
var
e
in
tabs
)
{
aux
=
tabs
[
e
]
colunas
+=
"
<tr><td></td><td>
"
for
(
var
element
in
aux
)
{
htmlCheckBoxes
+=
"
<input id =
\"
"
+
aux
[
element
]
+
"
\"
checked type=checkbox>
"
+
aux
[
element
]
+
"
</li>
"
colunas
+=
aux
[
element
]
+
"
"
}
htmlCheckBoxes
+=
"
<tr><td
>
"
colunas
+=
"
</td></tr
>
"
}
}
$
(
"
#checkBoxesCardapios
"
).
html
(
htmlCheckBoxes
)
;
document
.
getElementById
(
"
tcardapio
"
).
innerHTML
+=
colunas
;
}
$
(
"
#adicionaCardapioEmpresa
"
).
click
(
function
(){
numero
+=
1
;
htmlCheckBoxes
+=
"
<tr><td>
"
var
colunas
=
"
<tr><td> <input type=text id = nomeCardapio></td><td>
"
;
for
(
var
element
in
tiposDePreparo
)
{
htmlCheckBoxe
s
+=
"
<input id =
\"
"
+
tiposDePreparo
[
element
]
+
numero
+
"
\"
type=checkbox>
"
+
tiposDePreparo
[
element
]
+
""
coluna
s
+=
"
<input id =
\"
"
+
tiposDePreparo
[
element
]
+
numero
+
"
\"
type=checkbox>
"
+
tiposDePreparo
[
element
]
+
""
}
htmlCheckBoxes
+=
"
<tr><td
>
"
$
(
"
#checkBoxesCardapios
"
).
html
(
htmlCheckBoxes
+
"
</ul>
"
)
;
colunas
+=
"
</td></tr
>
"
document
.
getElementById
(
"
tcardapio
"
).
innerHTML
+=
colunas
;
});
$
(
"
#editaDadosEmpresa
"
).
click
(
function
(){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment