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

Transit History

View historical transit movements and records

Total Transits

{{ $transits->count() }}

Completed

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

Rejected

{{ $transits->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 ?? '' }}

{{ $transit->formatted_duration }} {!! $transit->status_badge !!}

No transit history found

Try adjusting your filters.

{{ $transits->links() }}
@endsection @section('scripts') @endsection