

<?php $__env->startSection('title'); ?>
<?php echo e(__('Permissions')); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>

<div class="row page-title align-items-center">
    <div class="col-12 col-xl-12">
        <h3 class="mb-1 mt-0 text-left"><?php echo e(__('Permission list')); ?>

            <span style="float:right;">
                <a href="javascript:;" permission="button" class="btn custom-button " data-toggle="modal"
                    data-target="#createpermissionModal"><i class="uil-plus mr-1"></i>
                    <?php echo e(__('Create permission')); ?></a></span>
        </h3>
        <nav aria-label="breadcrumb" class="float-left mt-1">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>"><?php echo e(__('Home')); ?></a></li>
                <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('Permission list')); ?></li>
            </ol>
        </nav>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

<!-- permissions -->
<div class="card">
    <div class="card-header">
        <div class="custom-control custom-switch mb-2">
            <input type="checkbox" class="custom-control-input" id="customSwitch1" checked>
            <label class="custom-control-label" for="customSwitch1">user management</label>
        </div>
    </div>
    <div class="card-body" id="customSwitchdiv1">
        <div class="row">
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck1">
                    <label class="custom-control-label" for="customCheck1">Add User</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck2">
                    <label class="custom-control-label" for="customCheck2">Edit User</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck3">
                    <label class="custom-control-label" for="customCheck3">Update User</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck4">
                    <label class="custom-control-label" for="customCheck4">Delete User</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck5">
                    <label class="custom-control-label" for="customCheck5">Add Role</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck6">
                    <label class="custom-control-label" for="customCheck6">Edit Role</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck7">
                    <label class="custom-control-label" for="customCheck7">Update Role</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck8">
                    <label class="custom-control-label" for="customCheck8">Delete Role</label>
                </div>
            </div> <!-- end col -->

        </div>
    </div>
</div>

<div class="card">
    <div class="card-header">
        <div class="custom-control custom-switch mb-2">
            <input type="checkbox" class="custom-control-input"  id="customSwitch2" checked>
            <label class="custom-control-label" for="customSwitch2">project management</label>
        </div>
    </div>
    <div class="card-body" id="customSwitchdiv2">
        <div class="row">
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck9">
                    <label class="custom-control-label" for="customCheck9">Add Project</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck10">
                    <label class="custom-control-label" for="customCheck10">Edit Project</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck11">
                    <label class="custom-control-label" for="customCheck11">Update Project</label>
                </div>
            </div> <!-- end col -->
            <div class="col-lg-4 mb-2 mb-lg-0">
                <div class="custom-control custom-checkbox mb-2">
                    <input type="checkbox" class="custom-control-input" id="customCheck12">
                    <label class="custom-control-label" for="customCheck12">Delete Project</label>
                </div>
            </div> <!-- end col -->
        </div>

    </div>
</div>
<div class="row">
    <div class="col-12 text-center">
        <button type="submit" class="btn custom-button"><?php echo e(__('Save permissions')); ?></button>
    </div>
</div>

<!-- permission modal content -->
<div id="createpermissionModal" class="modal fade" tabindex="-1" permission="dialog"
    aria-labelledby="createpermissionModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="createpermissionModalLabel"><?php echo e(__('Create permission')); ?></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group mb-3">
                    <label><?php echo e(__('Name')); ?></label>
                    <input type="text" id="name" name="name" class="form-control" placeholder="<?php echo e(__('Enter permission name')); ?>">
                </div>
                <div class="form-group mb-3">
                    <label><?php echo e(__('Section name')); ?></label>
                    <input type="text" id="name" name="section_name" class="form-control"
                        placeholder="<?php echo e(__('Enter section name')); ?>">
                </div>
                <div class="form-group mb-3">
                    <label><?php echo e(__('Guard name')); ?></label>
                    <select class="custom-select mb-2">
                        <option selected><?php echo e(__('Select guard name')); ?></option>
                        <option value="1">Web Guard</option>
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="submit" class="btn custom-button"><?php echo e(__('Save')); ?> </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- permission modal content -->
<div id="editpermissionModal" class="modal fade" tabindex="-1" permission="dialog"
    aria-labelledby="editpermissionModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="editpermissionModalLabel"><?php echo e(__('Edit permission')); ?></h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group mb-3">
                    <label><?php echo e(__('Name')); ?></label>
                    <input type="text" id="name" name="name" class="form-control" placeholder="<?php echo e(__('Enter name')); ?>">
                </div>
                <div class="form-group mb-3">
                    <label>Status</label>
                    <select class="custom-select mb-2">
                        <option selected><?php echo e(__('Select status')); ?></option>
                        <option value="1">Active</option>
                        <option value="2">Pending</option>
                        <option value="3">Decline</option>
                    </select>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn custom-button"><?php echo e(__('Save changes')); ?></button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<!-- end row -->


<!-- <div class="row">
    <div class="col-4"></div>
    <div class="col-4">
        <ul class="pagination  mb-3 flex-wrap">
            <li class="page-item page-prev disabled">
                <a class="page-link" href="#" tabindex="-1">Prev</a>
            </li>
            <li class="page-item active"><a class="page-link" href="#">1</a></li>
            <li class="page-item"><a class="page-link" href="#">2</a></li>
            <li class="page-item"><a class="page-link" href="#">3</a></li>
            <li class="page-item"><a class="page-link" href="#">4</a></li>
            <li class="page-item"><a class="page-link" href="#">5</a></li>
            <li class="page-item"><a class="page-link" href="#">6</a></li>
            <li class="page-item page-next">
                <a class="page-link" href="#">Next</a>
            </li>
        </ul>
    </div>
    <div class="col-4"></div>
</div> -->
<!-- end row -->

<?php $__env->stopSection(); ?>

<?php $__env->startSection('script-bottom'); ?>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.1.10/dist/sweetalert2.all.min.js"></script>

<script type="text/javascript">
    // Delete

    $(document).on('click', '.btnDelete', function (e) {
        var member = $(this).attr('id');
        Swal.fire({
                title: "Are you sure?",
                text: "You will not be able to recover this permission!",
                type: "warning",
                buttons: true,
                confirmButtonColor: "#ff5e5e",
                confirmButtonText: "Yes, delete it!",
                closeOnConfirm: false,
                dangerMode: true,
                showCancelButton: true
            })
            .then((deleteThis) => {
                if (deleteThis.isConfirmed) {
                    $.ajax({
                        url: '',
                        type: "GET",
                        dataType: "JSON",
                        data: {
                            member: member

                        },
                        success: function (response) {

                            if (response["status"] == "fail") {
                                Swal.fire("Failed!", "Failed to delete permission.",
                                    "error");
                            } else if (response["status"] == "success") {
                                Swal.fire("Deleted!", "permission has been deleted.",
                                    "success");

                                // Using .reload() method.
                                location.reload();
                            }
                        },
                        error: function (error) {
                            console.log(error);
                        },
                        async: false
                    });
                } else {
                    Swal.close();
                }
            });
    });

</script>
<script>
    $(document).ready(function (e) {
        $("#customSwitch1").click(function () {
            $("#customSwitchdiv1").toggle();
        });

        $("#customSwitch2").click(function () {
            $("#customSwitchdiv2").toggle();
        });
    })

</script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\php\www\laravel\baramdat\hvg\hvg\resources\views/general/user/permission.blade.php ENDPATH**/ ?>