@extends('layouts.app') @section('title', 'Channel Manager') @section('nav_channels', 'bg-teal-50 text-teal-700 font-semibold') @section('page_title', 'Channel Manager') @section('page_subtitle', 'Booking source performance & rate mapping') @section('content') @if(session('success'))

{{ session('success') }}

@endif {{-- ===== SUMMARY TILES ===== --}}

Active Channels

{{ $summary['total_sources'] }}

booking sources

Total Bookings

{{ number_format($summary['total_bookings']) }}

confirmed reservations

Total Revenue

₱{{ number_format($summary['total_revenue'], 0) }}

across all channels

Top Channel

{{ $summary['top_source'] }}

by booking count

{{-- ===== LEFT: PERFORMANCE TABLE (3/5) ===== --}}

Source Performance

All-time bookings excluding cancelled & no-show

@if($stats->isEmpty())

No reservation data yet.

@else
@foreach($stats as $row) @php $share = $totalConfirmed > 0 ? round($row->confirmed_count / $totalConfirmed * 100, 1) : 0; $cfg = $configs->get($row->source); @endphp @endforeach
Channel Bookings Revenue Avg Stay Share
@php $icons = [ 'Booking.com' => '🔵', 'Agoda' => '🟠', 'Airbnb' => '🔴', 'Expedia' => '🟡', 'Walk-in' => '🚶', 'Direct (Phone)' => '📞', 'Website' => '🌐', 'Travel Agent' => '✈️', 'Corporate' => '🏢', ]; @endphp {{ $icons[$row->source] ?? '📋' }}

{{ $row->source }}

@if($cfg?->ratePlan)

{{ $cfg->ratePlan->code }} — {{ $cfg->ratePlan->modifierLabel() }}

@else

Rack rate

@endif

{{ number_format($row->confirmed_count) }}

@if($row->total_reservations != $row->confirmed_count)

{{ $row->total_reservations }} total

@endif

₱{{ number_format($row->confirmed_revenue, 0) }}

@if($row->confirmed_count > 0)

₱{{ number_format($row->confirmed_revenue / max(1,$row->confirmed_count), 0) }} avg

@endif
{{ number_format($row->avg_nights, 1) }}n
{{ $share }}%
@endif
{{-- ===== RIGHT: RATE MAPPING (2/5) ===== --}}

Rate Mapping

Default rate plan applied per channel when creating reservations

@foreach($allSources as $source) @php $cfg = $configs->get($source); @endphp
@php $icons = ['Booking.com'=>'🔵','Agoda'=>'🟠','Airbnb'=>'🔴','Expedia'=>'🟡','Walk-in'=>'🚶','Direct (Phone)'=>'📞','Website'=>'🌐','Travel Agent'=>'✈️','Corporate'=>'🏢']; @endphp {{ $icons[$source] ?? '📋' }}

{{ $source }}

@if($cfg?->ratePlan) {{ $cfg->ratePlan->code }} @else Rack @endif
@csrf
@endforeach
{{-- New channel --}}
@csrf
@endsection