Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
d528390d1b
@ -312,7 +312,7 @@ $(document).ready(function()
|
|||||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Add From Lead',
|
text: 'Add From Opportunities',
|
||||||
className: 'btn-filter add-from-lead', // custom class
|
className: 'btn-filter add-from-lead', // custom class
|
||||||
action: function(e, dt, node, config) {
|
action: function(e, dt, node, config) {
|
||||||
showModal();
|
showModal();
|
||||||
|
|||||||
@ -104,7 +104,7 @@ input:checked + .slider_blue::before {
|
|||||||
|
|
||||||
<div class="row" style="padding-bottom: 10px; position: relative;right: 13px; justify-content: end;">
|
<div class="row" style="padding-bottom: 10px; position: relative;right: 13px; justify-content: end;">
|
||||||
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm" style="position: relative;right: 10px;"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
|
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm" style="position: relative;right: 10px;"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
|
||||||
<button type="button" id="BtnAddSuccess" class="btn btn-success waves-effect waves-light BtnAddSuccess btn-sm" onclick="showModal()"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy From Lead</button>
|
<button type="button" id="BtnAddSuccess" class="btn btn-success waves-effect waves-light BtnAddSuccess btn-sm" onclick="showModal()"><span class="mdi mdi-plus-box-outline" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy From Opportunities</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -156,7 +156,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="row">
|
<!-- <div class="row">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
<h4 style="position: relative;">Add Endorsement</h4>
|
<h4 style="position: relative;">Add Endorsement</h4>
|
||||||
</div>
|
</div>
|
||||||
@ -164,7 +164,7 @@
|
|||||||
<a href="<?= base_url('policy_tranction/endorsement/list') ?>" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
<a href="<?= base_url('policy_tranction/endorsement/list') ?>" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||||
>Back</a>
|
>Back</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<form role="form" class="parsley-examples" method="post" id="endorsement_form_id" enctype="multipart/form-data">
|
<form role="form" class="parsley-examples" method="post" id="endorsement_form_id" enctype="multipart/form-data">
|
||||||
|
|
||||||
<input type="hidden" name="id" id="policy_tranction_primarykey">
|
<input type="hidden" name="id" id="policy_tranction_primarykey">
|
||||||
@ -1052,6 +1052,12 @@
|
|||||||
if(res.status == true){
|
if(res.status == true){
|
||||||
|
|
||||||
hide_list_show_add()
|
hide_list_show_add()
|
||||||
|
var page_title = 'Edit Endorsement' + (res.data.client_short_name || res.data.policy_type || res.data.policy_no ?
|
||||||
|
' - ' + [res.data.client_short_name, res.data.policy_type, res.data.policy_no]
|
||||||
|
.filter(Boolean).join('-') : '');
|
||||||
|
var backUrl = '<?= base_url("policy_tranction/endorsement/list"); ?>';
|
||||||
|
var backButton = `<a href="${backUrl}" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>`;
|
||||||
|
updateNavTitle(page_title, backButton);
|
||||||
|
|
||||||
$('#bro_payable_by').val(res.data.bro_payable_by)
|
$('#bro_payable_by').val(res.data.bro_payable_by)
|
||||||
|
|
||||||
|
|||||||
@ -638,7 +638,37 @@
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var pageName = "<?= esc($page_name ?? '') ?>";
|
||||||
|
var userName = "<?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?>";
|
||||||
|
|
||||||
|
function updateNavTitle(subTitle, backButton) {
|
||||||
|
var titleHtml = "";
|
||||||
|
var $titleEl = $(".top-navbar-title");
|
||||||
|
var $navDiv = $(".top-navbar-div");
|
||||||
|
|
||||||
|
if (pageName && backButton && subTitle) {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
titleHtml += `<h6>${backButton} ${subTitle}</h6>`;
|
||||||
|
$titleEl.css({ display: "block", bottom: "12px" });
|
||||||
|
$navDiv.css({ marginTop: "0px" });
|
||||||
|
} else if (pageName && subTitle) {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
titleHtml += `<h6>${subTitle}</h6>`;
|
||||||
|
$titleEl.css({ display: "block", bottom: "12px" });
|
||||||
|
$navDiv.css({ marginTop: "0px" });
|
||||||
|
} else {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
$titleEl.css({ display: "flex", bottom: "0px" });
|
||||||
|
$navDiv.css({ marginTop: "20px" });
|
||||||
|
}
|
||||||
|
|
||||||
|
$titleEl.html(titleHtml);
|
||||||
|
}
|
||||||
|
|
||||||
function hide_list_show_add() {
|
function hide_list_show_add() {
|
||||||
|
var backUrl = '<?= base_url("policy_tranction/endorsement/list"); ?>';
|
||||||
|
var backButton = `<a href="${backUrl}" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>`;
|
||||||
|
updateNavTitle('Add Endorsement', backButton);
|
||||||
removeAllColumnsExceptFirst('insurerTable');
|
removeAllColumnsExceptFirst('insurerTable');
|
||||||
$('.hideter').hide()
|
$('.hideter').hide()
|
||||||
$('.hidetp').hide()
|
$('.hidetp').hide()
|
||||||
@ -654,6 +684,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function show_list_hide_add() {
|
function show_list_hide_add() {
|
||||||
|
updateNavTitle(false, false);
|
||||||
$('#pt_onboarding').hide()
|
$('#pt_onboarding').hide()
|
||||||
$('#endorsement_list').show()
|
$('#endorsement_list').show()
|
||||||
$('#endorsement_filter').show()
|
$('#endorsement_filter').show()
|
||||||
|
|||||||
@ -2258,7 +2258,9 @@
|
|||||||
var page_title = 'Edit Policy' + (res.data.client_short_name || res.data.policy_type || res.data.policy_no ?
|
var page_title = 'Edit Policy' + (res.data.client_short_name || res.data.policy_type || res.data.policy_no ?
|
||||||
' - ' + [res.data.client_short_name, res.data.policy_type, res.data.policy_no]
|
' - ' + [res.data.client_short_name, res.data.policy_type, res.data.policy_no]
|
||||||
.filter(Boolean).join('-') : '');
|
.filter(Boolean).join('-') : '');
|
||||||
pageSubTitle = page_title;
|
var backUrl = '<?= base_url("policy_tranction/inception/list"); ?>';
|
||||||
|
var backButton = `<a href="${backUrl}" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>`;
|
||||||
|
updateNavTitle(page_title, backButton);
|
||||||
$('#client_id_kyc').val(res.data.client_id);
|
$('#client_id_kyc').val(res.data.client_id);
|
||||||
$('#policy_tranction_primarykey_for_file_upload').val(res.data.id);
|
$('#policy_tranction_primarykey_for_file_upload').val(res.data.id);
|
||||||
$('#client_id_for_vehicle_file_upload').val(res.data.client_id);
|
$('#client_id_for_vehicle_file_upload').val(res.data.client_id);
|
||||||
|
|||||||
@ -720,12 +720,39 @@ $(document).ready(function(){
|
|||||||
})
|
})
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------
|
||||||
|
var pageName = "<?= esc($page_name ?? '') ?>";
|
||||||
|
var userName = "<?= esc(get_session_userdata()->first_name ?? 'NOT SET') ?>";
|
||||||
|
|
||||||
|
function updateNavTitle(subTitle, backButton) {
|
||||||
|
var titleHtml = "";
|
||||||
|
var $titleEl = $(".top-navbar-title");
|
||||||
|
var $navDiv = $(".top-navbar-div");
|
||||||
|
|
||||||
|
if (pageName && backButton && subTitle) {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
titleHtml += `<h6>${backButton} ${subTitle}</h6>`;
|
||||||
|
$titleEl.css({ display: "block", bottom: "12px" });
|
||||||
|
$navDiv.css({ marginTop: "0px" });
|
||||||
|
} else if (pageName && subTitle) {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
titleHtml += `<h6>${subTitle}</h6>`;
|
||||||
|
$titleEl.css({ display: "block", bottom: "12px" });
|
||||||
|
$navDiv.css({ marginTop: "0px" });
|
||||||
|
} else {
|
||||||
|
titleHtml = `<h3 style="margin-right:5px !important;">${pageName}</h3>`;
|
||||||
|
$titleEl.css({ display: "flex", bottom: "0px" });
|
||||||
|
$navDiv.css({ marginTop: "20px" });
|
||||||
|
}
|
||||||
|
|
||||||
|
$titleEl.html(titleHtml);
|
||||||
|
}
|
||||||
|
|
||||||
function hide_list_show_add()
|
function hide_list_show_add()
|
||||||
{
|
{
|
||||||
// $('#page_title').text('Add Policy')
|
// $('#page_title').text('Add Policy')
|
||||||
var pageSubTitle = 'Add Policy';
|
var backUrl = '<?= base_url("policy_tranction/inception/list"); ?>';
|
||||||
var pageBackButton = '<a href="<?= base_url("policy_tranction/inception/list"); ?>" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>';
|
var backButton = `<a href="${backUrl}" aria-label="Back to list"><i class="mdi mdi-arrow-left" style="font-size: 17px;"></i></a>`;
|
||||||
|
updateNavTitle('Add Policy', backButton);
|
||||||
$('#inception_form_id')[0].reset();
|
$('#inception_form_id')[0].reset();
|
||||||
$('#client_id').val('').change().prop('disabled', false);
|
$('#client_id').val('').change().prop('disabled', false);
|
||||||
$('#tpa').val('').change().prop('disabled', false);
|
$('#tpa').val('').change().prop('disabled', false);
|
||||||
@ -758,6 +785,7 @@ function show_list_hide_add()
|
|||||||
{
|
{
|
||||||
pageSubTitle = undefined;
|
pageSubTitle = undefined;
|
||||||
pageBackButton = undefined;
|
pageBackButton = undefined;
|
||||||
|
updateNavTitle(false, false);
|
||||||
$('#pt_onboarding').hide()
|
$('#pt_onboarding').hide()
|
||||||
$('#inception_list').show()
|
$('#inception_list').show()
|
||||||
$('#inception_filter').show();
|
$('#inception_filter').show();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user