fix: update navigation role names to match Prisma schema (STAFF/GROWER vs WORKER/CULTIVATOR)
This commit is contained in:
parent
ac50b7a9d9
commit
4506e17e49
1 changed files with 6 additions and 6 deletions
|
|
@ -24,10 +24,10 @@ import {
|
|||
* Navigation configuration with RBAC support
|
||||
*/
|
||||
|
||||
export type UserRole = 'VIEWER' | 'WORKER' | 'CULTIVATOR' | 'MANAGER' | 'ADMIN' | 'OWNER';
|
||||
export type UserRole = 'VIEWER' | 'STAFF' | 'GROWER' | 'MANAGER' | 'ADMIN' | 'OWNER';
|
||||
|
||||
// Role hierarchy for permission checking (higher index = more access)
|
||||
const ROLE_HIERARCHY: UserRole[] = ['VIEWER', 'WORKER', 'CULTIVATOR', 'MANAGER', 'ADMIN', 'OWNER'];
|
||||
const ROLE_HIERARCHY: UserRole[] = ['VIEWER', 'STAFF', 'GROWER', 'MANAGER', 'ADMIN', 'OWNER'];
|
||||
|
||||
export interface NavItem {
|
||||
id: string;
|
||||
|
|
@ -82,13 +82,13 @@ export const NAV_SECTIONS: NavSection[] = [
|
|||
{ id: 'rooms', label: 'Rooms', path: '/rooms', icon: Home },
|
||||
{ id: 'batches', label: 'Batches', path: '/batches', icon: Sprout },
|
||||
{ id: 'ipm', label: 'IPM Dashboard', shortLabel: 'IPM', path: '/ipm', icon: Shield },
|
||||
{ id: 'environment', label: 'Environment', path: '/environment', icon: Thermometer, minRole: 'WORKER' },
|
||||
{ id: 'environment', label: 'Environment', path: '/environment', icon: Thermometer, minRole: 'STAFF' },
|
||||
]
|
||||
},
|
||||
{
|
||||
id: 'inventory',
|
||||
label: 'Inventory',
|
||||
minRole: 'WORKER',
|
||||
minRole: 'STAFF',
|
||||
items: [
|
||||
{ id: 'supplies', label: 'Supplies', path: '/supplies', icon: Package },
|
||||
]
|
||||
|
|
@ -96,7 +96,7 @@ export const NAV_SECTIONS: NavSection[] = [
|
|||
{
|
||||
id: 'workforce',
|
||||
label: 'Workforce',
|
||||
minRole: 'WORKER',
|
||||
minRole: 'STAFF',
|
||||
items: [
|
||||
{ id: 'timeclock', label: 'Time Clock', path: '/timeclock', icon: Clock },
|
||||
]
|
||||
|
|
@ -112,7 +112,7 @@ export const NAV_SECTIONS: NavSection[] = [
|
|||
{
|
||||
id: 'analytics',
|
||||
label: 'Analytics',
|
||||
minRole: 'WORKER',
|
||||
minRole: 'STAFF',
|
||||
items: [
|
||||
{ id: 'reports', label: 'Reports', path: '/reports', icon: BarChart3 },
|
||||
{ id: 'financial', label: 'Financial', path: '/financial', icon: DollarSign, minRole: 'MANAGER' },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue