@extends('layouts.admin') @section('content')

Journey Details

Journey Information
Title{{ $journey->title }}
Created By{{ $journey->user->name ?? 'Unknown' }}
Destination{{ $journey->destination ?? 'Unknown' }}
Accommodation{{ $journey->accommodation ?? 'Unknown' }}
Acc. hyperlink @if($journey->accommodation_link) View @else No Link @endif
Map @if($journey->map_link) View @else No Link @endif
Start Date{{ $journey->start_date ? \Carbon\Carbon::parse($journey->start_date)->format('d M Y') : 'N/A' }}
End Date{{ $journey->end_date ? \Carbon\Carbon::parse($journey->end_date)->format('d M Y') : 'N/A' }}
Created{{ $journey->created_at->format('d M Y, h:i A') }}
Updated{{ $journey->updated_at->format('d M Y, h:i A') }}
Participants ({{ $journey->participants->count() }})
@if($journey->participants->count()) @foreach($journey->participants as $p) @endforeach
NameEmail
{{ $p->name }}{{ $p->email }}
@else

No participants added.

@endif
Checklist
@foreach($checklists as $key => $checklist) @endforeach
Sl No Checklist
{{ $loop->iteration }} {{ $checklist->item }}
Estimated Cost per Person
@if($estimatedCost)

AED {{ $estimatedCost->price_range }}

@else

No cost estimated.

@endif
Cost Breakdown
@foreach($costBreakdowns as $key => $cost) @endforeach
SLItem
{{ $loop->iteration }} @if($cost->items->isNotEmpty()) @php // Get the first item that is a main item (parent_id is null) $mainItem = $cost->items->firstWhere('parent_id', null); $subItems = $cost->items->where('parent_id', '!=', null); @endphp @if($mainItem) {{ $mainItem->item }}: AED {{ $mainItem->price }} @else No main item found. @endif @else No items available. @endif @if($subItems->isNotEmpty())
    @foreach($subItems as $item) @if($item->parent_id !== null)
  • {{ $item->item }}: AED {{ $item->price }} @if($item->subItems->isNotEmpty())
      @foreach($item->subItems as $subItem)
    • {{ $subItem->item }}: AED {{ $subItem->price }}
    • @endforeach
    @endif
  • @endif @endforeach
@else @endif
Itinerary
@if (!$showItineraries)
No start or end date is set for the journey.
@else
@for ($i = 0; $i < $days; $i++) {{-- Note: < instead of <= --}} @php $currentDate = $start_date->copy()->addDays($i)->format('Y-m-d'); $dayItineraries = $groupedItineraries->get($currentDate, collect()); @endphp
Day {{ $i + 1 }} - {{ \Carbon\Carbon::parse($currentDate)->format('d M Y') }}
@forelse ($dayItineraries as $key => $itinerary)
Slot {{ $key + 1 }}
Start: {{ \Carbon\Carbon::parse($itinerary->start_time)->format('H:i') }}
End: {{ \Carbon\Carbon::parse($itinerary->end_time)->format('H:i') }}
Description: {{ $itinerary->description }}
@empty
No itineraries for this day.
@endforelse
@endfor
@endif
Back to Journeys
@endsection