
<?php $__env->startSection('title', 'Detail Pesanan'); ?>
<?php $__env->startSection('content'); ?>

<div class="container">
    <div class="mb-3"><strong>Customer:</strong> <?php echo e($order->customer_name); ?></div>
    <div class="mb-3"><strong>No Telp:</strong> <?php echo e($order->customer_phone ?? '-'); ?></div>
    <div class="mb-3"><strong>Status:</strong> <?php echo e(ucfirst($order->status)); ?></div>
    <div class="mb-3"><strong>Total Harga:</strong> Rp <?php echo e(number_format($order->total_price,0,',','.')); ?></div>
    <div class="mb-3"><strong>Tanggal Pesan:</strong> <?php echo e(\Carbon\Carbon::parse($order->order_date)->format('d F Y')); ?></div>

    <?php if($order->status === 'scheduled'): ?>
        <div class="mb-3"><strong>Tanggal Ambil:</strong> <?php echo e(\Carbon\Carbon::parse($order->pickup_date)->format('d F Y')); ?></div>
    <?php endif; ?>

    <h5>Products</h5>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>Nama Produk</th>
                <th>Jumlah</th>
                <th>Harga</th>
                <th>Subtotal</th>
            </tr>
        </thead>
        <tbody>
            <?php $__currentLoopData = $order->details; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $detail): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($detail->product->name); ?></td>
                <td><?php echo e($detail->qty); ?></td>
                <td>Rp <?php echo e(number_format($detail->price,0,',','.')); ?></td>
                <td>Rp <?php echo e(number_format($detail->qty * $detail->price,0,',','.')); ?></td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>

    <?php if (isset($component)) { $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.gold-button','data' => ['type' => 'button','onclick' => 'window.location.href=\''.e(route('orders.index')).'\'']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('gold-button'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'button','onclick' => 'window.location.href=\''.e(route('orders.index')).'\'']); ?>
        Back
     <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $attributes = $__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__attributesOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739)): ?>
<?php $component = $__componentOriginalb04da7a8feb93a7268b6e0eef6b32739; ?>
<?php unset($__componentOriginalb04da7a8feb93a7268b6e0eef6b32739); ?>
<?php endif; ?>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.main', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\PAW\PiaZhang\resources\views/orders/show.blade.php ENDPATH**/ ?>