@extends('layouts.app') @section('title', $person->display_name) @section('content')

{{ $person->display_name }}

{{ $person->email }} · {{ $person->inventory?->name }} @if($person->exit_date && $person->exit_date->isPast()) Ausgetreten am {{ $person->exit_date->format('d.m.Y') }} @endif
@can('editContent', $person->inventory) Bearbeiten @endcan Zur Liste

Stammdaten

Vorname / Nachname
{{ $person->first_name }} {{ $person->last_name }}
E-Mail
{{ $person->email ?? '–' }}
M365-Benutzername
{{ $person->m365_username ?? '–' }}
AD-Benutzername
{{ $person->ad_username ?? '–' }}
Entra Object ID
{{ $person->entra_object_id ?? '–' }}
Standort / Land
{{ $person->location ?? '–' }} / {{ $person->country ?? '–' }}
Abteilung
{{ $person->department ?? '–' }}
Kostenstelle
{{ $person->cost_center ?? '–' }}
Eintritt / Austritt
{{ $person->entry_date?->format('d.m.Y') ?? '–' }} / {{ $person->exit_date?->format('d.m.Y') ?? '–' }}
Status
{{ $person->is_active ? 'Aktiv' : 'Inaktiv' }}
@if($person->notes)
Notizen
{!! nl2br(e($person->notes)) !!}
@endif

Zugewiesene Hardware {{ $person->assets->count() }}

@if($person->assets->isEmpty())

Keine Geräte zugewiesen.

@else
@foreach($person->assets as $asset) @endforeach
GerätKategorieStatus
{{ $asset->hostname ?: $asset->model ?: $asset->asset_code }} {{ $asset->category?->name }} {{ $asset->statusLabel() }}
@endif

Berechtigungen {{ $person->accessAssignments->where('status', 'active')->count() }}

@if($person->accessAssignments->isEmpty())

Keine Berechtigungen erfasst.

@else
@foreach($person->accessAssignments->sortBy(fn ($a) => $a->resource?->name) as $assignment) @endforeach
RessourceStatusGültig
{{ $assignment->resource?->name }} {{ $assignment->resource?->categoryLabel() }} {{ $assignment->statusLabel() }} {{ $assignment->valid_from?->format('d.m.Y') }} – {{ $assignment->valid_until?->format('d.m.Y') ?? 'offen' }}
@endif

Lizenzen {{ $person->licenseAssignments->count() }}

@if($person->licenseAssignments->isEmpty())

Keine Lizenzen zugewiesen.

@else
@foreach($person->licenseAssignments as $assignment) @endforeach
LizenzZugewiesen am
{{ $assignment->license?->name }} {{ $assignment->assigned_at?->format('d.m.Y') }}
@endif
@endsection