Merge branch 'administativePages' into 'dev'
Administative pages See merge request kluppsoftware/smart-energia-web!93
This commit is contained in:
commit
4389dd4639
@ -63,7 +63,7 @@ export default function Chart({ title, data1, data2, label, subtitle, dataset1,
|
|||||||
dataArr.map(data => {
|
dataArr.map(data => {
|
||||||
sum += 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 : ''}`
|
const result = ` ${parseInt(value)!=0? parseInt(value).toLocaleString('pt-br') : ''}\n ${parseInt(value)!=0? percentage : ''}`
|
||||||
|
|
||||||
return value==null? null : result
|
return value==null? null : result
|
||||||
|
|||||||
@ -21,6 +21,9 @@ export default function commonQuestions({faqData, userName}) {
|
|||||||
</Header>
|
</Header>
|
||||||
<section className='CommonQuestionsSection' >
|
<section className='CommonQuestionsSection' >
|
||||||
{
|
{
|
||||||
|
faqData.length<1?
|
||||||
|
<p>Nenhuma pergunta no momento!</p>
|
||||||
|
:
|
||||||
faqData.map((value, index ) => {
|
faqData.map((value, index ) => {
|
||||||
return <>
|
return <>
|
||||||
<CommonQuestionsCard key={index} question={value.question} answer={value.answer}/>
|
<CommonQuestionsCard key={index} question={value.question} answer={value.answer}/>
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
import axios from 'axios';
|
|
||||||
import { GetServerSideProps } from 'next';
|
import { GetServerSideProps } from 'next';
|
||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
@ -26,7 +25,7 @@ export default function aboutUs({userName, news}: any) {
|
|||||||
|
|
||||||
return <>
|
return <>
|
||||||
<section>
|
<section>
|
||||||
<h2 dangerouslySetInnerHTML={{__html: data.pubDate.slice(0, -5)}} />
|
<h2 dangerouslySetInnerHTML={{__html: data.pubDate.slice(0, -8)}} />
|
||||||
<strong dangerouslySetInnerHTML={{__html: data.title}} />
|
<strong dangerouslySetInnerHTML={{__html: data.title}} />
|
||||||
<strong>ANEEL APROVA REAJUSTE TARIFÁRIO ANUAL DA ENERGISA SERGIPE DE 16,46 % PARA O CONSUMIDOR RESIDENCIAL</strong>
|
<strong>ANEEL APROVA REAJUSTE TARIFÁRIO ANUAL DA ENERGISA SERGIPE DE 16,46 % PARA O CONSUMIDOR RESIDENCIAL</strong>
|
||||||
<br />
|
<br />
|
||||||
|
|||||||
@ -378,6 +378,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||||||
|
|
||||||
await apiClient.post('/units', {
|
await apiClient.post('/units', {
|
||||||
"filters": [
|
"filters": [
|
||||||
|
{"type" : "not_in", "field": "dados_cadastrais.codigo_scde", "value":["0P"]},
|
||||||
{"type" : "=", "field": "dados_cadastrais.cod_smart_cliente", "value": id}
|
{"type" : "=", "field": "dados_cadastrais.cod_smart_cliente", "value": id}
|
||||||
],
|
],
|
||||||
"fields": ["cod_smart_unidade", "codigo_scde"],
|
"fields": ["cod_smart_unidade", "codigo_scde"],
|
||||||
|
|||||||
@ -1787,6 +1787,7 @@ axe-core@^4.3.5:
|
|||||||
axios@^0.27.2:
|
axios@^0.27.2:
|
||||||
version "0.27.2"
|
version "0.27.2"
|
||||||
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
|
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
|
||||||
|
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
follow-redirects "^1.14.9"
|
follow-redirects "^1.14.9"
|
||||||
form-data "^4.0.0"
|
form-data "^4.0.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user