@extends('layouts.app') @section('title', 'Transit History') @section('no-page-header') @push('styles') @endpush @section('content')

Transit History

View historical transit movements and records

Filters

Total Transits

{{ $transits->total() }}

Completed

{{ $transits->getCollection()->where('status', 'completed')->count() }}

Rejected

{{ $transits->getCollection()->where('status', 'rejected')->count() }}

Avg Duration

{{ $transits->getCollection()->whereNotNull('transit_duration_minutes')->avg('transit_duration_minutes') ? round($transits->getCollection()->whereNotNull('transit_duration_minutes')->avg('transit_duration_minutes')) . 'm' : 'N/A' }}

@forelse($transits as $transit) @empty @endforelse
Date Employee From To Duration Status Actions
{{ $transit->transit_date?->format('M d, Y') ?? 'N/A' }}

{{ $transit->employee?->full_name ?? 'N/A' }}

{{ $transit->employee?->profile?->employee_id ?? '' }}

{{ $transit->fromService?->service_name ?? 'N/A' }}

{{ $transit->fromService?->client?->name ?? '' }}

{{ $transit->toService?->service_name ?? 'N/A' }}

{{ $transit->toService?->client?->name ?? '' }}

@if($transit->transit_duration_minutes) {{ $transit->transit_duration_minutes }} min @else N/A @endif @switch($transit->status) @case('completed') Completed @break @case('rejected') Rejected @break @default {{ $transit->status }} @endswitch View

No transit history found

Try adjusting your filters.

@if($transits->hasPages())
{{ $transits->links() }}
@endif
@push('scripts') @endpush