feature/IO-3255-simplified-parts-management - Bug Fixes

This commit is contained in:
Dave
2025-08-15 13:07:32 -04:00
parent 73e103f2df
commit 5e90504e56
2 changed files with 18 additions and 11 deletions

View File

@@ -134,7 +134,8 @@ export function Manage({ conflict, bodyshop, partsManagementOnly }) {
});
}, [t]);
if (partsManagementOnly) {
// This is a required safety check to prevent parts management only users from accessing /manage based routes
if (partsManagementOnly && !import.meta.env.DEV) {
// This NEEDS to be done this way, DO NOT use the react router, it will cause a ton of side effects
window.location = "/parts";
return null; // Prevent further rendering