From c30c1b16539cb7f133433a8aa224fb639de279b4 Mon Sep 17 00:00:00 2001 From: HotSwapp <47397945+HotSwapp@users.noreply.github.com> Date: Sun, 21 Sep 2025 21:01:26 -0500 Subject: [PATCH] fix: Update all navigation links to point to new admin import system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROBLEM FIXED: - Main menu "Import" was still pointing to old unified-import system - Dashboard quick actions pointed to broken import routes - Keyboard shortcut Alt+I was routing to old system NAVIGATION UPDATES: ✅ Desktop/Mobile nav menu: /import → /admin/import ✅ Dashboard quick action button: /import → /admin/import ✅ Dashboard "Open Import" link: /import → /admin/import ✅ Keyboard shortcut Alt+I: /import → /admin/import ✅ Support modal page mapping: /import → /admin/import ✅ Base template page names: /import → /admin/import ADMIN PERMISSIONS: - Import menu items now properly hidden by default - Shown only to admin users via JavaScript permission check - Maintains security for admin-only functionality REMOVED REFERENCES: - All /flexible route references (old flexible import system) - Cleaned up navigation menu from removed functionality NOW WORKING: - Clicking "Import" in main menu → new /admin/import interface - Alt+I keyboard shortcut → new /admin/import interface - Dashboard import button → new /admin/import interface - All navigation properly secured for admin users only 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- static/js/keyboard-shortcuts.js | 2 +- static/js/main.js | 6 +++++- templates/base.html | 11 +++++------ templates/dashboard.html | 4 ++-- templates/support_modal.html | 2 +- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/static/js/keyboard-shortcuts.js b/static/js/keyboard-shortcuts.js index cf61a1f..3f9a1c4 100644 --- a/static/js/keyboard-shortcuts.js +++ b/static/js/keyboard-shortcuts.js @@ -57,7 +57,7 @@ function handleKeyboardShortcuts(event) { break; case 'Alt+I': event.preventDefault(); - navigateTo('/import'); + navigateTo('/admin/import'); break; case 'Alt+A': event.preventDefault(); diff --git a/static/js/main.js b/static/js/main.js index 0e10f71..4f6e284 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -475,7 +475,11 @@ async function checkUserPermissions() { const adminDivider = document.getElementById('admin-menu-divider'); if (adminItem) adminItem.classList.remove('hidden'); if (adminDivider) adminDivider.classList.remove('hidden'); - // Import navigation items removed + // Show import menu for admins + const importDesktop = document.getElementById('nav-import-desktop'); + const importMobile = document.getElementById('nav-import-mobile'); + if (importDesktop) importDesktop.classList.remove('hidden'); + if (importMobile) importMobile.classList.remove('hidden'); } const userDropdownName = document.querySelector('#userDropdown button span'); if (user.full_name && userDropdownName) { diff --git a/templates/base.html b/templates/base.html index e04d3b9..c87cfe8 100644 --- a/templates/base.html +++ b/templates/base.html @@ -55,11 +55,11 @@ Search - - @@ -129,11 +129,11 @@ Search - - @@ -433,10 +433,9 @@ '/files': 'File Cabinet', '/financial': 'Financial/Ledger', '/documents': 'Document Management', - '/import': 'Data Import', + '/admin/import': 'Data Import', '/search': 'Advanced Search', '/admin': 'System Administration', - '/flexible': 'Flexible Imports' }; const currentPage = pageNames[path] || `Page: ${path}`; diff --git a/templates/dashboard.html b/templates/dashboard.html index 5e60b69..4f9e51c 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -129,7 +129,7 @@ Global Search Ctrl+F -