novas atualizações na exportacao planilha, tela de listar fechamento, filtros
This commit is contained in:
+10
-4
@@ -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 />} />
|
||||
|
||||
Reference in New Issue
Block a user