MERGE_UAT_UI
This commit is contained in:
commit
35c2f24515
@ -312,7 +312,7 @@ $(document).ready(function()
|
||||
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
|
||||
buttons: [
|
||||
{
|
||||
text: 'Add From Lead',
|
||||
text: 'Add From Opportunities',
|
||||
className: 'btn-filter add-from-lead', // custom class
|
||||
action: function(e, dt, node, config) {
|
||||
showModal();
|
||||
|
||||
@ -104,7 +104,7 @@ input:checked + .slider_blue::before {
|
||||
|
||||
<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="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>
|
||||
|
||||
<br>
|
||||
|
||||
@ -156,7 +156,7 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<!-- <div class="row">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;">Add Endorsement</h4>
|
||||
</div>
|
||||
@ -164,7 +164,7 @@
|
||||
<a href="<?= base_url('policy_tranction/endorsement/list') ?>" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||
>Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<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">
|
||||
@ -1052,6 +1052,12 @@
|
||||
if(res.status == true){
|
||||
|
||||
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)
|
||||
|
||||
|
||||
@ -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() {
|
||||
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');
|
||||
$('.hideter').hide()
|
||||
$('.hidetp').hide()
|
||||
@ -654,6 +684,7 @@
|
||||
}
|
||||
|
||||
function show_list_hide_add() {
|
||||
updateNavTitle(false, false);
|
||||
$('#pt_onboarding').hide()
|
||||
$('#endorsement_list').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 ?
|
||||
' - ' + [res.data.client_short_name, res.data.policy_type, res.data.policy_no]
|
||||
.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);
|
||||
$('#policy_tranction_primarykey_for_file_upload').val(res.data.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()
|
||||
{
|
||||
// $('#page_title').text('Add Policy')
|
||||
var pageSubTitle = 'Add Policy';
|
||||
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 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('Add Policy', backButton);
|
||||
$('#inception_form_id')[0].reset();
|
||||
$('#client_id').val('').change().prop('disabled', false);
|
||||
$('#tpa').val('').change().prop('disabled', false);
|
||||
@ -758,6 +785,7 @@ function show_list_hide_add()
|
||||
{
|
||||
pageSubTitle = undefined;
|
||||
pageBackButton = undefined;
|
||||
updateNavTitle(false, false);
|
||||
$('#pt_onboarding').hide()
|
||||
$('#inception_list').show()
|
||||
$('#inception_filter').show();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user