From ea0225d6392eba5b9667d22194485d3de4418b61 Mon Sep 17 00:00:00 2001 From: joseCorte-exe Date: Wed, 15 Jun 2022 15:54:42 -0300 Subject: [PATCH] add notification delete --- .../NotificationsTable.tsx | 13 +- .../accumulatedSavings/index.tsx | 39 --- src/pages/administrative/clients.tsx | 15 +- .../administrative/costIndicator/index.tsx | 38 --- .../administrative/estimatedCost/index.tsx | 39 --- .../administrative/grossSavings/index.tsx | 39 --- .../administrative/industryInfo/index.tsx | 37 --- src/pages/administrative/news/index.tsx | 58 ----- .../administrative/notification/index.tsx | 188 ++++++++------ .../administrative/notifications/index.tsx | 40 --- src/pages/administrative/pld/index.tsx | 231 ------------------ .../administrative/resumoOperacao/index.tsx | 161 ------------ src/pages/administrative/telemetria/index.tsx | 195 --------------- src/styles/layouts/clients/ClientsView.ts | 14 -- src/styles/layouts/modals/confirmModalView.ts | 13 + 15 files changed, 143 insertions(+), 977 deletions(-) delete mode 100644 src/pages/administrative/accumulatedSavings/index.tsx delete mode 100644 src/pages/administrative/costIndicator/index.tsx delete mode 100644 src/pages/administrative/estimatedCost/index.tsx delete mode 100644 src/pages/administrative/grossSavings/index.tsx delete mode 100644 src/pages/administrative/industryInfo/index.tsx delete mode 100644 src/pages/administrative/news/index.tsx delete mode 100644 src/pages/administrative/notifications/index.tsx delete mode 100644 src/pages/administrative/pld/index.tsx delete mode 100644 src/pages/administrative/resumoOperacao/index.tsx delete mode 100644 src/pages/administrative/telemetria/index.tsx create mode 100644 src/styles/layouts/modals/confirmModalView.ts diff --git a/src/components/administrativeTables/NotificationsTable.tsx b/src/components/administrativeTables/NotificationsTable.tsx index 9610612..284f730 100644 --- a/src/components/administrativeTables/NotificationsTable.tsx +++ b/src/components/administrativeTables/NotificationsTable.tsx @@ -19,7 +19,7 @@ import Toolbar from '@mui/material/Toolbar'; import Tooltip from '@mui/material/Tooltip'; import Typography from '@mui/material/Typography'; import { visuallyHidden } from '@mui/utils'; -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { ClientTableView, StyledStatus } from './ClientsTableView'; @@ -178,7 +178,12 @@ interface NotificationData { deleted_at: Date, } -export default function ClientTable({notifications}: any) { +interface NotificationsTableInterface{ + notifications: NotificationData[], + onChange: any +} + +export default function NotificationsTable({notifications, onChange}: NotificationsTableInterface) { const [order, setOrder] = useState('asc'); const [orderBy, setOrderBy] = useState('status'); const [selected, setSelected] = useState([]); @@ -238,6 +243,10 @@ export default function ClientTable({notifications}: any) { // Avoid a layout jump when reaching the last page with empty rows. const emptyRows = page > 0 ? Math.max(0, (1 + page) * rowsPerPage - notifications.length) : 0; + useEffect(() => { + onChange(selected) + }, [selected]) + return ( diff --git a/src/pages/administrative/accumulatedSavings/index.tsx b/src/pages/administrative/accumulatedSavings/index.tsx deleted file mode 100644 index 85a78d9..0000000 --- a/src/pages/administrative/accumulatedSavings/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Button from '@material-ui/core/Button' -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import Chart from '../../../components/graph/Chart' -import { SingleBar } from '../../../components/graph/SingleBar' -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle' -import { EconomiaAcumulada } from '../../../services/economiaAcumulada' -import { dataEconomiaBruta } from '../../../services/economiaBruta' -import { AccumulatedSavingsView } from '../../../styles/layouts/economy/accumulatedSavings/AccumulatedSavingsView' - -export default function AccumulatedSavings() { - return ( - - - Smart Energia - Economia Acumulada - - - - -
- -
-
- ) -} diff --git a/src/pages/administrative/clients.tsx b/src/pages/administrative/clients.tsx index b9caf6f..e130a9a 100644 --- a/src/pages/administrative/clients.tsx +++ b/src/pages/administrative/clients.tsx @@ -13,12 +13,10 @@ import FaqButton1 from '../../components/buttons/faqButton/FaqButton1'; import FaqButton2 from '../../components/buttons/faqButton/FaqButton2'; import Header from '../../components/header/Header' import InputUpload from '../../components/inputUplaod/inputUpload'; -import { IconButton } from '@mui/material'; -import { ClientsView, ConfirmModalView } from '../../styles/layouts/clients/ClientsView'; +import { ClientsView } from '../../styles/layouts/clients/ClientsView'; import PageTitle from '../../components/pageTitle/PageTitle'; import ConfirmModal from '../../components/modal/ConfirmModal'; - - +import { ConfirmModalView } from '../../styles/layouts/modals/confirmModalView'; const style = { position: 'absolute' as const, @@ -34,8 +32,6 @@ const style = { overflowY: 'scroll' }; - - export default function clients() { const [open, setOpen] = React.useState(false); const [openModalInativar, setOpenModalInativar] = useState(false) @@ -44,17 +40,13 @@ export default function clients() { const [openModal, setOpenModal] = useState(false) - - - - return (
{/* */} -
+
@@ -91,7 +83,6 @@ export default function clients() { setOpenModalInativar(true)}/> -
) } diff --git a/src/pages/administrative/costIndicator/index.tsx b/src/pages/administrative/costIndicator/index.tsx deleted file mode 100644 index f6ee0f3..0000000 --- a/src/pages/administrative/costIndicator/index.tsx +++ /dev/null @@ -1,38 +0,0 @@ -import Button from '@material-ui/core/Button' -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import Chart from '../../../components/graph/Chart' -import { SingleBar } from '../../../components/graph/SingleBar' -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle' -import { dataEconomiaBruta } from '../../../services/economiaBruta' -import { dataEconomiaIndicador } from '../../../services/economiaIndicador' -import { CostIndicatorView } from '../../../styles/layouts/economy/costIndicator/CostIndicatorView' - -export default function CostIndicator() { - return ( - - - Smart Energia - Indicador de Custos - - - - -
- -
-
- ) -} diff --git a/src/pages/administrative/estimatedCost/index.tsx b/src/pages/administrative/estimatedCost/index.tsx deleted file mode 100644 index fbee31d..0000000 --- a/src/pages/administrative/estimatedCost/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Button from '@material-ui/core/Button' -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import Chart from '../../../components/graph/Chart' -import { LineBarChart } from '../../../components/graph/LineBarChart' -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle' -import { ConsumoEstimado } from '../../../services/consumoEstimado' -import { EstimatedCostView } from '../../../styles/layouts/economy/estimatedCost/EstimatedCostView' - -export default function EstimatedCost() { - return ( - <> - - Smart Energia - Custos Estimados - - - - - -
- -
-
- - ) -} diff --git a/src/pages/administrative/grossSavings/index.tsx b/src/pages/administrative/grossSavings/index.tsx deleted file mode 100644 index 5369c0d..0000000 --- a/src/pages/administrative/grossSavings/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import Button from '@material-ui/core/Button' -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import Chart from '../../../components/graph/Chart' -import { SingleBar } from '../../../components/graph/SingleBar' -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle' -import { dataEconomiaBruta } from '../../../services/economiaBruta' -import { GrossSavingsView } from '../../../styles/layouts/economy/grossSavings/GrossSavings' - -export default function GrossSavings() { - return ( - <> - - Smart Energia - Economia Acumulada - - - - - -
- -
-
- - ) -} diff --git a/src/pages/administrative/industryInfo/index.tsx b/src/pages/administrative/industryInfo/index.tsx deleted file mode 100644 index 8ca5b64..0000000 --- a/src/pages/administrative/industryInfo/index.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import Button from '@material-ui/core/Button' -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import BasicButton from '../../../components/buttons/basicButton/BasicButton' -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle' -import { IndustryInfoView } from '../../../styles/layouts/industryInfo/IndustryInfoView' - -export default function industryInfo() { - return ( - <> - - Smart Energia - Info de Setor - - - -
- -
- - -
- - ) -} diff --git a/src/pages/administrative/news/index.tsx b/src/pages/administrative/news/index.tsx deleted file mode 100644 index a471f72..0000000 --- a/src/pages/administrative/news/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import Head from 'next/head'; -import Link from 'next/link' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader'; -import Banner from '../../../components/banner/Banner' -import BasicButton from '../../../components/buttons/basicButton/BasicButton'; -import Header from '../../../components/header/Header' -import { Button, NewsView } from '../../../styles/layouts/news/NewsView' - -export default function index() { - return ( - <> - - Smart Energia - Noticias - - - - - -
-

19 Abril 2022

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

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.
- Os itens que mais impactaram a correção foram os encargos setoriais, os custos de distribuição, a retirada dos componentes financeiros..

- - -

19 Abril 2022

- NEEL APROVA REAJUSTE MÉDIO DE 20,36% NA TARIFA DE ENERGIA NO RN -
-
-

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.
- Os itens que mais impactaram a correção foram os encargos setoriais, os custos de distribuição, a retirada dos componentes financeiros..

- - -
- - console.log()}/> -
- - ) -} diff --git a/src/pages/administrative/notification/index.tsx b/src/pages/administrative/notification/index.tsx index d2631c1..dc142d6 100644 --- a/src/pages/administrative/notification/index.tsx +++ b/src/pages/administrative/notification/index.tsx @@ -8,7 +8,7 @@ import Modal from '@mui/material/Modal'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; import Head from 'next/head' -import React, { useState } from 'react' +import React, { useEffect, useState } from 'react' import NotificationsTable from '../../../components/administrativeTables/NotificationsTable' import FaqButton1 from '../../../components/buttons/faqButton/FaqButton1'; @@ -24,9 +24,12 @@ import FormControlLabel from '@mui/material/FormControlLabel'; import getAPIClient from '../../../services/ssrApi'; import { GetServerSideProps } from 'next'; import { parseCookies } from 'nookies'; -import Notifications from '../../notifications'; import Snackbar from '@mui/material/Snackbar'; import MuiAlert, { AlertProps } from '@mui/material/Alert'; +import BasicButton from '../../../components/buttons/basicButton/BasicButton'; +import { ConfirmModalView } from '../../../styles/layouts/modals/confirmModalView'; +import ConfirmModal from '../../../components/modal/ConfirmModal'; +import { JsxElement } from 'typescript'; const style = { position: 'absolute' as const, @@ -65,10 +68,14 @@ export default function notification({clients, notifications}) { body: '', users: [] }) + const [selectedNotifications, setSelectedNotifications] = useState([]) const [open, setOpen] = useState(false); + const [openModalInativar, setOpenModalInativar] = useState(false) const [openSnackSuccess, setOpenSnackSuccess] = useState(false); const [openSnackError, setOpenSnackError] = useState(false); + const [openSnackSuccessDelete, setOpenSnackSuccessDelete] = useState(false); + const [openSnackErrorDelete, setOpenSnackErrorDelete] = useState(false); const [radiusValue, setRadiusValue] = useState('all'); @@ -81,8 +88,17 @@ export default function notification({clients, notifications}) { } setOpenSnackError(false); + setOpenSnackSuccess(false); }; + const handleCloseSnackDelete = (event?: React.SyntheticEvent | Event, reason?: string) => { + if (reason === 'clickaway') { + return; + } + + setOpenSnackErrorDelete(false); + setOpenSnackSuccessDelete(false); + }; async function handleRegisterNewNotification({title, body, users}: NotificationInterface) { await api.post('/notification', { @@ -91,6 +107,15 @@ export default function notification({clients, notifications}) { users }).then(res => setOpenSnackSuccess(true)).catch(res => setOpenSnackError(true)) } + async function handleDeleteNotification(id: any) { + await id.map((value) => { + api.delete(`/notification/${value}`).then(res => { + setOpenSnackSuccessDelete(true) + setOpenModalInativar(false) + window.location.reload() + }).catch(res => setOpenSnackErrorDelete(true)) + }) + } return ( @@ -111,90 +136,109 @@ export default function notification({clients, notifications}) { + + + notificação excluida com sucesso! + + + + + Notificação não excluida! + + +
+
- setSelectedNotifications(value)}/> + - -

Disparar Notificações

- - Pode ser que todas as notificaçõs demorem alguns minutos para estarem disponíveis -
- { - setNotification({ - ...notification, - title: value.target.value - }) - }} variant="outlined" />

- { - setNotification({ - ...notification, - body: value.target.value - }) - }} variant="outlined" />

+ +

Disparar Notificações

+ + Pode ser que todas as notificaçõs demorem alguns minutos para estarem disponíveis +
+ { + setNotification({ + ...notification, + title: value.target.value + }) + }} variant="outlined" />

+ { + setNotification({ + ...notification, + body: value.target.value + }) + }} variant="outlined" />

-
- - - } checked={radiusValue==='all'? true : false}onChange={(value: React.ChangeEvent) => { - setRadiusValue(value.target.value) - }} label="Disparar para todos os clientes" /> - } checked={radiusValue==='some'? true : false} onChange={(value: React.ChangeEvent) => { - setRadiusValue(value.target.value) - }} label="Disparar somente para alguns clientes" /> - - -
+
+ + + } checked={radiusValue==='all'? true : false}onChange={(value: React.ChangeEvent) => { + setRadiusValue(value.target.value) + }} label="Disparar para todos os clientes" /> + } checked={radiusValue==='some'? true : false} onChange={(value: React.ChangeEvent) => { + setRadiusValue(value.target.value) + }} label="Disparar somente para alguns clientes" /> + + +
- { - radiusValue === 'some'? - { - setNotification({...notification, users: newValue.map((el) => {return {"user_id": el.id}})}); - }} - getOptionLabel={(option) => option.name} - renderOption={(props, option, { selected }) => ( -
  • - - {option.name} -
  • - )} - sx={{ml:8}} - style={{ width: 700 }} - renderInput={(params) => ( - + { + radiusValue === 'some'? + { + setNotification({...notification, users: newValue.map((el) => {return {"user_id": el.id}})}); + }} + getOptionLabel={(option) => option.name} + renderOption={(props, option, { selected }) => ( +
  • + + {option.name} +
  • )} - /> : - null - } + sx={{ml:8}} + style={{ width: 700 }} + renderInput={(params) => ( + + )} + /> : + null + } - {console.log()}} /> - { - handleRegisterNewNotification(notification) - }} /> -
    + {setOpen(false)}} /> + { + handleRegisterNewNotification(notification)}} + /> +
    - + {setOpenModalInativar(value)}}> + + + handleDeleteNotification(selectedNotifications)}/> + setOpenModalInativar(false)}/> + +
    ) } diff --git a/src/pages/administrative/notifications/index.tsx b/src/pages/administrative/notifications/index.tsx deleted file mode 100644 index cfce39c..0000000 --- a/src/pages/administrative/notifications/index.tsx +++ /dev/null @@ -1,40 +0,0 @@ -import FormControl from '@mui/material/FormControl'; -import InputLabel from '@mui/material/InputLabel'; -import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; -import TextField from '@mui/material/TextField'; -import Head from 'next/head' -import React from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader' -import NotificationsTable from '../../../components/administrativeTables/NotificationsTable'; -import BasicButton from '../../../components/buttons/basicButton/BasicButton'; -import CommonQuestionsCard from '../../../components/faqQuestionsCard/FaqQuestionsCard' -import Header from '../../../components/header/Header' -import { FaqView } from '../../../styles/layouts/commonQuestions/FaqView' - -export default function commonQuestions() { - - const [month, setMonth] = React.useState(''); - const [unidade, setUnidade] = React.useState(''); - - const handleChangeMonth = (event: SelectChangeEvent) => { - setMonth(event.target.value); - }; - const handleChangeUnidade = (event: SelectChangeEvent) => { - setUnidade(event.target.value); - }; - - return ( - <> - - - Smart Energia - FAQ - -
    - - - - - ) -} diff --git a/src/pages/administrative/pld/index.tsx b/src/pages/administrative/pld/index.tsx deleted file mode 100644 index 82c071b..0000000 --- a/src/pages/administrative/pld/index.tsx +++ /dev/null @@ -1,231 +0,0 @@ -import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; -import TextField from '@mui/material/TextField'; -import Head from 'next/head'; -import Link from 'next/link'; -import { useRouter } from 'next/router' -import React, { useEffect, useState } from 'react' - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader'; -import BasicButton from '../../../components/buttons/basicButton/BasicButton'; -import Chart from '../../../components/graph/Chart'; -import { LineBarChart } from '../../../components/graph/LineBarChart'; -import LineChart from '../../../components/graph/LineChart'; -import Header from '../../../components/header/Header' -import PageTitle from '../../../components/pageTitle/PageTitle'; -import { EconomiaAcumulada } from '../../../services/economiaAcumulada'; -import { EvolucaoPld } from '../../../services/evolucaoPld'; -import { GoBack, NewTableLine, PldGraphView, PldTableView } from '../../../styles/layouts/pld/PldView' -import RenderIf from '../../../utils/renderIf' - -export default function index() { - const [page, setPage] = useState('table') - const [age, setAge] = React.useState(''); - - const handleChange = (event: SelectChangeEvent) => { - setAge(event.target.value); - }; - - useEffect(() => { - console.log(page) - }, [page]) - - return ( -
    - - Smart Energia - PLD - - - - {'< voltar para visão geral'} - - -
    - - - - - -
    - console.log()}/> -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MêsNordesteNorteSudesteSul
    2101xxxxxxxxxxxxxxxx
    2102xxxxxxxxxxxxxxxx
    2103xxxxxxxxxxxxxxxx
    2104xxxxxxxxxxxxxxxx
    2105xxxxxxxxxxxxxxxx
    2106xxxxxxxxxxxxxxxx
    2107xxxxxxxxxxxxxxxx
    2108xxxxxxxxxxxxxxxx
    2109xxxxxxxxxxxxxxxx
    2110xxxxxxxxxxxxxxxx
    2111xxxxxxxxxxxxxxxx
    2112xxxxxxxxxxxxxxxx
    2021xxxxxxxxxxxxxxxx
    Mínxxxxxxxxxxxxxxxx
    Maxxxxxxxxxxxxxxxxx
    Desv Padxxxxxxxxxxxxxxxx
    -
    -
    setPage('perMouth')}> -

    Valores Diarios

    -
    -
    setPage('perDate')}> -

    Valores Horários

    -
    -
    -
    -
    - - - setPage('table')}>{'< voltar para tabela pld'} - - -
    -
    - -
    - - console.log()}/> -
    - -
    -
    - - - setPage('table')}>{'< voltar para tabela pld'} - - -
    - - console.log()}/> -
    - -
    -
    -
    - ) -} diff --git a/src/pages/administrative/resumoOperacao/index.tsx b/src/pages/administrative/resumoOperacao/index.tsx deleted file mode 100644 index 23a0258..0000000 --- a/src/pages/administrative/resumoOperacao/index.tsx +++ /dev/null @@ -1,161 +0,0 @@ -import TextField from '@material-ui/core/TextField'; -import Box from '@mui/material/Box'; -import FormControl from '@mui/material/FormControl'; -import InputLabel from '@mui/material/InputLabel'; -import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; -import Head from 'next/head'; -import React, { useEffect } from 'react'; -// import Teste from '../files/teste.csv'; -import { CSVDownload, CSVLink } from "react-csv"; - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader'; -import BasicButton from '../../../components/buttons/basicButton/BasicButton'; -import Header from '../../../components/header/Header'; -import PageTitle from '../../../components/pageTitle/PageTitle'; -import Sidebar from '../../../components/sidebar/Sidebar'; -// import { dados } from '../services/DadosTabelaResumoOperacao'; -import data from '../../../services/dados.json' -import { NewTableLine, Pagination, TableView } from '../../../styles/layouts/ResumoOperacao/ResumoOperacaoView'; - -export default function index() { - const csvData = [ - // ["firstname", "lastname", "email"], - // ["Ahmed", "Tomi", "ah@smthing.co.com"], - // ["Raed", "Labes", "rl@smthing.co.com"], - // ["Yezzi", "Min l3b", "ymin@cocococo.com"], - - [ "value", "unidade1", "name", "Unidade-1", "operacao", "Compra", "montante", "130,00", "contraparte", "cOPEL COM I5", "preco", "234,67", "valorNF", "38.257,15" ], - [ "value", "unidade2", "name", "Unidade-2", "operacao", "Compra", "montante", "20,00", "contraparte", "EMEWE I5", "preco", "234,67", "valorNF", "38.257,15"], - [ "value", "unidade3", "name", "Unidade-3", "operacao", "Compra", "montante", "30,00", "contraparte", "EMEWE I5", "preco", "234,67", "valorNF", "38.257,15" ], - [ "value", "unidade4", "name", "Unidade-4", "operacao", "Compra", "montante", "40,00", "contraparte", "COPEL COM I5", "preco", "234,67", "valorNF", "38.257,15" ], - [ "value", "unidade5", "name", "Unidade-5", "operacao", "Compra", "montante", "500,00","contraparte", "COPEL COM I5", "preco", "234,67", "valorNF", "38.257,15" ], - [ "value", "unidade6", "name", "Unidade-6", "operacao", "Compra", "montante", "300,00", "contraparte", "COPEL COM I5", "preco","234,67", "valorNF", "965,95" ] - ]; - - const [month, setMonth] = React.useState(''); - const [unidade, setUnidade] = React.useState(''); - - const handleChangeMonth = (event: SelectChangeEvent) => { - setMonth(event.target.value); - }; - const handleChangeUnidade = (event: SelectChangeEvent) => { - setUnidade(event.target.value); - }; - - return( - <> - - - - Smart Energia - Resumo de Operação - - - -

    Seletor Mês

    -
    - - Unidades - - - - - Mês - - -
    - -
    - - - - - - -
    - console.log()}/> -
    - - - - - - - - - - - - - { - data.unidades.filter((value, index)=> value.value.includes(unidade)).map((value, index) => { - if (index%2===0) { - return - - - - - - - - } else { - return - - - - - - - - } - }) - } - -
    Unidade OperaçãoMontante (MWh)ContrapartePreço(R$/MWh)ValorNF/Crédito(R$)
    {value.name}{value.operacao}{value.montante}{value.contraparte}{value.preco}{value.valorNF}
    {value.name}{value.operacao}{value.montante}{value.contraparte}{value.preco}{value.valorNF}
    -
    - - {/* */} - {/* */} - {/* */} - - - console.log()}/> - - -
    - -
    - - ) -} diff --git a/src/pages/administrative/telemetria/index.tsx b/src/pages/administrative/telemetria/index.tsx deleted file mode 100644 index f1e77c1..0000000 --- a/src/pages/administrative/telemetria/index.tsx +++ /dev/null @@ -1,195 +0,0 @@ -import Button from '@material-ui/core/Button'; -import FormControl from '@mui/material/FormControl'; -import InputLabel from '@mui/material/InputLabel'; -import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; -import Head from 'next/head'; -import Link from 'next/link'; -import { useRouter } from 'next/router' -import { start } from 'nprogress'; -import React from 'react'; - -import AdministrativeHeader from '../../../components/administrativeHeader/AdministrativeHeader'; -import Banner from '../../../components/banner/Banner'; -import GradientButton from '../../../components/buttons/gradientButton/GradientButton' -import LineChart from '../../../components/graph/LineChart'; -import Header from '../../../components/header/Header'; -import { FatorPotencia } from '../../../services/fatorPotencia'; -import { Buttons, TelemetriaView, Uploads } from '../../../styles/layouts/Telemetria/TelemetriaView'; -import RenderIf from '../../../utils/renderIf'; - -export default function index() { - const [unity, setUnity] = React.useState(''); - const [startDate, setStartDate] = React.useState(''); - const [endDate, setEndDate] = React.useState(''); - const [discretization, setDiscretization] = React.useState(''); - - const [showChart, setShowChart] = React.useState(false); - - const handleChange = (event: SelectChangeEvent) => { - // setAge(event.target.value); - }; - - return( - <> - - - - Smart Energia - Telemetria - - - -
    -
    -

    Unidade

    - - Unidade - - -
    - -
    -

    Data inicial

    - - Data Inicial - - -
    - -
    -

    Data Final

    - - Data Final - - -
    - -
    -

    Discretização

    - - Discretização - - -
    -
    - - - - - - - - - setShowChart(!showChart)} green /> - - - - - - -

    - - Fonte: Dados coletados do Sistema de Coleta de Dados - de Energia - SCDE da Câmara de Comercialização
    - Energia Elétrica – CCEE, sendo que as quantidades aqui - informadas são de responsabilidade
    do agente de - medição - Distribuidora. -
    -

    -
    - - ) -} diff --git a/src/styles/layouts/clients/ClientsView.ts b/src/styles/layouts/clients/ClientsView.ts index 63f98aa..4d61b0b 100644 --- a/src/styles/layouts/clients/ClientsView.ts +++ b/src/styles/layouts/clients/ClientsView.ts @@ -62,17 +62,3 @@ export const ClientsModalView = styled.main` margin-top: 70px } ` - -export const ConfirmModalView = styled.main` - display: flex; - align-items: center; - justify-content: space-around; - - margin: 0; - padding: 0; - - width: 100%; - height: 100%; - - -` diff --git a/src/styles/layouts/modals/confirmModalView.ts b/src/styles/layouts/modals/confirmModalView.ts new file mode 100644 index 0000000..b3cea70 --- /dev/null +++ b/src/styles/layouts/modals/confirmModalView.ts @@ -0,0 +1,13 @@ +import styled from "styled-components"; + +export const ConfirmModalView = styled.main` + display: flex; + align-items: center; + justify-content: space-around; + + margin: 0; + padding: 0; + + width: 100%; + height: 100%; +`