File: /var/www/html/hrms-production/storage/framework/views/841b55c6116cc45ae9392f9aceae128c78994d8f.php
<?php $__env->startSection('content'); ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Admin Detail</h1>
</div>
<div class="col-sm-6 text-right">
<a class="btn btn-sm btn-outline-info mx-1" href="<?php echo e(url('add-admin')); ?>">Add New</a>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<!-- /.card-header -->
<div class="card-body">
<table id="AdminTable" class="table table-bordered table-striped table-sm">
<thead>
<tr>
<th>S.No.</th>
<th>FirstName</th>
<th>MiddleName</th>
<th>LastName</th>
<th>Email</th>
<th>Mobile</th>
<th>UserType</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $AllAdmins; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $AllAdmin): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($loop->iteration); ?></td>
<td><?php echo e($AllAdmin->FirstName); ?></td>
<td><?php echo e($AllAdmin->MiddleName); ?></td>
<td><?php echo e($AllAdmin->LastName); ?></td>
<td><?php echo e($AllAdmin->Email); ?></td>
<td>
<?php if($AllAdmin->Mobile): ?>
<?php echo e($AllAdmin->Mobile); ?>
<?php else: ?>
N/A
<?php endif; ?>
</td>
<td><?php echo e($AllAdmin->UserType); ?></td>
<td>
<?php if($AllAdmin->isActive=='1'): ?>
<span class="btn btn-success btn-flat bg-success btn-xs" data-toggle="tooltip"
data-placement="top" title="Click to De-activate" data-id="<?php echo e($AllAdmin->UserId); ?>"
onclick="deactivateAdminStatus('<?php echo e($AllAdmin->UserId); ?>')">Active</span>
<?php else: ?>
<span class="btn btn-danger btn-flat btn-xs" data-toggle="tooltip" data-placement="top"
title="Click to Activate"
onclick="activateAdminStatus('<?php echo e($AllAdmin->UserId); ?>')">InActive</span>
<?php endif; ?>
</td>
<td>
<a href="<?php echo e(url('edit-profile/'.$AllAdmin->UserId)); ?>"><i class="fas fa-edit"></i></a>
<!-- <button type="button" title="Edit"
onclick="EditAdminDetail('<?php echo e($AllAdmin->UserId); ?>')" ;
class="btn btn-xs btn-outline-info" data-id=""><i class="fas fa-edit"></i></button> -->
<!-- <button type="button" title="Delete"
onclick="DeleteVehicleDetail('<?php echo e($AllAdmin->VehicleId); ?>')" ;
class="btn btn-xs btn-outline-danger"
data-id="'<?php echo e($AllAdmin->VehicleId); ?>'"><i class="fas fa-trash-alt"></i>
</button> -->
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</form>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<script>
function formReset()
{
Swal.fire({
title: 'Do Want to reset form?',
text: "Are you sure you want to reset this form!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, reset it!'
}).then(function() {
$('form#paySlipForm').each(function() {
this.reset();
});
});
}
</script>
<script>
$(function() {
$("#AdminTable").DataTable({
"responsive": true,
"lengthChange": true,
"autoWidth": false,
"lengthMenu": [10, 20, 50, 100, 250, 500],
"buttons": ["copy", "csv", "excel", "pdf", "print", "colvis"]
}).buttons().container().appendTo('#AdminTable_wrapper .col-md-6:eq(0)');
});
</script>
<script>
// Activate
function activateAdminStatus(UserId) {
var UserId = UserId;
Swal.fire({
title: 'Activate Status Name?',
text: "Are you sure you want to activate Status Name!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, activate it!'
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "get",
url: "<?php echo e(url('/')); ?>/change-admin-status/" + UserId,
success: function(response) {
Swal.fire({
icon: 'success',
title: 'Admin Status has been activated!',
showConfirmButton: false,
timer: 1500
}).then(function() {
location.reload();
});
}
});
}
});
}
// Deactivate
function deactivateAdminStatus(UserId) {
var UserId = UserId;
Swal.fire({
title: 'De-activate Admin Status?',
text: "Are you sure you want to De-activate Admin Status!",
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes, De-activate it!'
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
type: "get",
url: "<?php echo e(url('/')); ?>/change-admin-status/" + UserId,
success: function(response) {
Swal.fire({
icon: 'success',
title: 'Admin Status has been De-activated!',
showConfirmButton: false,
timer: 1500
}).then(function() {
location.reload();
});
}
});
}
});
}
</script>
<!-- /.content-wrapper -->
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.include.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/hrms/resources/views/admin/all-admin.blade.php ENDPATH**/ ?>