<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AppLayout::class, []); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
    <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Completed Donations</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
</head>
<body class="bg-gray-100">
    <div class="container mx-auto p-6">
        <h2 class="text-3xl font-bold mb-4 text-center text-indigo-600">Completed Donations</h2>
        
        <!-- Display Total Donations Amount -->
        <div class="bg-indigo-100 p-4 rounded-lg shadow-lg text-center mb-6">
            <p class="text-xl font-semibold text-indigo-800">Total Donations: <span class="text-green-600 font-bold">$<?php echo e(number_format($totalDonations, 2)); ?></span></p>
        </div>
        
        <div class="bg-white p-4 rounded-lg shadow-lg">
            <table id="donationsTable" class="min-w-full bg-white border rounded-lg">
                <thead class="bg-indigo-600 text-white">
                    <tr>
                        <th class="py-3 px-4">Donation ID</th>
                        <th class="py-3 px-4">User Name</th>
                        <th class="py-3 px-4">User ID</th>
                        <th class="py-3 px-4">Amount</th>
                        <th class="py-3 px-4">Donation Date</th>
                        <th class="py-3 px-4">Transaction Status</th>
                        <th class="py-3 px-4">Payment Method</th>
                    </tr>
                </thead>
                <tbody>
                    <?php $__currentLoopData = $donations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $donation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="hover:bg-indigo-100">
                            <td class="py-2 px-4 border-b text-center"><?php echo e($donation->donation_id); ?></td>
                            <td class="py-2 px-4 border-b text-center"><?php echo e($donation->user_name); ?></td>
                            <td class="py-2 px-4 border-b text-center"><?php echo e($donation->user_id); ?></td>
                            <td class="py-2 px-4 border-b text-center text-green-600 font-bold">$<?php echo e(number_format($donation->amount, 2)); ?></td>
                            <td class="py-2 px-4 border-b text-center"><?php echo e(\Carbon\Carbon::parse($donation->donation_date)->format('d M y')); ?></td>
                            <td class="py-2 px-4 border-b text-center"><?php echo e(ucfirst($donation->transaction_status)); ?></td>
                            <td class="py-2 px-4 border-b text-center"><?php echo e($donation->payment_method); ?></td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
            </table>
        </div>
    </div>

    <!-- jQuery and DataTables Scripts -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <script src="https://cdn.datatables.net/1.10.24/js/jquery.dataTables.min.js"></script>
    <script>
        $(document).ready(function() {
            $('#donationsTable').DataTable({
                "pageLength": 5,
                "lengthMenu": [5, 10, 15, 20],
                "order": [[3, "desc"]],
                "language": {
                    "search": "Search donations:",
                    "paginate": {
                        "previous": "Prev",
                        "next": "Next"
                    }
                }
            });
        });
    </script>
</body>
</html>

 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?><?php /**PATH /home/u152672654/domains/drycleaneo.com/public_html/admin/resources/views/donations/index.blade.php ENDPATH**/ ?>