From c4879e92bc7a91a7bbf6d638311ef4ea2ca105b9 Mon Sep 17 00:00:00 2001 From: Matheus Costa Vieira Date: Thu, 2 Apr 2020 16:13:51 -0300 Subject: [PATCH] corrigido template estabelecimento e yml --- _data/estabelecimentos/exemplo_email.yml | 8 ++++---- _data/estabelecimentos/exemplo_whatsapp.yml | 8 ++++---- _includes/estabelecimento/Estabelecimento.js | 2 ++ _includes/estabelecimento/form.html | 8 ++++++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/_data/estabelecimentos/exemplo_email.yml b/_data/estabelecimentos/exemplo_email.yml index 535bf40..ce63036 100644 --- a/_data/estabelecimentos/exemplo_email.yml +++ b/_data/estabelecimentos/exemplo_email.yml @@ -3,8 +3,8 @@ Email: "matheus.costa.vieira@gmail.com" 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" ] diff --git a/_data/estabelecimentos/exemplo_whatsapp.yml b/_data/estabelecimentos/exemplo_whatsapp.yml index 3de9996..d4aa526 100644 --- a/_data/estabelecimentos/exemplo_whatsapp.yml +++ b/_data/estabelecimentos/exemplo_whatsapp.yml @@ -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" ] diff --git a/_includes/estabelecimento/Estabelecimento.js b/_includes/estabelecimento/Estabelecimento.js index dfd7712..d708180 100644 --- a/_includes/estabelecimento/Estabelecimento.js +++ b/_includes/estabelecimento/Estabelecimento.js @@ -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}`)); }; diff --git a/_includes/estabelecimento/form.html b/_includes/estabelecimento/form.html index 872a3c4..1ca3ebe 100644 --- a/_includes/estabelecimento/form.html +++ b/_includes/estabelecimento/form.html @@ -1,7 +1,9 @@
@@ -36,7 +38,9 @@

Detalhes do estabelecimento selecionado

Nome:
+
Email:
Telefone:
-
Whatsapp (opcional):
+
Whatsapp:
+
Categorias:
Endereço:
\ No newline at end of file