@php use App\Enums\Order\OrderItemStatusEnum; /** @var \Illuminate\Support\Collection $items */ /** @var bool $editPermission */ /** @var string $detailRoute */ @endphp
@if($items->isEmpty())

{{ __('labels.no_items_for_this_order') }}

@else
@foreach($items as $item)
@if(!empty($item['image'])) @else
@endif
{{ $item['product_title'] }}
@if(!empty($item['variant_title'])) {{ $item['variant_title'] }} @endif @if(!empty($item['store'])) {{ $item['store'] }} @endif @if(!empty($item['sku'])) {{ $item['sku'] }} @endif
@if(!empty($item['addons']) && $item['addons']->count() > 0)
{{ __('labels.addons') }}: @foreach($item['addons'] as $addon) {{ $addon->addonGroup?->title }} — {{ $addon->addonItem?->title }} @endforeach
@endif @if(!empty($item['attachments'])) @php $gallery = 'order-item-attachments-' . (int) $item['id']; @endphp
{{ __('labels.prescription') }} ({{ count($item['attachments']) }}) @foreach(array_slice($item['attachments'], 1) as $url) @endforeach
@endif
{{ __('labels.quantity') }}
× {{ (int) $item['quantity'] }}
{{ __('labels.subtotal') }}
{{ $currencyService->format($item['subtotal']) }}
@include('partials.order-status', ['status' => $item['status']])
@if($editPermission && $item['id']) @if($isReschedulePending ?? false)
{{ __('labels.needs_reschedule') }}
@elseif(empty($item['status']) || $item['status'] === OrderItemStatusEnum::AWAITING_STORE_RESPONSE())
@elseif($item['status'] === OrderItemStatusEnum::ACCEPTED())
@if(!($isPickup ?? false)) @endif
@elseif($item['status'] === OrderItemStatusEnum::PREPARING())
@elseif($item['status'] === OrderItemStatusEnum::RETURNING_TO_STORE())
@endif @endif
@endforeach
@if(!empty($orderUuid)) @php $isScheduledExpand = str_contains(request()->route()?->getName() ?? '', 'scheduled_orders') || request()->boolean('is_scheduled'); $invoiceExpandRoute = $isScheduledExpand ? ($panel === 'seller' ? route('seller.scheduled_orders.invoice', ['id' => $orderUuid]) : route('admin.scheduled_orders.invoice', ['id' => $orderUuid])) : ($panel === 'seller' ? route('seller.orders.invoice', ['id' => $orderUuid]) : route('admin.orders.invoice', ['id' => $orderUuid])); @endphp {{ __('labels.download_invoice') }} @endif {{ __('labels.view_full_order') }}
@endif