@extends('layout.app') @section('content') @php($fmt = fn ($v) => number_format($v, 2))

{{ $property->property_name }} @if($property->is_active) Active @else Inactive@include('partials.property-disabled-by') @endif

@if($canEdit) Edit property Rates calendar Inventory Room numbers Photos @if(auth()->user()->isOwner())
@csrf
@endif @else View rates View inventory @endif

Category: @if($property->categories->isNotEmpty()) {{ $property->categories->pluck('name')->join(' · ') }} @else None selected yet@if($canEdit) · Choose categories@endif @endif

@if($photos->isNotEmpty())

Photos

@foreach($photos as $photo)
@endforeach
@endif

Location

{{ $property->address }}

{{ $property->city?->city_name }}, {{ $property->city?->district?->district_name }}

{{ $property->city?->district?->province?->province_name }}

@if($property->mapEmbedUrl()) @endif @if($property->mapUrl())

Open in Google Maps

@elseif($property->location)

{{ $property->location }}

@else

No map pin yet.@if($canEdit) Add one@endif

@endif

Property owner

{{ $property->propertyOwner?->name }}

{{ $property->propertyOwner?->email }}

{{ $property->propertyOwner?->phone }}

Contact person

@if($property->primaryContact)

{{ $property->primaryContact->name }}

{{ $property->primaryContact->mobile }}

{{ $property->primaryContact->email ?: 'No email' }}

{{ $property->primaryContact->user ? 'Has a login account' : 'No login account' }}

@else

Not set

@endif

Cancellation policy

{{ $property->effectiveCancellationDays() }} day(s) before check-in

Cancellations within {{ $property->effectiveCancellationDays() }} day(s) of check-in, and no-shows, are not refunded. @if($property->cancellation_days === null) (Platform default) @endif

Property amenities

{{ $amenities->isNotEmpty() ? $amenities->join(' · ') : 'None added' }}

Room types today ({{ \Carbon\Carbon::parse($today)->format('D, d M Y') }})

Available = total − closed − booked; a room type with no complete USD + LKR rates today is closed.

@forelse($roomTypes as $item) @php($roomType = $item['roomType'])
{{ $roomType->roomType }} up to {{ $roomType->max_occupancy }} guests
@if($item['open']) Open today @else Closed today (no complete rates) @endif
Total {{ $item['total'] }}
Closed {{ $item['closed'] }}
Booked {{ $item['booked'] }}
Available {{ $item['available'] }}
{{ $item['roomNumbers'] }} room number(s)

Meal plans today: {{ $item['mealPlans']->isNotEmpty() ? $item['mealPlans']->pluck('mealType')->join(', ') : 'None' }}

@if($item['amenities']->isNotEmpty())

Room amenities: {{ $item['amenities']->join(' · ') }}

@endif @if($item['rates']) @foreach($item['rates'] as $rate) @endforeach
GuestsMeal planUSDLKR
{{ $rate['occupancy']->occupancy_name }} {{ $rate['mealType']->mealType }} {{ $fmt($rate['usd']) }} {{ $fmt($rate['lkr']) }}
@endif
@empty

No room types are set up at this property.

@endforelse
@stop