<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col-md-6">
        <div class="card mb-4">
            <h5 class="card-header">Informasi Maintenance</h5>
            <div class="card-body">
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Objek</label>
                    <div class="col-sm-8">
                        <?php echo e($log->maintainable?->name ?? 'Objek terhapus'); ?>

                        <span class="badge bg-label-secondary ms-2"><?php echo e(class_basename($log->maintainable_type)); ?></span>
                    </div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Petugas</label>
                    <div class="col-sm-8"><?php echo e($log->submitter_name); ?></div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Tanggal</label>
                    <div class="col-sm-8"><?php echo e($log->performed_at?->translatedFormat('l, d F Y H:i')); ?></div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Kondisi</label>
                    <div class="col-sm-8">
                        <?php if($log->condition === 'good'): ?>
                            <span class="badge bg-label-success">BAIK</span>
                        <?php elseif($log->condition === 'minor'): ?>
                            <span class="badge bg-label-warning">RUSAK RINGAN</span>
                        <?php else: ?>
                            <span class="badge bg-label-danger">RUSAK BERAT</span>
                        <?php endif; ?>
                    </div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Sumber</label>
                    <div class="col-sm-8"><span class="badge bg-label-secondary"><?php echo e($log->source); ?></span></div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Catatan Lokasi</label>
                    <div class="col-sm-8"><?php echo e($log->location_note ?: '-'); ?></div>
                </div>
                <div class="row mb-3">
                    <label class="col-sm-4 fw-bold">Catatan Maintenance</label>
                    <div class="col-sm-8"><?php echo e($log->notes ?: '-'); ?></div>
                </div>
            </div>
            <div class="card-footer border-top">
                <a href="<?php echo e(route('maintenance.index')); ?>" class="btn btn-label-secondary waves-effect">Kembali</a>
                <a href="<?php echo e(route('maintenance.edit', $log->id)); ?>" class="btn btn-warning waves-effect waves-light">Edit</a>
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="card">
            <h5 class="card-header">Foto Bukti</h5>
            <div class="card-body text-center">
                <?php if($log->photo_path): ?>
                    <img src="<?php echo e(\Illuminate\Support\Facades\Storage::url($log->photo_path)); ?>" alt="Foto Bukti" class="img-fluid rounded shadow-sm" style="max-height: 400px;">
                <?php else: ?>
                    <div class="py-5 text-muted">
                        <i class="ti tabler-photo-off d-block fs-1 mb-2"></i>
                        Tidak ada foto bukti.
                    </div>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', ['title' => 'Detail Maintenance', 'heading' => 'Detail Histori Maintenance'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\Project\inventaris-pondok\resources\views/maintenance/show.blade.php ENDPATH**/ ?>