Skip to content

Commit

Permalink
corrigido template estabelecimento e yml
Browse files Browse the repository at this point in the history
  • Loading branch information
matheus-vieira committed Apr 2, 2020
1 parent 1cc103f commit c4879e9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
8 changes: 4 additions & 4 deletions _data/estabelecimentos/exemplo_email.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Email: "[email protected]"
Telefone: "5541988024599"
Whatsapp: ""
Endereço:
- logradouro": "Rua Teste, 3157"
- Bairro": "Sítio Cercado"
- Cidade": "Curitiba"
- Uf": "PR"
logradouro": "Rua Teste, 3157"
Bairro": "Sítio Cercado"
Cidade": "Curitiba"
Uf": "PR"
Categoria: [ "mercado", "padaria", "açougue" ]
8 changes: 4 additions & 4 deletions _data/estabelecimentos/exemplo_whatsapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Email: ""
Telefone: "5541988024599"
Whatsapp: "5541988024599"
Endereço:
- logradouro": "Rua Teste, 3157"
- Bairro": "Sítio Cercado"
- Cidade": "Curitiba"
- Uf": "PR"
logradouro": "Rua Teste, 3157"
Bairro": "Sítio Cercado"
Cidade": "Curitiba"
Uf": "PR"
Categoria: [ "ferragem", "hortifruti", "padaria", "açougue" ]
2 changes: 2 additions & 0 deletions _includes/estabelecimento/Estabelecimento.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ const Estabelecimento = function Estabelecimento(d) {
const end = Object.values(this["Endereço"]).join(", ");
Object.defineProperty(this, "end", defineProp(`${end}`));
Object.defineProperty(this, "label", defineProp(`${this.Nome}`));
const categorias = Object.values(this["Categoria"]).join(", ");
Object.defineProperty(this, "categorias", defineProp(`${categorias}`));
};
8 changes: 6 additions & 2 deletions _includes/estabelecimento/form.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<script type="text/html" id="tpl-estabelecimento-selecionado">
<div><strong>Nome: </strong> {Nome}</div>
<div><strong>Email: </strong> {Email}</div>
<div><strong>Telefone: </strong> {Telefone}</div>
<div><strong>Whatsapp (opcional): </strong> {Whatsapp}</div>
<div><strong>Whatsapp: </strong> {Whatsapp}</div>
<div><strong>Categorias: </strong> {categorias}</div>
<div><strong>Endereço: </strong> {end}</div>
</script>
<form id="formEstabelecimento">
Expand Down Expand Up @@ -36,7 +38,9 @@
<h3>Detalhes do estabelecimento selecionado</h3>
<dl id="divDetalhes">
<div><strong>Nome: </strong></div>
<div><strong>Email: </strong></div>
<div><strong>Telefone: </strong></div>
<div><strong>Whatsapp (opcional):</strong></div>
<div><strong>Whatsapp:</strong></div>
<div><strong>Categorias: </strong></div>
<div><strong>Endereço: </strong></div>
</dl>

0 comments on commit c4879e9

Please sign in to comment.