JFIF  x x C         C     "        } !1AQa "q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz        w !1AQ aq"2B #3Rbr{ gilour

File "fc06efe5ad55d3335a9ca9239ccf7f3b.php"

Full Path: /home/ambitio2/public_html/storage/framework/views/fc06efe5ad55d3335a9ca9239ccf7f3b.php
File size: 6.6 KB
MIME-type: text/x-php
Charset: utf-8

<?php $__env->startPush('title', get_phrase('Assign Permission')); ?>
<?php $__env->startPush('meta'); ?><?php $__env->stopPush(); ?>
<?php $__env->startPush('css'); ?><?php $__env->stopPush(); ?>
<?php $__env->startSection('content'); ?>
    <div class="ol-card radius-8px">
        <div class="ol-card-body my-3 py-12px px-20px">
            <div class="d-flex align-items-center justify-content-between gap-3 flex-wrap flex-md-nowrap">
                <h4 class="title fs-16px">
                    <i class="fi-rr-settings-sliders me-2"></i>
                    <?php echo e(get_phrase('Admin Permissions')); ?>

                </h4>

                <a href="<?php echo e(route('admin.admins.index')); ?>" class="btn ol-btn-outline-secondary d-flex align-items-center cg-10px">
                    <span class="fi-rr-arrow-alt-left"></span>
                    <span><?php echo e(get_phrase('Back')); ?></span>
                </a>
            </div>
        </div>
    </div>
    <?php
        // MAKE SURE TO KEEP A PERMISSION FOR USERS AND THEME
        $routes = [
            'admin.dashboard' => get_phrase('Dashboard'),
            'admin.categories' => get_phrase('Category'),
            'admin.courses' => get_phrase('Course'),
            'admin.bootcamps' => get_phrase('Bootcamp'),
            'admin.student.enroll' => get_phrase('Enrollment'),
            'admin.enroll.history' => get_phrase('Enroll History'),
            'admin.revenue' => get_phrase('Admin Revenue'),
            'admin.instructor.revenue' => get_phrase('Instructor Revenue'),
            'admin.purchase.history' => get_phrase('Purchase history'),
            'admin.instructor.index' => get_phrase('Instructor'),
            'admin.admins.index' => get_phrase('Admin'),
            'admin.student.index' => get_phrase('Student'),
            'admin.message' => get_phrase('Message'),
            'admin.newsletter' => get_phrase('Newsletter'),
            'admin.subscribed_user' => get_phrase('Newsletter Subscriber'),
            'admin.contact' => get_phrase('Contact User'),
            'admin.offline.payments' => get_phrase('Offline Payment'),
            'admin.coupons' => get_phrase('Coupon'),
            'admin.blog' => get_phrase('Blog'),
            'admin.pending.blog' => get_phrase('Pending Blog List'),
            'admin.blog.category' => get_phrase('Blog Category'),
            'admin.blog.settings' => get_phrase('Blog Settings'),

            'admin.system.settings' => get_phrase('System Settings'),
            'admin.website.settings' => get_phrase('Website Settings'),
            'admin.payment.settings' => get_phrase('Payment Settings'),
            'admin.manage.language' => get_phrase('Language Settings'),
            'admin.live.class.settings' => get_phrase('Live Class Settings'),
            'admin.certificate.settings' => get_phrase('Certificate'),
            'admin.open.ai.settings' => get_phrase('Open AI Settings'),
            'admin.seo.settings' => get_phrase('SEO Settings'),
            'admin.about' => get_phrase('About'),
        ];
        $permission_row = DB::table('permissions')
            ->where('admin_id', $admin->id)
            ->first();
        $permissions = json_decode($permission_row->permissions ?? '{}', true);
    ?>

    <div class="row">
        <div class="col-xl-8">
            <div class="ol-card p-4">
                <div class="ol-card-body">
                    <div class="col-6 pt-3">
                        <p class="column-title"><?php echo e(get_phrase('Assign permission for')); ?>: <?php echo e($admin->name); ?></p>
                    </div>
                    <div class="pb-3">
                        <small> <strong><?php echo e(get_phrase('Note')); ?></strong> :
                            <?php echo e(get_phrase('You can toggle the switch for enabling or disabling a feature to access')); ?></small>
                    </div>
                    <div class="table-responsive">
                        <table class="table eTable">
                            <thead>
                                <tr>
                                    <th><?php echo e(get_phrase('Feature')); ?></th>
                                    <th></th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__currentLoopData = $routes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $route => $title): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td><?php echo e($title); ?></td>
                                        <td>
                                            <!-- Bool Switch-->
                                            <input type="checkbox" class="form-check-input" id="<?php echo e($admin->id . '-' . $route); ?>" data-switch="bool" onchange="setPermission('<?php echo e($admin->id); ?>', '<?php echo e($route); ?>')" <?php if(is_array($permissions) && in_array($route, $permissions)): ?> checked <?php endif; ?>>
                                            <label for="<?php echo e($admin->id . '-' . $route); ?>" data-on-label="On" data-off-label="Off"></label>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </tbody>
                        </table>
                    </div>
                </div> <!-- end card body-->
            </div> <!-- end card -->
        </div><!-- end col-->
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startPush('js'); ?>
    <script>
        "use strict";

        function setPermission(user_id, permission) {
            $.ajax({
                type: "post",
                url: "<?php echo e(route('admin.admins.permission.store')); ?>/" + user_id,
                data: {
                    user_id: user_id,
                    permission: permission,
                },
                headers: {
                    'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>'
                },
                success: function(response) {
                    if (response == 1) {
                        success("<?php echo e(get_phrase('Permission updated')); ?>");
                    }
                }
            });
        }
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\Projects\academylmslaravel_running\resources\views/admin/admin/permission.blade.php ENDPATH**/ ?>