

<?php $__env->startSection('title', 'All Shipments'); ?>
<?php $__env->startSection('heading', 'All Shipments'); ?>

<?php $__env->startSection('actions'); ?>
    <a class="btn-admin btn-back" href="<?php echo e(route('admin.dashboard')); ?>">&lt;- Back</a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<p><a class="btn-admin btn-primary" href="<?php echo e(route('admin.shipments.create')); ?>">Create New Shipment</a></p>

<?php if(($site['customs_notice_enabled'] ?? '1') === '1'): ?>
    <div class="notice-banner">
        <span>🚨</span>
        <?php echo e($site['customs_notice_text'] ?? 'Note: To turn on Customs Clearance Document Required.'); ?>

    </div>
<?php endif; ?>

<div class="panel" style="padding:0; overflow-x:auto;">
    <table class="ship-table">
        <thead>
            <tr>
                <th>Tracking Code</th>
                <th>Sender</th>
                <th>Receiver</th>
                <th>Status</th>
                <th>Origin → Destination</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
            <?php $__empty_1 = true; $__currentLoopData = $shipments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $shipment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                <tr>
                    <td><?php echo e($shipment->tracking_number); ?></td>
                    <td><?php echo e($shipment->sender_name); ?></td>
                    <td><?php echo e($shipment->receiver_name); ?></td>
                    <td><span class="badge <?php echo e($shipment->status); ?>"><?php echo e($shipment->statusLabel()); ?></span></td>
                    <td><?php echo e($shipment->origin_city); ?> → <?php echo e($shipment->destination_city); ?></td>
                    <td>
                        <div class="action-stack">
                            <a class="act act-update" href="<?php echo e(route('admin.shipments.show', $shipment)); ?>">Update</a>
                            <a class="act act-edit" href="<?php echo e(route('admin.shipments.edit', $shipment)); ?>">Edit</a>
                            <form method="POST" action="<?php echo e(route('admin.shipments.destroy', $shipment)); ?>" onsubmit="return confirm('Delete this shipment?');">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>
                                <button class="act act-delete" type="submit">Delete</button>
                            </form>
                        </div>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                <tr><td colspan="6">No shipments yet.</td></tr>
            <?php endif; ?>
        </tbody>
    </table>
</div>
<div style="margin-top:1rem;"><?php echo e($shipments->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\owner\Videos\NEWCOURIER\resources\views/admin/shipments/index.blade.php ENDPATH**/ ?>