-
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
39 changed files
with
1,699 additions
and
276 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
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
183 changes: 109 additions & 74 deletions
183
src/componentes/Despesas/CadastroDeDespesas/CadastroForm.js
Large diffs are not rendered by default.
Oops, something went wrong.
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
28 changes: 28 additions & 0 deletions
28
src/componentes/GeracaoDaAta/BoxPrestacaoDeContasPorPeriodo/index.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,28 @@ | ||
import React from "react"; | ||
import "../geracao-da-ata.scss" | ||
|
||
export const BoxPrestacaoDeContasPorPeriodo = ({corBoxPrestacaoDeContasPorPeriodo, textoBoxPrestacaoDeContasPorPeriodo, dataBoxPrestacaoDeContasPorPeriodo}) => { | ||
|
||
const onClickVisualizarAta = () =>{ | ||
window.location.assign('/visualizacao-da-ata') | ||
} | ||
|
||
return ( | ||
<div className="row mt-5"> | ||
<div className="col-12"> | ||
<h1 className="titulo-box-prestacao-de-contas-por-periodo">Ata de apresentação da prestação de contas por período</h1> | ||
<div className="col-12"> | ||
<div className="row mt-3 border pt-4 pb-4"> | ||
<div className="col-12 col-md-8"> | ||
<p className='fonte-14 mb-1'><strong>{textoBoxPrestacaoDeContasPorPeriodo}</strong></p> | ||
<p className={`fonte-12 mb-1 status-data-${corBoxPrestacaoDeContasPorPeriodo}`}>{dataBoxPrestacaoDeContasPorPeriodo}</p> | ||
</div> | ||
<div className="col-12 col-md-4 align-self-center"> | ||
<button onClick={onClickVisualizarAta} type="button" className="btn btn-success float-right">Visualizar ata</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
}; |
78 changes: 78 additions & 0 deletions
78
src/componentes/GeracaoDaAta/VisualizacaoDaAta/TabelaDinamica/index.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,78 @@ | ||
import React from "react"; | ||
import {TextoDespesas} from "../TextoDespesas"; | ||
|
||
export const TabelaDinamica = ({infoAta, valorTemplate})=> { | ||
return( | ||
<> | ||
{infoAta.acoes && infoAta.acoes.length > 0 && infoAta.acoes.map((info)=>( | ||
<div key={info.acao_associacao_uuid}> | ||
<p className='titulo-tabela-acoes mt-5'> | ||
{info.acao_associacao_nome} | ||
</p> | ||
<table className="table table-bordered tabela-acoes"> | ||
<thead> | ||
<tr className="tr-titulo"> | ||
<th scope="col"> </th> | ||
<th scope="col">Custeio (R$)</th> | ||
<th scope="col">Capital (R$)</th> | ||
<th scope="col">Total (R$) </th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Saldo anterior</td> | ||
<td>{valorTemplate(info.saldo_reprogramado_custeio)}</td> | ||
<td>{valorTemplate(info.saldo_reprogramado_capital)}</td> | ||
<td>{valorTemplate(info.saldo_reprogramado)}</td> | ||
</tr> | ||
<tr> | ||
<td>Recebimento</td> | ||
<td>{valorTemplate(info.repasses_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(info.repasses_no_periodo_capital)}</td> | ||
<td>{valorTemplate(info.repasses_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Demais créditos (rendimento e outros)</td> | ||
<td>{valorTemplate(info.outras_receitas_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(info.outras_receitas_no_periodo_capital)}</td> | ||
<td>{valorTemplate(info.outras_receitas_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Despesas</td> | ||
<td>{valorTemplate(info.despesas_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(info.despesas_no_periodo_capital)}</td> | ||
<td>{valorTemplate(info.despesas_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Saldo atual</td> | ||
<td>{valorTemplate(info.saldo_atual_custeio)}</td> | ||
<td>{valorTemplate(info.saldo_atual_capital)}</td> | ||
<td>{valorTemplate(info.saldo_atual_total)}</td> | ||
</tr> | ||
<tr> | ||
<td>Pagamentos a compensar</td> | ||
<td>{valorTemplate(info.despesas_nao_conciliadas_custeio)}</td> | ||
<td>{valorTemplate(info.despesas_nao_conciliadas_capital)}</td> | ||
<td>{valorTemplate(info.despesas_nao_conciliadas)}</td> | ||
</tr> | ||
<tr> | ||
<td>Crédito não demonstrado</td> | ||
<td>{valorTemplate(info.receitas_nao_conciliadas_custeio)}</td> | ||
<td>{valorTemplate(info.receitas_nao_conciliadas_capital)}</td> | ||
<td>{valorTemplate(info.receitas_nao_conciliadas)}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<TextoDespesas | ||
especificaoesDespesaCusteio={info.especificacoes_despesas_custeio} | ||
especificaoesDespesaCapital={info.especificacoes_despesas_capital} | ||
despesasPeriodoCusteio={info.despesas_no_periodo_custeio} | ||
despesasPeriodoCapital={info.despesas_no_periodo_capital} | ||
valorTemplate={valorTemplate} | ||
/> | ||
</div> | ||
))} | ||
|
||
</> | ||
) | ||
} |
69 changes: 69 additions & 0 deletions
69
src/componentes/GeracaoDaAta/VisualizacaoDaAta/TabelaTotais/index.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,69 @@ | ||
import React from "react"; | ||
|
||
export const TabelaTotais = ({infoAta, valorTemplate}) => { | ||
return ( | ||
<> | ||
{infoAta.totais && Object.entries(infoAta.totais).length > 0 && | ||
<> | ||
<p className='titulo-tabela-acoes mt-5'> | ||
Totais | ||
</p> | ||
<table className="table table-bordered tabela-totais"> | ||
<thead> | ||
<tr className="tr-titulo"> | ||
<th scope="col"> </th> | ||
<th scope="col">Custeio (R$)</th> | ||
<th scope="col">Capital (R$)</th> | ||
<th scope="col">Total (R$)</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>Saldo anterior</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_reprogramado_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_reprogramado_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_reprogramado)}</td> | ||
</tr> | ||
<tr> | ||
<td>Recebimento</td> | ||
<td>{valorTemplate(infoAta.totais.repasses_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.repasses_no_periodo_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.repasses_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Demais créditos (rendimento e outros)</td> | ||
<td>{valorTemplate(infoAta.totais.outras_receitas_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.outras_receitas_no_periodo_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.outras_receitas_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Despesas</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_no_periodo_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_no_periodo_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_no_periodo)}</td> | ||
</tr> | ||
<tr> | ||
<td>Saldo atual</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_atual_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_atual_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.saldo_atual_total)}</td> | ||
</tr> | ||
<tr> | ||
<td>Pagamentos a compensar</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_nao_conciliadas_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_nao_conciliadas_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.despesas_nao_conciliadas)}</td> | ||
</tr> | ||
<tr> | ||
<td>Crédito não demonstrado</td> | ||
<td>{valorTemplate(infoAta.totais.receitas_nao_conciliadas_custeio)}</td> | ||
<td>{valorTemplate(infoAta.totais.receitas_nao_conciliadas_capital)}</td> | ||
<td>{valorTemplate(infoAta.totais.receitas_nao_conciliadas)}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</> | ||
} | ||
</> | ||
) | ||
}; |
59 changes: 59 additions & 0 deletions
59
src/componentes/GeracaoDaAta/VisualizacaoDaAta/TextoDespesas/index.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,59 @@ | ||
import React from "react"; | ||
|
||
export const TextoDespesas = ({especificaoesDespesaCusteio, especificaoesDespesaCapital, despesasPeriodoCusteio, despesasPeriodoCapital, valorTemplate}) => { | ||
|
||
const divideArrayColunas = (array, cols) => { | ||
|
||
let indexAtual = 0; | ||
|
||
let ret = []; | ||
if (cols == 1 || array.length <= 5) { | ||
ret.push(array); | ||
} else { | ||
let size = Math.ceil(array.length / cols); | ||
for (let i = 0; i < cols; i++) { | ||
let start = i * size; | ||
ret.push(array.slice(start, start + size)); | ||
} | ||
} | ||
|
||
return ret.map((item, index) => { | ||
return ( | ||
<div key={index} className='col-3'> | ||
{item.map((textoDespesa, textoDespesaIndex) => { | ||
indexAtual = indexAtual + 1; | ||
return ( | ||
<p key={textoDespesaIndex} className="mb-0">{indexAtual}-{textoDespesa}</p> | ||
) | ||
})} | ||
</div> | ||
); | ||
}) | ||
} | ||
|
||
return ( | ||
<> | ||
{especificaoesDespesaCusteio && especificaoesDespesaCusteio.length > 0 ? ( | ||
<div className="mt-3 mb-3"> | ||
<p className="texto-despesas-titulo">Despesas de custeio: <span className="texto-despesas-valor">R${valorTemplate(despesasPeriodoCusteio)}</span></p> | ||
<div id='contem' className='row'> | ||
{divideArrayColunas(especificaoesDespesaCusteio, 3)} | ||
</div> | ||
</div> | ||
) : | ||
<p className="texto-despesas-titulo">Despesas de custeio: <span className='font-weight-normal'>Não foram realizadas despesas de Custeio no período.</span></p> | ||
} | ||
|
||
{especificaoesDespesaCapital && especificaoesDespesaCapital.length > 0 ? ( | ||
<> | ||
<p className="texto-despesas-titulo">Despesas de capital: <span className="texto-despesas-valor">R${valorTemplate(despesasPeriodoCapital)}</span></p> | ||
<div id='contem' className='row'> | ||
{divideArrayColunas(especificaoesDespesaCapital, 3)} | ||
</div> | ||
</> | ||
) : | ||
<p className="texto-despesas-titulo">Despesas de capital: <span className='font-weight-normal'>Não foram realizadas despesas de Capital no período. </span></p> | ||
} | ||
</> | ||
) | ||
} |
Oops, something went wrong.