{{-- resources/views/livewire/trips/review.blade.php --}}

Review Your Trip

Trip Type

@if($tripType === 'pre_planned') Pre-planned Trip Package @else Self-planned Custom Trip @endif

Travelers

{{ $travelerBreakdown['adults'] }} {{ $travelerBreakdown['adults'] === 1 ? 'Adult' : 'Adults' }}
@if($travelerBreakdown['children'] > 0)
{{ $travelerBreakdown['children'] }} {{ $travelerBreakdown['children'] === 1 ? 'Child' : 'Children' }}
@endif
Total: {{ $travelerBreakdown['total'] }} {{ $travelerBreakdown['total'] === 1 ? 'traveler' : 'travelers' }}
@if($travelerBreakdown['children'] > 0)
Child-friendly trip
@endif

Destination

@if($tripType === 'pre_planned' && $tripTemplate)

{{ $tripTemplate->title }}

{{ $tripTemplate->destination->name }}, {{ $tripTemplate->destination->country }}

{{ $tripTemplate->description }}

Capacity: {{ $tripTemplate->capacity_range }}
Child Policy: {{ $tripTemplate->child_friendly_info['display_text'] }}
@if(!empty($templateHighlights))

Trip Highlights

    @foreach($templateHighlights as $highlight)
  • {{ $highlight }}
  • @endforeach
@endif

Duration

{{ $tripTemplate->duration_days }} days

Base Price

${{ number_format($tripTemplate->base_price, 2) }}/person

Difficulty

{{ ucfirst($tripTemplate->difficulty_level) }}

Style

{{ ucfirst($tripTemplate->trip_style) }}

@elseif($destination)

{{ $destination['name'] }}

{{ $destination['country'] }}

@else

No destination selected

@endif
@if($tripType === 'self_planned')

Trip Details

@if($tripDetails)

Title

{{ $tripDetails['title'] ?? 'Trip to ' . ($destination['name'] ?? 'Unknown') }}

Start Date

{{ isset($tripDetails['start_date']) ? date('M d, Y', strtotime($tripDetails['start_date'])) : 'Not set' }}

End Date

{{ isset($tripDetails['end_date']) ? date('M d, Y', strtotime($tripDetails['end_date'])) : 'Not set' }}

Duration

@if(isset($tripDetails['start_date']) && isset($tripDetails['end_date'])) {{ \Carbon\Carbon::parse($tripDetails['start_date'])->diffInDays(\Carbon\Carbon::parse($tripDetails['end_date'])) + 1 }} days @else Not set @endif

Budget (per person)

${{ number_format($tripDetails['budget'] ?? 0, 2) }}

Total Budget

@if(isset($tripDetails['budget']) && $tripDetails['budget'] > 0) ${{ number_format($tripDetails['budget'] * $travelerBreakdown['total'], 2) }} @else Not set @endif

@else

No details added yet

@endif

Itinerary

@if(!empty($tripActivities))
@foreach($tripActivities as $day => $activities)
{{ $day }}

Day {{ $day }}

@foreach($activities as $activity)

{{ $activity['title'] }}

@if(isset($activity['start_time']) && isset($activity['end_time']))

{{ date('g:i A', strtotime($activity['start_time'])) }} - {{ date('g:i A', strtotime($activity['end_time'])) }}

@endif @if(isset($activity['description']))

{{ $activity['description'] }}

@endif @if(isset($activity['location']) || isset($activity['cost']))
@if(isset($activity['location'])) {{ $activity['location'] }} @endif @if(isset($activity['cost']) && $activity['cost'] > 0) ${{ number_format($activity['cost'], 2) }} @endif
@endif
@endforeach
@endforeach
@else

No activities added yet

@endif
@endif @if($tripType === 'pre_planned' && $tripTemplate && !empty($templateActivities))

Itinerary Preview

@for($day = 1; $day <= $tripTemplate->duration_days; $day++)
{{ $day }}

Day {{ $day }}

@if(isset($templateActivities[$day])) @foreach($templateActivities[$day] as $activity)

{{ $activity->title }}

{{ date('g:i A', strtotime($activity->start_time)) }} - {{ date('g:i A', strtotime($activity->end_time)) }}

{{ $activity->description }}

{{ $activity->location }} @if($activity->cost > 0) ${{ number_format($activity->cost, 2) }} @endif {{ ucfirst($activity->category) }}
@endforeach @else

No activities scheduled for this day.

@endif
@endfor
@endif @if($tripType === 'pre_planned' && $tripTemplate && !empty($selectedOptionalActivities) && !empty($optionalActivities))

Selected Optional Activities

@foreach($selectedOptionalActivities as $activityId => $activityData)

{{ $activityData['title'] }}

${{ number_format($activityData['cost'], 2) }} × {{ $travelerBreakdown['total'] }} travelers = ${{ number_format($activityData['cost'] * $travelerBreakdown['total'], 2) }}
@endforeach
@endif

Invite Friends

@if(!empty($invites))
@foreach($invites as $invite)
{{ substr($invite['name'] ?? $invite['email'], 0, 1) }}
@if(isset($invite['name']))

{{ $invite['name'] }}

@endif

{{ $invite['email'] }}

Pending
@endforeach
@else

No friends invited yet

@endif

Trip Summary & Pricing

Trip Type: @if($tripType === 'pre_planned') Pre-planned Package @else Self-planned Custom Trip @endif
Destination: @if($tripType === 'pre_planned' && $tripTemplate) {{ $tripTemplate->destination->name }}, {{ $tripTemplate->destination->country }} @elseif($destination) {{ $destination['name'] }}, {{ $destination['country'] }} @else Not set @endif
Duration: @if($tripType === 'pre_planned' && $tripTemplate) {{ $tripTemplate->duration_days }} days @elseif(isset($tripDetails['start_date']) && isset($tripDetails['end_date'])) {{ \Carbon\Carbon::parse($tripDetails['start_date'])->diffInDays(\Carbon\Carbon::parse($tripDetails['end_date'])) + 1 }} days @else Not set @endif
Dates: @if(isset($tripDetails['start_date']) && isset($tripDetails['end_date'])) {{ date('M d', strtotime($tripDetails['start_date'])) }} - {{ date('M d, Y', strtotime($tripDetails['end_date'])) }} @else 2 weeks from today (default) @endif
Travelers: {{ $travelerBreakdown['display_text'] }}
@if($tripType === 'pre_planned' && $tripTemplate && !empty($groupPricing))

Detailed Pricing Breakdown

{{ $groupPricing['adults_count'] }} {{ $groupPricing['adults_count'] === 1 ? 'Adult' : 'Adults' }} × ${{ number_format($groupPricing['base_cost_per_adult'], 2) }}: ${{ number_format($groupPricing['adult_cost'], 2) }}
@if($groupPricing['paying_children'] > 0 || $groupPricing['free_children'] > 0) @if($groupPricing['free_children'] > 0)
{{ $groupPricing['free_children'] }} {{ $groupPricing['free_children'] === 1 ? 'Child' : 'Children' }} (Free): $0.00
@endif @if($groupPricing['paying_children'] > 0)
{{ $groupPricing['paying_children'] }} {{ $groupPricing['paying_children'] === 1 ? 'Child' : 'Children' }} @if($groupPricing['child_discount_percentage'] > 0) ({{ $groupPricing['child_discount_percentage'] }}% discount) @endif × ${{ number_format($groupPricing['child_cost_per_child'], 2) }}: ${{ number_format($groupPricing['child_cost'], 2) }}
@endif @endif @if(isset($groupPricing['total_optional_cost']) && $groupPricing['total_optional_cost'] > 0)
Optional Activities: ${{ number_format($groupPricing['total_optional_cost'], 2) }}
@endif @if($groupPricing['savings_from_children'] > 0)
Child Pricing Savings: -${{ number_format($groupPricing['savings_from_children'], 2) }}
@endif
Total Cost: ${{ number_format($groupPricing['total_cost'], 2) }}
@else
@php $pricingSummary = $this->getPricingSummary(); @endphp @if($pricingSummary['type'] === 'self_planned')
Per Person Budget: ${{ number_format($pricingSummary['per_person_cost'], 2) }}
Total Budget ({{ $travelerBreakdown['total'] }} travelers): ${{ number_format($pricingSummary['total_cost'], 2) }}
@endif
@endif