<table>
    <thead>
        <tr>
            <th>No</th>
            <th>No. Tiket</th>
            <th>Nama Pelanggan</th>
            <th>Nomor WA</th>
            <th>Jenis Perangkat</th>
            <th>Merek</th>
            <th>Model</th>
            <th>No. Seri</th>
            <th>Keluhan</th>
            <th>Status</th>
            <th>Tanggal Masuk</th>
            <th>Tanggal Selesai / Diambil</th>
            <th>Alasan Batal</th>
        </tr>
    </thead>
    <tbody>
        @foreach($tickets as $i => $ticket)
        <tr>
            <td>{{ $i + 1 }}</td>
            <td>{{ $ticket->ticket_code }}</td>
            <td>{{ $ticket->customer->name }}</td>
            <td>{{ $ticket->customer->whatsapp }}</td>
            <td>{{ $ticket->device_type }}</td>
            <td>{{ $ticket->brand }}</td>
            <td>{{ $ticket->model }}</td>
            <td>{{ $ticket->serial_number }}</td>
            <td>{{ $ticket->problem_desc }}</td>
            <td>{{ $ticket->status }}</td>
            <td>{{ $ticket->created_at->format('d/m/Y H:i') }}</td>
            <td>{{ $ticket->picked_up_at?->format('d/m/Y H:i') }}</td>
            <td>{{ $ticket->cancel_reason }}</td>
        </tr>
        @endforeach
    </tbody>
</table>
