From 4fd69b032e05cb80811b288086d137076dcba98d Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 1 Jul 2022 10:10:42 -0300 Subject: [PATCH 1/3] fixing OP units --- src/pages/telemetria/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/telemetria/index.tsx b/src/pages/telemetria/index.tsx index 4febdbb..d05ed17 100644 --- a/src/pages/telemetria/index.tsx +++ b/src/pages/telemetria/index.tsx @@ -378,6 +378,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { await apiClient.post('/units', { "filters": [ + {"type" : "not_in", "field": "dados_cadastrais.codigo_scde", "value":["0P"]}, {"type" : "=", "field": "dados_cadastrais.cod_smart_cliente", "value": id} ], "fields": ["cod_smart_unidade", "codigo_scde"], From f6223a000d4d5b147d70b6f840dc8c5dd69dd55a Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 1 Jul 2022 10:13:22 -0300 Subject: [PATCH 2/3] fixing Nan in charts --- src/components/graph/Chart2.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/graph/Chart2.tsx b/src/components/graph/Chart2.tsx index 5d5371c..5609835 100644 --- a/src/components/graph/Chart2.tsx +++ b/src/components/graph/Chart2.tsx @@ -63,7 +63,7 @@ export default function Chart({ title, data1, data2, label, subtitle, dataset1, dataArr.map(data => { sum += data; }); - const percentage = (data1[ctx.dataIndex].econ_percentual*100).toFixed(0)+"%"; + const percentage = data1[ctx.dataIndex].econ_percentual? (data1[ctx.dataIndex].econ_percentual*100).toFixed(0)+"%" : ''; const result = ` ${parseInt(value)!=0? parseInt(value).toLocaleString('pt-br') : ''}\n ${parseInt(value)!=0? percentage : ''}` return value==null? null : result From 98e5bf4b5ea1fafc2230824cf24b7c00b50d98ab Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 1 Jul 2022 10:18:21 -0300 Subject: [PATCH 3/3] add message in faq --- src/pages/faq/index.tsx | 3 +++ src/pages/news/index.tsx | 3 +-- yarn.lock | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/faq/index.tsx b/src/pages/faq/index.tsx index 7b90f55..fc91704 100644 --- a/src/pages/faq/index.tsx +++ b/src/pages/faq/index.tsx @@ -21,6 +21,9 @@ export default function commonQuestions({faqData, userName}) {
{ + faqData.length<1? +

Nenhuma pergunta no momento!

+ : faqData.map((value, index ) => { return <> diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index e2700eb..4bc5720 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -1,4 +1,3 @@ -import axios from 'axios'; import { GetServerSideProps } from 'next'; import Head from 'next/head'; import Link from 'next/link' @@ -26,7 +25,7 @@ export default function aboutUs({userName, news}: any) { return <>
-

+

ANEEL APROVA REAJUSTE TARIFÁRIO ANUAL DA ENERGISA SERGIPE DE 16,46 % PARA O CONSUMIDOR RESIDENCIAL
diff --git a/yarn.lock b/yarn.lock index 6f24770..1775cec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1787,6 +1787,7 @@ axe-core@^4.3.5: axios@^0.27.2: version "0.27.2" resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" + integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== dependencies: follow-redirects "^1.14.9" form-data "^4.0.0"