Skip to content

feat: add role-based details navigation#183

Merged
mbeernut merged 14 commits intomainfrom
feat/MPT-18042-role-based-access-to-object-views
Feb 24, 2026
Merged

feat: add role-based details navigation#183
mbeernut merged 14 commits intomainfrom
feat/MPT-18042-role-based-access-to-object-views

Conversation

@mbeernut
Copy link
Contributor

@mbeernut mbeernut commented Feb 23, 2026

disabled Items with icon:
image

@mbeernut mbeernut marked this pull request as draft February 23, 2026 13:09
@mbeernut mbeernut marked this pull request as ready for review February 23, 2026 13:24
@GitchalWoo
Copy link
Collaborator

Consider a configuration-driven approach, for example:

TSX
// navigationPermissions.ts
const navigationPermissions: Record<string, (accountType: string) => boolean> = {
vendorDetails: (type) => type === 'Operations',
clientDetails: (type) => type !== 'Vendor',
sellerDetails: (type) => type !== 'Vendor',
buyerDetails: (type) => type !== 'Vendor',
};

export const canNavigateTo = (target: string, accountType: string): boolean => {
return navigationPermissions[target]?.(accountType) ?? true;
};

WHile implementing this by copy paste hiding, we might get into a problem later on. On the other hand I am not sure we are styling it correctly with disabled state or it should be a different rendering way of an item without a link

Copy link
Collaborator

@GitchalWoo GitchalWoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small check?

@mbeernut mbeernut merged commit b184a7a into main Feb 24, 2026
4 checks passed
@mbeernut mbeernut deleted the feat/MPT-18042-role-based-access-to-object-views branch February 24, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants