@extends('admin.layouts.app') @section('title', 'Rescheduled Bookings') @section('content') @include('admin.includes.alerts')
@foreach($bookings as $i => $booking) {{-- --}} {{-- --}} {{-- --}} {{-- --}} @endforeach
SN Passenger Seat Mobile Gender Prev Schedule Prev Ticket# New Ticket# Agent Status Route Class Booking By Reason
{{$i + $bookings->firstItem()}} {{$booking->fullname}} {{ \App\Models\BusSeat::where(['id' => $booking->seat_id])->first()->naming }} {{$booking->msisdn}} {{$booking->gender}} {{$booking->schedule->trip_date}} {{$booking->schedule->departure}} {{$booking->schedule->label}} {{ \App\Models\Bus::where(['id' => $booking->schedule->bus_id])->first()->bus_reg_no }} {{$booking->reference}} {{$booking->reschedule_id}} @if($booking->agent_id == 0) Exabytes Africa @else {{ \App\Models\Agent::where(['id' => $booking->agent_id])->first()->name }} @endif @if($booking->status == "RESCHEDULED") RESCHEDULED @else CANCELED @endif @php if($booking->sub_route_id == null){ $pA = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->start_point; $pB = \App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->end_point; $pointA = \App\Models\Cities::where(['id' => $pA])->first()->city; $pointB = \App\Models\Cities::where(['id' => $pB])->first()->city; echo $pointA .' - '.$pointB; }else{ $from = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointA; $to = \App\Models\SubRoute::where(['id' => $booking->sub_route_id])->first()->pointB; echo $from .' - '.$to; } @endphp {{$booking->fare}} @if(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 1) VVIP @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 2) VIP @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 3) LUXURY @elseif(\App\Models\Route::where(['id' => $booking->schedule->route_id])->first()->class == 4) SEMI-LUXURY @else ORDINARY @endif {{$booking->schedule->label}}{{$booking->booking_date}}--}} {{-- --}} {{-- @if($booking->status == 2)--}} {{-- @if($booking->is_deleted == 0)--}} {{-- {!! Form::open(array(--}} {{-- 'style' => 'display: inline-block;',--}} {{-- 'method' => 'GET',--}} {{-- 'onsubmit' => "return confirm('".trans("Are sure you want to Cancel Booking")."');",--}} {{-- 'route' => ['Cancel Booking', $booking->id])) !!}--}} {{-- {!! Form::submit('Cancel', array('class' => 'btn btn-sm btn-danger')) !!}--}} {{-- {!! Form::close() !!}--}} {{-- @else--}} {{-- {!! Form::open(array(--}} {{-- 'style' => 'display: inline-block;',--}} {{-- 'method' => 'GET',--}} {{-- 'onsubmit' => "return confirm('".trans("Are sure you want to Enable")."');",--}} {{-- 'route' => ['Enable Booking', $booking->id])) !!}--}} {{-- {!! Form::submit('Enable', array('class' => 'btn btn-sm btn-success')) !!}--}} {{-- {!! Form::close() !!}--}} {{-- @endif--}} {{-- @endif--}} {{-- {{ \App\Models\Agent::where(['id' => $booking->canceled_by])->first()->name }}{{ $booking->cancellation_status }} {{ $booking->reason }}
{{ $bookings->links() }}
@endsection