<?php $__env->startSection('title', 'پرداخت‌ها'); ?>

<?php $__env->startSection('content'); ?>
    <h1 class="text-xl font-bold mb-6">پرداخت‌ها (نظارت)</h1>

    <form method="GET" class="flex flex-wrap gap-2 mb-4">
        <select name="status" class="border rounded-lg px-3 py-2 text-sm">
            <option value="">همه وضعیت‌ها</option>
            <option value="pending_review" <?php if(request('status') === 'pending_review'): echo 'selected'; endif; ?>>در انتظار بررسی</option>
            <option value="approved" <?php if(request('status') === 'approved'): echo 'selected'; endif; ?>>تأیید شده</option>
            <option value="rejected" <?php if(request('status') === 'rejected'): echo 'selected'; endif; ?>>رد شده</option>
        </select>
        <button class="bg-gray-100 px-4 py-2 rounded-lg text-sm">اعمال فیلتر</button>
    </form>

    <div class="bg-white rounded-xl shadow-sm overflow-x-auto">
        <table class="w-full text-sm">
            <thead class="bg-gray-50 text-gray-500">
                <tr>
                    <th class="p-3 text-right">ورزشکار</th>
                    <th class="p-3 text-right">مربی</th>
                    <th class="p-3 text-right">مبلغ</th>
                    <th class="p-3 text-right">وضعیت</th>
                    <th class="p-3 text-right">تاریخ ارسال</th>
                    <th class="p-3 text-right">رسید</th>
                </tr>
            </thead>
            <tbody class="divide-y">
                <?php $__empty_1 = true; $__currentLoopData = $payments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $payment): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td class="p-3"><?php echo e($payment->coachRequest->athlete->user->fullName()); ?></td>
                        <td class="p-3"><?php echo e($payment->coachRequest->coach->user->fullName()); ?></td>
                        <td class="p-3"><?php echo e(number_format($payment->amount)); ?></td>
                        <td class="p-3"><?php echo e($payment->status->label()); ?></td>
                        <td class="p-3"><?php echo e(verta($payment->submitted_at)->format('Y/m/d')); ?></td>
                        <td class="p-3"><a href="<?php echo e(route('coach.payments.receipt', $payment)); ?>" target="_blank" class="text-blue-600 hover:underline">مشاهده</a></td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr><td colspan="6" class="p-6 text-center text-gray-400">پرداختی ثبت نشده است.</td></tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>

    <div class="mt-4"><?php echo e($payments->links()); ?></div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\paradox\Desktop\fresh\abtin-sport-platform\resources\views/admin/payments/index.blade.php ENDPATH**/ ?>