add more fix
This commit is contained in:
commit
4a08d520f8
@ -8,6 +8,7 @@ export const BannerView = styled.div`
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 20%;
|
height: 20%;
|
||||||
|
max-height: 200px;
|
||||||
|
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ export function LineBarChart2({ title, subtitle, data1, data2, data3, label, red
|
|||||||
type: 'bar' as const,
|
type: 'bar' as const,
|
||||||
label: dataset2? dataset2 : 'Dataset 2',
|
label: dataset2? dataset2 : 'Dataset 2',
|
||||||
backgroundColor: (value, ctx) => {
|
backgroundColor: (value, ctx) => {
|
||||||
return hashurado? data1[value.dataIndex].dad_estimado == false? '#C2D5FB' : pattern.draw('diagonal', '#C2D5FB') : '#C2D5FB'
|
return hashurado? data1[value.dataIndex]?.dad_estimado == false? '#C2D5FB' : pattern.draw('diagonal', '#C2D5FB') : '#C2D5FB'
|
||||||
},
|
},
|
||||||
data: data3.map(value => value.custo_cativo),
|
data: data3.map(value => value.custo_cativo),
|
||||||
},
|
},
|
||||||
@ -134,7 +134,7 @@ export function LineBarChart2({ title, subtitle, data1, data2, data3, label, red
|
|||||||
label: dataset3? dataset3 : 'Dataset 2',
|
label: dataset3? dataset3 : 'Dataset 2',
|
||||||
// backgroundColor: '#255488',
|
// backgroundColor: '#255488',
|
||||||
backgroundColor: (value, ctx) => {
|
backgroundColor: (value, ctx) => {
|
||||||
return hashurado? data1[value.dataIndex].dad_estimado == false? '#255488' : pattern.draw('diagonal', '#255488') : '#255488'
|
return hashurado? data1[value.dataIndex]?.dad_estimado == false? '#255488' : pattern.draw('diagonal', '#255488') : '#255488'
|
||||||
},
|
},
|
||||||
data: data2.map(value => value.custo_livre),
|
data: data2.map(value => value.custo_livre),
|
||||||
},
|
},
|
||||||
|
|||||||
@ -70,7 +70,7 @@ export default function ChartCard({ title, subtitle, consumption, className, lin
|
|||||||
<div className='header'>
|
<div className='header'>
|
||||||
<div>
|
<div>
|
||||||
<h2>{title}</h2>
|
<h2>{title}</h2>
|
||||||
<span>{subtitle}</span>
|
<span style={{display:'block'}}>{subtitle}</span>
|
||||||
</div>
|
</div>
|
||||||
{/* <ButtonGroup /> */}
|
{/* <ButtonGroup /> */}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -37,6 +37,11 @@ export const ChartCardView = styled.article`
|
|||||||
color: #2F4CDD;
|
color: #2F4CDD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span{
|
||||||
|
display:block;
|
||||||
|
font-size: 12.8px;
|
||||||
|
}
|
||||||
|
|
||||||
.statusDot {
|
.statusDot {
|
||||||
max-width: 11px;
|
max-width: 11px;
|
||||||
max-height: 11px;
|
max-height: 11px;
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export default function Header({name, admin}: headerInterface) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{
|
{
|
||||||
!admin?
|
!admin && profile_picture?
|
||||||
<Image src={profile_picture} height={50} width={75}/>
|
<Image src={profile_picture} height={50} width={75}/>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
@ -39,6 +39,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||||||
const apiClient = getAPIClient(ctx)
|
const apiClient = getAPIClient(ctx)
|
||||||
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
||||||
const { ['user-name']: userName } = parseCookies(ctx)
|
const { ['user-name']: userName } = parseCookies(ctx)
|
||||||
|
const { ['user-profile_picture']: profile_picture } = parseCookies()
|
||||||
|
|
||||||
let userData = [];
|
let userData = [];
|
||||||
|
|
||||||
@ -60,7 +61,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
userData,
|
userData,
|
||||||
userName
|
userName,
|
||||||
|
profile_picture
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,42 +5,22 @@ import { parseCookies } from 'nookies'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Banner from '../components/banner/Banner'
|
import Banner from '../components/banner/Banner'
|
||||||
import Header from '../components/header/Header'
|
import Header from '../components/header/Header'
|
||||||
|
import getAPIClient from '../services/ssrApi'
|
||||||
import { AboutUsView } from '../styles/layouts/aboutUs/AboutUsView'
|
import { AboutUsView } from '../styles/layouts/aboutUs/AboutUsView'
|
||||||
|
|
||||||
export default function aboutUs({userName}) {
|
export default function aboutUs({userName, text}) {
|
||||||
return (
|
return (
|
||||||
<AboutUsView>
|
<AboutUsView>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Smart Energia - About Us</title>
|
<title>Smart Energia - About Us</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Header name={userName} />
|
|
||||||
|
{/* <Header name={userName}/> */}
|
||||||
<Banner title='Quem Somos' subtitle='Soluções inteligentes em Gestão de Energia' imgSource='/assets/banners/aboutUsBanner.png' />
|
<Banner title='Quem Somos' subtitle='Soluções inteligentes em Gestão de Energia' imgSource='/assets/banners/aboutUsBanner.png' />
|
||||||
|
|
||||||
<section>
|
<section dangerouslySetInnerHTML={{__html: text[0].about}}/>
|
||||||
<p>A <strong>SMART ENERGIA</strong> é uma consultoria independente especializada em Gestão de Energia Elétrica, consolidada como uma das três maiores consultorias do Brasil.
|
|
||||||
Devido à grande experiência em operações na CCEE – Câmara de Comercialização de Energia Elétrica e ANEEL, entrega resultados que superam as expectativas.</p>
|
|
||||||
|
|
||||||
<p>Nasceu para gerenciar a compra de energia com inovação, transparência e imparcialidade sendo o elo forte e necessário entre os Consumidores e os
|
|
||||||
Vendedores de energia. </p>
|
|
||||||
|
|
||||||
<p>Baseada em sua experiência no setor elétrico adquirida desde 2001 e em mais de 900 unidades migradas, atua na negociação de contratos de compra e venda de
|
|
||||||
energia, na Gestão de Energia no Mercado Livre e criação de produtos diferenciados para atender as necessidades específicas dos consumidores.</p>
|
|
||||||
|
|
||||||
<p>Apoiada pela sólida experiência de seus gestores, conhecendo as premissas dos agentes de Comercialização e Geração para a compra e venda de energia,
|
|
||||||
aplicamos as mesmas premissas a favor dos Consumidores, disponibilizando assim um diferencial único para a tomada de decisão e elaboração das estratégias de
|
|
||||||
contratação de energia.</p>
|
|
||||||
<ul>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Informação'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Economia'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Gestão de Energia'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Imparcialidade'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Previsão de Custos'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Experiência'}</li>
|
|
||||||
<li><Image src='/assets/listIcon.svg' width={25} height={25} />{'Relacionamento'}</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
<aside>
|
<aside style={{alignSelf: 'flex-end'}}>
|
||||||
<h2>Apoio a projetos sociais</h2>
|
<h2>Apoio a projetos sociais</h2>
|
||||||
<div>
|
<div>
|
||||||
<Image src='/assets/stamps/whiteStamp.png' width={200} height={200} />
|
<Image src='/assets/stamps/whiteStamp.png' width={200} height={200} />
|
||||||
@ -48,15 +28,23 @@ export default function aboutUs({userName}) {
|
|||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
</article>
|
</article>
|
||||||
</section>
|
|
||||||
</AboutUsView>
|
</AboutUsView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
||||||
|
const apiClient = getAPIClient(ctx)
|
||||||
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
||||||
const { ['user-name']: userName } = parseCookies(ctx)
|
const { ['user-name']: userName } = parseCookies(ctx)
|
||||||
|
|
||||||
|
let text = []
|
||||||
|
|
||||||
|
await apiClient.get('/aboutUs').then(res => {
|
||||||
|
text = res.data.data
|
||||||
|
}).catch(res => {
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
|
||||||
if (!token) {
|
if (!token) {
|
||||||
return {
|
return {
|
||||||
redirect: {
|
redirect: {
|
||||||
@ -68,7 +56,8 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
userName
|
userName,
|
||||||
|
text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,9 +19,9 @@ export default function AccumulatedSavings({graphData, years, userName}: any) {
|
|||||||
<title>Smart Energia - Economia Bruta Mensal</title>
|
<title>Smart Energia - Economia Bruta Mensal</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Header name={userName} />
|
<Header name={userName} />
|
||||||
<PageTitle title='Economia Bruta Mensal' subtitle='Economia Bruta Estimada e Acumulada mensal (Valores em R$ mil)' />
|
<PageTitle title='Economia Bruta Mensal' subtitle='Economia Bruta Estimada e Acumulada mensal - Valores em R$ mil' />
|
||||||
<section>
|
<section>
|
||||||
<SingleBar title='Economia Bruta Estimada e Acumulada' subtitle='(Valores em R$ mil)' dataset='Consolidada'
|
<SingleBar title='' subtitle='' dataset='Consolidada'
|
||||||
dataProps={graphData.sort((a, b) => {
|
dataProps={graphData.sort((a, b) => {
|
||||||
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
||||||
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
||||||
|
|||||||
@ -8,12 +8,23 @@ import Header from '../../components/header/Header';
|
|||||||
import PageTitle from '../../components/pageTitle/PageTitle';
|
import PageTitle from '../../components/pageTitle/PageTitle';
|
||||||
import { api } from '../../services/api';
|
import { api } from '../../services/api';
|
||||||
import { GeneralView } from '../../styles/layouts/general/GeneralView'
|
import { GeneralView } from '../../styles/layouts/general/GeneralView'
|
||||||
|
import MuiAlert, { AlertProps } from '@mui/material/Alert'
|
||||||
|
import Snackbar from '@mui/material/Snackbar';
|
||||||
|
|
||||||
|
const Alert = React.forwardRef<HTMLDivElement, AlertProps>(function Alert(
|
||||||
|
props,
|
||||||
|
ref
|
||||||
|
) {
|
||||||
|
return <MuiAlert elevation={6} ref={ref} variant="filled" {...props} />
|
||||||
|
})
|
||||||
|
|
||||||
export default function index({userName}: any) {
|
export default function index({userName}: any) {
|
||||||
const editorRef = useRef(null);
|
const editorRef = useRef(null);
|
||||||
const [text, setText] = useState('');
|
const [text, setText] = useState('');
|
||||||
|
|
||||||
|
const [openSnackSuccess, setOpenSnackSuccess] = useState<boolean>(false)
|
||||||
|
const [openSnackError, setOpenSnackError] = useState<boolean>(false)
|
||||||
|
|
||||||
const log = () => {
|
const log = () => {
|
||||||
if (editorRef.current) {
|
if (editorRef.current) {
|
||||||
console.log(editorRef.current.getContent());
|
console.log(editorRef.current.getContent());
|
||||||
@ -24,16 +35,54 @@ export default function index({userName}: any) {
|
|||||||
setText(event.target.value);
|
setText(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleCloseSnack = (
|
||||||
|
event?: React.SyntheticEvent | Event,
|
||||||
|
reason?: string
|
||||||
|
) => {
|
||||||
|
if (reason === 'clickaway') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
setOpenSnackError(false)
|
||||||
|
setOpenSnackSuccess(false)
|
||||||
|
}
|
||||||
|
|
||||||
async function handleRegisterAboutUs() {
|
async function handleRegisterAboutUs() {
|
||||||
await api.post('/aboutUs', {
|
await api.post('/aboutUs', {
|
||||||
about: editorRef.current.value
|
about: text
|
||||||
}).then(res => {
|
})
|
||||||
console.log(res)
|
.then(res => setOpenSnackSuccess(true))
|
||||||
}).catch(res => console.log(res))
|
.catch(res => setOpenSnackError(false))
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<GeneralView>
|
<GeneralView>
|
||||||
|
<Snackbar
|
||||||
|
open={openSnackSuccess}
|
||||||
|
autoHideDuration={4000}
|
||||||
|
onClose={handleCloseSnack}
|
||||||
|
>
|
||||||
|
<Alert
|
||||||
|
onClose={handleCloseSnack}
|
||||||
|
severity="success"
|
||||||
|
sx={{ width: '100%' }}
|
||||||
|
>
|
||||||
|
Cadastrado com Sucesso!
|
||||||
|
</Alert>
|
||||||
|
</Snackbar>
|
||||||
|
<Snackbar
|
||||||
|
open={openSnackError}
|
||||||
|
autoHideDuration={4000}
|
||||||
|
onClose={handleCloseSnack}
|
||||||
|
>
|
||||||
|
<Alert
|
||||||
|
onClose={handleCloseSnack}
|
||||||
|
severity="error"
|
||||||
|
sx={{ width: '100%' }}
|
||||||
|
>
|
||||||
|
Não cadastrado!
|
||||||
|
</Alert>
|
||||||
|
</Snackbar>
|
||||||
<Header name={userName} admin/>
|
<Header name={userName} admin/>
|
||||||
<PageTitle title='Sobre nós' subtitle='Alterar texto de sobre nós'/>
|
<PageTitle title='Sobre nós' subtitle='Alterar texto de sobre nós'/>
|
||||||
<div style={{width: '100%', display: 'flex', justifyContent: 'flex-start', alignItems: 'flex-start', marginTop: '30px', marginBottom: '10px'}}>
|
<div style={{width: '100%', display: 'flex', justifyContent: 'flex-start', alignItems: 'flex-start', marginTop: '30px', marginBottom: '10px'}}>
|
||||||
@ -43,6 +92,8 @@ export default function index({userName}: any) {
|
|||||||
<br />
|
<br />
|
||||||
<Editor
|
<Editor
|
||||||
onInit={(evt, editor) => editorRef.current = editor}
|
onInit={(evt, editor) => editorRef.current = editor}
|
||||||
|
onChange={value => console.log(value)}
|
||||||
|
onEditorChange={(newText) => setText(newText)}
|
||||||
initialValue=' <p>A <strong>SMART ENERGIA</strong> é uma consultoria independente especializada em Gestão de Energia Elétrica, consolidada como uma das três maiores consultorias do Brasil.
|
initialValue=' <p>A <strong>SMART ENERGIA</strong> é uma consultoria independente especializada em Gestão de Energia Elétrica, consolidada como uma das três maiores consultorias do Brasil.
|
||||||
Devido à grande experiência em operações na CCEE – Câmara de Comercialização de Energia Elétrica e ANEEL, entrega resultados que superam as expectativas.</p>
|
Devido à grande experiência em operações na CCEE – Câmara de Comercialização de Energia Elétrica e ANEEL, entrega resultados que superam as expectativas.</p>
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ export default function industryInfo({userName}: any) {
|
|||||||
<form action="">
|
<form action="">
|
||||||
<div className='testess'>
|
<div className='testess'>
|
||||||
<label htmlFor="arquivo"> <p className='TitleButton'> Enviar PDF </p> </label>
|
<label htmlFor="arquivo"> <p className='TitleButton'> Enviar PDF </p> </label>
|
||||||
{/* <input type="file" name='arquivo' id='arquivo' onChange={onChange} /> */}
|
|
||||||
<input type="file" name='arquivo' id='arquivo' accept=".pdf" onChange={onChange} />
|
<input type="file" name='arquivo' id='arquivo' accept=".pdf" onChange={onChange} />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@ -87,16 +87,13 @@ export default function industryInfo({userName}: any) {
|
|||||||
{/* <InputUploadPdf/> */}
|
{/* <InputUploadPdf/> */}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="update">
|
<div style={{marginTop:'20px'}}>
|
||||||
<form action="">
|
<input type="file" name='arquivo' id='arquivo' onChange={onChange} />
|
||||||
<div className='testess'>
|
|
||||||
<label htmlFor="arquivo"> <p className='TitleButton'> Enviar PDF </p> </label>
|
|
||||||
<input type="file" accept=".pdf" onChange={onChange} />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<BasicButton onClick={() => handleCreateClient()} title='Atualizar'/>
|
|
||||||
|
<br />
|
||||||
|
{/* <BasicButton onClick={() => handleCreateClient()} title='Atualizar'/> */}
|
||||||
|
|
||||||
</IndustryInfoView>
|
</IndustryInfoView>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -16,9 +16,9 @@ export default function CostIndicator({graphData, userName}: any) {
|
|||||||
<title>Smart Energia - Indicador de Custos</title>
|
<title>Smart Energia - Indicador de Custos</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Header name={userName} />
|
<Header name={userName} />
|
||||||
<PageTitle title='Indicador de Custo' subtitle='Valores em R$/MWh'/>
|
<PageTitle title='Indicador de Custo' subtitle='Indicador de Custo - Valores em R$/MWh'/>
|
||||||
<section>
|
<section>
|
||||||
<Chart title='Indicador de Custo' subtitle='(Valores em R$/MWh)'
|
<Chart title='' subtitle=''
|
||||||
data1={graphData.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
data1={graphData.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
||||||
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
||||||
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
||||||
|
|||||||
@ -44,14 +44,14 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<section className='dashboard'>
|
<section className='dashboard'>
|
||||||
<GraphCard title='Economia Bruta Anual' subtitle='Economia Bruta Estimada e Acumulada anual'>
|
<GraphCard title='Economia Bruta Anual' subtitle='Economia Bruta Estimada e Acumulada anual - (Valores em R$ mil)'>
|
||||||
<SingleBar title='Economia Bruta' subtitle='(Valores em R$ mil)'
|
<SingleBar title='' subtitle=''
|
||||||
dataset='Consolidada' dataset1='Estimada'
|
dataset='Consolidada' dataset1='Estimada'
|
||||||
dataProps={grossAnualGraph}
|
dataProps={grossAnualGraph}
|
||||||
label={grossAnualYears} barLabel year/>
|
label={grossAnualYears} barLabel year/>
|
||||||
</GraphCard>
|
</GraphCard>
|
||||||
|
|
||||||
<GraphCard title='Economia Bruta Mensal' subtitle='Economia Bruta Estimada e Acumulada mensal' singleBar>
|
<GraphCard title='Economia Bruta Mensal' subtitle='Economia Bruta Estimada e Acumulada mensal - (Valores em R$)' singleBar>
|
||||||
<SingleBar title='Economia Bruta Estimada e Acumulada' subtitle='(Valores em R$)'
|
<SingleBar title='Economia Bruta Estimada e Acumulada' subtitle='(Valores em R$)'
|
||||||
dataset='Acumulada' dataset1='Estimado'
|
dataset='Acumulada' dataset1='Estimado'
|
||||||
dataProps={grossMensalGraph}
|
dataProps={grossMensalGraph}
|
||||||
@ -59,14 +59,14 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal
|
|||||||
barLabel month/>
|
barLabel month/>
|
||||||
</GraphCard>
|
</GraphCard>
|
||||||
|
|
||||||
<GraphCard title='Cativo x Livre mensal' subtitle='Comparativo de Custo Estimado' singleBar>
|
<GraphCard title='Cativo x Livre mensal' subtitle='Comparativo de Custo Estimado - (Valores em R$/MWh)' singleBar>
|
||||||
<LineBarChart2 data1={acumulatedGraph} data2={acumulatedGraph} data3={acumulatedGraph}
|
<LineBarChart2 data1={acumulatedGraph} data2={acumulatedGraph} data3={acumulatedGraph}
|
||||||
label={ConsumoEstimado.label} dataset1='Custo' dataset2='Cativo' dataset3='Livre'
|
label={ConsumoEstimado.label} dataset1='Custo' dataset2='Cativo' dataset3='Livre'
|
||||||
title='Custo Estimado' subtitle='(Valores em R$/MWh)' barLabel hashurado/>
|
title='' subtitle='' barLabel hashurado/>
|
||||||
</GraphCard>
|
</GraphCard>
|
||||||
|
|
||||||
<GraphCard title='Indicador de Custo' subtitle='Valores em R$/ MWh'>
|
<GraphCard title='Indicador de Custo' subtitle='Valores em R$/ MWh'>
|
||||||
<Chart title='Indicador de Custo' subtitle='(Valores em R$/MWh)'
|
<Chart title='' subtitle=''
|
||||||
data1={costIndicator.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
data1={costIndicator.filter((value, index) => value.mes.slice(3, 7).includes('2021')).sort((a, b) => {
|
||||||
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
if (parseFloat(a.mes.slice(0,2)) > parseFloat(b.mes.slice(1,2))) return 1
|
||||||
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
if (parseFloat(a.mes.slice(0,2)) < parseFloat(b.mes.slice(1,2))) return -1
|
||||||
|
|||||||
@ -19,13 +19,13 @@ export default function GrossSavings({graphData, years, userName}: any) {
|
|||||||
<title>Smart Energia - Economia Acumulada</title>
|
<title>Smart Energia - Economia Acumulada</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Header name={userName} />
|
<Header name={userName} />
|
||||||
<PageTitle title='Economia Bruta Anual' subtitle='Economia Bruta Estimada e Acumulada anual (Valores em R$ mil)' />
|
<PageTitle title='Economia Bruta Anual' subtitle='Economia Bruta Estimada e Acumulada anual - Valores em R$ mil' />
|
||||||
<section>
|
<section>
|
||||||
<SingleBar title='Economia Bruta' subtitle='(Valores em R$ mil)'
|
<SingleBar title='' subtitle=''
|
||||||
dataset='Consolidada' dataset1='Estimada'
|
dataset='Consolidada'
|
||||||
|
|
||||||
dataProps={graphData}
|
dataProps={graphData}
|
||||||
label={years} barLabel year/>
|
label={years} barLabel/>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
</GrossSavingsView>
|
</GrossSavingsView>
|
||||||
|
|||||||
@ -12,44 +12,38 @@ import getAPIClient from '../services/ssrApi';
|
|||||||
import { Button, NewsView } from '../styles/layouts/news/NewsView'
|
import { Button, NewsView } from '../styles/layouts/news/NewsView'
|
||||||
|
|
||||||
export default function aboutUs({userName, news}: any) {
|
export default function aboutUs({userName, news}: any) {
|
||||||
console.log(news)
|
console.log(news.channel.item)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NewsView>
|
<NewsView>
|
||||||
<Head>
|
<Head>
|
||||||
<title>Smart Energia - Noticias</title>
|
<title>Smart Energia - Noticias</title>
|
||||||
</Head>
|
</Head>
|
||||||
<Header name={userName} />
|
{/* <Header name={userName} /> */}
|
||||||
<Banner title='Notícias' subtitle='Tudo de importante no setor de energia' imgSource='/assets/banners/news.png' />
|
<Banner title='Notícias' subtitle='Tudo de importante no setor de energia' imgSource='/assets/banners/news.png'/>
|
||||||
|
|
||||||
|
{
|
||||||
|
news.channel.item.map(data => {
|
||||||
|
|
||||||
|
return <>
|
||||||
<section>
|
<section>
|
||||||
<h2>19 Abril 2022</h2>
|
<h2 dangerouslySetInnerHTML={{__html: data.pubDate}} />
|
||||||
|
<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 />
|
||||||
<br />
|
<br />
|
||||||
<p>A Agência Nacional de Energia Elétrica (ANEEL) aprovou, nesta terça-feira (19/04) o reajuste tarifário anual da Energisa Sergipe – Distribuidora de Energia S.A (ESE).
|
{
|
||||||
As novas tarifas da empresa, que atende cerca de e 825 mil unidades consumidoras no Sergipe, entram em vigor nesta sexta, 22/04, com reajuste de 16,46 % para
|
<p dangerouslySetInnerHTML={{__html: data.description}} />
|
||||||
o consumidor residencial. <br />
|
}
|
||||||
Os itens que mais impactaram a correção foram os encargos setoriais, os custos de distribuição, a retirada dos componentes financeiros..</p>
|
|
||||||
<Button>
|
|
||||||
<fieldset>
|
|
||||||
<legend> <BasicButton title='Ver Mais...' onClick={() => console.log()}/></legend>
|
|
||||||
</fieldset>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<h2>19 Abril 2022</h2>
|
|
||||||
<strong>NEEL APROVA REAJUSTE MÉDIO DE 20,36% NA TARIFA DE ENERGIA NO RN</strong>
|
|
||||||
<br />
|
|
||||||
<br />
|
|
||||||
<p>A Agência Nacional de Energia Elétrica (ANEEL) aprovou, nesta terça-feira (19/04) o reajuste tarifário anual da Energisa Sergipe – Distribuidora de Energia S.A (ESE).
|
|
||||||
As novas tarifas da empresa, que atende cerca de e 825 mil unidades consumidoras no Sergipe, entram em vigor nesta sexta, 22/04, com reajuste de 16,46 % para
|
|
||||||
o consumidor residencial. <br />
|
|
||||||
Os itens que mais impactaram a correção foram os encargos setoriais, os custos de distribuição, a retirada dos componentes financeiros..</p>
|
|
||||||
<Button>
|
<Button>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend> <BasicButton title='Ver Mais...' onClick={() => console.log()}/></legend>
|
<legend> <BasicButton title='Ver Mais...' onClick={() => console.log()}/></legend>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
|
</>
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
<a href='https://www.energiasmart.com.br/noticias/'
|
<a href='https://www.energiasmart.com.br/noticias/'
|
||||||
target={"_blank"}
|
target={"_blank"}
|
||||||
@ -63,10 +57,10 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|||||||
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
const { ['@smartAuth-token']: token } = parseCookies(ctx)
|
||||||
const { ['user-name']: userName } = parseCookies(ctx)
|
const { ['user-name']: userName } = parseCookies(ctx)
|
||||||
|
|
||||||
let news;
|
let news = [];
|
||||||
|
|
||||||
await axios.get('https://www.energiasmart.com.br/noticias/feed/').then(res => {
|
await apiClient.get('/news').then(res => {
|
||||||
news = res.data
|
news = res.data.data
|
||||||
}).catch(res => {
|
}).catch(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
|
|||||||
@ -19,12 +19,15 @@ export default function Notifications({notificationData, userName}: any) {
|
|||||||
<PageTitle title='Notificações' subtitle='Aqui estão as notificações publicadas para você!' />
|
<PageTitle title='Notificações' subtitle='Aqui estão as notificações publicadas para você!' />
|
||||||
<section className='CommonQuestionsSection' >
|
<section className='CommonQuestionsSection' >
|
||||||
{
|
{
|
||||||
|
notificationData?
|
||||||
notificationData.map((value, index ) => {
|
notificationData.map((value, index ) => {
|
||||||
return <>
|
return <>
|
||||||
<NotificationQuestionsCard key={index} title={value.title} body={value.body}/>
|
<NotificationQuestionsCard key={index} title={value.title} body={value.body}/>
|
||||||
<hr />
|
<hr />
|
||||||
</>
|
</>
|
||||||
})
|
})
|
||||||
|
:
|
||||||
|
<p style={{alignSelf: 'center'}}>Você não tem notificações!</p>
|
||||||
}
|
}
|
||||||
</section>
|
</section>
|
||||||
</FaqView>
|
</FaqView>
|
||||||
|
|||||||
@ -22,7 +22,6 @@ export const AboutUsView = styled.main`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
|
||||||
article {
|
article {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
@ -38,7 +37,6 @@ export const AboutUsView = styled.main`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1008px) {
|
@media (max-width: 1008px) {
|
||||||
li {
|
li {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user