From b97b7ed8dd290776c5a7badbd0e406f3b9442ebc Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 22 Jul 2022 14:20:08 -0300 Subject: [PATCH 1/3] label size --- src/components/graph/DemRegXDemConChart.tsx | 18 +++++-- .../graph/DiscretizedConsumptionChart.tsx | 19 +++++-- .../graph/DiscretizedConsumptionChartLine.tsx | 3 ++ src/components/graph/LineBarChart.tsx | 17 ++++++- src/components/graph/LineChart.tsx | 17 ++++++- .../graph/cativoXLivreChart/index.tsx | 36 +++++++++----- .../graph/costIndicatorChart/index.tsx | 26 ++++++---- src/components/graph/fatorPotenciaChart.tsx | 14 +++++- .../graph/grossAnualChart/GrossAnualChart.tsx | 33 ++++++++----- .../grossMensalChart/GrossMensalChart.tsx | 28 +++++++---- src/pages/economy/index.tsx | 8 +-- src/pages/faq/index.tsx | 34 +++++++------ src/pages/news/index.tsx | 3 +- src/pages/notifications/index.tsx | 34 +++++++------ src/pages/telemetria/index.tsx | 49 ++++++------------- .../layouts/Telemetria/TelemetriaView.ts | 20 +------- src/styles/layouts/economy/economy.ts | 15 +----- src/styles/layouts/news/NewsView.ts | 2 +- 18 files changed, 215 insertions(+), 161 deletions(-) diff --git a/src/components/graph/DemRegXDemConChart.tsx b/src/components/graph/DemRegXDemConChart.tsx index b3efb90..dcd17e6 100644 --- a/src/components/graph/DemRegXDemConChart.tsx +++ b/src/components/graph/DemRegXDemConChart.tsx @@ -92,12 +92,22 @@ export function DemRegXDemConChart({ x: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, }, y: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, }, }, plugins: { @@ -140,8 +150,9 @@ export function DemRegXDemConChart({ { type: 'bar' as const, label: 'Demanda Registrada', - backgroundColor: '#255488', data: data2?.map(value => value.dem_reg), + borderRadius: 8, + backgroundColor: '#255488', }, ], }; @@ -154,7 +165,6 @@ export function DemRegXDemConChart({ return ( - {/* */}
diff --git a/src/components/graph/DiscretizedConsumptionChart.tsx b/src/components/graph/DiscretizedConsumptionChart.tsx index 7688a91..b71577b 100644 --- a/src/components/graph/DiscretizedConsumptionChart.tsx +++ b/src/components/graph/DiscretizedConsumptionChart.tsx @@ -40,12 +40,22 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label, x: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, }, y: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, }, }, plugins: { @@ -68,6 +78,7 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label, { type: 'line' as const, label: 'reativa', + borderRadius: 8, borderColor: '#F00' , fill: false, borderDash: [5, 5], @@ -78,8 +89,9 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label, { type: 'bar' as const, label: 'consumo', - backgroundColor: '#74acec', data: dataProps.map(value => value.consumo), + borderRadius: 8, + backgroundColor: '#74acec', }, // { // type: 'line' as const, @@ -97,7 +109,6 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label, return ( - {/* */}
diff --git a/src/components/graph/DiscretizedConsumptionChartLine.tsx b/src/components/graph/DiscretizedConsumptionChartLine.tsx index 8b987cd..5b11b01 100644 --- a/src/components/graph/DiscretizedConsumptionChartLine.tsx +++ b/src/components/graph/DiscretizedConsumptionChartLine.tsx @@ -70,6 +70,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1 datasets: [ { label: dataset1, + borderRadius: 8, data: data1.map(value => value.reativa), borderColor: 'rgb(53, 162, 235)', backgroundColor: 'rgba(53, 162, 235, 0)', @@ -77,6 +78,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1 { label: 'base', data: data1.map(value => 500), + borderRadius: 8, borderColor: 'rgb(0, 0, 0)', fill: false, backgroundColor: 'rgba(255, 145, 0, 0)' , @@ -85,6 +87,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1 { label: 'tolerância', data: data1.map(value => 525), + borderRadius: 8, borderColor: 'rgb(255, 0, 0)', fill: false, backgroundColor: 'rgba(255, 145, 0, 0)' , diff --git a/src/components/graph/LineBarChart.tsx b/src/components/graph/LineBarChart.tsx index 78100d8..95b7ba6 100644 --- a/src/components/graph/LineBarChart.tsx +++ b/src/components/graph/LineBarChart.tsx @@ -88,7 +88,22 @@ export function LineBarChart({ title, subtitle, data1, data2, data3, label, red, x: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, + }, + y: { + grid: { + display: false + }, + ticks: { + font: { + size: 16 + } + }, }, }, plugins: { diff --git a/src/components/graph/LineChart.tsx b/src/components/graph/LineChart.tsx index 1862a66..f25259f 100644 --- a/src/components/graph/LineChart.tsx +++ b/src/components/graph/LineChart.tsx @@ -50,7 +50,22 @@ export default function LineChart({ title, subtitle, data1, data2, data3, data4, x: { grid: { display: false - } + }, + ticks: { + font: { + size: 16 + } + }, + }, + y: { + grid: { + display: false + }, + ticks: { + font: { + size: 16 + } + }, }, }, plugins: { diff --git a/src/components/graph/cativoXLivreChart/index.tsx b/src/components/graph/cativoXLivreChart/index.tsx index 5732a2b..565a115 100644 --- a/src/components/graph/cativoXLivreChart/index.tsx +++ b/src/components/graph/cativoXLivreChart/index.tsx @@ -82,12 +82,22 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1, x: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, y: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, }, plugins: { @@ -141,48 +151,50 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1, { type: 'bar' as const, label: 'Cativo', - backgroundColor: '#C2D5FB', data: chartData?.map(value => { if (!value.dad_estimado) return parseInt(value.custo_cativo) }), + borderRadius: 8, + backgroundColor: '#C2D5FB', + stack: 'cativo' }, { type: 'bar' as const, label: 'Livre', - backgroundColor: '#255488', data: chartData?.filter(value => !value.dad_estimad? true : false).map(value => { if (!value.dad_estimado) return parseInt(value.custo_livre) }), + borderRadius: 8, + backgroundColor: '#255488', + stack: 'livre' }, { type: 'bar', label: 'Est. Cativo', - backgroundColor: pattern.draw('diagonal', '#C2D5FB'), data: chartData?.map(value => { if (value.dad_estimado) return parseInt(value.custo_cativo) }), + borderRadius: 8, + backgroundColor: pattern.draw('diagonal', '#C2D5FB'), + stack: 'cativo' }, { type: 'bar', label: 'Est. Livre', - backgroundColor: pattern.draw('diagonal', '#255488'), data: chartData?.map(value => { if (value.dad_estimado) return parseInt(value.custo_livre) }), + borderRadius: 8, + backgroundColor: pattern.draw('diagonal', '#255488'), + stack: 'livre' } ], } - useEffect(() => { - const chart = chartRef.current; - - // triggerTooltip(chart); - }, []); - return ( diff --git a/src/components/graph/costIndicatorChart/index.tsx b/src/components/graph/costIndicatorChart/index.tsx index 31e3db3..856a342 100644 --- a/src/components/graph/costIndicatorChart/index.tsx +++ b/src/components/graph/costIndicatorChart/index.tsx @@ -45,12 +45,22 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl x: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, y: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, }, plugins: { @@ -90,36 +100,32 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl { label: '2021', data: data1?.map(value => value.custo_unit>0? value.custo_unit : null), - // backgroundColor: '#C2d5fb' + borderRadius: 8, backgroundColor: (value, ctx) => { if (value.dad_estimado) return draw('diagonal-right-left', '#C2d5fb'); else return '#C2d5fb' }, + stack: '0' }, { label: '2022', data: data2?.map(value => value.custo_unit>0? value.custo_unit : null), - // backgroundColor: '#255488' + borderRadius: 8, backgroundColor: (value, ctx) => { if (value.dad_estimado) return draw('diagonal-right-left', '#255488'); else return '#255488' }, + stack: '0' } ], } return ( - {/* - - */} value.dad_estimado === false).map((value, index) => { return parseFloat(value.economia_acumulada) }), + borderRadius: 10, backgroundColor: '#255488', }, { @@ -124,8 +134,9 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba label: 'Estimado', data: dataProps.filter(value => value.ano === '2022').map((value, index) => { if (value.dad_estimado) - return parseFloat(value.economia_acumulada) + return parseFloat(value.economia_acumulada) }), + borderRadius: 10, backgroundColor: draw('diagonal-right-left', '#C2d5fb'), }, ], diff --git a/src/components/graph/grossMensalChart/GrossMensalChart.tsx b/src/components/graph/grossMensalChart/GrossMensalChart.tsx index 40d8ef2..a0008b2 100644 --- a/src/components/graph/grossMensalChart/GrossMensalChart.tsx +++ b/src/components/graph/grossMensalChart/GrossMensalChart.tsx @@ -55,12 +55,22 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle, x: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, y: { grid: { display: false - } + }, + ticks: { + font: { + size: !miniature? 16 : 10 + } + }, }, }, plugins: { @@ -103,25 +113,23 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle, type: 'bar', label: 'Consolidado', data: data1.map(value => !value.dad_estimado? value?.economia_acumulada : null), - backgroundColor: '#255488' + borderRadius: 8, + backgroundColor: '#255488', + stack: '0' }, { type: 'bar', label: 'Estimado', data: data2.map(value => value.dad_estimado? value?.economia_acumulada : null), - backgroundColor: draw('diagonal-right-left', '#C2d5fb') + borderRadius: 8, + backgroundColor: draw('diagonal-right-left', '#C2d5fb'), + stack: '0' }, ], } return ( - {/* - - */} { api.post('/economy/estimates', unity!==''?{ "filters": [ - {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity} + {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity!=="default"? null : unity} ] }:{}).then(res => { setCatLivDataState(res.data.data) @@ -75,7 +75,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta useEffect(() => { api.post('/economy/MWh', unity!==''?{ "filters": [ - {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity} + {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity!=="default"? null : unity} ] }:{}).then(res => { setIndicatorDataState(res.data.data) @@ -152,7 +152,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta onChange={value => setUnity(value.target.value)} fullWidth > - Todas + Todas {/* RSZFNAENTR101P !!OPÇAO COM DADOS TESTES!! */} { clients.map((value) => { @@ -182,7 +182,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta onChange={value => setUnity(value.target.value)} fullWidth > - Todas + Todas {/* RSZFNAENTR101P COMENTARIO DE OPÇAO COM DADOS TESTES */} { clients.map((value) => { diff --git a/src/pages/faq/index.tsx b/src/pages/faq/index.tsx index 372776c..e327e35 100644 --- a/src/pages/faq/index.tsx +++ b/src/pages/faq/index.tsx @@ -12,28 +12,30 @@ import { FaqView } from '../../styles/layouts/commonQuestions/FaqView' export default function commonQuestions({faqData, userName}) { return ( - +
Smart Energia - FAQ
- {/* */} -
- { - faqData.length<1? -

Nenhuma pergunta no momento!

+ + {/* */} +
+ { + faqData.length!==0? + faqData.map((value, index ) => { + return <> + +
+ + }) : - faqData.map((value, index ) => { - return <> - -
- - }) - } -
-
+

Nenhuma pergunta no momento!

+ } +
+ +
) } @@ -47,7 +49,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => { await apiClient.get('/faq').then(res => { faqData = res.data.data }).catch(res => { - // console.log(res) + console.log(res) }) if (!token) { diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index a8c04b7..31d2e59 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -46,10 +46,9 @@ export default function aboutUs({userName, news}: any) { }) } - Ver Mais + rel={"noreferrer"}>Ver todas as notícias diff --git a/src/pages/notifications/index.tsx b/src/pages/notifications/index.tsx index 0521ae9..5694a14 100644 --- a/src/pages/notifications/index.tsx +++ b/src/pages/notifications/index.tsx @@ -12,28 +12,30 @@ import Banner from '../../components/banner/Banner' export default function Notifications({notificationData, userName}: any) { return ( - +
Smart Energia - Notificações
- {/* */} -
- { - notificationData.length!=0? - notificationData.map((value, index ) => { - return <> - -
- - }) - : -

Você não tem notificações!

- } -
- + + {/* */} +
+ { + notificationData.length!=0? + notificationData.map((value, index ) => { + return <> + +
+ + }) + : +

Você não tem notificações!

+ } +
+
+
) } diff --git a/src/pages/telemetria/index.tsx b/src/pages/telemetria/index.tsx index 79f323c..1915750 100644 --- a/src/pages/telemetria/index.tsx +++ b/src/pages/telemetria/index.tsx @@ -144,25 +144,6 @@ export default function Telemetria({userName, clients}: any) { setOpenSnackSuccess(false) }) } - - function handleVerifyFields() { - if (unity != '' && startDate.toLocaleDateString() != '' && endDate.toLocaleDateString() != '' && discretization != '') { - router.push({ - pathname: '/chartTelemetry', - query: { - 'startDate': startDate.toLocaleDateString(), - 'endDate': endDate.toLocaleDateString(), - discretization, - unity - }, - }) - return true - } else { - setOpenSnackFields(true) - return false - } - } - async function getChartData() { const html = document.querySelector("table")?.outerHTML; await api.post('/telemetry/demand', { @@ -195,12 +176,6 @@ export default function Telemetria({userName, clients}: any) { getChartData() }, [send]) - useEffect(() => { - // getDiscretization("PRAXCUENTR101P", "2022-01-01", "2022-01-31", "med_5min") - // .then(result => setDiscretizedConsumptionData(result)) - // .catch(exception => console.log(exception)) - }, [discretization]) - return(
@@ -243,7 +218,7 @@ export default function Telemetria({userName, clients}: any) { severity="error" sx={{ width: '100%' }} > - Verifique os campos! + Verifique os campos e tente novamente! @@ -351,9 +326,10 @@ export default function Telemetria({userName, clients}: any) {
{ + setSend(true) getDiscretization(unity, startDate, endDate, discretization) - .then(result => setDiscretizedConsumptionData(result)) - .catch(exception => console.log(exception)) + .then(result => {setDiscretizedConsumptionData(result); setSend(false)}) + .catch(exception => {setSend(false); setOpenSnackFields(true)}) }}/>
@@ -447,9 +423,10 @@ export default function Telemetria({userName, clients}: any) {
{ + setSend(true) getDemand(unity, startDate, endDate, discretization) - .then(result => setDemRegXDemCon(result)) - .catch(exception => console.log(exception)) + .then(result => {setDemRegXDemCon(result); setSend(false)}) + .catch(exception => {setSend(false); setOpenSnackFields(true)}) }}/>
@@ -539,9 +516,10 @@ export default function Telemetria({userName, clients}: any) {
{ + setSend(true) getPowerFactorData(unity, startDate, endDate, discretization) - .then(result => setFatorPotenciaData(result)) - .catch(exception => console.log(exception)) + .then(result => {setFatorPotenciaData(result); setSend(false)}) + .catch(exception => {setSend(false); setOpenSnackFields(true)}) }}/>
@@ -598,11 +576,12 @@ export default function Telemetria({userName, clients}: any) { -
+
{ + setSend(true) getDemand(unity, startDate, endDate, discretization) - .then(result => setDiscretizedConsumptionData(result)) - .catch(exception => console.log(exception)) + .then(result => {setDiscretizedConsumptionData(result); setSend(false)}) + .catch(exception => {setSend(false); setOpenSnackFields(true)}) }}/>
diff --git a/src/styles/layouts/Telemetria/TelemetriaView.ts b/src/styles/layouts/Telemetria/TelemetriaView.ts index 9498483..bc40e8b 100644 --- a/src/styles/layouts/Telemetria/TelemetriaView.ts +++ b/src/styles/layouts/Telemetria/TelemetriaView.ts @@ -191,7 +191,7 @@ export const TelemetriaView = styled.main` .MuiInputLabel-outlined { margin-top: 11px; } - .Mui-focused { + .Mui-focused, .MuiInputLabel-shrink { margin-top: 0!important; } } @@ -226,23 +226,7 @@ export const TelemetriaView = styled.main` flex-wrap: wrap; .select { - display: flex; - align-items: flex-start; - justify-content: center; - - flex-direction: column; - /* height: 10em; */ - - :nth-child(1) { - label { - margin-top: 10px; - } - } - :nth-child(2) { - label { - margin-top: 10px; - } - } + margin-bottom: 17px;// input margin bottom } } `; diff --git a/src/styles/layouts/economy/economy.ts b/src/styles/layouts/economy/economy.ts index a4d10eb..6c370c4 100644 --- a/src/styles/layouts/economy/economy.ts +++ b/src/styles/layouts/economy/economy.ts @@ -22,23 +22,10 @@ export const EconomyView = styled.main` .MuiInputLabel-outlined { margin-top: 11px; } - .Mui-focused { + .Mui-focused, .MuiInputLabel-shrink { margin-top: 0!important; } .chartBox { } - - /* input { - width: 16.6rem; - height: 63px!important; - - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; - font-weight: 400; - - border-radius: 6px; - border: solid gray 1px; - - background-color: #F9F9F9; - } */ ` diff --git a/src/styles/layouts/news/NewsView.ts b/src/styles/layouts/news/NewsView.ts index 8a3aa42..3a550b5 100644 --- a/src/styles/layouts/news/NewsView.ts +++ b/src/styles/layouts/news/NewsView.ts @@ -84,7 +84,7 @@ export const NewsView = styled.main` align-items: center; margin-top: 1px; - width: 140px; + width: 170px; height: 45px; cursor: pointer; From c8e9a5305e3ac1d30317e4f8036ab6af0816dded Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 22 Jul 2022 15:28:52 -0300 Subject: [PATCH 2/3] add fixed issues --- src/components/graph/graphCard/ChartCard.tsx | 38 +------------------ .../graph/graphCard/ChartCardView.ts | 2 +- src/pages/aboutUs/index.tsx | 28 +++++++------- src/pages/industryInfo/index.tsx | 12 +++--- .../ResumoOperacao/ResumoOperacaoView.ts | 1 + .../layouts/Telemetria/TelemetriaView.ts | 12 +++++- src/styles/layouts/aboutUs/AboutUsView.ts | 8 ++++ src/styles/layouts/commonQuestions/FaqView.ts | 8 ++++ .../layouts/industryInfo/IndustryInfoView.ts | 8 ++++ src/styles/layouts/news/NewsView.ts | 8 ++++ src/styles/layouts/pld/PldView.ts | 10 +++++ 11 files changed, 79 insertions(+), 56 deletions(-) diff --git a/src/components/graph/graphCard/ChartCard.tsx b/src/components/graph/graphCard/ChartCard.tsx index a339b99..578397c 100644 --- a/src/components/graph/graphCard/ChartCard.tsx +++ b/src/components/graph/graphCard/ChartCard.tsx @@ -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('left'); - - const handleAlignment = ( - event: React.MouseEvent, - 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 (
@@ -53,7 +20,6 @@ export default function ChartCard({ title, subtitle, consumption, className, lin

{title}

{subtitle}
- {/* */}
{ consumption? diff --git a/src/components/graph/graphCard/ChartCardView.ts b/src/components/graph/graphCard/ChartCardView.ts index ebff2d3..8a78f83 100644 --- a/src/components/graph/graphCard/ChartCardView.ts +++ b/src/components/graph/graphCard/ChartCardView.ts @@ -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; diff --git a/src/pages/aboutUs/index.tsx b/src/pages/aboutUs/index.tsx index 87a895d..48800a8 100644 --- a/src/pages/aboutUs/index.tsx +++ b/src/pages/aboutUs/index.tsx @@ -11,7 +11,7 @@ import { AboutUsView } from '../../styles/layouts/aboutUs/AboutUsView' export default function aboutUs({userName, text}) { return ( - +
Smart Energia - Sobre nós @@ -19,19 +19,21 @@ export default function aboutUs({userName, text}) {
- {/* */} + + {/* */} -
-
- -
- +
+
+ +
+ +
) } diff --git a/src/pages/industryInfo/index.tsx b/src/pages/industryInfo/index.tsx index 5b6b989..89f922a 100644 --- a/src/pages/industryInfo/index.tsx +++ b/src/pages/industryInfo/index.tsx @@ -44,7 +44,7 @@ export default function industryInfo({userName}: any) { } return ( - +
Pdf baixado Sucesso! @@ -61,11 +61,13 @@ 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

- + + {/* */} +

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/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts b/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts index eb4eaf5..63890d3 100644 --- a/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts +++ b/src/styles/layouts/ResumoOperacao/ResumoOperacaoView.ts @@ -12,6 +12,7 @@ export const TableView = styled.div` width: 100%; height: 100%; + img{ margin-left:30rem; } diff --git a/src/styles/layouts/Telemetria/TelemetriaView.ts b/src/styles/layouts/Telemetria/TelemetriaView.ts index bc40e8b..09bbad3 100644 --- a/src/styles/layouts/Telemetria/TelemetriaView.ts +++ b/src/styles/layouts/Telemetria/TelemetriaView.ts @@ -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; diff --git a/src/styles/layouts/aboutUs/AboutUsView.ts b/src/styles/layouts/aboutUs/AboutUsView.ts index b0520e9..be1aa68 100644 --- a/src/styles/layouts/aboutUs/AboutUsView.ts +++ b/src/styles/layouts/aboutUs/AboutUsView.ts @@ -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; diff --git a/src/styles/layouts/commonQuestions/FaqView.ts b/src/styles/layouts/commonQuestions/FaqView.ts index 96652d0..273497a 100644 --- a/src/styles/layouts/commonQuestions/FaqView.ts +++ b/src/styles/layouts/commonQuestions/FaqView.ts @@ -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); diff --git a/src/styles/layouts/industryInfo/IndustryInfoView.ts b/src/styles/layouts/industryInfo/IndustryInfoView.ts index 3a9483e..36ddef8 100644 --- a/src/styles/layouts/industryInfo/IndustryInfoView.ts +++ b/src/styles/layouts/industryInfo/IndustryInfoView.ts @@ -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; } diff --git a/src/styles/layouts/news/NewsView.ts b/src/styles/layouts/news/NewsView.ts index 3a550b5..861d19c 100644 --- a/src/styles/layouts/news/NewsView.ts +++ b/src/styles/layouts/news/NewsView.ts @@ -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; diff --git a/src/styles/layouts/pld/PldView.ts b/src/styles/layouts/pld/PldView.ts index 8d18787..a3fec56 100644 --- a/src/styles/layouts/pld/PldView.ts +++ b/src/styles/layouts/pld/PldView.ts @@ -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; From cb7e212953b847afea844769765f80d0e8367ca5 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Fri, 22 Jul 2022 16:09:21 -0300 Subject: [PATCH 3/3] add fixed issues --- .../graph/grossAnualChart/GrossAnualChart.tsx | 12 +++--------- src/pages/_document.tsx | 3 +++ src/pages/dashboard/index.tsx | 4 ++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/graph/grossAnualChart/GrossAnualChart.tsx b/src/components/graph/grossAnualChart/GrossAnualChart.tsx index e7f9a29..6596e07 100644 --- a/src/components/graph/grossAnualChart/GrossAnualChart.tsx +++ b/src/components/graph/grossAnualChart/GrossAnualChart.tsx @@ -3,6 +3,7 @@ import ChartDataLabels from 'chartjs-plugin-datalabels'; import { draw } from 'patternomaly' import React, { useEffect } from 'react'; import { Chart } from 'react-chartjs-2'; +import 'chartjs-plugin-style'; import { GrossAnualChartView } from './GrossAnualChartView'; import ChartTitle from '../ChartTitle'; @@ -14,7 +15,7 @@ ChartJS.register( Title, Tooltip, Legend, - ChartDataLabels + ChartDataLabels, ); interface SingleBarInterface{ @@ -59,13 +60,6 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba size: !miniature? 16 : 10 } }, - // title: { - // display: true, - // text: 'titleY', - // font: { - // size: 00 - // } - // } }, }, series: { @@ -88,7 +82,7 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba }, display: true, anchor: "end", - offset: !miniature?20 : 10, + offset: !miniature? 5 : 5, align: "start", font: { size: !miniature? 30 : 10, diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index ccde447..f70d3dd 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -51,6 +51,9 @@ export default class MyDocument extends Document { + + +
diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx index 4824b8b..2e2e0b4 100644 --- a/src/pages/dashboard/index.tsx +++ b/src/pages/dashboard/index.tsx @@ -75,7 +75,7 @@ export default function Dashboard({grossAnualGraph, grossAnualYears, grossMensal label={grossAnualYears} barLabel bruta miniature/> - + - +