150 lines
7.4 KiB
PHP
150 lines
7.4 KiB
PHP
@props(['order' => null])
|
|
|
|
<div class="offcanvas offcanvas-end pb-sm-2 px-sm-2" id="orderDetails_{{ $order->id }}" tabindex="-1" aria-labelledby="orderDetailsLabel"
|
|
style="width: 500px" aria-modal="true" role="dialog">
|
|
|
|
<!-- Header -->
|
|
<div class="offcanvas-header align-items-start py-3 pt-lg-4">
|
|
<div>
|
|
<h4 class="offcanvas-title mb-1" id="orderDetailsLabel">
|
|
Order # {{ $order?->number ?? '78A6431D409' }}
|
|
</h4>
|
|
<span class="d-flex align-items-center fs-sm fw-medium text-body-emphasis">
|
|
<span class="bg-info rounded-circle p-1 me-2"></span>
|
|
{{ $order?->status_title ?? 'In progress' }}
|
|
</span>
|
|
</div>
|
|
<button type="button" class="btn-close mt-0" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
|
</div>
|
|
|
|
<!-- Body -->
|
|
<div class="offcanvas-body d-flex flex-column gap-4 pt-2 pb-3">
|
|
|
|
<!-- Items -->
|
|
<div class="d-flex flex-column gap-3">
|
|
@if($order && $order->details)
|
|
@foreach ($order->details as $detail)
|
|
<div class="d-flex align-items-center">
|
|
<a class="flex-shrink-0" href="{{ route('product.detail', $detail->reference->item->slug ?? '#') }}">
|
|
<img src="{{ $detail->reference->item->image_url ?? '/img/shop/electronics/thumbs/01.png' }}"
|
|
width="110" alt="{{ $detail->reference->item->name ?? 'Product' }}">
|
|
</a>
|
|
<div class="w-100 min-w-0 ps-2 ps-sm-3">
|
|
<h5 class="d-flex animate-underline mb-2">
|
|
<a class="d-block fs-sm fw-medium text-truncate animate-target"
|
|
href="{{ route('product.detail', $detail->reference->item->slug ?? '#') }}">
|
|
{{ $detail->reference->item->name ?? 'Product Name' }}
|
|
</a>
|
|
</h5>
|
|
<div class="h6 mb-2">Rp {{ number_format($detail->price ?? 0, 0, ',', '.') }}</div>
|
|
<div class="fs-xs">Qty: {{ $detail->qty ?? 1 }}</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
@else
|
|
<!-- Default items for demo -->
|
|
<div class="d-flex align-items-center">
|
|
<a class="flex-shrink-0" href="shop-product-general-electronics.html">
|
|
<img src="assets/img/shop/electronics/thumbs/01.png" width="110" alt="Smart Watch">
|
|
</a>
|
|
<div class="w-100 min-w-0 ps-2 ps-sm-3">
|
|
<h5 class="d-flex animate-underline mb-2">
|
|
<a class="d-block fs-sm fw-medium text-truncate animate-target"
|
|
href="shop-product-general-electronics.html">Smart Watch Series 7, White</a>
|
|
</h5>
|
|
<div class="h6 mb-2">$429.00</div>
|
|
<div class="fs-xs">Qty: 1</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center">
|
|
<a class="flex-shrink-0" href="shop-product-general-electronics.html">
|
|
<img src="assets/img/shop/electronics/thumbs/08.png" width="110" alt="iPhone 14">
|
|
</a>
|
|
<div class="w-100 min-w-0 ps-2 ps-sm-3">
|
|
<h5 class="d-flex animate-underline mb-2">
|
|
<a class="d-block fs-sm fw-medium text-truncate animate-target"
|
|
href="shop-product-general-electronics.html">Apple iPhone 14 128GB White</a>
|
|
</h5>
|
|
<div class="h6 mb-2">$899.00</div>
|
|
<div class="fs-xs">Qty: 1</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center">
|
|
<a class="flex-shrink-0" href="shop-product-general-electronics.html">
|
|
<img src="assets/img/shop/electronics/thumbs/09.png" width="110" alt="iPad Pro">
|
|
</a>
|
|
<div class="w-100 min-w-0 ps-2 ps-sm-3">
|
|
<h5 class="d-flex animate-underline mb-2">
|
|
<a class="d-block fs-sm fw-medium text-truncate animate-target"
|
|
href="shop-product-general-electronics.html">Tablet Apple iPad Pro M2</a>
|
|
</h5>
|
|
<div class="h6 mb-2">$989.00</div>
|
|
<div class="fs-xs">Qty: 1</div>
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Delivery + Payment info -->
|
|
<div class="border-top pt-4">
|
|
<h6>Delivery</h6>
|
|
<ul class="list-unstyled fs-sm mb-4">
|
|
<li class="d-flex justify-content-between mb-1">
|
|
Estimated delivery date:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
{{ $order?->estimated_delivery_date ?? 'Feb 8, 2025 / 10:00 - 12:00' }}
|
|
</span>
|
|
</li>
|
|
<li class="d-flex justify-content-between mb-1">
|
|
Shipping method:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
{{ $order?->courier_company ?? 'Courier delivery' }} {{ $order?->courier_type ?? '' }}
|
|
</span>
|
|
</li>
|
|
<li class="d-flex justify-content-between">
|
|
Shipping address:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
{{ $order?->address?->location ?? '567 Cherry Lane Apt B12,<br>Harrisburg' }}
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
<h6>Payment</h6>
|
|
<ul class="list-unstyled fs-sm m-0">
|
|
<li class="d-flex justify-content-between mb-1">
|
|
Payment method:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
{{ $order?->payment_method ?? 'Cash on delivery' }}
|
|
</span>
|
|
</li>
|
|
<li class="d-flex justify-content-between mb-1">
|
|
Tax collected:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
Rp {{ number_format($order?->tax ?? 0, 0, ',', '.') }}
|
|
</span>
|
|
</li>
|
|
<li class="d-flex justify-content-between">
|
|
Shipping:
|
|
<span class="text-body-emphasis fw-medium text-end ms-2">
|
|
Rp {{ number_format($order?->shipping_cost ?? 0, 0, ',', '.') }}
|
|
</span>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<!-- Total -->
|
|
<div class="d-flex align-items-center justify-content-between fs-sm border-top pt-4">
|
|
Estimated total:
|
|
<span class="h5 text-end ms-2 mb-0">
|
|
Rp {{ number_format($order?->total ?? 210590, 0, ',', '.') }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="offcanvas-header">
|
|
<a class="btn btn-lg btn-secondary w-100" href="#!">Change the delivery time</a>
|
|
</div>
|
|
</div>
|