Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
velz 2024-05-27 17:38:25 +05:30
commit 82024d10b4
6 changed files with 157 additions and 28 deletions

View File

@ -19,7 +19,7 @@ $routes->get('/logout', 'LoginController::logout');
$routes->get('/oauth2callback', 'LoginController::receiveGoogleOAuthResponse');
$routes->get('/auth/google', 'LoginController::initiateGoogleOAuth');
$routes->get('/update-emp-policy-status', 'ClientController::updateEmpAndPolicyStatus');
$routes->get('download-e-card/(:segment)', 'EmployeeController::generateIDCardForEmployee/$1');
$routes->get('download-e-card/(:any)', 'EmployeeController::generateIDCardForEmployee/$1');
$routes->get('download-kyc-docs/(:segment)', 'ClientController::downloadKYCDocument/$1');

View File

@ -2266,12 +2266,12 @@ class EmpDataServiceController extends BaseController
if($status == 'success'){
$msg_txt = $data['short_name'] . ' - ' . $data['branch_name'] . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
$msg_txt = $data['client_name'] . '( ' . $data['branch_name'] . ' )' . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
$msg_title = 'File Upload Success';
}else if ($status == 'failure'){
$msg_txt = $data['short_name'] . ' - ' . $data['branch_name'] . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
$msg_txt = $data['client_name'] . '( ' . $data['branch_name'] . ' )' . ' - ' . $data['policy_name'] . ' - ' . $data['event_type'] . ' - ' . $data['actions'] . ' - ' . $data['insurer_or_tpa'];
$msg_title = 'File Upload Failure';
}

View File

@ -877,8 +877,9 @@ class EmployeeController extends AdminController
}
public function generateIDCardForEmployee($rand_string)
{
public function generateIDCardForEmployee($rand_string, $people = 0)
{
// dd($rand_string, $people);
try {
@ -906,9 +907,13 @@ class EmployeeController extends AdminController
$client_policy_id = $get_emp_code_and_client_policy_id['client_policy_id'];
$emp_code = $get_emp_code_and_client_policy_id['emp_code'];
// $data['data'] = $this->employeePolicyModel->getECardDataUsingMd5($client_policy_id, $emp_code);
$data = $this->employeePolicyModel->getECardDataUsingMd5($client_policy_id, $emp_code);
if($people == 0){
$data = $this->employeePolicyModel->getECardSingleData($rand_string, $emp_code);
}
// dd($data);
$template_data_path = WRITEPATH . 'e_card_template/';

View File

@ -782,6 +782,72 @@ class EmployeePolicyModel extends Model
return $result;
}
public function getECardSingleData($rand_string, $emp_code){
$result = $this->db->table('employees e')
->select('e.id,
e.name, e.mobile,
e.relationship,
e.relationship_code,
e.emp_code,
e.email_personal,
e.email_corporate,
e.gender,
e.dob,
e.doj,
e.band,
TIMESTAMPDIFF(YEAR, e.dob, CURDATE()) AS emp_age,
(SELECT name FROM employees WHERE relationship = "Self" and emp_code = ' . $this->db->escape($emp_code) . ') AS self,
ep.tpa_id,
ep.uhid,
ep.policy_end_date,
clients.client_name,
clients.short_name AS client_short_name,
cp.policy_start_date,
cp.policy_no,
policies.name AS policy_name,
insurers.name AS insurer_name,
insurers.short_name AS insurer_short_name,
insurers.insurer_logo,
insurer_branch.branch_name,
insurer_branch.branch_code,
insurer_branch.city as insurer_branch_city,
tpa.name AS tpa_name,
tpa.tpa_logo AS tpa_logo,
tpa.front_card,
tpa.back_card,
tpa.short_name AS tpa_short_name'
)
->join('employee_polices ep', 'ep.employee_id = e.id')
->join('client_policy cp', 'cp.id = ep.client_policy_id')
->join('clients', 'clients.id = cp.client_id')
->join('policies', 'policies.id = cp.policy_id')
->join('insurers', 'insurers.id = cp.insurer_id')
->join('insurer_branch', 'insurer_branch.id = cp.insurer_branch_id')
->join('tpa', 'tpa.id = cp.tpa_id')
->where("ep.tpa_id IS NOT NULL AND ep.tpa_id <> ''")
->where('e.emp_status', 'active')
->where('e.is_active', '1')
->where('ep.status', 'active')
->where('ep.is_active', '1')
->where('ep.rand_string', $rand_string)
->get()
->getResultArray();
return $result;
}

View File

@ -69,6 +69,7 @@ class MessageModel extends Model
$builder->orWhere('messages.role_id', $roleId);
$builder->orWhere('messages.team_id', $teamId);
$builder->groupEnd();
$builder->orderBy('id', 'desc');
$query = $builder->get();
return $query->getResult();

View File

@ -48,9 +48,9 @@
</div>
<!-- Pending Action Header -->
<h6 class="font-weight-medium px-3 m-0 py-2 font-13 text-uppercase bg-light fixed-header">
<h6 class="font-weight-medium px-3 m-0 py-2 font-13 bg-light fixed-header">
<i class="mdi mdi-format-list-checks font-22"></i>
<span class="header-title">Pending Action</span>
<span class="header-title">TO DOs</span>
</h6>
<div class="scrollable-content">
<ul class="list-unstyled" id="messages-list-2">
@ -340,7 +340,15 @@
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var toast_body_data = item.client_name + ' - ' + item.branch_name + ' - ' + item.policy_name;
if (!item.branch_name.toLowerCase().includes('branch')) {
console.log(item.branch_name)
item.branch_name += ' branch';
}
//console.log(item.branch_name);
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
//console.log(toast_body_data);
@ -394,13 +402,23 @@
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var title = 'Correction Export Pending';
var title = 'Correction Pending';
if (item.batch_export_count > 0) {
title = 'Correction Import Pending';
if (!item.branch_name.toLowerCase().includes('branch')) {
console.log(item.branch_name)
item.branch_name += ' branch';
}
//console.log(item.branch_name);
// if (item.batch_export_count > 0) {
// title = 'Correction Import Pending';
// }
var toast_body_data = item.client_name + ' - ' + item.branch_name;
//console.log(toast_body_data);
@ -458,14 +476,24 @@
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var title = 'Deletion Export Pending';
var title = 'Deletion Pending';
if (item.batch_export_count > 0) {
title = 'Deletion Import Pending';
if (!item.branch_name.toLowerCase().includes('branch')) {
console.log(item.branch_name)
item.branch_name += ' branch';
}
var toast_body_data = item.client_name + ' - ' + item.branch_name + ' - ' + item.policy_name;
//console.log(item.branch_name);
// if (item.batch_export_count > 0) {
// title = 'Deletion Import Pending';
// }
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
//console.log(toast_body_data);
var html = ` <li data-id="" data-url="${url}">
@ -520,14 +548,24 @@
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var title = 'SI Enhancement Export Pending';
var title = 'SI Enhancement Pending';
if (item.batch_export_count > 0) {
title = 'SI Enhancement Import Pending';
if (!item.branch_name.toLowerCase().includes('branch')) {
console.log(item.branch_name)
item.branch_name += ' branch';
}
var toast_body_data = item.client_name + ' - ' + item.branch_name + ' - ' + item.policy_name;
//console.log(item.branch_name);
// if (item.batch_export_count > 0) {
// title = 'SI Enhancement Import Pending';
// }
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
//console.log(toast_body_data);
var html = ` <li data-id="" data-url="${url}">
@ -582,14 +620,23 @@
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var title = 'TPA Export Pending';
var title = 'TPA Pending';
if (item.batch_export_count > 0) {
if (!item.branch_name.toLowerCase().includes('branch')) {
title = 'TPA Import Pending';
console.log(item.branch_name)
item.branch_name += ' branch';
}
var toast_body_data = item.client_name + ' - ' + item.branch_name + ' - ' + item.policy_name;
//console.log(item.branch_name);
// if (item.batch_export_count > 0) {
// title = 'TPA Import Pending';
// }
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
//console.log(toast_body_data);
var html = ` <li data-id="" data-url="${url}">
@ -643,14 +690,24 @@
var toast_head_css = 'background-color : rgb(2, 168, 181) !important; color :#000; border-bottom: 0;';
var toast_icon = 'mdi mdi-checkbox-marked-circle mr-auto';
var toast_status_word = 'Info';
var title = 'Insurer Export Pending';
var title = 'Insurer Pending';
if (item.batch_export_count > 0) {
title = 'Insurer Import Pending';
if (!item.branch_name.toLowerCase().includes('branch')) {
console.log(item.branch_name)
item.branch_name += ' branch';
}
var toast_body_data = item.client_name + ' - ' + item.branch_name + ' - ' + item.policy_name;
//console.log(item.branch_name);
// if (item.batch_export_count > 0) {
// title = 'Insurer Import Pending';
// }
var toast_body_data = item.client_name + '( ' + item.branch_name + ' ) ' + ' - ' + item.policy_name;
//console.log(toast_body_data);
var html = ` <li data-id="" data-url="${url}">