@extends('layout.mainlayout') @section('content')
{{-- FILTERS --}}
{{-- TABLE --}}
\ @forelse($requests as $r) @php $testingStart = $r->getForm('testing_start_time') ?? '-'; $testingEnd = $r->getForm('testing_end_time') ?? '-'; $start = \Carbon\Carbon::parse($r->start_date); $end = \Carbon\Carbon::parse($r->end_date); $calculatedDays = $start->diffInDays($end) + 1; if (strtolower($r->getForm('half_day') ?? 'no') === 'yes') { $calculatedDays = 0.5; } $testingTime = $testingStart !== '-' && $testingEnd !== '-' ? "{$testingStart} - {$testingEnd}" : '-'; $testingHours = $r->getForm('testing_hours') ?? '-'; $mobilityHours = $r->getForm('mobility_hours') ?? '-'; $mobility = strtolower($r->getForm('mobility') ?? 'no') === 'yes' ? 'Yes' : 'No'; $personalCar = strtolower($r->getForm('personal_car') ?? 'no') === 'yes' ? 'Yes' : 'No'; $city = $r->getForm('location_city') ?? '-'; $country = $r->getForm('location_country') ?? '-'; $halfDay = strtolower($r->getForm('half_day') ?? 'no') === 'yes' ? 'Yes' : 'No'; $productName = $r->getForm('product_name') ?? '-'; $remark = $r->getForm('remark') ?? '-'; @endphp @empty @endforelse
Name Applied On Date Range Days Type Testing Time Testing Hours Mobility Hours MobilityPersonal Car Usage City Country Half Day Product Remark Team Lead Manager Lead Status Manager Status Final
{{ $r->overseasResource?->first_name }} {{ $r->overseasResource?->last_name }}
{{ $r->overseasResource?->professional_email ?? '-' }}
{{ $r->created_at?->format('d M Y H:i') }} {{ \Carbon\Carbon::parse($r->start_date)->format('d M Y') }} → {{ \Carbon\Carbon::parse($r->end_date)->format('d M Y') }} {{ $calculatedDays }} {{ ucfirst($r->attendance_type) }} {{ $testingTime }} {{ $testingHours }} {{ $mobilityHours }} {{ $personalCar }} @if ($mobility === 'Yes') Yes @else No @endif {{ $city }} {{ $country }} @if ($halfDay === 'Yes') Yes @else No @endif {{ $productName }} {{ $remark }} {{ $r->overseasResource?->teamDetails?->name ?? '-' }} {{ $r->projectLead?->name ?? '-' }} {{ $r->manager?->name ?? '-' }} @if ($r->status_lead === 'approved') Approved @elseif($r->status_lead === 'rejected') Rejected @else Pending @endif @if ($r->status_manager === 'approved') Approved @elseif($r->status_manager === 'rejected') Rejected @else Pending @endif @if ($r->final_status === 'approved') Approved @elseif($r->final_status === 'rejected') Rejected @else Pending @endif
No overseas attendance requests found
{{ $requests->links('vendor.pagination.no-arrows') }}
@endsection @push('scripts') @endpush