@extends('layouts.admin') @section('title', 'Dashboard') @push('styles') @endpush @section('content') {{-- ===== HERO ===== --}}
Today's flight deck

Welcome back, {{ auth()->user()->name ?? 'Admin' }}

Here is what's happening across your travel business today.
Today's Income
{{ number_format($dailyIncome, 0) }}
Today's Expense
{{ number_format($dailyExpense, 0) }}
YTD Net Profit
{{ number_format($ytdProfit, 0) }} ({{ $profitMargin }}% margin)
{{-- ===== PRIMARY STAT CARDS ===== --}}
Total Sales
{{ number_format($totalSales, 2) }}
{{ number_format($monthlySales, 0) }} this month
Total Bookings
{{ number_format($totalBookings) }}
{{ number_format($dailyStats['bookings']) }} booked today
Pending Payments
{{ number_format($pendingPayments, 2) }}
Outstanding dues
Open Leads
{{ number_format($openLeads) }}
{{ number_format($conversionRatio, 1) }}% conversion (YTD)
{{-- ===== CHARTS ROW ===== --}}
Revenue vs Expense ({{ now()->year }})
Revenue Expense
Monthly Profit / Loss
{{-- ===== PERFORMANCE SNAPSHOT (interactive) + SOURCES ===== --}}
Performance Snapshot
Bookings
{{ $dailyStats['bookings'] }}
Sales
{{ number_format($dailyStats['sales'], 0) }}
Leads
{{ $dailyStats['leads'] }}

Top Selling Package {{ $topPackage?->title ?? 'N/A' }}
Best Employee (Month) {{ $bestEmployee?->name ?? 'N/A' }}
Agent Commission (Month) {{ number_format($monthlyAgentCommission, 2) }}
Booking Source Analytics
@if ($bookingSourceSeries->sum() > 0) @else
No source data yet.
@endif
Visa Processing
@php $visaTotal = array_sum($visaSummary); @endphp @forelse($visaSummary as $status => $count) @php $pct = $visaTotal > 0 ? round($count/$visaTotal*100) : 0; @endphp
{{ str_replace('_', ' ', $status) }}{{ $count }}
@empty
No visa applications.
@endforelse
{{-- ===== QUICK COUNT TILES ===== --}}
{{ number_format($totalCustomers) }}
Customers
{{ number_format($totalAgents) }}
Agents
{{ number_format($totalVendors) }}
Vendors
{{ number_format($totalEmployees) }}
Employees
{{ number_format($totalHotels) }}
Hotels
{{ number_format($totalAirlines) }}
Airlines
{{-- ===== TABLES ===== --}}
Upcoming Tours
@forelse($upcomingTours as $tour) @empty @endforelse
Date Customer Package
{{ optional($tour->travel_date)->format('d M Y') }} {{ $tour->customer?->full_name ?? '—' }} {{ $tour->tourPackage?->title ?? '—' }}
No upcoming tours.
Recent Customers
@forelse($recentCustomers as $c) @empty @endforelse
Name Phone Joined
{{ $c->full_name }} {{ $c->phone }} {{ optional($c->created_at)->format('d M Y') }}
No customers yet.
@endsection @push('scripts') @endpush