<?php $__env->startSection('title', 'Support Tickets'); ?>
<?php $__env->startSection('page-title', 'Support Tickets'); ?>

<?php $__env->startSection('content'); ?>
<div class="card border-0 shadow-sm">
    <div class="table-responsive">
        <table class="table mb-0"><thead><tr><th>Ticket</th><th>Tenant</th><th>Subject</th><th>Status</th><th>Response</th></tr></thead><tbody>
            <?php $__currentLoopData = $tickets; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ticket): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr>
                    <td><?php echo e($ticket->ticket_number); ?></td><td><?php echo e($ticket->tenant?->name ?? 'Platform'); ?></td><td><div class="fw-semibold"><?php echo e($ticket->subject); ?></div><small class="text-muted"><?php echo e($ticket->message); ?></small></td><td><?php echo e($ticket->status); ?></td>
                    <td style="min-width:320px">
                        <form method="POST" action="<?php echo e(route('super.support.update', $ticket)); ?>">
                            <?php echo csrf_field(); ?> <?php echo method_field('PATCH'); ?>
                            <select name="status" class="form-select form-select-sm mb-2">
                                <?php $__currentLoopData = ['open','in_progress','resolved','closed']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $status): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><option <?php if($ticket->status===$status): echo 'selected'; endif; ?> value="<?php echo e($status); ?>"><?php echo e($status); ?></option><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                            <textarea name="admin_response" class="form-control form-control-sm mb-2" rows="2"><?php echo e($ticket->admin_response); ?></textarea>
                            <button class="btn btn-sm btn-primary">Save</button>
                        </form>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody></table>
    </div>
    <div class="card-body"><?php echo e($tickets->links()); ?></div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\Polite hp\Documents\Codex\2026-05-08\build-a-complete-production-ready-saas\microfinance-saas\resources\views\super\support\index.blade.php ENDPATH**/ ?>