@extends('layouts.business') @section('title', 'Dashboard') @section('breadcrumb_title', 'Dashboard') @section('breadcrumb_title_route', route('business.dashboard')) @section('breadcrumb_sub_title', 'Overview') @section('page_title', 'Dashboard') @section('content')
Total Vehicles
{{ $totalVehicles }}
Total Bookings
{{ $totalBookings }}
Total Revenue
Rs. {{ number_format($totalRevenue, 2) }}
Total Clients
{{ $totalClients }}
Revenue Overview

Monthly Revenue

Booking Status

Overview

Pending
{{ $pendingBookings }}
Confirmed
{{ $confirmedBookings }}
Handover to Client
{{ $handoverToClientBookings }}
Return by Client
{{ $returnByClientBookings }}
Rejected
{{ $rejectedBookings }}
Bookings Overview

Monthly Bookings

Quick Stats

This Month

Monthly Revenue Rs. {{ number_format($monthlyRevenue, 2) }}
Monthly Bookings {{ $monthlyBookings }}
Active Vehicles {{ $activeVehicles }}/{{ $totalVehicles }}
Recent Activity

Recent Bookings

@forelse($recentBookings as $booking) @empty @endforelse
Client Vehicle Pickup Date Return Date Total Price Status
{{ $booking->client ? $booking->client->full_name : 'N/A' }}

{{ $booking->client ? $booking->client->email : 'N/A' }}

{{ $booking->vehicle ? $booking->vehicle->vehicle_name : 'N/A' }}

{{ $booking->vehicle ? $booking->vehicle->vehicle_no : 'N/A' }}

{{ $booking->pickup_date ? \Carbon\Carbon::parse($booking->pickup_date)->format('M d, Y') : 'N/A' }} {{ $booking->return_date ? \Carbon\Carbon::parse($booking->return_date)->format('M d, Y') : 'N/A' }} Rs. {{ number_format($booking->total_price ?? 0, 2) }} @php $statusValue = (int)$booking->status; $statusLabel = ''; $statusClass = ''; switch($statusValue) { case 0: $statusLabel = 'Pending'; $statusClass = 'warning'; break; case 1: $statusLabel = 'Confirmed'; $statusClass = 'success'; break; case 2: $statusLabel = 'Handover to Client'; $statusClass = 'info'; break; case 3: $statusLabel = 'Return by Client'; $statusClass = 'primary'; break; case 4: $statusLabel = 'Rejected'; $statusClass = 'danger'; break; default: $statusLabel = 'Unknown'; $statusClass = 'secondary'; break; } @endphp {{ $statusLabel }}

No recent bookings found.

@forelse($recentBookings as $booking) @php $statusValue = (int)$booking->status; $statusLabel = ''; $statusClass = ''; $cardClass = ''; switch($statusValue) { case 0: $statusLabel = 'Pending'; $statusClass = 'warning'; $cardClass = 'pending'; break; case 1: $statusLabel = 'Confirmed'; $statusClass = 'success'; $cardClass = 'confirmed'; break; case 2: $statusLabel = 'Handover to Client'; $statusClass = 'info'; $cardClass = 'handover'; break; case 3: $statusLabel = 'Return by Client'; $statusClass = 'primary'; $cardClass = 'returned'; break; case 4: $statusLabel = 'Rejected'; $statusClass = 'danger'; $cardClass = 'rejected'; break; default: $statusLabel = 'Unknown'; $statusClass = 'secondary'; $cardClass = ''; break; } @endphp
{{ $booking->client ? $booking->client->full_name : 'N/A' }}

{{ $booking->client ? $booking->client->email : 'N/A' }}

{{ $statusLabel }}

Vehicle:

{{ $booking->vehicle ? $booking->vehicle->vehicle_name : 'N/A' }}

{{ $booking->vehicle ? $booking->vehicle->vehicle_no : 'N/A' }}

Pickup:

{{ $booking->pickup_date ? \Carbon\Carbon::parse($booking->pickup_date)->format('M d, Y') : 'N/A' }}

Return:

{{ $booking->return_date ? \Carbon\Carbon::parse($booking->return_date)->format('M d, Y') : 'N/A' }}

Total Price: Rs. {{ number_format($booking->total_price ?? 0, 2) }}
@empty

No recent bookings found.

@endforelse
@endsection @section('scripts') @endsection