label size

This commit is contained in:
joseCorte-exe 2022-07-22 14:20:08 -03:00
parent 096b47ee5e
commit b97b7ed8dd
18 changed files with 215 additions and 161 deletions

View File

@ -92,12 +92,22 @@ export function DemRegXDemConChart({
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
}, },
plugins: { plugins: {
@ -140,8 +150,9 @@ export function DemRegXDemConChart({
{ {
type: 'bar' as const, type: 'bar' as const,
label: 'Demanda Registrada', label: 'Demanda Registrada',
backgroundColor: '#255488',
data: data2?.map(value => value.dem_reg), data: data2?.map(value => value.dem_reg),
borderRadius: 8,
backgroundColor: '#255488',
}, },
], ],
}; };
@ -154,7 +165,6 @@ export function DemRegXDemConChart({
return ( return (
<ChartView> <ChartView>
{/* <ChartTitle title={title} subtitle={subtitle}/> */}
<div style={{width: '90%'}}> <div style={{width: '90%'}}>
<Chart ref={chartRef} type='bar' options={options} data={data} /> <Chart ref={chartRef} type='bar' options={options} data={data} />
</div> </div>

View File

@ -40,12 +40,22 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label,
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
}, },
plugins: { plugins: {
@ -68,6 +78,7 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label,
{ {
type: 'line' as const, type: 'line' as const,
label: 'reativa', label: 'reativa',
borderRadius: 8,
borderColor: '#F00' , borderColor: '#F00' ,
fill: false, fill: false,
borderDash: [5, 5], borderDash: [5, 5],
@ -78,8 +89,9 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label,
{ {
type: 'bar' as const, type: 'bar' as const,
label: 'consumo', label: 'consumo',
backgroundColor: '#74acec',
data: dataProps.map(value => value.consumo), data: dataProps.map(value => value.consumo),
borderRadius: 8,
backgroundColor: '#74acec',
}, },
// { // {
// type: 'line' as const, // type: 'line' as const,
@ -97,7 +109,6 @@ export function DiscretizedConsumptionChart({ title, subtitle, dataProps, label,
return ( return (
<ChartView> <ChartView>
{/* <ChartTitle title={title} subtitle={subtitle}/> */}
<div style={{width: '90%'}}> <div style={{width: '90%'}}>
<Chart type='bar' options={options} data={data} /> <Chart type='bar' options={options} data={data} />
</div> </div>

View File

@ -70,6 +70,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1
datasets: [ datasets: [
{ {
label: dataset1, label: dataset1,
borderRadius: 8,
data: data1.map(value => value.reativa), data: data1.map(value => value.reativa),
borderColor: 'rgb(53, 162, 235)', borderColor: 'rgb(53, 162, 235)',
backgroundColor: 'rgba(53, 162, 235, 0)', backgroundColor: 'rgba(53, 162, 235, 0)',
@ -77,6 +78,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1
{ {
label: 'base', label: 'base',
data: data1.map(value => 500), data: data1.map(value => 500),
borderRadius: 8,
borderColor: 'rgb(0, 0, 0)', borderColor: 'rgb(0, 0, 0)',
fill: false, fill: false,
backgroundColor: 'rgba(255, 145, 0, 0)' , backgroundColor: 'rgba(255, 145, 0, 0)' ,
@ -85,6 +87,7 @@ export default function DiscretizedConsumptionChartLine({ title, subtitle, data1
{ {
label: 'tolerância', label: 'tolerância',
data: data1.map(value => 525), data: data1.map(value => 525),
borderRadius: 8,
borderColor: 'rgb(255, 0, 0)', borderColor: 'rgb(255, 0, 0)',
fill: false, fill: false,
backgroundColor: 'rgba(255, 145, 0, 0)' , backgroundColor: 'rgba(255, 145, 0, 0)' ,

View File

@ -88,7 +88,22 @@ export function LineBarChart({ title, subtitle, data1, data2, data3, label, red,
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
},
y: {
grid: {
display: false
},
ticks: {
font: {
size: 16
}
},
}, },
}, },
plugins: { plugins: {

View File

@ -50,7 +50,22 @@ export default function LineChart({ title, subtitle, data1, data2, data3, data4,
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
},
y: {
grid: {
display: false
},
ticks: {
font: {
size: 16
}
},
}, },
}, },
plugins: { plugins: {

View File

@ -82,12 +82,22 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1,
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
}, },
plugins: { plugins: {
@ -141,48 +151,50 @@ export function CativoXLivreChart({ title, subtitle, chartData, label, dataset1,
{ {
type: 'bar' as const, type: 'bar' as const,
label: 'Cativo', label: 'Cativo',
backgroundColor: '#C2D5FB',
data: chartData?.map(value => { data: chartData?.map(value => {
if (!value.dad_estimado) if (!value.dad_estimado)
return parseInt(value.custo_cativo) return parseInt(value.custo_cativo)
}), }),
borderRadius: 8,
backgroundColor: '#C2D5FB',
stack: 'cativo'
}, },
{ {
type: 'bar' as const, type: 'bar' as const,
label: 'Livre', label: 'Livre',
backgroundColor: '#255488',
data: chartData?.filter(value => !value.dad_estimad? true : false).map(value => { data: chartData?.filter(value => !value.dad_estimad? true : false).map(value => {
if (!value.dad_estimado) if (!value.dad_estimado)
return parseInt(value.custo_livre) return parseInt(value.custo_livre)
}), }),
borderRadius: 8,
backgroundColor: '#255488',
stack: 'livre'
}, },
{ {
type: 'bar', type: 'bar',
label: 'Est. Cativo', label: 'Est. Cativo',
backgroundColor: pattern.draw('diagonal', '#C2D5FB'),
data: chartData?.map(value => { data: chartData?.map(value => {
if (value.dad_estimado) if (value.dad_estimado)
return parseInt(value.custo_cativo) return parseInt(value.custo_cativo)
}), }),
borderRadius: 8,
backgroundColor: pattern.draw('diagonal', '#C2D5FB'),
stack: 'cativo'
}, },
{ {
type: 'bar', type: 'bar',
label: 'Est. Livre', label: 'Est. Livre',
backgroundColor: pattern.draw('diagonal', '#255488'),
data: chartData?.map(value => { data: chartData?.map(value => {
if (value.dad_estimado) if (value.dad_estimado)
return parseInt(value.custo_livre) return parseInt(value.custo_livre)
}), }),
borderRadius: 8,
backgroundColor: pattern.draw('diagonal', '#255488'),
stack: 'livre'
} }
], ],
} }
useEffect(() => {
const chart = chartRef.current;
// triggerTooltip(chart);
}, []);
return ( return (
<CativoXLivreChartView> <CativoXLivreChartView>
<ChartTitle title={title} subtitle={subtitle}/> <ChartTitle title={title} subtitle={subtitle}/>

View File

@ -45,12 +45,22 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
}, },
plugins: { plugins: {
@ -90,36 +100,32 @@ export default function CostIndicatorChart({ title, data1, data2, label, subtitl
{ {
label: '2021', label: '2021',
data: data1?.map(value => value.custo_unit>0? value.custo_unit : null), data: data1?.map(value => value.custo_unit>0? value.custo_unit : null),
// backgroundColor: '#C2d5fb' borderRadius: 8,
backgroundColor: (value, ctx) => { backgroundColor: (value, ctx) => {
if (value.dad_estimado) if (value.dad_estimado)
return draw('diagonal-right-left', '#C2d5fb'); return draw('diagonal-right-left', '#C2d5fb');
else else
return '#C2d5fb' return '#C2d5fb'
}, },
stack: '0'
}, },
{ {
label: '2022', label: '2022',
data: data2?.map(value => value.custo_unit>0? value.custo_unit : null), data: data2?.map(value => value.custo_unit>0? value.custo_unit : null),
// backgroundColor: '#255488' borderRadius: 8,
backgroundColor: (value, ctx) => { backgroundColor: (value, ctx) => {
if (value.dad_estimado) if (value.dad_estimado)
return draw('diagonal-right-left', '#255488'); return draw('diagonal-right-left', '#255488');
else else
return '#255488' return '#255488'
}, },
stack: '0'
} }
], ],
} }
return ( return (
<CostIndicatorChartView> <CostIndicatorChartView>
{/* <RenderIf isTrue={single? true : false} >
<Bar
options={options}
data={graphData}
/>
</RenderIf> */}
<ChartTitle title={title} subtitle={subtitle} /> <ChartTitle title={title} subtitle={subtitle} />
<Bar <Bar
options={options} options={options}

View File

@ -50,12 +50,22 @@ export default function FatorPotenciaChart({ title, subtitle, data1, data2, labe
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: 16
}
},
}, },
}, },
plugins: { plugins: {

View File

@ -40,18 +40,32 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
scales: { scales: {
x: { x: {
stacked: true, stacked: true,
font: {
size: 30
},
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
y: { y: {
stacked: true, stacked: true,
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
// title: {
// display: true,
// text: 'titleY',
// font: {
// size: 00
// }
// }
}, },
}, },
series: { series: {
@ -85,11 +99,6 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
}, },
legend: { legend: {
position: 'bottom' as const, position: 'bottom' as const,
labels: {
font: {
size: 12,
}
}
}, },
title: { title: {
display: false, display: false,
@ -116,6 +125,7 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
data: dataProps.filter(value => value.dad_estimado === false).map((value, index) => { data: dataProps.filter(value => value.dad_estimado === false).map((value, index) => {
return parseFloat(value.economia_acumulada) return parseFloat(value.economia_acumulada)
}), }),
borderRadius: 10,
backgroundColor: '#255488', backgroundColor: '#255488',
}, },
{ {
@ -124,8 +134,9 @@ export function GrossAnualChart({ title, subtitle, dataProps, label, dataset, ba
label: 'Estimado', label: 'Estimado',
data: dataProps.filter(value => value.ano === '2022').map((value, index) => { data: dataProps.filter(value => value.ano === '2022').map((value, index) => {
if (value.dad_estimado) if (value.dad_estimado)
return parseFloat(value.economia_acumulada) return parseFloat(value.economia_acumulada)
}), }),
borderRadius: 10,
backgroundColor: draw('diagonal-right-left', '#C2d5fb'), backgroundColor: draw('diagonal-right-left', '#C2d5fb'),
}, },
], ],

View File

@ -55,12 +55,22 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle,
x: { x: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
y: { y: {
grid: { grid: {
display: false display: false
} },
ticks: {
font: {
size: !miniature? 16 : 10
}
},
}, },
}, },
plugins: { plugins: {
@ -103,25 +113,23 @@ export default function GrossMensalChart({ title, data1, data2, label, subtitle,
type: 'bar', type: 'bar',
label: 'Consolidado', label: 'Consolidado',
data: data1.map(value => !value.dad_estimado? value?.economia_acumulada : null), data: data1.map(value => !value.dad_estimado? value?.economia_acumulada : null),
backgroundColor: '#255488' borderRadius: 8,
backgroundColor: '#255488',
stack: '0'
}, },
{ {
type: 'bar', type: 'bar',
label: 'Estimado', label: 'Estimado',
data: data2.map(value => value.dad_estimado? value?.economia_acumulada : null), 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 ( return (
<GrossMensalChartView> <GrossMensalChartView>
{/* <RenderIf isTrue={single? true : false} >
<Bar
options={options}
data={graphData}
/>
</RenderIf> */}
<ChartTitle title={title} subtitle={subtitle} /> <ChartTitle title={title} subtitle={subtitle} />
<ChartJs <ChartJs
options={options} options={options}

View File

@ -63,7 +63,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta
useEffect(() => { useEffect(() => {
api.post('/economy/estimates', unity!==''?{ api.post('/economy/estimates', unity!==''?{
"filters": [ "filters": [
{"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity} {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity!=="default"? null : unity}
] ]
}:{}).then(res => { }:{}).then(res => {
setCatLivDataState(res.data.data) setCatLivDataState(res.data.data)
@ -75,7 +75,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta
useEffect(() => { useEffect(() => {
api.post('/economy/MWh', unity!==''?{ api.post('/economy/MWh', unity!==''?{
"filters": [ "filters": [
{"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity} {"type" : "=", "field":"dados_cadastrais.cod_smart_unidade", "value": unity!=="default"? null : unity}
] ]
}:{}).then(res => { }:{}).then(res => {
setIndicatorDataState(res.data.data) setIndicatorDataState(res.data.data)
@ -152,7 +152,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta
onChange={value => setUnity(value.target.value)} onChange={value => setUnity(value.target.value)}
fullWidth fullWidth
> >
<MenuItem value="">Todas</MenuItem> <MenuItem value="default">Todas</MenuItem>
{/* <MenuItem value="RSZFNAENTR101P">RSZFNAENTR101P</MenuItem> !!OPÇAO COM DADOS TESTES!! */} {/* <MenuItem value="RSZFNAENTR101P">RSZFNAENTR101P</MenuItem> !!OPÇAO COM DADOS TESTES!! */}
{ {
clients.map((value) => { clients.map((value) => {
@ -182,7 +182,7 @@ export default function economy({userName, anual, years, brutaMensal, yearsBruta
onChange={value => setUnity(value.target.value)} onChange={value => setUnity(value.target.value)}
fullWidth fullWidth
> >
<MenuItem value="">Todas</MenuItem> <MenuItem value="default">Todas</MenuItem>
{/* <MenuItem value="RSZFNAENTR101P">RSZFNAENTR101P</MenuItem> COMENTARIO DE OPÇAO COM DADOS TESTES */} {/* <MenuItem value="RSZFNAENTR101P">RSZFNAENTR101P</MenuItem> COMENTARIO DE OPÇAO COM DADOS TESTES */}
{ {
clients.map((value) => { clients.map((value) => {

View File

@ -12,28 +12,30 @@ import { FaqView } from '../../styles/layouts/commonQuestions/FaqView'
export default function commonQuestions({faqData, userName}) { export default function commonQuestions({faqData, userName}) {
return ( return (
<FaqView> <main style={{width: '100%'}}>
<Head> <Head>
<title>Smart Energia - FAQ</title> <title>Smart Energia - FAQ</title>
</Head> </Head>
<Header name={userName}> <Header name={userName}>
<PageTitle title='Perguntas Frequentes' subtitle='Aqui estão algumas das perguntas que mais recebemos!'/> <PageTitle title='Perguntas Frequentes' subtitle='Aqui estão algumas das perguntas que mais recebemos!'/>
</Header> </Header>
{/* <Banner title='Perguntas Frequentes' subtitle='Aqui estão algumas das perguntas que mais recebemos!' imgSource='/assets/banners/faq1.png'/> */} <FaqView>
<section className='CommonQuestionsSection' > {/* <Banner title='Perguntas Frequentes' subtitle='Aqui estão algumas das perguntas que mais recebemos!' imgSource='/assets/banners/faq1.png'/> */}
{ <section className='CommonQuestionsSection' >
faqData.length<1? {
<p>Nenhuma pergunta no momento!</p> faqData.length!==0?
faqData.map((value, index ) => {
return <>
<CommonQuestionsCard key={index} question={value.question} answer={value.answer}/>
<hr />
</>
})
: :
faqData.map((value, index ) => { <p>Nenhuma pergunta no momento!</p>
return <> }
<CommonQuestionsCard key={index} question={value.question} answer={value.answer}/> </section>
<hr /> </FaqView>
</> </main>
})
}
</section>
</FaqView>
) )
} }
@ -47,7 +49,7 @@ export const getServerSideProps: GetServerSideProps = async (ctx) => {
await apiClient.get('/faq').then(res => { await apiClient.get('/faq').then(res => {
faqData = res.data.data faqData = res.data.data
}).catch(res => { }).catch(res => {
// console.log(res) console.log(res)
}) })
if (!token) { if (!token) {

View File

@ -46,10 +46,9 @@ export default function aboutUs({userName, news}: any) {
</> </>
}) })
} }
<a href='https://www.energiasmart.com.br/noticias/' <a href='https://www.energiasmart.com.br/noticias/'
target={"_blank"} target={"_blank"}
rel={"noreferrer"}>Ver Mais</a> rel={"noreferrer"}>Ver todas as notícias</a>
</NewsView> </NewsView>
</main> </main>

View File

@ -12,28 +12,30 @@ import Banner from '../../components/banner/Banner'
export default function Notifications({notificationData, userName}: any) { export default function Notifications({notificationData, userName}: any) {
return ( return (
<FaqView> <main style={{width: '100%'}}>
<Head> <Head>
<title>Smart Energia - Notificações</title> <title>Smart Energia - Notificações</title>
</Head> </Head>
<Header name={userName}> <Header name={userName}>
<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ê!'/>
</Header> </Header>
{/* <Banner title='Notificações' subtitle='Aqui estão as notificações publicadas para você!' imgSource='/assets/banners/notificacoes.jpg'/> */} <FaqView>
<section className='CommonQuestionsSection' > {/* <Banner title='Notificações' subtitle='Aqui estão as notificações publicadas para você!' imgSource='/assets/banners/notificacoes.jpg'/> */}
{ <section className='CommonQuestionsSection' >
notificationData.length!=0? {
notificationData.map((value, index ) => { notificationData.length!=0?
return <> notificationData.map((value, index ) => {
<NotificationQuestionsCard key={index} title={value.title} body={value.body}/> return <>
<hr /> <NotificationQuestionsCard key={index} title={value.title} body={value.body}/>
</> <hr />
}) </>
: })
<p style={{alignSelf: 'center'}}>Você não tem notificações!</p> :
} <p style={{alignSelf: 'center'}}>Você não tem notificações!</p>
</section> }
</FaqView> </section>
</FaqView>
</main>
) )
} }

View File

@ -144,25 +144,6 @@ export default function Telemetria({userName, clients}: any) {
setOpenSnackSuccess(false) 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() { async function getChartData() {
const html = document.querySelector("table")?.outerHTML; const html = document.querySelector("table")?.outerHTML;
await api.post('/telemetry/demand', { await api.post('/telemetry/demand', {
@ -195,12 +176,6 @@ export default function Telemetria({userName, clients}: any) {
getChartData() getChartData()
}, [send]) }, [send])
useEffect(() => {
// getDiscretization("PRAXCUENTR101P", "2022-01-01", "2022-01-31", "med_5min")
// .then(result => setDiscretizedConsumptionData(result))
// .catch(exception => console.log(exception))
}, [discretization])
return( return(
<main style={{width: '100%'}}> <main style={{width: '100%'}}>
<Head> <Head>
@ -243,7 +218,7 @@ export default function Telemetria({userName, clients}: any) {
severity="error" severity="error"
sx={{ width: '100%' }} sx={{ width: '100%' }}
> >
Verifique os campos! Verifique os campos e tente novamente!
</Alert> </Alert>
</Snackbar> </Snackbar>
@ -351,9 +326,10 @@ export default function Telemetria({userName, clients}: any) {
</LocalizationProvider> </LocalizationProvider>
<div className='select'> <div className='select'>
<BasicButton title='Selecionar!' onClick={() => { <BasicButton title='Selecionar!' onClick={() => {
setSend(true)
getDiscretization(unity, startDate, endDate, discretization) getDiscretization(unity, startDate, endDate, discretization)
.then(result => setDiscretizedConsumptionData(result)) .then(result => {setDiscretizedConsumptionData(result); setSend(false)})
.catch(exception => console.log(exception)) .catch(exception => {setSend(false); setOpenSnackFields(true)})
}}/> }}/>
</div> </div>
</ChartFilters> </ChartFilters>
@ -447,9 +423,10 @@ export default function Telemetria({userName, clients}: any) {
</LocalizationProvider> </LocalizationProvider>
<div className='select'> <div className='select'>
<BasicButton title='Selecionar!' onClick={() => { <BasicButton title='Selecionar!' onClick={() => {
setSend(true)
getDemand(unity, startDate, endDate, discretization) getDemand(unity, startDate, endDate, discretization)
.then(result => setDemRegXDemCon(result)) .then(result => {setDemRegXDemCon(result); setSend(false)})
.catch(exception => console.log(exception)) .catch(exception => {setSend(false); setOpenSnackFields(true)})
}}/> }}/>
</div> </div>
</ChartFilters> </ChartFilters>
@ -539,9 +516,10 @@ export default function Telemetria({userName, clients}: any) {
</LocalizationProvider> </LocalizationProvider>
<div className='select'> <div className='select'>
<BasicButton title='Selecionar!' onClick={() => { <BasicButton title='Selecionar!' onClick={() => {
setSend(true)
getPowerFactorData(unity, startDate, endDate, discretization) getPowerFactorData(unity, startDate, endDate, discretization)
.then(result => setFatorPotenciaData(result)) .then(result => {setFatorPotenciaData(result); setSend(false)})
.catch(exception => console.log(exception)) .catch(exception => {setSend(false); setOpenSnackFields(true)})
}}/> }}/>
</div> </div>
</ChartFilters> </ChartFilters>
@ -598,11 +576,12 @@ export default function Telemetria({userName, clients}: any) {
</Select> </Select>
</FormControl> </FormControl>
</div> </div>
<div className='select'> <div style={{marginBottom: '8px'}}>
<BasicButton title='Selecionar!' onClick={() => { <BasicButton title='Selecionar!' onClick={() => {
setSend(true)
getDemand(unity, startDate, endDate, discretization) getDemand(unity, startDate, endDate, discretization)
.then(result => setDiscretizedConsumptionData(result)) .then(result => {setDiscretizedConsumptionData(result); setSend(false)})
.catch(exception => console.log(exception)) .catch(exception => {setSend(false); setOpenSnackFields(true)})
}}/> }}/>
</div> </div>
</ChartFilters> </ChartFilters>

View File

@ -191,7 +191,7 @@ export const TelemetriaView = styled.main`
.MuiInputLabel-outlined { .MuiInputLabel-outlined {
margin-top: 11px; margin-top: 11px;
} }
.Mui-focused { .Mui-focused, .MuiInputLabel-shrink {
margin-top: 0!important; margin-top: 0!important;
} }
} }
@ -226,23 +226,7 @@ export const TelemetriaView = styled.main`
flex-wrap: wrap; flex-wrap: wrap;
.select { .select {
display: flex; margin-bottom: 17px;// input margin bottom
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;
}
}
} }
} }
`; `;

View File

@ -22,23 +22,10 @@ export const EconomyView = styled.main`
.MuiInputLabel-outlined { .MuiInputLabel-outlined {
margin-top: 11px; margin-top: 11px;
} }
.Mui-focused { .Mui-focused, .MuiInputLabel-shrink {
margin-top: 0!important; margin-top: 0!important;
} }
.chartBox { .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;
} */
` `

View File

@ -84,7 +84,7 @@ export const NewsView = styled.main`
align-items: center; align-items: center;
margin-top: 1px; margin-top: 1px;
width: 140px; width: 170px;
height: 45px; height: 45px;
cursor: pointer; cursor: pointer;