Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev

This commit is contained in:
aadhavan valli 2024-03-25 17:23:06 +05:30
commit 36f2036992
7 changed files with 45 additions and 10 deletions

View File

@ -596,6 +596,10 @@ class ClientController extends AdminController
$policy_type = $this->request->getPost('policy_type');
$client_id = $this->request->getPost('client_id');
$client_policy_id = $this->request->getPost('client_policy_id');
if(!empty($client_id) && $client_id != null){
$client_policy_data = $this->clientPolicyModel->where('id', $client_policy_id)->first();
$client_id = $client_policy_data['client_id'];
}
$policy_grid_id = $this->request->getPost('policy_grid_id');
$si_or_bp = $this->request->getPost('si_or_bp');
$basic_multiplier = str_replace(',', '', $this->request->getPost('basic_multiplier'));

View File

@ -42,7 +42,7 @@ class LoginController extends BaseController
if($user){
if($user->is_active !== '0'){
$session_data = ['isLoggedIn' => True ,'userid' => $user->id];
$session_data = ['isLoggedIn' => True ,'userid' => $user->id, 'userData' => $user];
set_session_data($session_data);
log_message('error', 'Set The UserId : `'. $user->id .'` in Session');
log_message('error', 'User Login Sucessfully');

View File

@ -19,6 +19,15 @@ if (!function_exists('get_session_userid')) {
}
}
if (!function_exists('get_session_userdata')) {
function get_session_userdata()
{
// $ci =& get_instance();
$session = \Config\Services::session();
return $session->get('userData');
}
}
if (!function_exists('get_session_user')) {
function get_session_user()
{

View File

@ -203,8 +203,11 @@ $(document).ready(function () {
$('#policy_PrimaryKey').val(res.data.id);
$('#client_id_kyc').val(res.data.id);
$('#kyc_PrimaryKey').val(res.data.id);
$('#Client_id').val(res.data.id);
$('#entity_type').val(res.data.entity_type_id);
var client_id_for_file = res.data.id;
console.log()
if(PrimaryKey === ''){
@ -226,7 +229,7 @@ $(document).ready(function () {
<td id="form_${item.id}" style=""><form class="ajax" ><input class="file-input__input" type="file" name="file_name">
<input type="hidden" class="form-control" value="<?= csrf_hash() ?>" name="<?= csrf_token() ?>" />
<input type="hidden" class="form-control" value="${item.id}" name="kyc_doc_type_id" />
<input type="hidden" name="client_id" value="<?= isset($client['id']) ? $client['id'] : '' ?>"/>
<input type="hidden" name="client_id" value="${client_id_for_file}"/>
<button class="btn btn-sm btn-primary submit" style="position: relative;right: 80px;">Submit</button></form></td>
<td id="name_${item.id}" style="display:none;"></td>
<td><i data-id="${item.id}" class="mdi mdi-delete btnKycDelete" style="font-size:18px;"></i></td>

View File

@ -88,7 +88,7 @@
<div class="form-row">
<div class="form-group col-md-6">
<label for="mobile">Mobile<span class="text-danger">*</span></label>
<input value="" type="text" class="form-control" placeholder="Enter Contact Mobile ( starting with 6, 7, 8, or 9 only. )" name="mobile[]" id="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" pattern="^[6-9]\d{9}$" data-parsley-type-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." data-parsley-required-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." required>
<input value="" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
</div>
<div class="form-group col-md-6">
<label for="designation">Designation<span class="text-danger">*</span></label>
@ -97,7 +97,7 @@
</div>
<div class="form-group" style="display: flex;">
<button style="margin-right: 10px;" type="button" class="btn btn-primary btn-sm ac" onclick="appendContactHtml()" id="add">Add Contact</button>
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="${uniqueId}_remove">Remove</button>
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="remove_btn">Remove</button>
</div>
<div id="container"></div>
@ -293,7 +293,6 @@ $(document).ready(function () {
});
$('body').on('click', '.btnBranchEdit', function () {
console.log(branch_form_action);
@ -352,6 +351,13 @@ $(document).ready(function () {
});
$("#remove_btn").click(function(){
$("#name").val('');
$("#email").val('');
$("#mobile").val('');
$("#designation").val('');
})
// Initialize the contact count
function appendContactHtml(contact = false, reset = false) {
@ -379,7 +385,7 @@ $(document).ready(function () {
<div class="form-row">
<div class="form-group col-md-6">
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile ( starting with 6, 7, 8, or 9 only. )" name="mobile[]" id="${uniqueId}_mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" pattern="^[6-9]\d{9}$" data-parsley-type-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." data-parsley-required-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." required>
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
</div>
<div class="form-group col-md-6">
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>

View File

@ -160,6 +160,12 @@
$('#table_list').hide();
$('.btnBack').show();
$('.btnAdd').hide();
$('#insurer').val('');
$('#tpa').val('');
$('#start_date').val('');
$('#end_date').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
$('#is_addon').prop('checked', false);
$('#policy_form_action').val('<?= base_url("client/policy/create"); ?>');
})
@ -288,10 +294,10 @@
<div class="btn-group dropdown">
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
<div class="dropdown-menu dropdown-menu-right">
<a href="#" data-id="${item.id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnPolicyEdit"><i class="mdi mdi-lead-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
<a href="#" data-id="${item.id}" class="dropdown-item btnPolicyMaster" data-toggle="modal" id="${item.policy_type_id}"><i class="mdi mdi-wrench mr-2 text-muted font-18 vertical-middle"></i>Terms</a>
<a href="#" data-id="${item.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>Rac Rate</a>
<a href="#" data-id="${item.id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
<a href="#" data-id="${item.id}" id="${item.policy_id}" class="dropdown-item btnOpenEnroll"><i class="mdi mdi-file-lock mr-2 text-muted font-18 vertical-middle"></i>Open Enrollment</a>
</div>
</div>
</td>
@ -299,6 +305,13 @@
`;
});
$('#policy_table').append(policyTable);
$('#insurer').val('');
$('#tpa').val('');
$('#start_date').val('');
$('#end_date').val('');
$('#policy').html('<option value="" selected>Select Policy</option>');
$('#is_addon').prop('checked', false);
},
error: function(xhr, status, error) {
console.error(xhr.responseText);

View File

@ -393,8 +393,8 @@
<li class="dropdown notification-list topbar-dropdown">
<a class="nav-link dropdown-toggle nav-user mr-0 waves-effect waves-light" data-toggle="dropdown" href="#" role="button" aria-haspopup="false" aria-expanded="false">
<img src="<?= base_url()."public"; ?>/assets/images/users/avatar-1.jpg" alt="user-image" class="rounded-circle">
<span class="pro-user-name ml-1">
Venkat
<span class="pro-user-name ml-1" style="font-size: 16px;" >
<?= get_session_userdata()->first_name ?>
<!-- <i class="mdi mdi-chevron-down"></i> -->
</span>
</a>