service = $service; } public function mount(): void { $user = auth()->user(); // Using spatie/laravel-activitylog v5 to log dashboard access if ($user) { activity() ->causedBy($user) ->event("dashboard_access") ->log("User accessed their assigned services dashboard."); } // Show toast from OAuth redirect flash data if (session("entra_success")) { $this->success(session("entra_success")); } if (session("entra_error")) { $this->error(session("entra_error")); } if (session("keka_success")) { $this->success(session("keka_success")); } if (session("keka_error")) { $this->error(session("keka_error")); } } #[Computed] public function services(): Collection { $user = auth()->user(); if (!$user) { return collect(); } return $this->service->getActiveServices($user); } #[Computed] public function entraToken(): ?OauthToken { return auth()->user()?->oauthToken('microsoft'); } #[Computed] public function isEntraConnected(): bool { $token = $this->entraToken(); return $token !== null && !$token->isExpired(); } #[Computed] public function kekaToken(): ?OauthToken { return auth()->user()?->oauthToken('keka'); } #[Computed] public function isKekaConnected(): bool { $token = $this->kekaToken(); return $token !== null && !$token->isExpired(); } }; ?>

Manage and access your authenticated single sign-on services.

Active Account {{ now()->format('F j, Y') }}
@if($this->services->isEmpty())

No Active Services Assigned

Your account does not currently have any active or visible services assigned by your role, or your access duration has expired.

To request access to specific applications, please contact your system administrator or IT helpdesk with your account details
@else
@foreach($this->services as $service) @if($service->is_warning) Expiring Soon @else Active @endif
@if($service->protocol_name === 'url' && $service->provider_slug === 'azure-fd')
Microsoft Integration
@if($this->isEntraConnected)
@csrf @method('DELETE') @else @endif
@endif @if($service->protocol_name === 'url' && $service->provider_slug === 'keka-hr')
Keka Integration
@if($this->isKekaConnected)
@csrf @method('DELETE') @else @endif
@endif
{{ Illuminate\Support\Carbon::parse($service->duration)->diffForHumans() }}
@if($service->is_warning) @endif
@endforeach
@endif