diff --git a/src/config/routeConfig.ts b/src/config/routeConfig.ts index 3ab0d0e..5ddaab7 100644 --- a/src/config/routeConfig.ts +++ b/src/config/routeConfig.ts @@ -118,6 +118,12 @@ export const routeConfig: RouteDefinition[] = [ guard: 'resource', resourceKey: 'ofs-lista', }, + { + path: '/ordens-fabricacao', + component: () => import('@/pages/OrdensFabricacao'), + guard: 'resource', + resourceKey: 'ofs-lista', + }, { path: '/ofs/cronograma', component: () => import('@/pages/CronogramaOF'), diff --git a/src/pages/CadastroPecasFiltrado.tsx b/src/pages/CadastroPecasFiltrado.tsx index 04af55b..a8520fc 100644 --- a/src/pages/CadastroPecasFiltrado.tsx +++ b/src/pages/CadastroPecasFiltrado.tsx @@ -193,6 +193,14 @@ export default function CadastroPecasFiltrado() { ); } + const handleVoltar = () => { + if (window.history.state && window.history.state.idx > 0) { + navigate(-1); + } else { + navigate('/seletor-of'); + } + }; + if (!ofSelecionada) { return null; } @@ -206,7 +214,7 @@ export default function CadastroPecasFiltrado() {