@extends('layouts.dashboard') @section('title', __('messages.dashboard')) @section('header', __('messages.dashboard')) @section('sidebar') @include('tenant.partials.sidebar') @endsection @section('content')

Welcome back, {{ $tenant->first_name ?? auth()->user()->name }}!

Manage your leases, track payments, and stay updated with your rental information all in one place.

@if($company)

Property Management Company

@if($company->logo) {{ $company->name }} @endif

{{ $company->name }}

@if($company->email)

{{ $company->email }}

@endif

Registered Tenants

{{ $companyTotalTenants ?? 0 }}

Property Portfolio

{{ $companyTotalProperties ?? 0 }}

@if($company->phone || $company->address || $company->city)
@if($company->phone)
{{ $company->phone }}
@endif @if($company->address)
{{ $company->address }}
@endif @if($company->city)
{{ $company->city }}{{ $company->country ? ', ' . $company->country : '' }}
@endif
@endif
@endif
{{ __('messages.paid') }}

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

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

Total amount paid across all completed transactions

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

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

{{ $pendingPayments ?? 0 }}

Payment requests currently under review

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

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

{{ $overduePayments ?? 0 }}

Payment obligations that have exceeded the due date

@if($activeLease)

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

{{ $activeLease->property->title }}

{{ $activeLease->property->address }}, {{ $activeLease->property->city }}

{{ $activeLease->property->type }}

{{ __('messages.monthly_rent') }}: {{ number_format($activeLease->monthly_rent, 0) }} {{ $activeLease->currency }}
{{ __('messages.lease_period') }}: {{ \Carbon\Carbon::parse($activeLease->start_date)->format('M d, Y') }} - {{ \Carbon\Carbon::parse($activeLease->end_date)->format('M d, Y') }}
{{ __('messages.payment_day') }}: {{ $activeLease->payment_day }}th of each month
@endif

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

@forelse($recentPayments ?? [] as $payment) @empty @endforelse
{{ __('messages.payment_number') }} {{ __('messages.date') }} {{ __('messages.amount') }} {{ __('messages.status') }} {{ __('messages.actions') }}
{{ $payment->payment_number }} {{ \Carbon\Carbon::parse($payment->payment_date)->format('M d, Y') }} {{ number_format($payment->amount, 0) }} {{ $payment->currency }} {{ ucfirst($payment->status) }} {{ __('messages.view') }}

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

Your payment history will appear here once you make your first payment.

@if(($recentPayments ?? collect())->count() > 0) @endif
@if(isset($otherTenants) && $otherTenants->count() > 0)

Fellow Tenants - {{ $company->name }}

@foreach($otherTenants as $otherTenant)
{{ strtoupper(substr($otherTenant->first_name, 0, 1) . substr($otherTenant->last_name, 0, 1)) }}

{{ $otherTenant->full_name }}

@if($otherTenant->email)

{{ $otherTenant->email }}

@endif @if($otherTenant->phone)

{{ $otherTenant->phone }}

@endif
@if($otherTenant->activeLease)
Active Lease
@endif
@endforeach
@endif @endsection