novas atualizações na exportacao planilha, tela de listar fechamento, filtros

This commit is contained in:
Vitex Tecnologia
2026-05-07 11:34:55 -03:00
parent 1c1e62c7db
commit 343aae602f
13 changed files with 228 additions and 88 deletions
+10 -4
View File
@@ -11,13 +11,18 @@ import React from "react";
import IntelligenceIAApp from "./modules/intelligence-ia/App";
import FechamentoHgtxApp from "./modules/fechamento-hgtx/App";
const INTELLIGENCE_SCORE_PREFIX = "/intelligence-score";
const FECHAMENTO_LEGACY_PREFIX = "/fechamento-hgtx";
const FECHAMENTO_PREFIX = "/fechamento";
/** Redireciona URLs antigas `/fechamento-hgtx/...` para `/fechamento/...` (mesmo sufixo, query e hash). */
/** Redireciona URLs antigas para `/intelligence-score/...` (mesmo sufixo, query e hash). */
function FechamentoLegacyRedirect() {
const location = useLocation();
const tail = location.pathname.slice(FECHAMENTO_LEGACY_PREFIX.length);
const to = `/fechamento${tail}`;
const fromPrefix = location.pathname.startsWith(FECHAMENTO_LEGACY_PREFIX)
? FECHAMENTO_LEGACY_PREFIX
: FECHAMENTO_PREFIX;
const tail = location.pathname.slice(fromPrefix.length);
const to = `${INTELLIGENCE_SCORE_PREFIX}${tail}`;
return <Navigate to={`${to}${location.search}${location.hash}`} replace />;
}
@@ -44,7 +49,8 @@ const App = () => (
/>
<Route path="/intelligence-ia/*" element={<IntelligenceIAApp />} />
<Route path="/fechamento/*" element={<FechamentoHgtxApp />} />
<Route path="/intelligence-score/*" element={<FechamentoHgtxApp />} />
<Route path="/fechamento/*" element={<FechamentoLegacyRedirect />} />
<Route path="/fechamento-hgtx/*" element={<FechamentoLegacyRedirect />} />
<Route path="/*" element={<Index />} />