-
@auth
@if (is_mec_role())
-
@endif
@endauth
{{-- -
--}}
@auth
@if (can('messages', 'list'))
-
0
@endif
-
-
0
@php
$activeRoleMemberships = [];
$activeRoleCurrent = null;
try {
if (auth()->check()) {
$activeRoleMemberships = app(\App\Services\PC\UserRoleMembershipService::class)->activeMembershipsFor(auth()->user());
$activeRoleCurrent = app(\App\Support\ActiveRoleContext::class)->membership();
}
} catch (\Throwable $e) {
$activeRoleMemberships = [];
}
@endphp
@if (count($activeRoleMemberships) > 0)
@php
$activeRoleLabel = role_display_name((string) ($activeRoleCurrent?->role?->name ?? $activeRoleMemberships[0]->role?->name ?? 'Role'));
$activeRoleDesig = trim((string) ($activeRoleCurrent?->designation?->name ?? ''));
$canSwitchRoles = count($activeRoleMemberships) > 1;
@endphp
-
Workspace
{{ $activeRoleLabel }}
@if ($canSwitchRoles)
@endif
@if ($canSwitchRoles)
@endif
@endif
-
@endauth
@guest
-
@endguest
{{-- -
-
--}}