-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
3,102 additions
and
809 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,33 @@ | ||
import React from 'react' | ||
import { useHistory } from 'react-router-dom' | ||
import { Rotas } from './rotas' | ||
|
||
import 'primereact/resources/themes/nova-light/theme.css' | ||
import 'primereact/resources/primereact.min.css' | ||
import 'primeicons/primeicons.css' | ||
|
||
import './assets/css/styles.scss' | ||
import { Cabecalho } from './componentes/Cabecalho' | ||
import { SidebarLeft } from './componentes/SidebarLeft' | ||
|
||
export const App = () => { | ||
const pathName = useHistory().location.pathname | ||
|
||
return ( | ||
<section role="main" id="main" className="row"> | ||
{pathName === '/login' ? ( | ||
<Rotas /> | ||
) : ( | ||
<> | ||
<Cabecalho /> | ||
<SidebarLeft /> | ||
<Rotas /> | ||
</> | ||
)} | ||
</section> | ||
) | ||
const pathName = useHistory().location.pathname | ||
return ( | ||
<section role="main" id="main" className="row"> | ||
{pathName === '/login' ? ( | ||
<Rotas /> | ||
) : pathName === '/detalhe-das-prestacoes' ? ( | ||
<> | ||
<Cabecalho /> | ||
<Rotas /> | ||
</> | ||
) : | ||
<> | ||
<Cabecalho /> | ||
<SidebarLeft /> | ||
<Rotas /> | ||
</> | ||
} | ||
</section> | ||
) | ||
} | ||
|
||
export default App | ||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/componentes/Dashborard/BarraDeStatusPeriodoAssociacao.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
export const BarraDeStatusPeriodoAssociacao = ({ statusPeriodoAssociacao, corBarraDeStatusPeriodoAssociacao, textoBarraDeStatusPeriodoAssociacao, | ||
}) => { | ||
return ( | ||
statusPeriodoAssociacao !== undefined && ( | ||
<div className={`col-12 barra-status-${corBarraDeStatusPeriodoAssociacao}`} | ||
> | ||
<p className="titulo-status pt-1 pb-1 mb-0"> | ||
{textoBarraDeStatusPeriodoAssociacao} | ||
</p> | ||
</div> | ||
|
||
) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,108 @@ | ||
import React, {useEffect, useState} from "react"; | ||
import "./dashboard.scss" | ||
import "../../paginas/404/pagina-404.scss" | ||
import {MsgImgLadoDireito} from "../Mensagens/MsgImgLadoDireito"; | ||
import Img404 from "../../assets/img/img-404.svg" | ||
import {exibeDataPT_BR, exibeDateTimePT_BR, exibeValorFormatadoPT_BR} from "../../utils/ValidacoesAdicionaisFormularios"; | ||
import Loading from "../../utils/Loading"; | ||
import React from 'react' | ||
import './dashboard.scss' | ||
import '../../paginas/404/pagina-404.scss' | ||
import {MsgImgLadoDireito} from '../Mensagens/MsgImgLadoDireito' | ||
import Img404 from '../../assets/img/img-404.svg' | ||
import { | ||
exibeDataPT_BR, | ||
exibeDateTimePT_BR, | ||
exibeValorFormatadoPT_BR, | ||
} from '../../utils/ValidacoesAdicionaisFormularios' | ||
|
||
export const DashboardCard = ({acoesAssociacao}) => { | ||
|
||
const [loading, setLoading] = useState(true); | ||
|
||
useEffect(()=> { | ||
setInterval(() => { | ||
setLoading(false); | ||
}, 1000); | ||
}, []) | ||
|
||
return ( | ||
<> | ||
{ | ||
loading ? ( | ||
<Loading | ||
corGrafico="black" | ||
corFonte="dark" | ||
marginTop="0" | ||
marginBottom="0" | ||
/> | ||
) : null | ||
} | ||
{!loading && acoesAssociacao.info_acoes && acoesAssociacao.info_acoes.length > 0 ? ( | ||
{acoesAssociacao.info_acoes && acoesAssociacao.info_acoes.length > 0 ? ( | ||
<div className="row row-cols-1 row-cols-md-2"> | ||
{acoesAssociacao.info_acoes.map((acao, index) => | ||
{acoesAssociacao.info_acoes.map((acao, index) => ( | ||
<div key={index} className="col mb-4 container-dashboard-card"> | ||
<div className="card h-100"> | ||
<div className="card-header bg-white"> | ||
{acao.acao_associacao_nome ? ( | ||
<span><strong>{acao.acao_associacao_nome}</strong> </span> | ||
) : null } | ||
{acao.acao_associacao_nome && | ||
<span><strong>{acao.acao_associacao_nome}</strong>{' '}</span> | ||
} | ||
</div> | ||
<div className="card-body"> | ||
<div className='row'> | ||
<div className="row"> | ||
<div className="col-12 col-md-5 align-self-center"> | ||
<div className="col-12 container-lado-esquerdo pt-1 pb-1"> | ||
<p className="pt-1 mb-1" >Custeio: <strong>{exibeValorFormatadoPT_BR(acao.saldo_atual_custeio)}</strong></p> | ||
<p className="pt-1 mb-1">Capital: <strong>{exibeValorFormatadoPT_BR(acao.saldo_atual_capital)}</strong></p> | ||
<p className="pt-1 pb-1 mb-0">Total: <strong>{exibeValorFormatadoPT_BR(acao.saldo_atual_total)}</strong></p> | ||
<p className="pt-1 mb-1"> | ||
Custeio:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.saldo_atual_custeio)} | ||
</strong> | ||
</p> | ||
<p className="pt-1 mb-1"> | ||
Capital:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.saldo_atual_capital)} | ||
</strong> | ||
</p> | ||
<p className="pt-1 pb-1 mb-0"> | ||
Total:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.saldo_atual_total)} | ||
</strong> | ||
</p> | ||
</div> | ||
</div> | ||
<div className="col-12 col-md-7 container-lado-direito align-self-center "> | ||
<p className="pt-1 mb-1" >Saldo reprogramado: <strong>{exibeValorFormatadoPT_BR(acao.saldo_reprogramado)}</strong></p> | ||
<p className="pt-1 mb-1">Repasses no período: <strong>{exibeValorFormatadoPT_BR(acao.repasses_no_periodo)}</strong></p> | ||
<p className="pt-1 pb-1 mb-0">Despesa declarada: <strong>{exibeValorFormatadoPT_BR(acao.despesas_no_periodo)}</strong></p> | ||
{acao.acao_associacao_nome.trim() === "PTRF" ? ( | ||
<p className="pt-1 pb-1 mb-0">Próx. repasse a partir de: <strong>{exibeDataPT_BR(acoesAssociacao.data_prevista_repasse)}</strong></p> | ||
) : null } | ||
<p className="pt-1 mb-1"> | ||
Saldo reprogramado:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.saldo_reprogramado)} | ||
</strong> | ||
</p> | ||
<p className="pt-1 mb-1"> | ||
Repasses no período:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.repasses_no_periodo)} | ||
</strong> | ||
</p> | ||
<p className="pt-1 mb-1"> | ||
Outras receitas:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR( | ||
acao.outras_receitas_no_periodo | ||
)} | ||
</strong> | ||
</p> | ||
<p className="pt-1 pb-1 mb-0"> | ||
Despesa declarada:{' '} | ||
<strong> | ||
{exibeValorFormatadoPT_BR(acao.despesas_no_periodo)} | ||
</strong> | ||
</p> | ||
{acao.acao_associacao_nome.trim() === 'PTRF' ? ( | ||
<p className="pt-1 pb-1 mb-0"> | ||
Próx. repasse a partir de:{' '} | ||
<strong> | ||
{exibeDataPT_BR( | ||
acoesAssociacao.data_prevista_repasse | ||
)} | ||
</strong> | ||
</p> | ||
) : null} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
)} | ||
))} | ||
</div> | ||
): | ||
!loading ? ( | ||
<> | ||
<MsgImgLadoDireito | ||
texto='A sua escola não possui ações ativas nesse período.' | ||
img={Img404} | ||
/> | ||
</> | ||
) : null | ||
) : | ||
|
||
<MsgImgLadoDireito | ||
texto="A sua escola não possui ações ativas nesse período." | ||
img={Img404} | ||
/> | ||
} | ||
<div className="d-flex justify-content-end pb-3 mt-5"> | ||
<p className="ultima-atualizacao">Última atualização: {exibeDateTimePT_BR(acoesAssociacao.ultima_atualizacao)}</p> | ||
<p className="ultima-atualizacao"> | ||
Última atualização:{' '} | ||
{exibeDateTimePT_BR(acoesAssociacao.ultima_atualizacao)} | ||
</p> | ||
</div> | ||
</> | ||
); | ||
} | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.