<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Fleet Overview</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <!-- Tailwind -->
    <script src="https://cdn.tailwindcss.com"></script>

    <!-- Chart.js -->
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body class="bg-gray-100 font-sans">

<div class="flex min-h-screen">

    <!-- Main content -->
    <main class="flex-1 p-6">

        <div class="space-y-6">

            
            <div class="p-4 bg-white rounded-2xl shadow">
                <h2 class="text-2xl font-bold text-gray-800">👋 Welcome back, <?php echo e(auth()->user()->name); ?>!</h2>
                <p class="text-sm text-gray-500">Role: <?php echo e(auth()->user()->roles->pluck('name')->implode(', ')); ?></p>
            </div>

            
            <div class="p-4 bg-white rounded-2xl shadow">
                <h3 class="text-lg font-semibold text-gray-700 mb-4">🚛 My Active Trips</h3>

                <?php $__empty_1 = true; $__currentLoopData = $this->activeTrips; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $trip): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <div class="border rounded-xl p-3 mb-3 hover:bg-gray-50 transition">
                        <div class="flex justify-between items-center">
                            <div>
                                <h4 class="font-bold text-gray-800">Trip #<?php echo e($trip->id); ?></h4>
                                <p class="text-sm text-gray-500">
                                    <?php echo e($trip->origin); ?> → <?php echo e($trip->destination); ?>

                                </p>
                                <p class="text-sm text-gray-500">Driver: <?php echo e($trip->driver->name ?? 'N/A'); ?></p>
                            </div>
                            <div class="text-right">
                            <span class="px-3 py-1 text-xs rounded-full
                                <?php echo e($trip->status === 'en_route' ? 'bg-yellow-100 text-yellow-700' :
                                   ($trip->status === 'returning' ? 'bg-blue-100 text-blue-700' :
                                   ($trip->status === 'loaded' ? 'bg-green-100 text-green-700' : 'bg-gray-100 text-gray-600'))); ?>">
                                <?php echo e(ucfirst(str_replace('_', ' ', $trip->status))); ?>

                            </span>
                            </div>
                        </div>

                        
                        <div class="flex items-center mt-3 space-x-2">
                            <?php $__currentLoopData = ['loaded', 'en_route', 'returning', 'offloaded']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $step): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="flex items-center">
                                    <div class="w-4 h-4 rounded-full
                                    <?php echo e($trip->status === $step ? 'bg-green-500' : 'bg-gray-300'); ?>"></div>
                                    <?php if(!$loop->last): ?>
                                        <div class="w-10 h-0.5 bg-gray-300"></div>
                                    <?php endif; ?>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>

                        
                        <div class="mt-3 flex space-x-2">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('update trips')): ?>
                                <?php if (isset($component)) { $__componentOriginal6330f08526bbb3ce2a0da37da512a11f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal6330f08526bbb3ce2a0da37da512a11f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.button.index','data' => ['size' => 'sm','color' => 'primary']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filament::button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['size' => 'sm','color' => 'primary']); ?>
                                    Update Status
                                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal6330f08526bbb3ce2a0da37da512a11f)): ?>
<?php $attributes = $__attributesOriginal6330f08526bbb3ce2a0da37da512a11f; ?>
<?php unset($__attributesOriginal6330f08526bbb3ce2a0da37da512a11f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6330f08526bbb3ce2a0da37da512a11f)): ?>
<?php $component = $__componentOriginal6330f08526bbb3ce2a0da37da512a11f; ?>
<?php unset($__componentOriginal6330f08526bbb3ce2a0da37da512a11f); ?>
<?php endif; ?>
                            <?php endif; ?>
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('approve expenses')): ?>
                                <?php if (isset($component)) { $__componentOriginal6330f08526bbb3ce2a0da37da512a11f = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal6330f08526bbb3ce2a0da37da512a11f = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'filament::components.button.index','data' => ['size' => 'sm','color' => 'success']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('filament::button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['size' => 'sm','color' => 'success']); ?>
                                    Approve Expense
                                 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal6330f08526bbb3ce2a0da37da512a11f)): ?>
<?php $attributes = $__attributesOriginal6330f08526bbb3ce2a0da37da512a11f; ?>
<?php unset($__attributesOriginal6330f08526bbb3ce2a0da37da512a11f); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6330f08526bbb3ce2a0da37da512a11f)): ?>
<?php $component = $__componentOriginal6330f08526bbb3ce2a0da37da512a11f; ?>
<?php unset($__componentOriginal6330f08526bbb3ce2a0da37da512a11f); ?>
<?php endif; ?>
                            <?php endif; ?>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <p class="text-sm text-gray-500">No active trips right now.</p>
                <?php endif; ?>
            </div>

            
            <div class="p-4 bg-white rounded-2xl shadow">
                <h3 class="text-lg font-semibold text-gray-700 mb-4">💰 Pending Expense Approvals</h3>
                    <p class="text-sm text-gray-500">No pending approvals.</p>
            </div>

        </div>

    </main>
</div>


</body>
</html>
<?php /**PATH /home/innovation/Documents/project/burundilogistics.com/api/resources/views/filament/pages/dispatcher-dashboard.blade.php ENDPATH**/ ?>