@extends('frontend.layouts.user.index') @section('title', __('My Trade Orders')) @section('content') {{-- Trade Orders List: active/history cards, resume banner, and quick review modal launcher --}}
@lang('Marketplace')
{{-- Resume shortcut for the last active trade order --}}
@lang('Resume last trade')
@lang('Order') #
@lang('Open Trade')
@lang('Trade Orders')
{{-- Trade order cards --}}
@forelse($orders as $o) @php $currency = $o->wallet->currency->code; $decimals = (int) setting('site_decimal', 2); $actorId = (int) auth()->id(); $hasFeedback = $o->relationLoaded('feedbacks') ? $o->feedbacks->where('user_id', $actorId)->isNotEmpty() : false; $canRate = $o->status->value === 'COMPLETED' && $actorId === (int) $o->taker_id && ! $hasFeedback; @endphp
#{{ $o->id }} · {{ $currency }}
{{ $o->offer->side->label() }} {{ $o->status->label() }} @lang('Price'): {{ number_format((float) $o->price, $decimals) }} @lang('Amount'): {{ number_format((float) $o->amount, $decimals) }}
@lang('View') @if($canRate) @elseif($o->status->value === 'COMPLETED' && $hasFeedback) @php $myFb = $o->feedbacks->where('user_id', $actorId)->first(); @endphp @if($myFb) {{ (int) $myFb->rating }}/5 @endif @endif
@empty @endforelse
{{ $orders->links() }}
@push('scripts') @include('frontend.user.p2p.trade_orders.partials._trade_orders_scripts') @endpush @endsection