Hide Specialty sidebar group for desk specialists.
Deploy Ladill Care / deploy (push) Successful in 2m34s
Deploy Ladill Care / deploy (push) Successful in 2m34s
Single-desk specialists already reach their workspace via dashboard cards; the Specialty → Dentistry nav group was redundant. GPs and multi-module roles keep the section. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -180,6 +180,32 @@ class SpecialtyModuleService
|
||||
return $out;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the sidebar should show the Specialty nav group.
|
||||
*
|
||||
* Desk specialists only receive their own matching module(s), so a
|
||||
* Specialty → Dentistry (etc.) group is redundant — they use dashboard
|
||||
* cards / direct routes instead. GPs, nurses, and other multi-module
|
||||
* roles keep the group for referral and cross-module access.
|
||||
*/
|
||||
public function shouldShowSpecialtyNav(Organization $organization, ?Member $member): bool
|
||||
{
|
||||
if (! $member) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$modules = $this->enabledModulesForMember($organization, $member);
|
||||
if ($modules === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($this->isDeskSpecialist($organization, $member)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 'general'|'limited'|'restricted'
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user