CHANGE_VIEW_MEMBERS_LIST_PAGE : RV
This commit is contained in:
parent
710ae1efa9
commit
b726b9530d
@ -34,6 +34,10 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.right-align-input {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<?php $pro_rata_total = 0; $gst_total = 0 ?>
|
||||
@ -47,24 +51,23 @@
|
||||
<h4 style="position: relative;">Employees</h4>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-hover m-0 table-centered dt-responsive w-100" cellspacing="0" id="tickets-table">
|
||||
<table class="table table-striped mb-0 nowrap" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="font-weight-medium">SNO</th>
|
||||
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<?php if (isset($getData)) {
|
||||
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<th class="font-weight-medium">Client/Branch</th>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<?php }
|
||||
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<th class="font-weight-medium">Branch</th>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } } ?>
|
||||
|
||||
<th class="font-weight-medium">Name/code</th>
|
||||
<th class="font-weight-medium">Name</th>
|
||||
<th class="font-weight-medium">EMP Code</th>
|
||||
<th class="font-weight-medium">Relationship</th>
|
||||
<th class="font-weight-medium">Date of Birth</th>
|
||||
<th class="font-weight-medium">Policy name</th>
|
||||
<th class="font-weight-medium">Insurer name</th>
|
||||
<th class="font-weight-medium">TPA ID</th>
|
||||
@ -86,19 +89,18 @@
|
||||
<tr>
|
||||
<td><b><?php echo ($key + 1); ?></b></td>
|
||||
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<?php if (isset($getData)) {
|
||||
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<td><?php echo $employee['client_short_name'] . ' - ' . $employee['client_branch_name']; ?></td>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<?php }
|
||||
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<td><?php echo $employee['client_branch_name']; ?></td>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } } ?>
|
||||
|
||||
<td><?php echo $employee['name'] . ' (' . $employee['emp_code'] . ' - ' . $employee['relationship'] . ')'; ?></td>
|
||||
<td><?php echo $employee['name']; ?></td>
|
||||
<td><?php echo $employee['emp_code']; ?></td>
|
||||
<td><?php echo $employee['relationship']; ?></td>
|
||||
<td><?php echo date('d/m/Y', strtotime($employee['dob'])); ?></td>
|
||||
<td><?php echo isset($employee['policy_type']) ? $employee['policy_type'] : ''; ?> - <?php echo isset($employee['policy_no']) ? $employee['policy_no'] : ''; ?></td>
|
||||
<td><?php echo $employee['insurer_short_name']; ?></td>
|
||||
<td><?php echo $employee['tpa_id']; ?></td>
|
||||
@ -132,24 +134,22 @@
|
||||
<td><?php $pro_rata_total += $employee['rata_premimum']; echo format_indian_number($employee['rata_premimum']); ?></td>
|
||||
<td><?php $gst_total += $employee['gst']; echo format_indian_number($employee['gst']); ?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
} ?>
|
||||
<?php } } ?>
|
||||
</tbody>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th></th>
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<?php if (isset($getData)) {
|
||||
if ($getData['client_id'] == '0' && $getData['policy_id'] == '0' && $getData['branch_id'] == '0' && ($getData['emp_code'] != "" || $getData['emp_name'] != "" || $getData['status'] != "")) { ?>
|
||||
<th></th>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (isset($getData)) { ?>
|
||||
<?php if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<?php }
|
||||
if ($getData['client_id'] != '0' && $getData['branch_id'] == '0') { ?>
|
||||
<th></th>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<?php } } ?>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
@ -174,6 +174,7 @@
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
|
||||
"<'row'<'col-sm-12'tr>>" +
|
||||
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
|
||||
@ -181,9 +182,6 @@
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Member-List',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}],
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
|
||||
@ -115,7 +115,6 @@ var client_id = '<?= isset($getData) ? $getData['client_id'] : '0' ?>';
|
||||
var client_branch_id = '<?= isset($getData) ? $getData['branch_id'] : '0' ?>';
|
||||
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
console.log("document loaded");
|
||||
//fetchClientPolicies();
|
||||
@ -127,7 +126,6 @@ $(window).on("load", function() {
|
||||
fetchClientPolicies();
|
||||
});
|
||||
|
||||
|
||||
function fetchClientPolicies() {
|
||||
$('#loader').show();
|
||||
var apiURL = '<?php echo base_url();?>' + 'util/clients-with-policies';
|
||||
@ -204,7 +202,6 @@ function fetchClientPolicies() {
|
||||
$('#loader').hide();
|
||||
}
|
||||
|
||||
|
||||
function appendClients(data) {
|
||||
var clientID = <?= isset($getData) ? $getData['client_id'] : '0' ?>;
|
||||
$.each(data, function(index, item) {
|
||||
@ -219,7 +216,6 @@ function appendClients(data) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function appendBranch(data) {
|
||||
|
||||
$('#branch_id').empty();
|
||||
@ -239,7 +235,6 @@ function appendBranch(data) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function appendPolicies(data) {
|
||||
|
||||
$('#policies').empty();
|
||||
@ -286,7 +281,6 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#branch_id').on('change', function() {
|
||||
@ -321,7 +315,6 @@ function objectToQueryString(obj) {
|
||||
return Object.keys(obj).map(key => `${encodeURIComponent(key)}=${encodeURIComponent(obj[key])}`).join('&');
|
||||
}
|
||||
|
||||
|
||||
function fetchEmpolyeeList(event) {
|
||||
event.preventDefault(); // Prevent default action
|
||||
|
||||
|
||||
@ -537,6 +537,7 @@ function getPolicyData(input) {
|
||||
}
|
||||
}
|
||||
|
||||
// Salse team user list data
|
||||
function selecSalsePerson(salse_person_ids) {
|
||||
|
||||
salse_person_ids = JSON.parse(salse_person_ids);
|
||||
@ -588,7 +589,7 @@ function addHTMLInput() {
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="insurer">Insurer <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="insurer_${increment}" name="insurer[]" required>
|
||||
<select class="form-control" id="insurer_${increment}" name="insurer[]" onchange="insurerChange(this, ${increment})" required>
|
||||
<option value="">Select Insurer</option>
|
||||
<?php if (isset($insurer)) { ?>
|
||||
<?php foreach ($insurer as $value) { ?>
|
||||
@ -602,7 +603,7 @@ function addHTMLInput() {
|
||||
|
||||
<div class="form-group col-md-3">
|
||||
<label for="tpa">TPA <span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="tpa_${increment}" name="tpa[]" required>
|
||||
<select class="form-control" id="tpa_${increment}" name="tpa[]" onchange="tpaChange(this, ${increment})" required>
|
||||
<option value="">Select TPA</option>
|
||||
<?php if (isset($tpa)) { ?>
|
||||
<?php foreach ($tpa as $value) { ?>
|
||||
@ -715,7 +716,6 @@ function addHTMLInput() {
|
||||
increment++; // Increment after adding the input
|
||||
}
|
||||
|
||||
|
||||
function removeHTMLInput(element)
|
||||
{
|
||||
const container = document.getElementById('dynamic-form-container');
|
||||
@ -849,6 +849,24 @@ $('#lead_type').change(function() {
|
||||
|
||||
})
|
||||
|
||||
function insurerChange(input, unique_id) {
|
||||
var lead_type = $('#lead_type').val()
|
||||
|
||||
if(lead_type == 2){
|
||||
var val = $(input).val();
|
||||
$('#proposed_insurer_'+unique_id).val(val).select2();
|
||||
}
|
||||
}
|
||||
|
||||
function tpaChange(input, unique_id) {
|
||||
var lead_type = $('#lead_type').val()
|
||||
|
||||
if(lead_type == 2){
|
||||
var val = $(input).val();
|
||||
$('#proposed_tpa_'+unique_id).val(val).select2();
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
function getURLParamsForReport() {
|
||||
@ -866,4 +884,5 @@ function getURLParamsForReport() {
|
||||
|
||||
console.log('pt_id', pt_id); // Retain the log if necessary
|
||||
}
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user