CHANGE_live_ui_fix_in_qcr - VADIVEL J 2025-10-17

This commit is contained in:
vadivelJ96 2025-10-17 15:26:50 +05:30
parent e6a3a442ab
commit 67521d45cf

View File

@ -12,7 +12,7 @@
margin-right: 40px; margin-right: 40px;
} }
#notification_slider .switch-label input { #notification_slider .switch-label input {
opacity: 0; opacity: 0;
width: 0; width: 0;
height: 0; height: 0;
@ -576,6 +576,8 @@ $('.btnAdd').click(function() {
fetchClientBranch() fetchClientBranch()
$('#notification_slider').hide();
$('#policy_form')[0].reset(); $('#policy_form')[0].reset();
$('#add_form').show(); $('#add_form').show();
$('#table_list').hide(); $('#table_list').hide();
@ -609,6 +611,7 @@ $('.btnAdd').click(function() {
$('.btnBack').click(function() { $('.btnBack').click(function() {
$('#notification_slider').show();
$('#policy_form')[0].reset(); $('#policy_form')[0].reset();
$('#add_form').hide(); $('#add_form').hide();
$('#table_list').show(); $('#table_list').show();
@ -633,6 +636,8 @@ $("#policy_form").submit(function(event) {
event.preventDefault(); event.preventDefault();
$('#notification_slider').show();
policy_PrimaryKey = $('#client_id_policy').val(); policy_PrimaryKey = $('#client_id_policy').val();
policy_client = $('#policy_PrimaryKey').val(); policy_client = $('#policy_PrimaryKey').val();
@ -774,6 +779,8 @@ $("#policy_form").submit(function(event) {
auto_si_menu = `<a href="#" data-id="${item.id}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="showModal('rack_rate_auto_si_modal'); getRackRateSIAmountAndAutoSiDataForAutoSI('${item.id}')"><i class="mdi mdi-autorenew mr-2 text-muted font-18 vertical-middle"></i>Auto SI</a>`; auto_si_menu = `<a href="#" data-id="${item.id}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="showModal('rack_rate_auto_si_modal'); getRackRateSIAmountAndAutoSiDataForAutoSI('${item.id}')"><i class="mdi mdi-autorenew mr-2 text-muted font-18 vertical-middle"></i>Auto SI</a>`;
} }
if(checkDateStatus(item.policy_end_date) != 'Expired'){
policyTable += policyTable +=
` `
<tr> <tr>
@ -794,20 +801,24 @@ $("#policy_form").submit(function(event) {
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a> <a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item btnPolicyModel" data-toggle="modal" data-target="#bs-example-modal-lg"><i class="mdi mdi-book-open mr-2 text-muted font-18 vertical-middle"></i>Rack Rate</a>
${auto_si_menu}`; ${auto_si_menu}`;
// Conditionally render the delete option based on the role // Conditionally render the delete option based on the role
if (role != 3 && role != 4) { if (role != 3 && role != 4) {
policyTable += policyTable +=
` `
<a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="removepolicy(this)"><i class="fa fa-trash mr-2 text-muted font-18 vertical-middle"></i>Delete</a>`; <a href="#" data-id="${item.id}" id="${search_term}" data-typeid="${item.policy_type_id}" class="dropdown-item" onclick="removepolicy(this)"><i class="fa fa-trash mr-2 text-muted font-18 vertical-middle"></i>Delete</a>`;
} }
policyTable += ` policyTable += `
</div> </div>
</div> </div>
</td> </td>
</tr> </tr>
`; `;
});
}
});
$('#policy_table').append(policyTable); $('#policy_table').append(policyTable);
// console.log(policyTable); // console.log(policyTable);
@ -833,7 +844,11 @@ $("#policy_form").submit(function(event) {
//console.log('Unknown error occurred', 'Warning'); //console.log('Unknown error occurred', 'Warning');
} }
}, 1000); }, 1000);
},
complete:function(){
$('notification_slider').show();
} }
}); });
}); });
@ -897,6 +912,9 @@ $('body').on('click', '.btnPolicyEdit', function() {
var policy_form_action = ''; var policy_form_action = '';
var policy_id = $(this).attr('data-id'); var policy_id = $(this).attr('data-id');
$('#notification_slider').hide();
$('.loader').fadeIn(); $('.loader').fadeIn();
$('.loader-mask').fadeIn(); $('.loader-mask').fadeIn();
@ -1120,6 +1138,10 @@ $('body').on('click', '.btnPolicyEdit', function() {
$('.loader-mask').delay(350).fadeOut('slow'); $('.loader-mask').delay(350).fadeOut('slow');
//console.log('Something Wrong!', 'warning'); //console.log('Something Wrong!', 'warning');
}, 1000); }, 1000);
},
complete:function() {
$('#notification_slider').hide();
console.log('complete call');
} }
}); });
}); });