@extends('layouts.dashboard') @section('title', __('messages.dashboard')) @section('header', __('messages.dashboard')) @section('sidebar') @include('company-admin.partials.sidebar') @endsection @section('content')
{{ __('messages.properties') }}

Property Portfolio

{{ $totalProperties ?? 0 }}

{{ $availableProperties ?? 0 }} available for rent

{{ __('messages.tenants') }}

Registered Tenants

{{ $totalTenants ?? 0 }}

active tenant accounts

{{ __('messages.active_leases') }}

Active Lease Agreements

{{ $activeLeases ?? 0 }}

@if(isset($overdueLeases) && $overdueLeases > 0)

{{ $overdueLeases }} requiring attention

@else

all leases current

@endif
{{ __('messages.revenue') }}

Total Revenue Generated

{{ number_format($totalRevenue ?? 0, 0) }}

TZS @if(isset($pendingPayments) && $pendingPayments > 0){{ number_format($pendingPayments, 0) }} pending@endif

Total

Property Viewing Requests

{{ $totalBookings ?? 0 }}

{{ $pendingBookings ?? 0 }} awaiting approval

Active

Active Rental Agreements

{{ $activeContracts ?? 0 }}

out of {{ $totalContracts ?? 0 }} total contracts

Pending

Unpaid Invoices

{{ $pendingInvoices ?? 0 }}

{{ $overdueInvoices ?? 0 }} past due date

Issued

Payment Receipts Issued

{{ $totalReceipts ?? 0 }}

official receipts generated

@if(isset($monthlyRevenue) && count($monthlyRevenue) > 0)

Revenue Performance (Last 6 Months)

@foreach($monthlyRevenue as $month)
{{ $month['month'] }} {{ number_format($month['revenue'], 0) }} TZS
@php $maxRevenue = collect($monthlyRevenue)->max('revenue'); $percentage = $maxRevenue > 0 ? ($month['revenue'] / $maxRevenue) * 100 : 0; @endphp
@endforeach
@endif

Recently Added Properties

@forelse($recentProperties ?? [] as $property)

{{ $property->title }}

{{ __('messages.' . $property->type) }} - {{ $property->city }}

{{ __('messages.' . $property->status) }}
@empty

{{ __('messages.no_properties_found') }}

@endforelse

Recent Payment Transactions

@forelse($recentPayments ?? [] as $payment)

{{ $payment->payment_number }}

{{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }}

{{ number_format($payment->amount, 0) }} {{ $payment->currency }} {{ __('messages.' . $payment->status) }}
@empty

{{ __('messages.no_payments_found') }}

@endforelse

Recent Property Viewing Requests

@forelse($recentBookings ?? [] as $booking)

{{ $booking->name }}

{{ $booking->property->title ?? 'N/A' }}

{{ __('messages.' . ($booking->booking_type ?? 'rent')) }} • {{ \Carbon\Carbon::parse($booking->preferred_date)->format('M d, Y') }}

{{ __('messages.' . $booking->status) }}
@empty

{{ __('messages.no_bookings_found') }}

@endforelse
@if(($recentBookings ?? collect())->count() > 0) @endif

Recent Rental Agreements

@forelse($recentContracts ?? [] as $contract)

{{ $contract->contract_number }}

{{ $contract->property->title ?? 'N/A' }}

{{ $contract->customer->name ?? 'N/A' }} • {{ number_format($contract->total_amount, 0) }} {{ $contract->currency }}

{{ __('messages.' . $contract->status) }}
@empty

{{ __('messages.no_contracts_found') }}

@endforelse
@if(($recentContracts ?? collect())->count() > 0) @endif
@endsection