
<?php $__env->startSection('title'); ?>
<?php echo $variables['header_routes']; ?>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<section class="content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card card-outline card-warning">
                    <div class="card-header">
                        <div class="row align-items-center">
                            <div class="col">
                                <h3 class="card-title mb-0"><?php echo e($variables['judul']); ?></h3>
                            </div>
                            <div class="col-auto">
                                <a href="<?php echo e(route('shipment_suppliers.edit', $data->id)); ?>" class="btn btn-sm btn-warning button-cek-permission" data-permission="shipment_suppliers.edit">
                                    <i class="fas fa-edit"></i> Ubah
                                </a>
                                <a href="<?php echo e(route('shipment_suppliers.index')); ?>" class="btn btn-sm btn-warning ml-2">
                                    <i class="fas fa-arrow-left"></i> Kembali ke Daftar
                                </a>
                            </div>
                        </div>
                    </div>
                    <div class="card-body">
                        <!-- Shipment Supplier Header Info -->
                        <div class="row">
                            <div class="col-md-6">
                                <table class="table table-borderless">
                                    <tr>
                                        <td width="40%"><strong>Kode</strong></td>
                                        <td>: <span class="badge badge-info"><?php echo e($data->code); ?></span></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Nama</strong></td>
                                        <td>: <?php echo e($data->name); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Kontak Person</strong></td>
                                        <td>: <?php echo e($data->contact_person ?: '-'); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Telepon</strong></td>
                                        <td>: <?php echo e($data->phone ?: '-'); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Email</strong></td>
                                        <td>: <?php echo e($data->email ?: '-'); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Status</strong></td>
                                        <td>: <span class="badge <?php echo e($data->status_badge); ?>"><?php echo e($data->status); ?></span></td>
                                    </tr>
                                </table>
                            </div>
                            <div class="col-md-6">
                                <table class="table table-borderless">
                                    <tr>
                                        <td width="40%"><strong>Hari Kontak</strong></td>
                                        <td>: <?php echo e($data->contact_days_string); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Waktu Kontak</strong></td>
                                        <td>: <?php echo e($data->contact_window); ?></td>
                                    </tr>
                                    <tr>
                                        <td><strong>Lead Time</strong></td>
                                        <td>: <?php echo e($data->lead_time_days); ?> hari</td>
                                    </tr>
                                    <tr>
                                        <td><strong>Dapat Dihubungi Hari Ini</strong></td>
                                        <td>: 
                                            <?php if($data->canContactToday()): ?>
                                            <span class="badge badge-success">Ya</span>
                                            <?php else: ?>
                                            <span class="badge badge-secondary">Tidak</span>
                                            <?php endif; ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><strong>Tanggal Kontak Berikutnya</strong></td>
                                        <td>: 
                                            <?php
                                            $nextContact = $data->getNextContactDate();
                                            ?>
                                            <?php if($nextContact): ?>
                                            <span class="badge badge-info"><?php echo e($nextContact->format('D, M j Y')); ?></span>
                                            <?php else: ?>
                                            <span class="badge badge-secondary">Tidak Diatur</span>
                                            <?php endif; ?>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td><strong>Estimasi Pengiriman</strong></td>
                                        <td>: 
                                            <?php
                                            $estimatedDelivery = $data->getEstimatedDeliveryDate();
                                            ?>
                                            <?php if($estimatedDelivery): ?>
                                            <span class="badge badge-primary"><?php echo e($estimatedDelivery->format('D, M j Y')); ?></span>
                                            <?php else: ?>
                                            <span class="badge badge-secondary">Tidak Diatur</span>
                                            <?php endif; ?>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-12">
                                <table class="table table-borderless">
                                    <tr>
                                        <td width="20%"><strong>Alamat</strong></td>
                                        <td>: <?php echo e($data->address ?: '-'); ?></td>
                                    </tr>
                                </table>
                            </div>
                        </div>

                        <?php if($data->notes): ?>
                        <div class="row">
                            <div class="col-12">
                                <table class="table table-borderless">
                                    <tr>
                                        <td width="20%"><strong>Catatan</strong></td>
                                        <td>: <?php echo e($data->notes); ?></td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <?php endif; ?>

                        <!-- System Information -->
                        <div class="row mt-3">
                            <div class="col-12">
                                <table class="table table-borderless">
                                    <tr>
                                        <td width="20%"><strong>Dibuat Oleh</strong></td>
                                        <td>: <?php echo e($data->creator->fullname ?? 'System'); ?> (<?php echo e($data->created_at->format('d M Y, H:i')); ?>)</td>
                                    </tr>
                                    <tr>
                                        <td><strong>Diubah Oleh</strong></td>
                                        <td>: <?php echo e($data->modificator->fullname ?? '-'); ?> (<?php echo e($data->updated_at ? $data->updated_at->format('d M Y, H:i') : '-'); ?>)</td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts/base_view', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\LSM\resources\views/m-shipment-suppliers/show.blade.php ENDPATH**/ ?>