{{-- Vermieter-Dashboard --}}
{{-- Statistik-Boxen --}}
@php $propertyCount = \App\Models\Property::where('user_id', auth()->id())->count(); $unitCount = \App\Models\Unit::whereHas('property', fn($q) => $q->where('user_id', auth()->id()))->count(); $tenantCount = \App\Models\Tenant::where('user_id', auth()->id())->count(); $totalRent = \App\Models\Contract::whereHas('tenant', fn($q) => $q->where('user_id', auth()->id()))->where('status', 'aktiv')->sum('rent_amount'); $offeneSumme = \App\Models\Payment::where('user_id', auth()->id())->whereIn('status', ['offen', 'überfällig'])->sum('amount'); @endphp

Immobilien

{{ $propertyCount }}

Einheiten

{{ $unitCount }}

Mieter

{{ $tenantCount }}

Offene Zahlungen

{{ number_format($offeneSumme, 0, ',', '.') }} €

{{-- Immobilien-Tabelle --}}

Deine Immobilien

@php $properties = \App\Models\Property::where('user_id', auth()->id())->latest()->get(); @endphp @if($properties->isEmpty())

Noch keine Immobilien.

@else
@foreach($properties as $property) @endforeach
Name Typ Adresse Einheiten Baujahr
{{ $property->name }} {{ ucfirst($property->type) }} {{ $property->street }} {{ $property->house_number }}, {{ $property->postal_code }} {{ $property->city }} {{ $property->units->count() }} {{ $property->construction_year ?? '-' }}
@endif
{{-- Charts Reihe 1 --}}

Einheiten-Status

Immobilien-Typen

{{-- Charts Reihe 2 --}}

Zahlungsübersicht

Mieteinnahmen (6 Monate)