
<?php $__env->startSection('title'); ?> রোল <?php $__env->stopSection(); ?>
<?php $__env->startSection('roles'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('roles.index'); ?> active <?php $__env->stopSection(); ?>
<?php $__env->startSection('styles'); ?>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('admin_content'); ?>
	
	<!-- BEGIN: Content-->
    <div class="app-content content ">
	    <div class="card">

	        <div class="card-header p-1">
	            <div class="head-label">
	                <h4>এডিট রোল</h4>
	            </div>
	        </div>

	        <div class="card-body">
	            <form action="<?php echo e(route('roles.update', $role->id)); ?>" method="post">
					<?php echo csrf_field(); ?>
					<?php echo method_field('put'); ?>
					<div class="container">
						<input type="hidden" name="najmun" value="Najmun">
						<hr class="mt-2">
						<h4>All Permissions:</h4>
						<hr class="mb-5">
						<div class="row">
							<?php $i = 0; ?>
							<?php $__currentLoopData = $permissionGroups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
							<?php if(isset($group) && $group != null): ?>
							<?php
							$permissions = App\Models\User::getpermissionsByGroupName($group->name);
							$j = 1;
							$i += 1
							?>
				
							<div class="col-md-4 mb-3">
								<div class="input-field">
									<p>
										<label class="custom-permission-group-color">
											<input type="checkbox" id="<?php echo e($i); ?>Management" value="<?php echo e($group->name); ?>"
												onclick="checkPermissionByGroup('role-<?php echo e($i); ?>-management-checkbox', this)"
												<?php echo e(App\Models\User::roleHasPermissions($role, $permissions) ? 'checked' : ''); ?>

												class="custom-permission-check-box" />
				
											<span class="custom-permission-group-name"
												for="<?php echo e($i); ?>Management"><?php echo e(Str::title($group->name)); ?></span>
										</label>
									</p>
								</div>
							</div>
				
							<div class="col-md-8 mb-3">
								<div class="input-field role-<?php echo e($i); ?>-management-checkbox">
				
									<?php $__currentLoopData = $permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $permission): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
									<?php if(isset($group) && $group != null): ?>
									<p>
										<label>
											<input class="filled-in common-input" type="checkbox" name="permissions[]"
												onclick="checkSinglePermission('role-<?php echo e($i); ?>-management-checkbox', '<?php echo e($i); ?>Management', <?php echo e(count($permissions)); ?>)"
												<?php echo e($role->hasPermissionTo($permission->name) ? 'checked' : ''); ?> id="checkPermission<?php echo e($permission->id); ?>"
												value="<?php echo e($permission->name); ?>">
									
											<span class="custom-permission-name" for="checkPermission<?php echo e($permission->id); ?>"><?php echo e($permission->name); ?></span>
										</label>
									</p>
									<?php endif; ?>
									<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
				
								</div>
							</div>
				
							<?php endif; ?>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
						</div>
				
						<div class="row">
							<div class="col-12 col-sm-12 col-md-2 col-lg-2 col-xl-2 d-flex align-items-center"
								style="margin-top: 15px;">
								<input type="submit" name="submit" class="btn btn btn-success" value="Update">
							</div>
						</div>
					</div>
				</form>
	        </div>

	    </div>

    </div>
    <!-- END: Content-->

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
    <script>
        $(document).ready(function() {
            $('.select2').select2();
        })
    </script>

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

<?php $__env->startSection('scripts'); ?>
<?php echo $__env->make('admin.userRole.roles.partial.script', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Project\Personal-Project\Office-Project\update\test-paper-finals\resources\views/admin/userRole/roles/edit.blade.php ENDPATH**/ ?>