From d177184a625f24c9b4043c4098e543b3efd00c84 Mon Sep 17 00:00:00 2001 From: Marcos Reifonas Date: Thu, 8 Oct 2026 07:32:15 -0300 Subject: [PATCH] fix(rotas): cadastrar alias /ordens-fabricacao e corrigir botao voltar no cadastro de pecas --- src/config/routeConfig.ts | 6 ++++++ src/pages/CadastroPecasFiltrado.tsx | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) 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() {