<!--**********************************Table AllTransaction Start***********************************-->

<?php if(session()->has('import_errors')): ?>

    <table class="table table-danger">
        <thead>
            <p class="fw-bold text-center text-danger bg-warning-light p-3 m-0"> لم يتم الاستيراد يرجى مراجعة البيانات في
                ملف الاكسل وتصحيح الاخطاء في كل من :
            </p>
        </thead>
        <tr>
            <th>الصف</th>
            <th>العمود</th>
            <th>الخطاء</th>
            <th>القيمة المرسلة</th>
            <th> المشرف</th>
        </tr>

        <?php $__currentLoopData = session()->get('import_errors'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $validation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo e($validation->row()); ?></td>
                <td><?php echo e($validation->attribute()); ?></td>
                <td>
                    <ul>
                        <?php $__currentLoopData = $validation->errors(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $e): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <li><?php echo e($e); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </td>
                <td>
                    <?php echo e($validation->values()[$validation->attribute()]); ?>

                </td>
                <td>
                    <?php echo e($validation->values()['name']); ?>

                </td>
            </tr>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </table>

<?php endif; ?>
<div class="tab-pane fade show active" id="AllTransaction" role="tabpanel" aria-labelledby="transaction-tab">
    <div class="table-responsive fs-14">
        <table class="table card-table display mb-4 dataTablesCard text-black text-center" id="example">
            <thead>
                <tr>
                    <th>رقم </th>
                    <th>اسم المشرف</th>
                    
                    <th>الإيميل</th>
                    <th>رقم الجوال</th>
                    <th>الحالة</th>
                    <th>العمليات</th>
                </tr>
            </thead>
            <tbody>
                <?php if(isset($trainers)): ?>
                    <?php $__currentLoopData = $trainers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $trainer): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr class="odd" role="row">
                            <td>
                                <?php if(isset($trainer)): ?>
                                    <?php echo e($loop->iteration); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if(isset($trainer->name)): ?>
                                    <?php echo e($trainer->name); ?>

                                <?php endif; ?>
                            </td> 
                            
                            <td>
                                <?php if(isset($trainer->email)): ?>
                                    <?php echo e($trainer->email); ?>

                                <?php endif; ?>
                            </td>
                            <td>
                                <?php if(isset($trainer->phone)): ?>
                                    <?php echo e($trainer->phone); ?>

                                <?php endif; ?>
                            </td>

                            <td>
                                <?php if(isset($trainer->is_active)): ?>
                                    <?php if($trainer->is_active == 1): ?>
                                        <span class="badge badge-success light">نشط</span>
                                    <?php else: ?>
                                        <span class="badge badge-danger light">غير نشط</span>
                                    <?php endif; ?>
                                <?php endif; ?>
                            </td>
                            <td>
                                <div class="dropdown dropstart">
                                    <a href="javascript:void(0);" class="btn-link" data-bs-toggle="dropdown"
                                        aria-expanded="false">
                                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
                                            xmlns="http://www.w3.org/2000/svg">
                                            <path
                                                d="M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z"
                                                stroke="#575757" stroke-width="2" stroke-linecap="round"
                                                stroke-linejoin="round"></path>
                                            <path
                                                d="M12 6C12.5523 6 13 5.55228 13 5C13 4.44772 12.5523 4 12 4C11.4477 4 11 4.44772 11 5C11 5.55228 11.4477 6 12 6Z"
                                                stroke="#575757" stroke-width="2" stroke-linecap="round"
                                                stroke-linejoin="round"></path>
                                            <path
                                                d="M12 20C12.5523 20 13 19.5523 13 19C13 18.4477 12.5523 18 12 18C11.4477 18 11 18.4477 11 19C11 19.5523 11.4477 20 12 20Z"
                                                stroke="#575757" stroke-width="2" stroke-linecap="round"
                                                stroke-linejoin="round"></path>
                                        </svg>
                                    </a>
                                    <div class="dropdown-menu">
                                        <button type="button" value=""
                                            data-id="<?php if(isset($trainer->id)): ?><?php echo e($trainer->id); ?> <?php endif; ?>"
                                            data-name="<?php if(isset($trainer->name)): ?><?php echo e($trainer->name); ?><?php endif; ?>"
                                            data-email="<?php if(isset($trainer->email)): ?><?php echo e($trainer->email); ?><?php endif; ?>"
                                            data-phone="<?php if(isset($trainer->phone)): ?><?php echo e($trainer->phone); ?><?php endif; ?>"
                                            data-description="<?php if(isset($trainer->trainer->description)): ?><?php echo e($trainer->trainer->description); ?><?php endif; ?>"
                                            data-type="1" class="updateTrainer dropdown-item" href=" transaction-details.html"><i
                                                class="bi bi-pencil-square text-success ms-3"></i>تعديل </button>
                                        <button type="button" value="" data-id="<?php echo e($trainer->id); ?>"
                                            data-is_active="<?php echo e($trainer->is_active); ?>" data-title="المشرف"
                                            data-route='<?php echo e(route('trainer_toggle')); ?>' class="toggle dropdown-item"
                                            href="toggle ">
                                            <?php if($trainer->is_active == 1): ?>
                                                <i class="bi bi-eye-slash-fill fa-trash ms-3 text-danger"></i>تعليق
                                            <?php else: ?>
                                                <i class="bi bi-eye-fill ms-3 text-success"></i>تفعيل
                                            <?php endif; ?>
                                        </button>
                                        <button type="button" data-route="<?php echo e(route('trainer_delete')); ?>"
                                            data-id="<?php if(isset($trainer->id)): ?><?php echo e($trainer->id); ?><?php endif; ?>"
                                            class=" delete-item   dropdown-item" href="toggle "><i
                                                class="fa fa-trash ms-3 text-danger"></i>حذف</button>
                                    </div>
                                </div>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
</div>
<!--**********************************Table AllTransaction End***********************************-->
<?php /**PATH C:\Users\Nasser\Desktop\TrainingManagementPlatform\resources\views/trainers/tables/all.blade.php ENDPATH**/ ?>