refactor: consolidate export detail into drawing detail page

Remove the duplicate export detail page and route exports list
directly to drawing detail. When navigating from exports, the
specific export's BOM items are shown via eid param; from drawings,
items are deduplicated to the latest revision. Add Rev column,
PDF download, and All DXFs download to drawing detail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-19 17:26:43 -05:00
parent 036ab2a55a
commit 53aa23f762
2 changed files with 52 additions and 95 deletions

View File

@@ -1,6 +1,9 @@
const router = {
go(page, params = {}) {
const hash = page + (params.id ? '/' + params.id : '') + (params.q ? '?q=' + encodeURIComponent(params.q) : '');
const qParts = [];
if (params.q) qParts.push('q=' + encodeURIComponent(params.q));
if (params.eid) qParts.push('eid=' + encodeURIComponent(params.eid));
const hash = page + (params.id ? '/' + params.id : '') + (qParts.length ? '?' + qParts.join('&') : '');
location.hash = hash;
},
parse() {
@@ -20,12 +23,10 @@ const router = {
document.querySelectorAll('.nav-item').forEach(el => {
el.classList.toggle('active',
el.dataset.page === page ||
(page === 'export-detail' && el.dataset.page === 'exports') ||
(page === 'drawing-detail' && el.dataset.page === 'drawings'));
});
switch(page) {
case 'exports': pages.exports(params); break;
case 'export-detail': pages.exportDetail(id); break;
case 'drawings': pages.drawings(params); break;
case 'drawing-detail': pages.drawingDetail(id, params); break;
case 'files': pages.files(params); break;