'use client' type Access = 'full' | 'partial' | 'none' interface Feature { label: string manager: Access managerNote?: string agent: Access agentNote?: string } const FEATURES: Feature[] = [ { label: 'View fleet & vehicles', manager: 'full', agent: 'full' }, { label: 'Add / edit vehicles', manager: 'full', agent: 'none' }, { label: 'Publish / unpublish vehicle', manager: 'full', agent: 'none' }, { label: 'Upload vehicle photos', manager: 'full', agent: 'none' }, { label: 'View reservations', manager: 'full', agent: 'full' }, { label: 'Create reservations', manager: 'full', agent: 'full' }, { label: 'Cancel reservations', manager: 'full', agent: 'partial', agentNote: 'Own only' }, { label: 'Check-in / check-out', manager: 'full', agent: 'full' }, { label: 'Damage inspection', manager: 'full', agent: 'full' }, { label: 'Customer CRM — view', manager: 'full', agent: 'full' }, { label: 'Customer CRM — edit', manager: 'full', agent: 'partial', agentNote: 'Notes only' }, { label: 'Approve driver licenses', manager: 'full', agent: 'none' }, { label: 'Flag / blacklist customer', manager: 'full', agent: 'none' }, { label: 'Offers & promotions', manager: 'full', agent: 'none' }, { label: 'Analytics & reports', manager: 'full', agent: 'none' }, { label: 'Contract & invoice PDF', manager: 'full', agent: 'full' }, { label: 'Billing & subscription', manager: 'none', agent: 'none' }, { label: 'Invite / remove staff', manager: 'none', agent: 'none' }, { label: 'Brand & site settings', manager: 'none', agent: 'none' }, { label: 'Payment settings', manager: 'none', agent: 'none' }, ] function AccessCell({ access, note }: { access: Access; note?: string }) { if (access === 'full') { return (
Full
) } if (access === 'partial') { return (
{note ?? 'Limited'}
) } return (
No access
) } export default function PermissionsMatrix() { return (

Role permissions

What each role can do across the dashboard. Owners have full access to everything.

{/* Header */}
Feature
Manager
Agent
{/* Rows */} {FEATURES.map((feature, i) => (
{feature.label}
))}
) }