@extends('layouts/public') @section('title', 'Order Placed — KalaRhea') @section('content')
@if ($order->isPaid() || $order->isCompleted()) @elseif ($order->status === \App\Models\Order::STATUS_CANCELLED) @else @endif

@if ($order->isPaid() || $order->isCompleted()) {{ __('Payment Successful!') }} @elseif ($order->status === \App\Models\Order::STATUS_CANCELLED) {{ __('Order Cancelled') }} @else {{ __('Order Placed') }} @endif

{{ __('Order code:') }} {{ $order->code }}

{{ __(match ($order->status) { \App\Models\Order::STATUS_DRAFT => 'Draft — awaiting payment', \App\Models\Order::STATUS_PAID => 'Paid', \App\Models\Order::STATUS_COMPLETED => 'Completed', \App\Models\Order::STATUS_CANCELLED => 'Cancelled', default => $order->statusLabel(), }) }}

@if ($order->payment_method === \App\Models\Order::METHOD_WHATSAPP)

{{ __('Your order & details will be sent to our WhatsApp. Click below to continue:') }}

@if ($waUrl) {{ __('Send to WhatsApp') }} @endif @elseif ($order->payment_method === \App\Models\Order::METHOD_MIDTRANS) @if ($order->isDraft() && $order->redirect_url)

{{ __('Your payment is not complete. Finish it on the payment page:') }}

{{ __('Complete Payment') }} @elseif ($order->isDraft())

{{ __('Awaiting payment. Order stays draft until payment is received.') }}

@else

{{ __('Thank you! Your order will be processed shortly.') }}

@endif @endif

{{ __('Order Details') }}

@foreach ($order->items as $item)
{{ $item->name }}

{{ $item->name }}

@if ($item->size || $item->color)

{{ implode(', ', array_filter([$item->size, $item->color])) }}

@endif
{{ $item->qty }}x {{ format_price($item->subtotal, $order->store_country) }}
@endforeach
{{ __('Total') }} {{ format_price($order->total, $order->store_country) }}

{{ __('Name') }} {{ $order->customer_name }} ({{ $order->phone }})

{{ __('Address') }} {{ $order->address }}

City {{ $order->city }}, {{ $order->province }} {{ $order->postal_code }}, {{ $order->country }}

{{ __('← Continue shopping') }}
@endsection @push('head') @endpush