Set default landing page for counter role to Inventory
This commit is contained in:
@@ -261,7 +261,14 @@
|
||||
allowed.push(permMap[p]);
|
||||
}
|
||||
}
|
||||
fallback = allowed.length ? allowed[0] : '/pos/login';
|
||||
// Role-specific default landing pages.
|
||||
if (userRole === 'counter' && allowed.indexOf('/pos/inventory') !== -1) {
|
||||
fallback = '/pos/inventory';
|
||||
} else if (userRole === 'cashier' && allowed.indexOf('/pos/sale') !== -1) {
|
||||
fallback = '/pos/sale';
|
||||
} else {
|
||||
fallback = allowed.length ? allowed[0] : '/pos/login';
|
||||
}
|
||||
} else {
|
||||
fallback = '/pos/dashboard';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user