@extends('layouts.admin') @section('title', 'Dispute #' . $dispute->id) @push('styles') @endpush @section('content') Back to disputes @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

Dispute #{{ $dispute->id }}

On {{ optional($tx)->title ?? '—' }} · ₦{{ number_format(optional($tx)->amount ?? 0, 2) }} · opened by {{ optional($dispute->initiator)->name ?? 'unknown' }} · {{ $dispute->created_at->diffForHumans() }}
{{ str_replace('_', ' ', $dispute->status) }}
@if($dispute->status === 'resolved' || $dispute->status === 'rejected' || $dispute->status === 'closed')
Resolved {{ optional($dispute->resolved_at)->diffForHumans() }} @if($dispute->resolver) by {{ $dispute->resolver->name }}@endif. @if($dispute->resolution)
{{ $dispute->resolution }}
@endif
@endif
{{-- Buyer side --}}

Buyer @if($tx && $tx->buyer) {{ $tx->buyer->name }} · {{ $tx->buyer->email }} @endif

@if($buyerWallet)
Wallet balance₦{{ number_format($buyerWallet->balance, 2) }}
Held in escrow₦{{ number_format($buyerWallet->escrow_balance, 2) }}
@endif @if($dispute->initiator && $dispute->initiator->id === optional($tx)->buyer_id)
Buyer's claim
{{ $dispute->description }}
@endif
{{-- Seller side --}}

Seller @if($tx && $tx->seller) {{ $tx->seller->name }} · {{ $tx->seller->email }} @endif

@if($sellerWallet)
Wallet balance₦{{ number_format($sellerWallet->balance, 2) }}
Held in escrow₦{{ number_format($sellerWallet->escrow_balance, 2) }}
@endif @if($dispute->initiator && $dispute->initiator->id === optional($tx)->seller_id)
Seller's claim
{{ $dispute->description }}
@endif

Transaction

@if($tx)
ID#{{ $tx->id }}
Amount₦{{ number_format($tx->amount, 2) }}
Status{{ $tx->status }}
Created{{ $tx->created_at->format('M d, Y H:i') }}
@if($tx->description)
{{ $tx->description }}
@endif @endif
@if($evidenceFiles->isNotEmpty())

Evidence Files {{ $evidenceFiles->count() }}

@foreach($evidenceFiles as $f) {{ \Illuminate\Support\Str::limit($f->content ?? 'attachment', 32) }}
by {{ optional($f->sender)->name ?? '—' }} · {{ $f->created_at->diffForHumans() }}
@endforeach
@endif @if($dispute->status === 'open' && auth()->user()->role === 'super_admin')

Resolve this dispute

Choose how funds should move and document the decision. Both parties will be notified.

@csrf
Cancel
@endif @endsection