<?php
    use Carbon\Carbon;
?>
<div class="content-wrapper">
    <div class="container-xxl flex-grow-1 container-p-y">
        <div class="row">
            <div class="col">
                <div class="card shadow">
                    <div class="card-header text-uppercase custom-header bg-primary text-bg-info fw-bold">
                        <i class="menu-icon ti ti-users-group"></i> Withdrawal Report
                    </div>
                    <div class="card-body">


                        <div class="row mt-3">
                            <table class="table table-sm" id="tableWithApproveTable">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Date</th>
                                        <th>Member</th>
                                        <th>Withdrawal Id</th>
                                        <th>Approve User</th>
                                        <th>Amount</th>
                                        <th>Status</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php
                                        $count = 1;
                                    ?>
                                    <?php $__currentLoopData = $getWithdrawalData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $withdrawal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <?php
                                            $cryptId = Crypt::encrypt($withdrawal->id);
                                            $formatted = Carbon::parse($withdrawal->created_at)->format('Y-m-d h:i:s A');
                                        ?>
                                        <tr>
                                            <td><?php echo e($count++); ?></td>
                                            <td><?php echo e($formatted); ?></td>
                                            <td>
                                                <?php $__currentLoopData = $getAllMemberData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $mem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php if($mem->uniqueId == $withdrawal->memberId): ?>
                                                        <?php echo e($mem->firstName); ?> <?php echo e($mem->lastName); ?>

                                                    <?php endif; ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </td>
                                            <td><?php echo e($withdrawal->withdrawalId); ?></td>
                                            <td>
                                                <?php $__currentLoopData = $getAllUser; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php if($user->id == $withdrawal->userId): ?>
                                                        <?php echo e($user->name); ?>

                                                    <?php endif; ?>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </td>
                                            <td><?php echo e(number_format($withdrawal->amount, 2)); ?></td>
                                            <td>
                                                <?php if($withdrawal->request == 0): ?>
                                                    <span class="badge bg-warning"><?php echo e($withdrawal->status); ?></span>
                                                <?php elseif($withdrawal->request == 1): ?>
                                                    <span class="badge bg-success"><?php echo e($withdrawal->status); ?></span>
                                                <?php elseif($withdrawal->request == 2): ?>
                                                    <span class="badge bg-success"><?php echo e($withdrawal->status); ?></span>
                                                <?php elseif($withdrawal->request == 3): ?>
                                                    <span class="badge bg-success"><?php echo e($withdrawal->status); ?></span>
                                                <?php elseif($withdrawal->request == 4): ?>
                                                    <span class="badge bg-success"><?php echo e($withdrawal->status); ?></span>
                                                <?php else: ?>
                                                    <span class="badge bg-danger"><?php echo e($withdrawal->status); ?></span>
                                                <?php endif; ?>

                                        </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php /**PATH /Users/anlex/Desktop/untitled folder/ngo/resources/views/pages/allpages/reports/view_withdrawal_history.blade.php ENDPATH**/ ?>