diff --git a/public/assets/banners/aboutUs.jpg b/public/assets/banners/aboutUs.jpg new file mode 100644 index 0000000..c5d023b Binary files /dev/null and b/public/assets/banners/aboutUs.jpg differ diff --git a/public/assets/banners/sectoriaInf.jpg b/public/assets/banners/sectoriaInf.jpg new file mode 100644 index 0000000..e6a3aae Binary files /dev/null and b/public/assets/banners/sectoriaInf.jpg differ diff --git a/src/components/graph/cativoXLivreChart/index.tsx b/src/components/graph/cativoXLivreChart/index.tsx index 0fe5aa2..3222b8a 100644 --- a/src/components/graph/cativoXLivreChart/index.tsx +++ b/src/components/graph/cativoXLivreChart/index.tsx @@ -85,7 +85,7 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1, }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -95,7 +95,7 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1, }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -109,7 +109,8 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1, offset: -20, align: "start", font: { - size: !miniature? 15 : 10 + weight: 'bold', + size: !miniature? window.innerWidth/80 : window.innerWidth/105 }, formatter: (value, ctx) => { let sum = 0; diff --git a/src/components/graph/costIndicatorChart/index.tsx b/src/components/graph/costIndicatorChart/index.tsx index 7cb103e..ca92efa 100644 --- a/src/components/graph/costIndicatorChart/index.tsx +++ b/src/components/graph/costIndicatorChart/index.tsx @@ -49,7 +49,7 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -60,7 +60,7 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -75,14 +75,15 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl dataArr.map(data => { sum += data; }); - const result = `${parseInt((parseInt(value)/10).toLocaleString('pt-br'))}` + const result = `${parseFloat((parseFloat(value)).toLocaleString('pt-br'))}` return value==null? null : result }, anchor: "end", align: "end", font: { - size: !miniature? 15 : 10, + weight: 'bold', + size: !miniature? window.innerWidth/80 : window.innerWidth/105 } }, legend: { diff --git a/src/components/graph/graphCard/ChartCardView.ts b/src/components/graph/graphCard/ChartCardView.ts index ddd8109..b8b39a7 100644 --- a/src/components/graph/graphCard/ChartCardView.ts +++ b/src/components/graph/graphCard/ChartCardView.ts @@ -26,6 +26,20 @@ export const ChartCardView = styled.article` margin-bottom: 10px; } + b { + display: flex; + align-items: center; + justify-content: center; + + font-size: 17px; + + color: #254F7F; + p { + font-size: 20px; + text-decoration: underline; + } + } + a { font-family: 'Poppins'; font-style: normal; diff --git a/src/components/graph/grossAnualChart/GrossAnualChart.tsx b/src/components/graph/grossAnualChart/GrossAnualChart.tsx index cf57379..145630f 100644 --- a/src/components/graph/grossAnualChart/GrossAnualChart.tsx +++ b/src/components/graph/grossAnualChart/GrossAnualChart.tsx @@ -46,7 +46,7 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -57,7 +57,7 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -82,10 +82,11 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, display: true, anchor: "end", - offset: !miniature? 5 : 5, + offset: !miniature? 0 : -5, align: "start", font: { - size: !miniature? 30 : 10, + weight: 'bold', + size: !miniature? window.innerWidth/70 : window.innerWidth/90, }, color: (value) => { return value.dataset.label==='Consolidada'? '#fff' : '#255488' @@ -99,7 +100,6 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba text: '', }, }, - }; let labels: string[]; diff --git a/src/components/graph/grossMensalChart/GrossMensalChart.tsx b/src/components/graph/grossMensalChart/GrossMensalChart.tsx index 01bdafa..31dc901 100644 --- a/src/components/graph/grossMensalChart/GrossMensalChart.tsx +++ b/src/components/graph/grossMensalChart/GrossMensalChart.tsx @@ -67,7 +67,7 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle, }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -77,7 +77,7 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle, }, ticks: { font: { - size: !miniature? window.innerWidth/80 : window.innerWidth/100 + size: !miniature? window.innerWidth/90 : window.innerWidth/110 } }, }, @@ -101,7 +101,8 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle, offset: 0, align: "end", font: { - size: !miniature? 18 : 10, + weight: 'bold', + size: !miniature? window.innerWidth/80 : window.innerWidth/120, } }, legend: { diff --git a/src/components/header/HeaderView.ts b/src/components/header/HeaderView.ts index e1603fe..c205221 100644 --- a/src/components/header/HeaderView.ts +++ b/src/components/header/HeaderView.ts @@ -40,6 +40,8 @@ export const HeaderView = styled.header` img { width: 100%; height: auto; + + border-radius: 8px; } } diff --git a/src/components/sidebar/Sidebar.tsx b/src/components/sidebar/Sidebar.tsx index c2e3bdc..cef77f3 100644 --- a/src/components/sidebar/Sidebar.tsx +++ b/src/components/sidebar/Sidebar.tsx @@ -125,7 +125,7 @@ export default function Sidebar() {
  • {'Notícias'}
  • setPldDrawer(!pldDrawer)} className={router.pathname=='/pld'? 'actualPath' : null}>{'PLD'}
  • {'Info Setorial'}
  • -
  • {'Notificações'}

    {notificationsCount}

  • +
  • {'Notificações'}

    {notificationsCount}

  • {'Sobre Nós'}
  • {'FAQ'}
  • diff --git a/src/contexts/AuthContext.tsx b/src/contexts/AuthContext.tsx index 677e7da..5162d20 100644 --- a/src/contexts/AuthContext.tsx +++ b/src/contexts/AuthContext.tsx @@ -51,7 +51,7 @@ export function AuthProvider({children}: {children: React.ReactNode}) { if (token) setCookie(undefined, '@smartAuth-token', token, { - maxAge: 60 * 60 * 1, // 1 hour + maxAge: 60 * 60 * 60 * 60 * 1, }) if (user.role) diff --git a/src/pages/aboutUs/index.tsx b/src/pages/aboutUs/index.tsx index 48800a8..1b450b6 100644 --- a/src/pages/aboutUs/index.tsx +++ b/src/pages/aboutUs/index.tsx @@ -20,15 +20,32 @@ export default function aboutUs({userName, text}) { - {/* */} - -
    + {/*
    */} +
    +

    A SMART ENERGIA é 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.

    +

    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 Agentes Vendedores de energia.

    +

    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.

    +

    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.

    +
      +
    • Informação
    • +
    • Economia
    • +
    • Gestão de Energia
    • +
    • Imparcialidade
    • +
    • Previsão de Custos
    • +
    • Experiência
    • +
    • Relacionamento
    • +
    +
    +
    + +
    @@ -66,4 +83,3 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { } } } - diff --git a/src/pages/api/hello.js b/src/pages/api/hello.js deleted file mode 100644 index 3a3d037..0000000 --- a/src/pages/api/hello.js +++ /dev/null @@ -1,4 +0,0 @@ - -export default function handler(req, res) { - res.status(200).json({ name: 'John Doe' }) -} diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index b82823e..bae5f96 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -78,16 +78,16 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal typeof window === 'undefined' || typeof window === undefined? null : <>
    - -

    Economia Acumulada: R${lastDataBrutaAnualS}

    + + Economia Acumulada:

    R${lastDataBrutaMensalS}

    - -

    Economia Acumulada: R${lastDataBrutaMensalS}

    + + Economia Acumulada:

    R${lastDataBrutaMensalS}

    - + diff --git a/src/pages/economy/index.tsx b/src/pages/economy/index.tsx index f7c0795..55302ad 100644 --- a/src/pages/economy/index.tsx +++ b/src/pages/economy/index.tsx @@ -115,7 +115,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta }

    { economyMenu===0 || economyMenu===1? - <>Economia Acumulada: R${lastDataBrutaMensalS} + <>Economia Acumulada:

    R${lastDataBrutaMensalS}

    : null }

    diff --git a/src/pages/industryInfo/index.tsx b/src/pages/industryInfo/index.tsx index 89f922a..002eb44 100644 --- a/src/pages/industryInfo/index.tsx +++ b/src/pages/industryInfo/index.tsx @@ -12,6 +12,7 @@ import Snackbar from '@mui/material/Snackbar'; import MuiAlert, { AlertProps } from '@mui/material/Alert'; import { useRouter } from 'next/router' import Banner from '../../components/banner/Banner' +import Image from 'next/image' const Alert = React.forwardRef(function Alert( props, @@ -62,8 +63,14 @@ export default function industryInfo({userName}: any) { - {/* */} -

    Um resumo das atualizações gerais do Setor Elétrico, com dados sobre geração consumo, demanda, meteorologia baseadas em informações do ONS, CCEE, ANEEL, 10 Maiores Jornais e Revistas e CPTEC

    +
    +
    +

    A Smart é uma empresa de vanguarda na informação sobre o Setor Elétrico Brasileiro e mantém sólidos relacionamentos com os agentes e entidades do setor, + a informação precisa aliada à mais de 21 anos de experiência torna a sua consultoria estratégica para consumidores e geradores

    + +
    +

    Um resumo das atualizações gerais do Setor Elétrico, com dados sobre geração consumo, demanda, meteorologia baseadas em informações do ONS, CCEE, ANEEL, 10 Maiores Jornais e Revistas e CPTEC

    +
    diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index 31d2e59..09ee7be 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -26,12 +26,11 @@ export default function aboutUs({userName, news}: any) { { news.slice(0, 3).map(data => { - return <>
    -

    - - ANEEL APROVA REAJUSTE TARIFÁRIO ANUAL DA ENERGISA SERGIPE DE 16,46 % PARA O CONSUMIDOR RESIDENCIAL +

    + + {/* ANEEL APROVA REAJUSTE TARIFÁRIO ANUAL DA ENERGISA SERGIPE DE 16,46 % PARA O CONSUMIDOR RESIDENCIAL */}

    { diff --git a/src/pages/resumoOperacao/index.tsx b/src/pages/resumoOperacao/index.tsx index 2834f52..a1f1b7f 100644 --- a/src/pages/resumoOperacao/index.tsx +++ b/src/pages/resumoOperacao/index.tsx @@ -174,7 +174,7 @@ export default function ResumoOperacao({tableData, clients, userName, clientMont Contraparte Montante (MWh) Preço(R$/MWh) - ValorNF/Crédito(R$) + Nota Fiscal (R$) diff --git a/src/pages/telemetria/index.tsx b/src/pages/telemetria/index.tsx index 9c9bcca..d5056a2 100644 --- a/src/pages/telemetria/index.tsx +++ b/src/pages/telemetria/index.tsx @@ -33,6 +33,7 @@ import { getDiscretization } from '../../services/charts/telemetry/getDiscretiza import { getPowerFactorData } from '../../services/charts/telemetry/getPowerFactor'; import { getDemand } from '../../services/charts/telemetry/getDemand'; import PageTitle from '../../components/pageTitle/PageTitle'; +import { format } from 'date-fns'; const Alert = React.forwardRef(function Alert( props, @@ -42,7 +43,7 @@ const Alert = React.forwardRef(function Alert( }) export default function Telemetria({userName, clients}: any) { - const [unity, setUnity] = useState(''); + const [unity, setUnity] = useState(clients[0].codigo_scde); const [startDate, setStartDate] = useState(new Date()); const [endDate, setEndDate] = useState(new Date()); const [discretization, setDiscretization] = useState('1_hora'); @@ -165,8 +166,6 @@ export default function Telemetria({userName, clients}: any) { setLoader(false) } - const [filters, setFilters] = useState() - const [fatorPotenciaData, setFatorPotenciaData] = useState([]); const [demRegXDemCon, setDemRegXDemCon] = useState([]); const [discretizedConsumptionData, setDiscretizedConsumptionData] = useState([]); @@ -180,6 +179,24 @@ export default function Telemetria({userName, clients}: any) { getChartData() }, [send]) + useEffect(() => { + const firstOfTheMonth = format(new Date(startDate).setDate(1), 'yyyy-MM-dd') + const lastOfTheMonth = format(new Date(startDate.getFullYear(), startDate.getMonth() + 1, 0), 'yyyy-MM-dd') + + setLoader(true) + getDiscretization(unity, new Date(firstOfTheMonth), new Date(lastOfTheMonth), discretization) + .then(result => {setDiscretizedConsumptionData(result); setSend(false); setLoader(false)}) + .catch(() => {setSend(false); setOpenSnackFields(true)}) + + getDemand(unity, startDate, endDate, discretization) + .then(result => {setDemRegXDemCon(result); setSend(false)}) + .catch(() => {setSend(false); setOpenSnackFields(true); setLoader(false)}) + + getPowerFactorData(unity, startDate, endDate, discretization) + .then(result => {setFatorPotenciaData(result); setSend(false); setLoader(false)}) + .catch(() => {setSend(false); setOpenSnackFields(true); setLoader(false)}) + }, []) + return(
    @@ -245,10 +262,10 @@ export default function Telemetria({userName, clients}: any) { 'Consumo discretizado em 1 dia'}/> - + {/* discretization chart */}
    @@ -337,15 +354,13 @@ export default function Telemetria({userName, clients}: any) { }}/>
    - {/* */} value.minut)} dataset={'Consumo'} dataset1='Estimado' month/> - {/*

    {`Mês - ${startDate}`}

    */} - {/*
    */}
    + {/* demand chart */}
    @@ -439,6 +454,7 @@ export default function Telemetria({userName, clients}: any) { label={demRegXDemCon.map(value => value.hora)} title='Demanda Contratada X Registrada' subtitle='' red/> + {/* power factor chart */}
    @@ -530,68 +546,6 @@ export default function Telemetria({userName, clients}: any) { (value.day_formatted))} /> - - - -
    - - Unidade - - -
    -
    - - Discretização - - -
    -
    - { - setLoader(true) - setSend(true) - getChartData() - }}/> -
    -
    - value.hora)} title='Demanda Contratada X Registrada' subtitle='' red/> -
    diff --git a/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts b/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts index 2d14679..532c1b9 100644 --- a/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts +++ b/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts @@ -12,7 +12,6 @@ export const TableView = styled.div` width: 100%; height: 100%; - .btn{ margin-top: 10px; } @@ -168,7 +167,7 @@ export const NewTableLine = styled.section` export const TableBodyView = styled.section` border-radius: 8px; - background-color: #EFEFEF; + background-color: #fff; width: 100%; diff --git a/src/styles/layouts/aboutUs/AboutUsView.ts b/src/styles/layouts/aboutUs/AboutUsView.ts index e95bab7..7a5327a 100644 --- a/src/styles/layouts/aboutUs/AboutUsView.ts +++ b/src/styles/layouts/aboutUs/AboutUsView.ts @@ -13,6 +13,16 @@ export const AboutUsView = styled.main` background-color: #FFFFFF; + .image { + position: absolute; + right: 75px; + transform: translateY(-190px); + } + + h2 { + font-size: 16px; + } + article { display: flex; justify-content: flex-end; diff --git a/src/styles/layouts/economy/economy.ts b/src/styles/layouts/economy/economy.ts index faa5c0b..6d7e755 100644 --- a/src/styles/layouts/economy/economy.ts +++ b/src/styles/layouts/economy/economy.ts @@ -34,6 +34,18 @@ export const EconomyView = styled.main` align-items: center; justify-content: space-between; + b { + display: flex; + align-items: center; + justify-content: center; + + font-size: 17px; + p { + font-size: 20px; + text-decoration: underline; + } + } + p { :first-child { margin-left: '3%' diff --git a/src/styles/layouts/industryInfo/IndustryInfoView.ts b/src/styles/layouts/industryInfo/IndustryInfoView.ts index fa95077..f45f611 100644 --- a/src/styles/layouts/industryInfo/IndustryInfoView.ts +++ b/src/styles/layouts/industryInfo/IndustryInfoView.ts @@ -17,6 +17,10 @@ export const IndustryInfoView = styled.main` margin-bottom: 50px; } + p { + text-align: justify; + } + button{ height: 70px; width: 30%; @@ -54,4 +58,13 @@ export const IndustryInfoView = styled.main` border-radius: 6px; } + article { + display: flex; + justify-content: space-between; + flex-direction: row; + + p { + width: 75% + } + } ` diff --git a/src/styles/layouts/news/NewsView.ts b/src/styles/layouts/news/NewsView.ts index c1072c6..e83668e 100644 --- a/src/styles/layouts/news/NewsView.ts +++ b/src/styles/layouts/news/NewsView.ts @@ -19,11 +19,14 @@ export const NewsView = styled.main` background-color: #FFFFFF; + text-align: justify; + .description { a { display: none; } p { + /* text-align: justify; */ :last-child { display: none; }