65 lines
4.5 KiB
JavaScript
65 lines
4.5 KiB
JavaScript
/* ============================================================
|
|
routes.js — the 24-route information architecture.
|
|
|
|
This is the one artefact ADR 0013 says to preserve outright: the module
|
|
breakdown, nav grouping and screen inventory are a validated UX artefact
|
|
independent of the fake data behind them. Titles are verbatim from
|
|
js/app.js:7-16 and the group order is verbatim from index.html's sidebar.
|
|
|
|
`permission` gates the nav item and the route guard. See auth/permissions.js:
|
|
this is cosmetic — only /users/*, /roles/* and /permissions/* enforce
|
|
server-side. Routes with no matching backend module carry null and are open
|
|
to any signed-in user.
|
|
============================================================ */
|
|
|
|
export const NAV_GROUPS = ['Workspace', 'Recruiting', 'Hiring', 'Insights', 'System']
|
|
|
|
export const ROUTES = [
|
|
// --- Workspace ---
|
|
{ path: 'dashboard', title: 'Dashboard', icon: 'dashboard', group: 'Workspace', permission: 'dashboard.view' },
|
|
{ path: 'inbox', title: 'Recruitment Inbox', icon: 'inbox', group: 'Workspace', permission: 'inbox.view', badge: 'inbox' },
|
|
{ path: 'matching', title: 'Job Matching', icon: 'target', group: 'Workspace', permission: 'candidates.view', badge: 'matching', hidden: true },
|
|
{ path: 'jobs', title: 'Jobs', icon: 'briefcase', group: 'Workspace', permission: 'jobs.view', badge: 'jobs' },
|
|
{ path: 'candidates', title: 'Candidates', icon: 'users', group: 'Workspace', permission: 'candidates.view' },
|
|
// Replaces Talent Pool. That screen browsed candidate accounts over a seed
|
|
// overlay of invented skills and companies; /candidates already does the real
|
|
// version of that. This one holds the people we have no job for yet.
|
|
// No `badge`: the matching badge counts the unassigned queue and reusing the
|
|
// key here would make the same rows read as two separate counts.
|
|
{ path: 'cvbank', title: 'CV Bank', icon: 'talent', group: 'Workspace', permission: 'candidates.view' },
|
|
{ path: 'pipeline', title: 'Pipeline', icon: 'pipeline', group: 'Workspace', permission: 'pipeline.view' },
|
|
{ path: 'progress', title: 'Progress', icon: 'trending-up', group: 'Workspace', permission: 'jobs.view' },
|
|
|
|
// --- Recruiting ---
|
|
{ path: 'import', title: 'CV Import', icon: 'upload', group: 'Recruiting', permission: 'candidates.create' },
|
|
{ path: 'jobboard', title: 'Job Board', icon: 'layers', group: 'Recruiting', permission: 'job_board.view' },
|
|
{ path: 'recruiterhub', title: 'Recruiter Hub', icon: 'check-circle', group: 'Recruiting', permission: 'analytics.view' },
|
|
{ path: 'talent', title: 'Find Talent', icon: 'user-plus', group: 'Recruiting', permission: 'talent.view' },
|
|
{ path: 'tasks', title: 'Tasks', icon: 'check-square', group: 'Recruiting', permission: 'tasks.view', badge: 'tasks' },
|
|
{ path: 'aiassistant', title: 'AI Assistant', icon: 'sparkles', group: 'Recruiting', permission: null, tag: 'AI' },
|
|
|
|
// --- Hiring ---
|
|
{ path: 'interviews', title: 'Interviews', icon: 'calendar', group: 'Hiring', permission: 'interviews.view' },
|
|
{ path: 'requisitions', title: 'Requisitions', icon: 'file', group: 'Hiring', permission: 'requisitions.view' },
|
|
{ path: 'assessments', title: 'Assessments', icon: 'check-square', group: 'Hiring', permission: 'assessments.view' },
|
|
{ path: 'offers', title: 'Offers', icon: 'offers', group: 'Hiring', permission: 'offers.view' },
|
|
{ path: 'managers', title: 'Hiring Managers', icon: 'managers', group: 'Hiring', permission: 'jobs.view' },
|
|
{ path: 'departments', title: 'Departments', icon: 'layers', group: 'Hiring', permission: 'department.view', tag: 'NEW' },
|
|
{ path: 'calendar', title: 'Calendar', icon: 'calendar', group: 'Hiring', permission: 'interviews.view' },
|
|
|
|
// --- Insights ---
|
|
{ path: 'reports', title: 'Reports', icon: 'reports', group: 'Insights', permission: 'reports.view' },
|
|
{ path: 'analytics', title: 'Analytics', icon: 'analytics', group: 'Insights', permission: 'analytics.view' },
|
|
{ path: 'aistudio', title: 'AI Studio', icon: 'zap', group: 'Insights', permission: null },
|
|
{ path: 'notifications', title: 'Notifications', icon: 'bell', group: 'Insights', permission: null, badge: 'notifications' },
|
|
|
|
// --- System ---
|
|
{ path: 'rbac', title: 'Access Control', icon: 'shield', group: 'System', permission: 'rbac_users.view' },
|
|
{ path: 'settings', title: 'Settings', icon: 'settings', group: 'System', permission: 'settings.view' },
|
|
{ path: 'help', title: 'Help', icon: 'help', group: 'System', permission: null },
|
|
]
|
|
|
|
export const ROUTE_BY_PATH = Object.fromEntries(ROUTES.map((r) => [r.path, r]))
|
|
|
|
export const DEFAULT_ROUTE = 'dashboard'
|