feat: Adicionar base de relatorios EM#18
Conversation
Co-authored-by: L00W1 <L00W1@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 057ac3d7c1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const otherItems = [ | ||
| { path: '/multiphase', label: 'Multi-Fase', icon: ChartBarIcon, color: 'text-gray-400' }, | ||
| { path: '/panel', label: 'Painel', icon: Squares2X2Icon, color: 'text-gray-400' }, | ||
| { path: '/em-reports', label: 'Eletromecânico', icon: DocumentTextIcon, color: 'text-gray-400' }, |
There was a problem hiding this comment.
Point EM nav item to an existing route
The new sidebar entry navigates to /em-reports, but the router only registers the EM list at /em in src/App.tsx (no /em-reports route exists). In practice, clicking "Eletromecânico" from the menu sends users to an unmatched URL instead of the page introduced in this commit, making the feature inaccessible through normal navigation.
Useful? React with 👍 / 👎.
| </div> | ||
| <div className="flex items-center gap-1 flex-shrink-0 ml-3"> | ||
| <Link | ||
| to={`/em/report/${r.id}`} |
There was a problem hiding this comment.
Avoid linking EM rows to an undefined detail page
Each row's "Ver" action links to /em/report/${r.id}, but there is no matching <Route> for that path (only /em and /report/:type/:id are defined). This means every click on the eye icon leads to a missing route, so users cannot view report details from the new EM list.
Useful? React with 👍 / 👎.
O que foi feito
EletroMecanicoReport(meta padronizada + módulo).src/em/para converter relatórios atuais para o formato EM.emReportsno Dexie com migraçãoversion(5)e helpers emdbUtils.src/utils/export-template/com overlay por coordenadas viapdf-lib(depende do PDF base ser fornecido).Relatórios EM(/em/reports) e item no menu.GenerateReport, também salva a versão EM (não bloqueante).Como testar
pnpm devRelatórios EMe validar que o relatório aparecePróximo passo