File: /var/www/html/hrms-production/storage/framework/views/9a75d66f483ba50481f6ad0d71113de0c35df251.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 id="page-title">Cadre wise Abstract</h1>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12 col-sm-12">
<div class="card card-primary card-outline card-outline-tabs">
<div class="card-header p-0 border-bottom-0">
<ul class="nav nav-tabs" id="custom-tabs-four-tab" role="tablist">
<li class="nav-item">
<a class="nav-link active" id="group-wise-nomination-tab" data-toggle="pill"
href="#group-wise-nomination" role="tab" aria-controls="group-wise-nomination"
aria-selected="true"><i class="fas fa-table-alt"></i> All Cadre</a>
</li>
<li class="nav-item">
<a class="nav-link" id="group-wise-promotion-tab" data-toggle="pill"
href="#group-wise-promotion" role="tab"
aria-controls="group-wise-promotion" aria-selected="false"><i class="fas fa-table-alt"></i> Cadre Wise</a>
</li>
</ul>
</div>
<!-- /.card-header -->
<div class="card-body">
<div class="tab-content" id="tabContent">
<div class="tab-pane fade show active" id="group-wise-nomination" role="tabpanel" aria-labelledby="group-wise-nomination">
<table id="AllCadreTable" class="table table-bordered table-striped table-sm">
<thead>
<tr>
<th colspan="1" class="align-middle">Cadre</th>
<th colspan="1" class="align-middle">Sanction</th>
<th colspan="1" class="align-middle">Filled by Nomination</th>
<th colspan="1" class="align-middle">Filled by Promotion</th>
<th colspan="1" class="align-middle">Vacant</th>
</tr>
</thead>
<tbody>
<?php
$TotalNominationCadreFilled = 0;
$TotalPromotionCadreFilled = 0;
$SumTotalSanctionedPost = 0;
?>
<?php $__currentLoopData = $groupData; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $report): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($report["CadreName"]); ?></td>
<td>
<?php
$getTotalSanctionedPost = isset($report["TotalSanctionedPost"]) ? $report["TotalSanctionedPost"] : '';
$SumTotalSanctionedPost = intval($SumTotalSanctionedPost) + intval($getTotalSanctionedPost);
?>
<?php if($report["TotalSanctionedPost"] > 0): ?>
<?php echo e($report["TotalSanctionedPost"]); ?>
<?php else: ?>
--
<?php endif; ?>
</td>
<td>
<?php
$NominationFilled = isset($report["TotalNominationCadreWisePost"]) ? $report["TotalNominationCadreWisePost"] : '';
$TotalNominationCadreFilled = $TotalNominationCadreFilled + $NominationFilled;
?>
<?php echo e($report["TotalNominationCadreWisePost"]); ?>
</td>
<td>
<?php
$PromotionFilled = isset($report["TotalPromotionCadreWisePost"]) ? $report["TotalPromotionCadreWisePost"] : '';
$TotalPromotionCadreFilled = $TotalPromotionCadreFilled + $PromotionFilled;
?>
<?php echo e($report["TotalPromotionCadreWisePost"]); ?>
</td>
<td>
<?php if($report["TotalSanctionedPost"] > ($report["TotalNominationCadreWisePost"] + $report["TotalPromotionCadreWisePost"])): ?>
<?php echo e($report["TotalSanctionedPost"] - ($report["TotalNominationCadreWisePost"] + $report["TotalPromotionCadreWisePost"])); ?>
<?php else: ?>
<?php echo e(0); ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<tr>
<th rowspan="6">Total</th>
<th><?php echo e($SumTotalSanctionedPost); ?></th>
<th><?php echo e($TotalNominationCadreFilled); ?></th>
<th><?php echo e($TotalPromotionCadreFilled); ?></th>
<th><?php echo e($SumTotalSanctionedPost-($TotalNominationCadreFilled + $TotalPromotionCadreFilled)); ?></th>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane fade" id="group-wise-promotion" role="tabpanel" aria-labelledby="group-wise-promotion">
<div class="col-md-12">
<div class="row">
<div class="col-sm-8">
</div>
<div class="col-sm-4 form-group mb-3" style="float: right;">
<label class="mb-0" for="Cadre Name">Cadre Name</label>
<form action="" method="GET" id="Cadre">
<select class="form-control form-control-sm select2" aria-hidden="true"
name="CadreNameId" id="CadreNameId" data-placeholder="Select Cadre">
<option value="" disabled selected>Select Cadre</option>
</select>
<input type="hidden" name="CadreId" id="CadreId">
</form>
</div>
</div>
<table id="CadreWiseTable" class="table table-bordered table-striped table-sm" style="width: 100% !important">
<thead>
<tr>
<th colspan="6" class="align-middle">Cadre Name: <span id="CadreName"></span></th>
</tr>
<tr>
<th>Name of Scheme</th>
<th>Designation Name</th>
<th>Sanction</th>
<th>Filled By Nomination</th>
<th>Filled By Promotion</th>
<th>Vacant</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<script>
$(document).ready(function() {
$.ajax({
type: "GET",
url: "<?php echo e(url('/cadre-list')); ?>",
dataType: "json",
success: function(response) {
var json = response.Cadre;
$.each(json, function(i, cadrename) {
$("#CadreNameId").append("<option value='" + cadrename.CadreId + "'>" + cadrename.CadreName + "</option>");
$('#CadreNameId').trigger('change');
});
}
});
});
$(document).ready(function(e) {
$('#CadreNameId').change(function(e) {
var CadreId = $(this).val();
if (CadreId == null) {
// var cadreName = 'N/A';
var nodata = '<tr class="odd"><td valign="top" colspan="8" class="text-center">No data available in table</td></tr>';
$('#CadreWiseTable').find('tbody').html('#' +nodata);
// $('span#CadreName').html('' +cadreName);
return false;
}
else{
$("#CadreWiseTable tbody").empty();
$('#CadreWiseTable').dataTable().fnClearTable();
$('#CadreWiseTable').dataTable().fnDestroy();
$.ajax({
type: "GET",
url: "<?php echo e(url('/cadre-wise-report/')); ?>/"+CadreId,
success: function(response, status) {
$('#CadreWiseTable').find('tbody').append(response.output);
$('#CadreWiseTable').find('tbody').append(response.total);
if (response == '') {
$('span#CadreName').html('N/A');
} else {
$('span#CadreName').html('' +response.CadreName);
}
$("#CadreWiseTable").DataTable({
"responsive": true,
"ordering": false,
"buttons": ["csv", "excel", "pdf", "print"]
}).buttons().container().appendTo('#CadreWiseTable_wrapper .col-md-6:eq(0)');
}
});
}
e.preventDefault();
});
});
$(function() {
$("#AllCadreTable").DataTable({
"responsive": true,
"ordering": false,
// "lengthChange": true,
// "autoWidth": false,
// "lengthMenu": [10, 20, 50, 100, 250, 500],
// "columnDefs": [{ "orderable": false, "targets": 0 }],
"buttons": ["csv", "excel", "pdf", "print"]
}).buttons().container().appendTo('#AllCadreTable_wrapper .col-md-6:eq(0)');
});
// $(function() {
// $("#CadreWiseTable").DataTable({
// "responsive": true,
// "ordering": false,
// "buttons": ["csv", "excel", "pdf", "print"]
// }).buttons().container().appendTo('#CadreWiseTable_wrapper .col-md-6:eq(0)');
// });
</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-production/resources/views/admin/Reports/cadre-wise-report.blade.php ENDPATH**/ ?>