@extends('layouts.main') @section('title', 'My Orders') @section('content')
Riwayat dan status pesanan Anda
{{ session('error') }}
| No | ID Pesanan | Produk | Qty | Total Harga | Metode Bayar | Status Pesanan | Status Pembayaran | Status Produksi | Aksi |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration + $orders->firstItem() - 1 }} | #{{ $order->id }} |
@if($order->product->product_image ?? false)
|
{{ $order->quantity }} | {{ $order->formatted_total_price }} | {{ ucfirst($order->payment_method) }} | {{ $order->order_status_label }} | {{ $order->status_label }} | {{ $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)
@else
@php
try {
$proofUrl = route('orders.proof', $order->id);
} catch (\Exception $e) {
$proofUrl = asset('uploads/' . $order->proof_file);
}
@endphp
@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)
@else
@php
try {
$proofUrl = route('orders.proof', $order->id);
} catch (\Exception $e) {
$proofUrl = asset('uploads/' . $order->proof_file);
}
@endphp
@endif
@endif
@if ($order->payment_method === 'midtrans' && $order->status !== 'selesai' && $order->midtrans_status !== 'settlement')
@endif
|
|
Belum ada pesanan Belanja Sekarang |
|||||||||
Total Harga
{{ $order->formatted_total_price }}
Metode Bayar
{{ ucfirst($order->payment_method) }}Belum ada pesanan
Belanja Sekarang