@extends('layouts.app') @section('title', 'Bangladesh Unbound - Ongoing Tours') @section('page-title', 'Ongoing Tours') @section('breadcrumb') @endsection @section('content')
Tour Icon

{{ $booking?->tourPackage?->name ?? 'Tour Package' }}

{{ $booking->duration ?? 'N/A' }}

Pickup: {{ $booking->pickup_location ?? 'N/A' }}
Drop off: {{ $booking->dropoff_location ?? 'N/A' }}
Tour Guide
{{ Auth::guard('customer')->user()->full_name ?? '' }}

{{ Auth::guard('customer')->user()->full_name ?? 'N/A' }}

{{ Auth::guard('customer')->user()->phone ?? 'N/A' }}

@php use Carbon\Carbon; $totalDays = $booking->duration_days ?? 30; $submittedDays = $submittedDays ?? []; $currentDay = $currentDay ?? 1; $firstOfMonth = Carbon::now()->startOfMonth(); $lastOfMonth = Carbon::now()->endOfMonth(); $monthDays = []; for ($day = 1; $day <= $lastOfMonth->day; $day++) { $monthDays[] = Carbon::createFromDate($firstOfMonth->year, $firstOfMonth->month, $day); } $nextPendingDay = !empty($submittedDays) ? max($submittedDays) + 1 : 1; @endphp @foreach($monthDays as $dayDate) @php $dayNumber = $dayDate->day; $inFeedbackRange = $dayNumber <= $totalDays; $isCompleted=in_array($dayNumber, $submittedDays); $isEnabled=$dayNumber==$nextPendingDay; $isLocked=$inFeedbackRange && !$isEnabled && !$isCompleted; $isActive=$dayNumber==$currentDay; @endphp
Day-{{ $dayNumber }}
{{ $dayDate->format('d M') }}
{{ $dayDate->format('D') }}
@if($isLocked)
@endif @if($isCompleted)
@endif
@endforeach
@for($day = 1; $day <= $totalDays; $day++) @php $dayData=$dayItineraries[$day] ?? []; $isCompleted=in_array($day, $submittedDays); $feedback=$feedbackData[$day] ?? null; @endphp

{{ $isCompleted ? "Feedback for Day $day" : "Day $day" }}

@foreach($dayData['activities'] ?? [] as $index => $activity) @php $completedActivities = $feedback->activities_completed ?? []; @endphp
@endforeach
@if(!$isCompleted)
@endif
@endfor
@include('customer.dashboard.partials.modals.alert') @include('customer.dashboard.partials.modals.complaint') @include('customer.dashboard.partials.modals.success') @endsection @push('scripts') @endpush