Skip to content

Commit

Permalink
Merge pull request #2437 from prefeiturasp/fix/122300-extracao-limpez…
Browse files Browse the repository at this point in the history
…a-filtro-datas

fix(122300): Corrige evento de limpeza do período de extração de dados
  • Loading branch information
alcfernandes authored Jun 7, 2024
2 parents a7c6e87 + 542cbff commit ce286c7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/componentes/Globais/ExtracaoDados/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ExtracaoDados = (props) => {

async function handleExportaDados(endpoint) {
try {

console.log(`Exportando ${endpoint} ${dataInicial} ${dataFinal}`)
await getExportaCreditos(endpoint, dataInicial, dataFinal, isSME ? '' : dre_uuid)
toastCustom.ToastCustomSuccess('Geração solicitada com sucesso.', 'A geração foi solicitada. Em breve você receberá um aviso na central de downloads com o resultado.')
}
Expand Down Expand Up @@ -60,6 +60,12 @@ export const ExtracaoDados = (props) => {
onOpenChange={(open) => {
setIsCalendarOpen(open);
}}
onChange={(dates) => {
console.log(dates?.[0] ? dates[0].format('YYYY-MM-DD'): 'Vazio')
console.log(dates?.[1] ? dates[1].format('YYYY-MM-DD'): 'Vazio')
setDataInicial(dates?.[0] ? dates[0].format('YYYY-MM-DD'): '')
setDataFinal(dates?.[1] ? dates[1].format('YYYY-MM-DD'): '')
}}
/>
{
dataInicial && dataFinal ?
Expand Down

0 comments on commit ce286c7

Please sign in to comment.