Tenant Details

Edit Tenant
@csrf @method('DELETE')
{{ strtoupper(mb_substr($tenant->user->name ?? 'T', 0, 1, 'UTF-8')) }}

{{ $tenant->user->name }}

{{ $tenant->user->email }}

Personal Info

{{ $tenant->occupation ?? '—' }}

{{ $tenant->gender ?? '—' }}

{{ $tenant->nationality ?? '—' }}

Contact & Identity

{{ $tenant->phone ?? '—' }}

@if($tenant->ic_number) IC: {{ $tenant->ic_number }} @elseif($tenant->passport) Passport: {{ $tenant->passport }} @else — @endif

@if($tenant->ic_photo_path) {{-- 统一使用精简版附件样式 --}}
Identity Document (IC) Click to Preview
@else
No document uploaded
@endif

Emergency Contacts

@forelse($tenant->emergencyContacts as $contact)

{{ $contact->name }}

{{ $contact->relationship }} • {{ $contact->phone }}

@empty

No emergency contacts listed.

@endforelse

{{ $tenant->created_at ? $tenant->created_at->format('d M Y, H:i') : 'N/A' }}

Lease Agreements

@forelse($tenant->leases as $lease) @php // 逻辑判断:如果结束日期早于今天,标记为已过期 $isExpired = $lease->end_date->isPast(); @endphp
@if($isExpired)
Expired
@endif

{{ $lease->room->room_no ?? 'N/A' }}

RM {{ number_format($lease->rent_price, 2) }}

{{ $lease->start_date->format('d M Y') }} - {{ $lease->end_date->format('d M Y') }}

{{ ucfirst($lease->status) }}
@if ($lease->status === 'New' || $lease->status === 'Renew') {{-- 1. Generate Invoice 按钮 (主操作) --}}
@csrf
{{-- 2. Add Manual Invoice 按钮 (次操作) --}} @endif
@empty @endforelse

Invoices & Payments

Rent Outstanding

@include('adminSide.tenants.payments.paymentTable', [ 'payments' => $rentPayments, 'emptyMessage' => 'No outstanding rent found.' ])
Invoice Type / Period Amount Details Status Method Actions
@if($rentPayments->hasPages())
{{ $rentPayments->appends(['other_page' => request('other_page')])->links() }}
@endif

{{-- Other Bills & Miscellaneous 部分 --}}

Other Bills & Miscellaneous

@include('adminSide.tenants.payments.paymentTable', [ 'payments' => $otherPayments, 'emptyMessage' => 'No miscellaneous records found.' ])
Invoice Type / Period Amount Details Status Method Actions
@if($otherPayments->hasPages())
{{ $otherPayments->appends(['rent_page' => request('rent_page')])->links() }}
@endif