@php
    $i = 0;
@endphp

@forelse ($tb_caseyet as $case)
    <tr>
        <td class="pp-no">{{ ++$i }}</td>
        <td class="pp-hn">{{ $case['case_hn'] ?? '' }}</td>
        <td class="pp-name">{{ $case['patientname'] ?? '' }}</td>
        <td>{{ $case['appointment_date'] ?? '' }}</td>
        <td>{{ $case['doctorname'] ?? '' }}</td>
        <td>
            <span class="badge bg-success-subtle text-success rounded-pill">
                {{ $case['statusjob'] ?? '' }}
            </span>
        </td>
        <td class="text-end">
            <a target="_blank" href="{{ url('printpdf/' . $case['_id']) }}" class="btn btn-success btn-sm">
                <i class="ri-restart-line align-bottom me-1"></i>พิมพ์อีกครั้ง
            </a>
        </td>
    </tr>
@empty
    <tr>
        <td colspan="7" class="pp-empty">
            <i class="ri-inbox-line"></i>
            <span>ไม่พบรายการที่ตรงกับการค้นหา</span>
        </td>
    </tr>
@endforelse
