<!doctype html>
<html lang="id">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Form Pemeriksaan <?php echo e($digitalForm->order->invoice_no); ?></title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-white text-slate-900">
<main class="mx-auto max-w-4xl p-5 md:p-8">
    <div class="flex flex-col gap-4 border-b pb-5 md:flex-row md:items-start md:justify-between">
        <div>
            <div class="text-sm text-slate-500">Form pemeriksaan barang</div>
            <h1 class="text-2xl font-semibold"><?php echo e($digitalForm->order->invoice_no); ?></h1>
            <div class="mt-2 text-sm text-slate-600"><?php echo e($digitalForm->customer?->name ?? $digitalForm->order->customer?->name ?? 'Walk-in'); ?> - <?php echo e($digitalForm->created_at->format('d/m/Y H:i')); ?></div>
        </div>
        <div class="flex gap-2 print:hidden">
            <a href="<?php echo e(route('orders.show', $digitalForm->order)); ?>" class="rounded-md border px-4 py-2 text-sm">Order</a>
            <button onclick="print()" class="rounded-md bg-slate-900 px-4 py-2 text-sm text-white">Print</button>
        </div>
    </div>

    <section class="mt-6">
        <h2 class="font-semibold">Checklist Kondisi</h2>
        <div class="mt-3 grid gap-2 text-sm md:grid-cols-2">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($digitalForm->checklist ?? []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                <div class="rounded-md border px-3 py-2">
                    <span class="font-medium"><?php echo e(str_replace('_', ' ', $key)); ?></span>
                    <span class="float-right"><?php echo e($value ? 'Ya' : 'Tidak'); ?></span>
                </div>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                <div class="text-slate-500">Tidak ada checklist.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    <section class="mt-6">
        <h2 class="font-semibold">Keterangan Kondisi</h2>
        <div class="mt-3 min-h-24 rounded-md border bg-slate-50 p-4 text-sm leading-6"><?php echo e($digitalForm->general_note ?: 'Tidak ada catatan.'); ?></div>
    </section>

    <section class="mt-6">
        <h2 class="font-semibold">Foto Evidence</h2>
        <div class="mt-3 grid gap-3 md:grid-cols-3">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = ($digitalForm->evidence_paths ?? []); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $path): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                <a href="<?php echo e(Storage::disk('public')->url($path)); ?>" target="_blank" class="block overflow-hidden rounded-lg border">
                    <img src="<?php echo e(Storage::disk('public')->url($path)); ?>" alt="Evidence" class="aspect-square w-full object-cover">
                </a>
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                <div class="text-sm text-slate-500">Belum ada foto evidence.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    <section class="mt-6">
        <h2 class="font-semibold">Tanda Tangan Pelanggan</h2>
        <div class="mt-3 rounded-md border p-4">
            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($digitalForm->signature_path): ?>
                <img src="<?php echo e(Storage::disk('public')->url($digitalForm->signature_path)); ?>" alt="Tanda tangan pelanggan" class="h-40 max-w-full object-contain">
            <?php else: ?>
                <div class="text-sm text-slate-500">Belum ada tanda tangan.</div>
            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
        </div>
    </section>

    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($digitalForm->items->isNotEmpty()): ?>
        <section class="mt-6">
            <h2 class="font-semibold">Detail Item Lama</h2>
            <div class="mt-3 divide-y rounded-md border text-sm">
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $digitalForm->items; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                    <div class="p-3">
                        <strong><?php echo e($item->item_name); ?></strong>
                        <p class="mt-1 text-slate-600"><?php echo e($item->note); ?></p>
                    </div>
                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
            </div>
        </section>
    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
</main>
</body>
</html>
<?php /**PATH /Users/dedehermawan/Dokumen/project/laundry/resources/views/digital-forms/show.blade.php ENDPATH**/ ?>