<?php if (isset($component)) { $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54 = $attributes; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\AppLayout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('header', null, []); ?> 
        <div class="flex justify-between items-center">
            <h2 class="font-semibold text-xl text-gray-800 dark:text-gray-200 leading-tight">
                <i class="fas fa-file-alt mr-2"></i>
                <?php echo e(__('Detail Laporan')); ?>

            </h2>
            <a href="<?php echo e(route('complaints.index')); ?>"
                class="inline-flex items-center px-4 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-500 rounded-md font-semibold text-xs text-gray-700 dark:text-gray-300 uppercase tracking-widest shadow-sm hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition ease-in-out duration-150">
                <i class="fas fa-arrow-left mr-2"></i>
                Kembali ke Daftar Laporan
            </a>
        </div>
     <?php $__env->endSlot(); ?>

    <div class="py-12">
        <div class="max-w-4xl mx-auto sm:px-6 lg:px-8">
            <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-lg sm:rounded-lg">
                <div class="p-6 md:p-8 text-gray-900 dark:text-gray-100">

                    
                    <div
                        class="flex justify-between items-start mb-6 pb-6 border-b border-gray-200 dark:border-gray-700">
                        <div>
                            <h3 class="text-2xl font-bold text-gray-900 dark:text-gray-100"><?php echo e($data['complaint']->title); ?></h3>
                            <p class="mt-1 text-md text-gray-500 dark:text-gray-400">
                                Dilaporkan oleh: <span class="font-semibold"><?php echo e($data['complaint']->reporter_name); ?></span>
                            </p>
                            <p class="mt-2 text-sm text-gray-500 dark:text-gray-400 flex items-center">
                                <i class="fas fa-user-circle mr-2"></i>
                                Dicatat oleh <?php echo e($data['complaint']->creator->name ?? 'Sistem'); ?> pada
                                <?php echo ($data['complaint']->created_at) ? \Carbon\Carbon::parse($data['complaint']->created_at)->translatedFormat('d F Y') : ''; ?>
                            </p>
                        </div>
                        <div>
                            <?php
                            $status = $data['complaint']->status;
                            $statusClass = [
                            'open' => 'bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300',
                            'converted_to_task' => 'bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300',
                            'closed' => 'bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300'
                            ][$status] ?? 'bg-gray-100';
                            $statusText = [
                            'open' => 'Terbuka',
                            'converted_to_task' => 'Jadi Tugas',
                            'closed' => 'Ditutup'
                            ][$status] ?? $status;
                            ?>
                            <span
                                class="px-3 py-1 inline-flex text-sm leading-5 font-semibold rounded-full <?php echo e($statusClass); ?>">
                                <?php echo e($statusText); ?>

                            </span>
                        </div>
                    </div>

                    
                    <div>
                        <dl class="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6">

                            
                            <div class="md:col-span-2">
                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center">
                                    <i class="fas fa-align-left fa-fw mr-3"></i>Deskripsi Lengkap
                                </dt>
                                <dd class="mt-1 text-base text-gray-900 dark:text-gray-100 prose max-w-none"><?php echo e($data['complaint']->description); ?></dd>
                            </div>

                            
                            <div>
                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center">
                                    <i class="fas fa-map-marker-alt fa-fw mr-3"></i>Deskripsi Lokasi
                                </dt>
                                <dd class="mt-1 text-sm text-gray-900 dark:text-gray-100"><?php echo e($data['complaint']->location_text); ?></dd>
                            </div>

                            
                            <div>
                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center">
                                    <i class="fas fa-door-open fa-fw mr-3"></i>Ruangan Terkait
                                </dt>
                                <dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
                                    <?php echo e($data['complaint']->room ?
                                    ($data['complaint']->room->floor->building->name_building . ' / ' .
                                    $data['complaint']->room->floor->name_floor . ' / ' .
                                    $data['complaint']->room->name_room) : 'Tidak spesifik'); ?>

                                </dd>
                            </div>

                            
                            <div>
                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center">
                                    <i class="fas fa-box fa-fw mr-3"></i>Aset Terkait
                                </dt>
                                <dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
                                    <?php echo e($data['complaint']->asset ? ($data['complaint']->asset->name_asset . ' (' .
                                    ($data['complaint']->asset->serial_number ?? 'Non-Serial') . ')') : 'Tidak spesifik'); ?>

                                </dd>
                            </div>

                            
                            <div>
                                <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 flex items-center">
                                    <i class="fas fa-retweet fa-fw mr-3"></i>Tugas yang Dihasilkan
                                </dt>
                                <dd class="mt-1 text-sm text-gray-900 dark:text-gray-100">
                                    <?php if($data['complaint']->task): ?>
                                    <a href="<?php echo e(route('tasks.show', ['taskId' => $data['complaint']->task->id])); ?>"
                                        class="text-indigo-500 hover:underline font-semibold">
                                        Lihat Tugas: <?php echo e($data['complaint']->task->title); ?>

                                    </a>
                                    <?php else: ?>
                                    <span>Belum dikonversi menjadi tugas.</span>
                                    <?php endif; ?>
                                </dd>
                            </div>
                        </dl>
                    </div>

                </div>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $attributes = $__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__attributesOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54)): ?>
<?php $component = $__componentOriginal9ac128a9029c0e4701924bd2d73d7f54; ?>
<?php unset($__componentOriginal9ac128a9029c0e4701924bd2d73d7f54); ?>
<?php endif; ?><?php /**PATH C:\laragon\www\Aktivara-Final\resources\views/backend/complaints/show.blade.php ENDPATH**/ ?>