feature/IO-3255-simplified-parts-management - Bug Fixes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user