@extends('admin.layouts.layouts') @section('title', 'Details | My Travel Plan') @section('page-css') @endsection @section('content') {{-- Change status modal --}} {{-- Travel Plan Details --}}
Travel Plan Details
Employee Name:
{{ $showDetails->employeeMaster->employee_name ?? '-' }}
Type:
{{ $showDetails->type ?? '-' }}
Send to Travel Desk:
@php $statuses = [ 'Requested' => ['label' => 'Requested', 'class' => 'info'], 'Approved' => ['label' => 'Approved', 'class' => 'success'], 'Rejected' => ['label' => 'Rejected', 'class' => 'danger'], 'Booking Done' => ['label' => 'Booking Done', 'class' => 'danger'], ]; $status = $statuses[$showDetails->status] ?? ['label' => '', 'class' => '']; $disabled = in_array($showDetails->status, ['Approved', 'Rejected', 'Booking Done']) ? 'disabled' : ''; $canChangeStatus = false; $currentUser = auth()->user(); // Check if current user is Super Admin if ($currentUser->hasRole('Super Admin')) { $canChangeStatus = true; } // Check if current user is the reporting person of the employee who created the plan if ($showDetails->employeeMaster && $showDetails->employeeMaster->reporting_person_id == $currentUser->id) { $canChangeStatus = true; } @endphp
Status:
@if ($canChangeStatus)
@else {{ $status['label'] }} @endif
Destination Type:
Travel Plan Period:
{{ date('d-m-Y', strtotime($showDetails->start_date)) }} To {{ date('d-m-Y', strtotime($showDetails->end_date)) }}
Mod Of Travel:
Current Expense Limit:
{{-- Travel Plan Items --}}
Travel Plan Items
@if ($showDetails->destination_type == 'National') @else @endif @if (count($showDetails->travelDetails) > 0) @foreach ($showDetails->travelDetails as $travelDetail) @if ($showDetails->destination_type == 'National') @else @endif @endforeach @else @endif
Start Date End Date Purpose Name Of DestinationState District Sub District CityCountryRemark Tickets
{{ date('d-m-Y', strtotime($travelDetail->start_date)) }} {{ date('d-m-Y', strtotime($travelDetail->end_date)) }} {{ $travelDetail->purpose?->name }} {{ $travelDetail->destination_name }}{{ $travelDetail->stateDetail?->state_name ?? '' }} {{ $travelDetail->districtDetail?->district_name ?? '' }} {{ $travelDetail->subDistrictDetail?->sub_district_name ?? '' }} {{ $travelDetail->cityDetail?->city_name ?? '' }}{{ $travelDetail->countryDetail?->country_name ?? '' }}{{ $travelDetail->remark }} @if (isset($travelDetail->files)) @else

-

@endif
No Records Found
{{-- Travel Plan Histories --}}
Travel Plan Histories
# Status Remark Created At Created By Updated At Updated By
@endsection @section('page-js') @endsection