Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
ea9fb8dbc7
@ -140,23 +140,25 @@
|
||||
|
||||
|
||||
<script>
|
||||
var client_list = [];
|
||||
var branch_list = [];
|
||||
var filter_client_list = [];
|
||||
var filter_branch_list = [];
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#filter_client_id').select2();
|
||||
$('#filter_client_branch_id').select2();
|
||||
$('#filter_policy_type').select2();
|
||||
|
||||
getfilterClientAndBranch()
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#filter_client_id').change(function() {
|
||||
|
||||
let client_id = $(this).val();
|
||||
if (branch_list != '') {
|
||||
if (filter_branch_list != '') {
|
||||
// console.log(branch_list[client_id]);
|
||||
let data = branch_list[client_id];
|
||||
appendBranch(data);
|
||||
let data = filter_branch_list[client_id];
|
||||
appendfilterBranch(data);
|
||||
}
|
||||
|
||||
})
|
||||
@ -225,7 +227,7 @@ function fetchTicketListData() {
|
||||
}
|
||||
|
||||
//function for fetch client, branch
|
||||
function getClientAndBranchAndPolicy() {
|
||||
function getfilterClientAndBranch() {
|
||||
$.ajax({
|
||||
url: '<?= base_url("/util/getClientAndBranchAndPolicy") ?>',
|
||||
type: "GET",
|
||||
@ -234,9 +236,9 @@ function getClientAndBranchAndPolicy() {
|
||||
|
||||
console.log('getClientAndBranchAndPolicy', res);
|
||||
if (res.status == true) {
|
||||
client_list = res.client_data;
|
||||
branch_list = res.branch_data;
|
||||
appendClients(res.client_data);
|
||||
filter_client_list = res.client_data;
|
||||
filter_branch_list = res.branch_data;
|
||||
appendfilterClients(res.client_data);
|
||||
} else {
|
||||
console.log('No data found');
|
||||
}
|
||||
@ -252,7 +254,7 @@ function getClientAndBranchAndPolicy() {
|
||||
//----- END AJAX FUNCTIONS --------------------------------------------------------------------------------
|
||||
|
||||
|
||||
function appendClients(data) {
|
||||
function appendfilterClients(data) {
|
||||
|
||||
$('#filter_client_id').empty();
|
||||
|
||||
@ -272,7 +274,7 @@ function appendClients(data) {
|
||||
|
||||
}
|
||||
|
||||
function appendBranch(data) {
|
||||
function appendfilterBranch(data) {
|
||||
|
||||
$('#filter_client_branch_id').empty();
|
||||
|
||||
|
||||
@ -1654,6 +1654,32 @@ $('.policy_type_id').change(function() {
|
||||
$('.freashDiv').show();
|
||||
} else {
|
||||
$('.freashDiv').hide(); // Optional: Hide when `policy_type_id` is not 2
|
||||
}});
|
||||
}});
|
||||
|
||||
function appendThreeYearsClaims()
|
||||
{
|
||||
html = `
|
||||
<div class="form-group col-md-3">
|
||||
<label for="first_year_${increment}">Year<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_year_${increment}" name="first_year[]">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="first_claim_amount_${increment}">Claim Amount / Settled Amount<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_claim_amount_${increment}" name="first_claim_amount[]">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="first_claim_status_${increment}">Claim Status<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_claim_status_${increment}" name="first_claim_status[]">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="first_casue_of_death_${increment}">Nature / Casue Of Death <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_casue_of_death_${increment}" name="first_casue_of_death[]">
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="first_death_date_${increment}">Date of Death<span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" id="first_death_date_${increment}" name="first_death_date[]">
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user