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

{{ $dispute->dispute_no }}

@if($dispute->status === 'pending') Pending @elseif($dispute->status === 'under_review') Under Review @elseif($dispute->status === 'resolved') Resolved @elseif($dispute->status === 'rejected') Rejected @else Cancelled @endif @if($dispute->dispute_type === 'booking') Booking Dispute @elseif($dispute->dispute_type === 'subscription') Subscription Dispute @elseif($dispute->dispute_type === 'gift_purchase') Gift Dispute @endif
Filed on: {{ $dispute->created_at ? $dispute->created_at->format('d M Y, h:i A') : '-' }} ({{ $dispute->created_at ? $dispute->created_at->diffForHumans() : '' }})
Claimed Amount

₹{{ number_format((float) $dispute->claim_amount, 2) }}

Complainant Profile
@if($dispute->user)
{{ strtoupper(substr($dispute->user->name ?? 'U', 0, 1)) }}
{{ $dispute->user->name }} {{ ucfirst($dispute->user->account_type ?? 'user') }}
{{ $dispute->user->email ?? 'N/A' }} | {{ $dispute->user->phone_no ?? 'N/A' }}
Wallet Balance: ₹{{ number_format((float) ($dispute->user->wallet_balance ?? 0), 2) }}
@else
User profile is no longer available.
@endif
Disputed Transaction Details
@if($dispute->dispute_type === 'booking' && $dispute->disputable_id) View Booking @endif
@if($dispute->dispute_type === 'booking' && $dispute->disputable) @php $b = $dispute->disputable; @endphp
Booking Reference
#{{ $b->booking_no ?: $b->id }}
Booking Status
{{ ucfirst(str_replace('_', ' ', $b->status)) }}
Customer (User)
{{ $b->user?->name ?: 'N/A' }}
Service Partner
{{ $b->partner?->name ?: 'N/A' }}
Scheduled Time
{{ $b->scheduled_start_at ? $b->scheduled_start_at->format('d M Y, h:i A') : 'N/A' }}
Total / Paid Amount
₹{{ number_format((float) ($b->payable_amount ?: $b->total_amount), 2) }}
@if($b->address)
Service Location
{{ $b->address }}
@endif @if(!empty($b->visiting_places) && is_array($b->visiting_places))
Visiting Places
@foreach($b->visiting_places as $place) {{ is_array($place) ? ($place['name'] ?? json_encode($place)) : $place }} @endforeach
@endif
@elseif($dispute->dispute_type === 'subscription' && $dispute->disputable) @php $s = $dispute->disputable; @endphp
Subscription Plan
{{ $s->plan_name ?: ($s->plan?->name ?: 'N/A') }}
Payment Status
{{ ucfirst($s->payment_status ?: 'completed') }}
Duration
{{ $s->duration_day }} Days
Validity Window
{{ $s->start_at ? $s->start_at->format('d M Y') : '-' }} to {{ $s->expire_at ? $s->expire_at->format('d M Y') : '-' }}
@elseif($dispute->dispute_type === 'gift_purchase' && $dispute->disputable) @php $g = $dispute->disputable; @endphp
Gift Item
{{ $g->gift?->title ?: 'Gift #' . $g->id }}
Recipient Partner
{{ $g->partner?->name ?: 'N/A' }}
Delivery Status
{{ ucfirst($g->status) }}
Gift Price
₹{{ number_format((float) ($g->gift?->price ?? 0), 2) }}
@if($g->formatted_address)
Delivery Address
{{ $g->formatted_address }}
@endif
@else
Associated transaction item record (ID #{{ $dispute->disputable_id }}) could not be retrieved.
@endif
Dispute Statement & Complaint
Subject
{{ $dispute->subject }}
Detailed Explanation
{{ $dispute->description }}
Evidence Attached
@if($dispute->evidence_url) @else
No evidence image provided by complainant.
@endif
@if($dispute->dispute_type === 'booking' && $dispute->disputable && $dispute->disputable->noShow) @php $linkedNoShow = $dispute->disputable->noShow; @endphp
Linked to No-Show Case #{{ $linkedNoShow->case_no }}
This booking timed out as a No-Show. To ensure synchronized partner penalties and travel compensations without double payouts, please resolve via No-Show Management.
@endif @if($dispute->status === 'pending')
Status: Pending Review
Let complainant know their case is currently being looked into.
@endif @if(in_array($dispute->status, ['pending', 'under_review'], true))
Resolve Case
@csrf
₹
Claimed: ₹{{ number_format((float) $dispute->claim_amount, 2) }}. This will be added directly to user's wallet.
Reject Dispute
@csrf
Sent to complainant.
@elseif($dispute->status === 'resolved')
Case Resolved
Closed on: {{ $dispute->resolved_at ? $dispute->resolved_at->format('d M Y, h:i A') : '-' }} by {{ $dispute->resolver?->name ?: 'Admin' }}
Resolution Method
{{ ucwords(str_replace('_', ' ', $dispute->resolution_type)) }}
Refund Amount Credited
₹{{ number_format((float) $dispute->refund_amount, 2) }}
@if($dispute->resolution_summary)
Resolution Summary Sent to Complainant
{{ $dispute->resolution_summary }}
@endif @if($dispute->admin_notes)
Internal Admin Notes
{{ $dispute->admin_notes }}
@endif
@elseif($dispute->status === 'rejected')
Case Rejected
Declined on: {{ $dispute->resolved_at ? $dispute->resolved_at->format('d M Y, h:i A') : '-' }} by {{ $dispute->resolver?->name ?: 'Admin' }}
@if($dispute->resolution_summary)
Rejection Explanation Provided
{{ $dispute->resolution_summary }}
@endif @if($dispute->admin_notes)
Internal Admin Notes
{{ $dispute->admin_notes }}
@endif
@elseif($dispute->status === 'cancelled')
Dispute Cancelled

{{ $dispute->resolution_summary ?: 'The complainant cancelled this dispute.' }}

@endif
@endsection @push('scripts') @endpush