@extends('layouts.app') @section('title', 'Detail Pesanan '.$order->code) @section('content') @php $statusColors = ['amber' => '#737373', 'blue' => '#525252', 'green' => '#111111', 'red' => '#d63031', 'gray' => '#737373']; $nextStatuses = array_filter([ \App\Models\Order::STATUS_PAID => 'Tandai Dibayar', \App\Models\Order::STATUS_COMPLETED => 'Tandai Selesai', \App\Models\Order::STATUS_CANCELLED => 'Batalkan', ], fn ($label, $key) => $key !== $order->status, ARRAY_FILTER_USE_BOTH); @endphp

{{ $order->code }}

Dibuat {{ $order->created_at->format('d M Y H:i') }} · {{ $order->payment_method === 'midtrans' ? 'Payment Gateway' : 'WhatsApp' }}

← Kembali
@if (session('success'))
{{ session('success') }}
@endif

Item Pesanan

@foreach ($order->items as $item)
{{ $item->name }}
{{ $item->name }} @if ($item->size || $item->color) {{ implode(', ', array_filter([$item->size, $item->color])) }} @endif {{ format_price($item->price, $order->store_country) }} × {{ $item->qty }}
{{ format_price($item->subtotal, $order->store_country) }}
@endforeach
Subtotal{{ format_price($order->subtotal, $order->store_country) }}
Pengiriman{{ $order->shipping_cost ? format_price($order->shipping_cost, $order->store_country) : '—' }}
Total{{ format_price($order->total, $order->store_country) }}

Status Pesanan

{{ $order->statusLabel() }} @if ($order->paid_at) Dibayar {{ $order->paid_at->format('d M Y H:i') }} @endif

@if ($nextStatuses)
@csrf @method('PATCH')
@else

Tidak ada aksi status tersedia.

@endif

Data Pelanggan

Nama {{ $order->customer_name }}

Telepon {{ $order->phone }}

@if ($order->email)

Email {{ $order->email }}

@endif

Alamat {{ $order->address }}

Kota {{ $order->city }}, {{ $order->province }} {{ $order->postal_code }}

Negara {{ $order->country }}

@if ($order->notes)

Catatan {{ $order->notes }}

@endif @if ($order->user_id && $order->user)

Akun {{ $order->user->email }}

@endif
@if ($order->redirect_url && $order->isDraft()) Buka Halaman Pembayaran @endif
@endsection @push('head') @include('admin.partials.track-styles') @endpush