• @auth @if (is_mec_role())
  • Sindh Integrated M&E System (SIMS)

  • @endif @endauth
    {{--
  • --}}
  • @include('partials.partner-logos-panel', ['variant' => 'header'])
  • @auth @if (can('messages', 'list'))
  • 0
  • @endif
  • User Avatar

    Brad Diesel

    Call me whenever you can...

    4 Hours Ago

    User Avatar

    John Pierce

    I got your message bro

    4 Hours Ago

    User Avatar

    Nora Silvester

    The subject goes here

    4 Hours Ago

    See All Messages
  • 0
    Notifications
    View all notifications
  • @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)
    Switch workspace
    @foreach ($activeRoleMemberships as $membership) @php $isCurrent = $activeRoleCurrent && (int) $activeRoleCurrent->id === (int) $membership->id; $label = role_display_name((string) ($membership->role?->name ?? 'Role')); $desig = trim((string) ($membership->designation?->name ?? '')); $scope = method_exists($membership, 'scopePayload') ? $membership->scopePayload() : []; $scopeHint = ''; if (method_exists($membership, 'isMec') && $membership->isMec()) { $r = count($scope['mec_region_ids'] ?? []); $s = count($scope['sector_ids'] ?? []); $bits = []; if ($r > 0) { $bits[] = $r.' region'.($r === 1 ? '' : 's'); } if ($s > 0) { $bits[] = $s.' sector'.($s === 1 ? '' : 's'); } $scopeHint = implode(' · ', $bits); } elseif (method_exists($membership, 'isPnd') && $membership->isPnd() && $membership->section) { $scopeHint = (string) $membership->section->name; } else { $d = count($scope['department_ids'] ?? []); if ($d > 0) { $scopeHint = $d.' department'.($d === 1 ? '' : 's'); } } @endphp @if ($isCurrent)
    {{ $label }} @if ($desig !== '') {{ $desig }} @endif @if ($scopeHint !== '') {{ $scopeHint }} @endif Active
    @else
    @csrf
    @endif @endforeach
    Open full role picker
    @endif
  • @endif
  • @endauth @guest
  • @endguest {{--
  • --}}