add fixed issues

This commit is contained in:
joseCorte-exe 2022-07-22 15:28:52 -03:00
parent b97b7ed8dd
commit c8e9a5305e
11 changed files with 79 additions and 56 deletions

View File

@ -1,50 +1,17 @@
import React from 'react'
import Link from 'next/link';
import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import { ChartCardView } from './ChartCardView';
import Chart from '../Chart';
import ButtonGroup from '../../buttonGroup/ButtonGroup';
import RenderIf from '../../../utils/renderIf';
import LineChart from '../LineChart';
import { SingleBar } from '../SingleBar';
interface ChartCardInterface {
title: string,
subtitle: string,
consumption?: number,
className?: string,
line?: boolean | undefined,
singleBar?: any,
children?: any
children?: React.ReactNode
}
export default function ChartCard({ title, subtitle, consumption, className, line, singleBar, children }: ChartCardInterface) {
const [timeCourse, setTimeCourse] = React.useState<string | null>('left');
const handleAlignment = (
event: React.MouseEvent<HTMLElement>,
newAlignment: string | null,
) => {
setTimeCourse(newAlignment);
};
const labels = ['0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8', '0', '2', '4', '6', '8',];
const data = {
labels,
datasets: [
{
label: 'Dataset 1',
data: [1, 2, 3, 5, 7, 8, 9, 8, 9, 7, 8, 6, 4, 3, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 7, 9, 10, 11, 12, 12, 14, 15, 17, 20, 21, 18, 15, 14, 12, 11, 10, 8, 6, 7, 8, 7, 9],
borderColor: 'rgb(53, 162, 235)',
backgroundColor: 'rgba(53, 162, 235, 0.5)',
},
],
};
export default function ChartCard({ title, subtitle, consumption, className, children }: ChartCardInterface) {
return (
<ChartCardView className={className} >
<div className='content' >
@ -53,7 +20,6 @@ export default function ChartCard({ title, subtitle, consumption, className, lin
<h2>{title}</h2>
<span style={{display:'block'}}>{subtitle}</span>
</div>
{/* <ButtonGroup /> */}
</div>
{
consumption?

View File

@ -3,7 +3,7 @@ import styled from 'styled-components';
export const ChartCardView = styled.article`
display: flex;
align-items: center;
justify-content: space-between;
justify-content: space-around;
flex-direction: column;

View File

@ -11,7 +11,7 @@ import { AboutUsView } from '../../styles/layouts/aboutUs/AboutUsView'
export default function aboutUs({userName, text}) {
return (
<AboutUsView>
<main style={{width: '100%'}}>
<Head>
<title>Smart Energia - Sobre nós</title>
</Head>
@ -19,19 +19,21 @@ export default function aboutUs({userName, text}) {
<Header name={userName}>
<PageTitle title='Quem Somos' subtitle='Soluções inteligentes em Gestão de Energia'/>
</Header>
{/* <Banner title='Quem Somos' subtitle='Soluções inteligentes em Gestão de Energia' imgSource='/assets/banners/aboutUsBanner.png' /> */}
<AboutUsView>
{/* <Banner title='Quem Somos' subtitle='Soluções inteligentes em Gestão de Energia' imgSource='/assets/banners/aboutUsBanner.png' /> */}
<section dangerouslySetInnerHTML={{__html: text[0]?.about}}/>
<article>
<aside>
<h2>Apoio a projetos sociais</h2>
<div>
<Image src='/assets/stamps/whiteStamp.png' width={200} height={200} />
<Image src='/assets/stamps/blueStamp.png' width={200} height={200} />
</div>
</aside>
</article>
</AboutUsView>
<section dangerouslySetInnerHTML={{__html: text[0]?.about}}/>
<article>
<aside>
<h2>Apoio a projetos sociais</h2>
<div>
<Image src='/assets/stamps/whiteStamp.png' width={200} height={200} />
<Image src='/assets/stamps/blueStamp.png' width={200} height={200} />
</div>
</aside>
</article>
</AboutUsView>
</main>
)
}

View File

@ -44,7 +44,7 @@ export default function industryInfo({userName}: any) {
}
return (
<IndustryInfoView>
<main style={{width: '100%'}}>
<Snackbar open={openSnackSuccess} autoHideDuration={4000} onClose={handleCloseSnack}>
<Alert onClose={handleCloseSnack} severity="success" sx={{ width: '100%' }}>
Pdf baixado Sucesso!
@ -61,11 +61,13 @@ export default function industryInfo({userName}: any) {
<Header name={userName}>
<PageTitle title='Info setorial' subtitle='Baixe o pdf para ver o info setorial'/>
</Header>
{/* <Banner title='Info setorial' subtitle='Baixe o pdf para ver o info setorial' imgSource='/assets/banners/infoSetorial.jpg'/> */}
<p>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</p>
<button onClick={() => handleDownloadPdf()}>Clique aqui para baixar o arquivo em PDF</button>
<IndustryInfoView>
{/* <Banner title='Info setorial' subtitle='Baixe o pdf para ver o info setorial' imgSource='/assets/banners/infoSetorial.jpg'/> */}
<p>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</p>
<button onClick={() => handleDownloadPdf()}>Clique aqui para baixar o arquivo em PDF</button>
</IndustryInfoView>
</IndustryInfoView>
</main>
)
}

View File

@ -12,6 +12,7 @@ export const TableView = styled.div`
width: 100%;
height: 100%;
img{
margin-left:30rem;
}

View File

@ -7,9 +7,19 @@ export const TelemetriaView = styled.main`
flex-direction: column;
padding: 0;
padding: 15px 0 0 0;
width: 100%;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
/* margin-top: 10px; */
.modal {
position: absolute;

View File

@ -5,6 +5,14 @@ export const AboutUsView = styled.main`
font-weight: 300;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
article {
display: flex;
justify-content: flex-end;

View File

@ -8,6 +8,14 @@ export const FaqView = styled.main`
width: 100%;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
h1 {
font-weight: 700;
font-size: calc(90% + 2rem);

View File

@ -5,6 +5,14 @@ export const IndustryInfoView = styled.main`
flex-direction: column;
width: 100%;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
.title {
margin-bottom: 50px;
}

View File

@ -11,6 +11,14 @@ export const NewsView = styled.main`
margin-bottom: 100px;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
.description {
a {
display: none;

View File

@ -428,6 +428,16 @@ export const PldGraphView = styled.main`
width: 100%;
background: #F8F8F8;
box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-webkit-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
-moz-box-shadow: 0 0 11px rgba(0, 0, 0, 0.2) ;
border-radius: 20px;
background-color: #FFFFFF;
margin-top: 38px;
.MuiOutlinedInput-input {
height: 30px;