@extends('mainlayout.layout') @section('title', config('app.name') . ' | ' . $property->name) @section('topbar-search', 'enabled') @section('content')
@if($property->propertyowner) {{ $property->propertyowner->name }} @else Dashboard @endif Project

{{ $property->name }}

Read-only project, inventory, order, and visitation information.

{{ $property->status_label }}
@foreach([ ['Total plots', $metrics['plots'], 'bx-grid-alt'], ['Available plots', $metrics['available_plots'], 'bx-check-circle'], ['Orders', $metrics['orders'], 'bx-cart'], ['Open cases', $metrics['open_cases'], 'bx-support'], ] as [$label, $value, $icon])
{{ $label }}{{ number_format($value) }}
@endforeach

Project overview

Customer-facing description and location.

{{ strip_tags($property->description_mini_en ?: ($property->description_en ?: 'No project description is available.')) }}

Plot inventory

Current plots and their availability.

{{ $plots->total() }} total
@forelse($plots as $plot) @empty@endforelse
PlotAreaLand useListed amountStatus
{{ $plot->plotnumber ?: ($plot->name ?: 'Not specified') }}{{ $plot->area_size ? number_format((float) $plot->area_size) . ' SQM' : 'Not available' }}{{ optional($plot->landuse)->use_en ?: 'Not specified' }}{{ $plot->amount ? 'TZS ' . number_format((int) $plot->amount) : 'Not available' }}{{ $plot->status_description ?: 'Unknown' }}
No plots are recorded for this project.
@if($plots->hasPages())
{{ $plots->links() }}
@endif

Recent orders

The 25 most recent orders for this project.

{{ $metrics['orders'] }} total
@forelse($orders as $order) @php $customerName = trim(optional($order->user)->first_name . ' ' . optional($order->user)->middle_name . ' ' . optional($order->user)->last_name); @endphp @empty@endforelse
OrderCustomerPlotPayment planAmountStatus
{{ $order->referenceid ?: $order->id }}{{ optional($order->created_at)->format('d M Y') }} {{ $customerName ?: 'Unknown customer' }}{{ optional($order->user)->phone ?: 'Phone not available' }} {{ optional($order->plot)->plotnumber ?: 'Not selected' }} {{ ucfirst($order->order_type ?: 'Not specified') }} TZS {{ number_format((int) $order->amount) }} {{ $order->status_description ?: 'Status unavailable' }}
No orders are recorded for this project.

Recent visit bookings

Customer site-visit selections and payment status.

{{ $metrics['bookings'] }} total
@forelse($bookings as $booking) @php $visitPayment = $booking->visitPayments->sortByDesc('created_at')->first(); $customerName = trim(optional($booking->user)->first_name . ' ' . optional($booking->user)->middle_name . ' ' . optional($booking->user)->last_name); @endphp @empty@endforelse
CustomerPlotVisit dateLocationPaymentStatus
@if($booking->user){{ $customerName ?: 'Customer #' . $booking->userid }}@else Unknown customer @endif{{ optional($booking->user)->phone }} {{ optional($booking->plot)->plotnumber ?: 'Not selected' }} {{ $booking->booked_date_time ?: ($booking->booked_date ?: 'Not selected') }} {{ $booking->location ?: 'Not specified' }} {{ $visitPayment ? strtoupper($visitPayment->payment_option ?: 'Recorded') . ' · TZS ' . number_format((int) $visitPayment->amount) : ((int) $booking->amount > 0 ? 'Not recorded' : 'Free') }} {{ ucfirst($visitPayment?->status_description ?: ($booking->status ?: 'Pending')) }}
No visit bookings are recorded for this project.
@endsection @push('scripts') @endpush