Viewing file: aa230a7b0f73f65016673d5b1ef1beace9664247.php (12.51 KB) -rwxrwxrwx Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php $__env->startSection('title'); ?> User Group <?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
<!--datatable css-->
<link href="https://cdn.datatables.net/1.11.5/css/dataTables.bootstrap5.min.css" rel="stylesheet" type="text/css" />
<!--datatable responsive css-->
<link href="https://cdn.datatables.net/responsive/2.2.9/css/responsive.bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.datatables.net/buttons/2.2.2/css/buttons.dataTables.min.css" rel="stylesheet" type="text/css" />
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<?php $__env->startComponent('components.breadcrumb'); ?>
<?php $__env->slot('li_1'); ?> Settings <?php $__env->endSlot(); ?>
<?php $__env->slot('title'); ?>User Groups <?php $__env->endSlot(); ?>
<?php echo $__env->renderComponent(); ?>
<div class="row">
<div class="col-lg-12">
<div class="card">
<?php if($errors->any()): ?>
<div class="alert alert-danger">
<?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<span class="each-error"><?php echo e($error); ?> </span><br/>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
<?php endif; ?>
<?php if(session()->has('message')): ?>
<div class="alert alert-success">
<?php echo e(session()->get('message')); ?>
</div>
<?php endif; ?>
<div class="card-header border-0">
<div class="d-flex align-items-center">
<h5 class="card-title mb-0 flex-grow-1">Groups List</h5>
<div class="flex-shrink-0">
<button type="button" class="btn btn-success add-btn" onClick="add_modal_open()"><i
class="ri-add-line align-bottom me-1"></i> Create New
</button>
</div>
</div>
</div>
<div class="card-body">
<div class="">
<table id="alternative-pagination" class="table nowrap dt-responsive align-middle table-hover table-bordered" style="width:100%">
<thead>
<tr>
<th>SR No.</th>
<th>Name</th>
<th>Description</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
?>
<?php if(isset($user_groups)): ?>
<?php $__currentLoopData = $user_groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user_group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($i++); ?></td>
<td><?php echo e($user_group->name); ?></td>
<td><?php echo e($user_group->description); ?></td>
<td>
<ul class="list-inline hstack gap-2 mb-0">
<li class="list-inline-item edit"
data-bs-toggle="tooltip" data-bs-trigger="hover"
data-bs-placement="top" title="Edit">
<a onclick="update_modal_open
('<?php echo e($user_group); ?>')"
class="text-primary d-inline-block edit-item-btn">
<i class="ri-pencil-fill fs-16"></i>
</a>
</li>
<li class="list-inline-item" data-bs-toggle="tooltip"
data-bs-trigger="hover" data-bs-placement="top"
title="Remove">
<a class="text-danger d-inline-block remove-item-btn"
onclick="delete_modal_open
('<?php echo e($user_group->id); ?>')">
<i class="ri-delete-bin-5-fill fs-16"></i>
</a>
</li>
</ul>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</tbody>
</table>
</div>
<!-- Modal -->
<div class="modal fade" id="addModal" tabindex="-1"
aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-light p-3">
<h5 class="modal-title" id="exampleModalLabel"></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close" id="close-modal"></button>
</div>
<form method="POST"class="needs-validation" action="<?php echo e(route('add_user_group')); ?>">
<?php echo csrf_field(); ?>
<div class="modal-body">
<input type="hidden" id="user_group_id" name="user_group_id" />
<div class="mb">
<label for="name-field" class="form-label">
Name *
</label>
<input type="text" id="name-field" name="name"
class="form-control" placeholder="Enter name"
required />
</div>
<div class="mb">
<label for="description-field" class="form-label">
Description
</label>
<input type="text" id="description-field" name="description"
class="form-control" placeholder="Enter Description"/>
</div>
</div>
<div class="modal-footer">
<div class="hstack gap-2 justify-content-end">
<button type="button" class="btn btn-light"
data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-success"
id="add-btn">Submit</button>
<!-- <button type="button" class="btn btn-success"
id="edit-btn">Update</button> -->
</div>
</div>
</form>
</div>
</div>
</div>
<!-- delete modal -->
<div class="modal fade flip" id="deleteOrder" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-body p-5 text-center">
<lord-icon src="https://cdn.lordicon.com/gsqxdxog.json"
trigger="loop" colors="primary:#405189,secondary:#f06548"
style="width:90px;height:90px"></lord-icon>
<div class="mt-4 text-center">
<h4>You are about to delete a User Group ?</h4>
<div class="hstack gap-2 justify-content-center remove">
<form method="POST"class="needs-validation" action="<?php echo e(route('delete_user_group')); ?>">
<?php echo csrf_field(); ?>
<input type="hidden" id="del_group_id" name="user_group_id" />
<button type="button"
class="btn btn-link link-success fw-medium text-decoration-none"
data-bs-dismiss="modal" id="deleteRecord-close" ><i
class="ri-close-line me-1 align-middle"></i>
Close</button>
<button class="btn btn-danger" type="submit" id="delete-record">Yes,
Delete It</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end col-->
</div>
<!--end row-->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.datatables.net/1.11.5/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/1.11.5/js/dataTables.bootstrap5.min.js"></script>
<script src="https://cdn.datatables.net/responsive/2.2.9/js/dataTables.responsive.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.2/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.print.min.js"></script>
<script src="https://cdn.datatables.net/buttons/2.2.2/js/buttons.html5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="<?php echo e(URL::asset('assets/js/pages/form-validation.init.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/js/pages/datatables.init.js')); ?>"></script>
<script src="<?php echo e(URL::asset('/assets/js/app.min.js')); ?>"></script>
<script>
document.getElementById("addModal").addEventListener("hidden.bs.modal", function() {
$(this).find('form').trigger('reset');
});
function add_modal_open() {
$("#exampleModalLabel").text("Add User Group");
$('#addModal').modal('toggle');
}
function update_modal_open(data) {
data=JSON.parse(data);
$("#user_group_id").val(data.id);
$("#name-field").val(data.name);
$("#description-field").val(data.description);
$("#exampleModalLabel").text("Edit User Group");
$('#addModal').modal('toggle');
}
function delete_modal_open(id) {
$("#del_group_id").val(id);
$('#deleteOrder').modal('toggle');
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\jiff\default\resources\views/pages/settings/user_group.blade.php ENDPATH**/ ?>
|