{{-- resources/views/livewire/pages/trips/index.blade.php --}} @extends('layouts.dashboard') @section('title', 'My Trips - PangoQ') @section('content')

My Trips

Manage and track your travel adventures

Total Trips

{{ $trips->count() }}

Active Trips

{{ $trips->where('status', 'active')->count() }}

Total Saved

${{ number_format( $trips->sum(function ($trip) { return $trip->savingsWallet ? $trip->savingsWallet->current_amount : 0; }), 0, ) }}

Total Travelers

{{ $trips->sum(function ($trip) { return $trip->members ? $trip->members->count() : 1; }) }}

@forelse ($trips as $trip)
@if ($trip->image_url) {{ $trip->title }} @else
No Image Available
@endif
{{ ucfirst($trip->status) }}

{{ $trip->title }}

{{ $trip->destination_name }}
{{ $trip->date_range }}
{{ $trip->members ? $trip->members->count() : 1 }} {{ ($trip->members ? $trip->members->count() : 1) == 1 ? 'traveler' : 'travelers' }}
@if ($trip->savingsWallet)
Savings Progress @php $progressPercentage = 0; if ($trip->savingsWallet->target_amount > 0) { $progressPercentage = round( ($trip->savingsWallet->current_amount / $trip->savingsWallet->target_amount) * 100, ); } @endphp {{ $progressPercentage }}%
${{ number_format($trip->savingsWallet->current_amount, 0) }} saved ${{ number_format($trip->savingsWallet->target_amount, 0) }} goal
@endif
@empty

No trips yet

Start planning your first adventure and create memories that will last a lifetime. The world is waiting for you!

Plan Your First Trip
@endforelse
@endsection