@extends('layouts.main') @section('title', 'My Orders') @section('content')

Pesanan Saya

Riwayat dan status pesanan Anda

@if (session('error'))

{{ session('error') }}

@endif
@forelse ($orders as $order)
No. {{ $loop->iteration + $orders->firstItem() - 1 }} #{{ $order->id }}
Detail
@if($order->product->product_image ?? false) {{ $order->product->product_title }} @endif

{{ $order->product->product_title ?? 'N/A' }}

Qty: {{ $order->quantity }}

Total Harga

{{ $order->formatted_total_price }}

Metode Bayar

{{ ucfirst($order->payment_method) }}
Status Pesanan {{ $order->order_status_label }}
Status Pembayaran {{ $order->status_label }}
Status Produksi {{ $order->production_status_label }}
@if ($order->payment_method === 'transfer') @php $hasProofFile = !empty($order->proof_file); $proofExists = false; if ($hasProofFile) { try { $proofExists = \Illuminate\Support\Facades\Storage::disk('uploads')->exists($order->proof_file); } catch (\Exception $e) { $proofExists = false; } } @endphp @if (!$proofExists) Upload Bukti @else @php try { $proofUrl = route('orders.proof', $order->id); } catch (\Exception $e) { $proofUrl = asset('uploads/' . $order->proof_file); } @endphp Lihat Bukti @endif @endif @if ($order->payment_method === 'dp') @php $hasProofFile = !empty($order->proof_file); $proofExists = false; if ($hasProofFile) { try { $proofExists = \Illuminate\Support\Facades\Storage::disk('uploads')->exists($order->proof_file); } catch (\Exception $e) { $proofExists = false; } } @endphp @if (!$proofExists) Upload Bukti DP @else @php try { $proofUrl = route('orders.proof', $order->id); } catch (\Exception $e) { $proofUrl = asset('uploads/' . $order->proof_file); } @endphp Lihat Bukti @endif @endif @if ($order->payment_method === 'midtrans' && $order->status !== 'selesai' && $order->midtrans_status !== 'settlement') @endif
@empty

Belum ada pesanan

Belanja Sekarang
@endforelse
@if ($orders->count() > 0)
{{ $orders->links() }}
@endif
@if(config('midtrans.client_key')) @else @endif @if (session('success')) @endif @if (session('error')) @endif @endsection