File: /var/www/html/owlcrm/storage/framework/views/0496ac85d2e2cef3d74b68baa95832a0.php
<?php $__env->startSection('title', 'Dashboard'); ?>
<?php $__env->startSection('content_header'); ?>
<h1>Roles</h1>
<small>Manage roles</small>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<link rel="stylesheet" href="<?php echo e(asset('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css')); ?>">
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Add Roles</h3>
</div>
<?php if(session('error')): ?>
<h6 class="alert alert-danger">
<?php echo e(session('error')); ?>
</h6>
<?php endif; ?>
<?php if($errors->any()): ?>
<div class="alert alert-danger">
<ul>
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<li><?php echo e($error); ?></li>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</ul>
</div>
<?php endif; ?>
<form method="POST" id="add_roles" role="form" action="<?php echo e(route('role.store')); ?>" class="jqueryValidation">
<?php echo csrf_field(); ?>
<div class="card-body">
<div class="form-group">
<label for="name">Name</label>
<?php if (isset($component)) { $__componentOriginale5d826ae10df3aa87f8449f474c11664 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale5d826ae10df3aa87f8449f474c11664 = $attributes; } ?>
<?php $component = JeroenNoten\LaravelAdminLte\View\Components\Form\Input::resolve(['id' => 'name','name' => 'name'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('adminlte-input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(JeroenNoten\LaravelAdminLte\View\Components\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['class' => 'form-control','placeholder' => 'Enter Name','value' => ''.e(old('name')).'','required' => true]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $attributes = $__attributesOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__attributesOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $component = $__componentOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__componentOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
</div>
<div class="form-group">
<label for="description">Description</label>
<?php if (isset($component)) { $__componentOriginale5d826ae10df3aa87f8449f474c11664 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginale5d826ae10df3aa87f8449f474c11664 = $attributes; } ?>
<?php $component = JeroenNoten\LaravelAdminLte\View\Components\Form\Input::resolve(['id' => 'description','name' => 'description'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('adminlte-input'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(JeroenNoten\LaravelAdminLte\View\Components\Form\Input::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes(['type' => 'text','class' => 'form-control','placeholder' => 'Enter description','value' => ''.e(old('description')).'']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $attributes = $__attributesOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__attributesOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
<?php if (isset($__componentOriginale5d826ae10df3aa87f8449f474c11664)): ?>
<?php $component = $__componentOriginale5d826ae10df3aa87f8449f474c11664; ?>
<?php unset($__componentOriginale5d826ae10df3aa87f8449f474c11664); ?>
<?php endif; ?>
</div>
<div class="card-body">
<div class="row mt-4 mb-4">
<h4 class="heading">Set Permission</h4>
<small class="paragraph">Modify what individuals on this role can do </small>
</div>
<?php if($user_modules): ?>
<?php $__currentLoopData = $user_modules; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $module): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(count($module->permissions)): ?>
<div class="card-body border border-light border-2 mt-5">
<div class="row mt-4 mb-4">
<div class="col-6 md-6">
<h4 class="heading"><?php echo e($module->name); ?></h4>
<input type="hidden" name="module[]" value="<?php echo e($module->id); ?>">
</div>
<div class="col-6 md-6">
<div class="form-check float-end form-switch">
<input class="form-check-input staff_management_enable_all_permissions"
type="checkbox" role="switch" name="box"
id="flexSwitchCheckDefault-<?php echo e($module->id); ?>">
<label class="form-check-label" for="flexSwitchCheckDefault">Enable
all</label>
</div>
</div>
</div>
<div class="row ">
<?php $__currentLoopData = $module->permissions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="col-6 md-6">
<div class="form-check form-switch">
<input class="form-check-input staff_management" type="checkbox"
role="switch" name="permission[]"
id="staff_management-<?php echo e($module->id); ?>"
value="<?php echo e($data->id); ?>">
<label class="form-check-label" for="flexSwitchCheckDefault">
<h6 class="heading"><?php echo e($data->title ?? ''); ?></h6>
</label><br>
<small class="paragraph">Modify what individuals on this role can do
</small>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<div class="card-footer d-flex justify-content-end">
<a href="<?php echo e(route('role.index')); ?>" class="btn btn-danger mx-1">Cancel</a>
<button type="submit" class="btn btn-dark mx-1">Submit</button>
</div>
</div>
</form>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
$('.staff_management_enable_all_permissions').click(function() {
var moduleContainer = $(this).closest('.card-body');
var modulePermissions = moduleContainer.find('.staff_management');
modulePermissions.prop('checked', $(this).prop('checked'));
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/owlcrm/resources/views/users/roles/create.blade.php ENDPATH**/ ?>