diff --git a/app/Config/Acl.php b/app/Config/Acl.php
index b4d85eac..45ca160a 100644
--- a/app/Config/Acl.php
+++ b/app/Config/Acl.php
@@ -15,6 +15,13 @@ class Acl
'#^/loginPos#' => ['public' => true],
'#^/getVerifyPosMobileNo#' => ['public' => true],
'#^/getVerifiedPosUserData#' => ['public' => true],
+ '#^/chat#' => ['public' => true],
+ '#^/widget#' => ['public' => true],
+ '#^/chatbottest#' => ['public' => true],
+ '#^/chatbot#' => ['public' => true],
+ '#^/getSSORedirectUrl#' => ['public' => true],
+ '#^/getEmployeePolicy#' => ['public' => true],
+ '#^/downloadFileTableFile#' => ['public' => true],
'#^/swagger#' => ['roles' => [ADMIN_ROLE_ID]],
'#^/getEmployeeActiveOrInactivePolicy#' => ['roles' => [ADMIN_ROLE_ID, HEAD_ROLE_ID]],
'#^/bulkEcardDownloadAsZip#' => ['roles' => [ADMIN_ROLE_ID, HEAD_ROLE_ID]],
@@ -54,6 +61,34 @@ class Acl
'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => []
],
+ '#^/hrFileDownload#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/sendPushNotification#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/sendEmail#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/getPolicyLevelEmployeeSummaryData#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/cdTransactionData#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/claimsSearch#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/getBackToEnrolledDetails#' => [
+ 'roles' => [ ADMIN_ROLE_ID,HEAD_ROLE_ID, MANAGER_ROLE_ID, STAFF_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => []
+ ],
// ===================== USER MANAGEMENT =====================
'#^/user#' => [
@@ -88,6 +123,18 @@ class Acl
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
],
+ '#^/dmsSearch#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
+ ],
+ '#^/downloadGdriveFile#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
+ ],
+ '#^/driveListFiles#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
+ ],
'#^/bds_upload#' => [
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
@@ -108,12 +155,60 @@ class Acl
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
],
+ '#^/importRules#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [FINANCE_TEAM_ID,POS_TEAM_ID]
+ ],
// ===================== CLAIMS / TICKETS =====================
'#^/ticket#' => [
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => [CLAIMS_TEAM_ID]
],
+ '#^/ticketSave#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketList#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketConversationSave#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketConversationList#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketType#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketHistoryList#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/ticketAutoFetchDetails#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/initiateClaim#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/departments#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/get_ticket_data#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
+ '#^/claimView#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
+ 'teams' => [CLAIMS_TEAM_ID]
+ ],
'#^/claim_mis#' => [
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID],
'teams' => [CLAIMS_TEAM_ID]
@@ -138,6 +233,22 @@ class Acl
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
'teams' => []
],
+ '#^/add_advertise_image#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/remove_advertise_image#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/getAdvertiseImage#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
+ 'teams' => []
+ ],
+ '#^/showAdvertiseImage#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
+ 'teams' => []
+ ],
'#^/frontend_content#' => [
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
'teams' => []
@@ -146,6 +257,10 @@ class Acl
'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
'teams' => []
],
+ '#^/getFEContent#' => [
+ 'roles' => [ HEAD_ROLE_ID,ADMIN_ROLE_ID, MANAGER_ROLE_ID, ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID],
+ 'teams' => []
+ ],
// ===================== LOGS =====================
'#^/logs#' => [
@@ -167,9 +282,25 @@ class Acl
// ===================== WEBHOOKS / 3RD PARTY =====================
'#^/dispatchWebhookData#' => ['public' => true],
'#^/retrieveWebhookData#' => ['public' => true],
- // '#^/ICICI#' => ['public' => true],
- // '#^/Vidal#' => ['public' => true],
- // '#^/MediAssist#' => ['public' => true],
+ '#^/ecardRequest#' => ['public' => true],
+ '#^/getTPAID#' => ['public' => true],
+ '#^/fileDownload#' => ['public' => true],
+ '#^/generateAuthToken#' => ['public' => true],
+ '#^/createEnrollmentBatch#' => ['roles' => [ADMIN_ROLE_ID, HEAD_ROLE_ID], 'teams' => [ENROLLMENT_TEAM_ID]],
+ '#^/getEnrollmentBatchStatus#' => ['roles' => [ADMIN_ROLE_ID, HEAD_ROLE_ID], 'teams' => [ENROLLMENT_TEAM_ID]],
+ '#^/fetchUHIDDetails#' => ['roles' => [ADMIN_ROLE_ID, HEAD_ROLE_ID], 'teams' => [ENROLLMENT_TEAM_ID]],
+ '#^/FhplGetBenefDetails#' => ['roles' => [ADMIN_ROLE_ID]],
+ '#^/EcardRequest#' => ['public' => true],
+ '#^/HospitalNetwork#' => ['public' => true],
+ '#^/VidalGetBenefDetails#' => ['public' => true],
+ '#^/ClaimDetail#' => ['public' => true],
+ '#^/SubmitClaim#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/IntimateClaim#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/IRSubmission#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/ClaimStatusUpdate#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/syncTpaClaimToNhance#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/HealthIndiaGetBenefDetails#' => ['roles' => [ADMIN_ROLE_ID,HEAD_ROLE_ID,ACCOUNT_MANAGER_ROLE_ID,STAFF_ROLE_ID]],
+ '#^/testTracelog#' => ['roles' => [ADMIN_ROLE_ID]],
// ===================== CLI =====================
'#^/cli/#' => ['public' => true],
diff --git a/app/Config/Routes.php b/app/Config/Routes.php
index 09d117f3..cf17885b 100755
--- a/app/Config/Routes.php
+++ b/app/Config/Routes.php
@@ -227,6 +227,8 @@ $routes->group("/employee", ["filter" => "authMVC"], function ($routes) {
$routes->get("retail-endorsement-list", "EmployeeController::retailendorsementlist");
$routes->post("retail-endorsement-save", "EmployeeController::retailendorsementsave");
$routes->get("getTPADataVariationReport/(:num)", "EmployeeController::getTPADataVariationReport/$1");
+ $routes->get("getTPADataVariationReportView/(:num)", "EmployeeController::getTPADataVariationReport/$1/view");
+ $routes->get("proceedTPADataVariationNextStep/(:num)", "EmployeeController::proceedTPADataVariationNextStep/$1");
$routes->get("bulkGenerateEcardAndStoreinS3", "EmployeeController::bulkGenerateEcardAndStoreinS3");
$routes->get('clearCdSession', 'EmployeeController::clearCdSession');
$routes->get('checkSessionStatus', 'EmployeeController::checkSessionStatus');
diff --git a/app/Controllers/ApiServiceController.php b/app/Controllers/ApiServiceController.php
index 16a650a0..bb977a11 100644
--- a/app/Controllers/ApiServiceController.php
+++ b/app/Controllers/ApiServiceController.php
@@ -82,6 +82,8 @@ class ApiServiceController extends BaseController
{
try{
+
+
if(empty($params) && $this->response){
$payload = $this->request->getJSON(true);
@@ -105,6 +107,9 @@ class ApiServiceController extends BaseController
}
+
+ log_message('error', 'Ecard Request started | client_policy_id: '.$client_policy_id.' | policyNo: '.$policy_no.' | emp_code: '.$emp_code.' | type: '.$type);
+
// $employee_policy = $this->employeePolicyModel
// ->select('employees.*, employee_polices.tpa_id , employee_polices.rand_string , employee_polices.uhid as uhid , client_policy.tpa_id as tpa_primary_id ')
// ->join('employees', 'employee_polices.employee_id = employees.id', 'left')
@@ -126,11 +131,15 @@ class ApiServiceController extends BaseController
->whereIn('employees.emp_status', ['active', 'expired'])
->findAll();
+ log_message('error', 'Ecard Request - Employee data fetched | count: '.count($employee_policy).' | type: '.$type);
if(count($employee_policy) > 0)
{
if($employee_policy[0]['tpa_id'] != null)
{
+
+ log_message('error', 'Ecard Request - tpa_id found | tpa_id: '.$employee_policy[0]['tpa_id'].' | type: '.$type);
+
if($employee_policy[0]['tpa_primary_id'] == $this->medi_assist_primary_key)//Medi assist
{
@@ -176,11 +185,11 @@ class ApiServiceController extends BaseController
$data['message'] = "E-card not generated";
}
- } else {
- $data['eCardDownload'] = null;
- $data['message'] = "E-card not generated";
- log_message('error', 'TPA number is null');
- }
+ } else {
+ $data['eCardDownload'] = null;
+ $data['message'] = "E-card not generated";
+ log_message('error', 'TPA number is null');
+ }
}else{
$data['eCardDownload'] = null;
$data['message'] = "E-card not generated";
diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php
index 3ea1af3a..45e7097c 100755
--- a/app/Controllers/EmpDataServiceController.php
+++ b/app/Controllers/EmpDataServiceController.php
@@ -3891,6 +3891,13 @@ class EmpDataServiceController extends BaseController
$policy_name = $this->getPolicyNameUsingClientPolicyId($client_policy_id);
$job_details = new Jobs();
+
+ $r = Jobs::addJob(['job_name' => 'visitOffBoard', 'payload' => [
+ 'memberIds' => $employee_policy_table_primaryKey ?? [],
+ 'policyNumber' => $policy_name['policy_no'] ?? null ,
+ 'source' => 'NHANCE'
+ ]]);
+
$r = Jobs::addJob(['job_name' => 'cashDepositCalculationForDeletion', 'payload' => [
'employeeIds' => $employee_policy_table_primaryKey,
'client_id' => $client_id,
@@ -4703,7 +4710,7 @@ class EmpDataServiceController extends BaseController
public function getPolicyNameUsingClientPolicyId($client_policy_id)
{
- return $this->clientPolicyModel->select('policy_type.policy_type as policy_name')
+ return $this->clientPolicyModel->select('policy_type.policy_type as policy_name, client_policy.policy_no')
->join('policy_type', 'policy_type.id = client_policy.policy_type_id')
->where('client_policy.id', $client_policy_id)
->first();
diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php
index 01664e76..fbff649a 100755
--- a/app/Controllers/EmployeeController.php
+++ b/app/Controllers/EmployeeController.php
@@ -163,17 +163,21 @@ class EmployeeController extends AdminController
public function getClientWithPolicies()
{
- //echo $this->request->isAJAX();die();
- $result = $this->clientModel->clientsWithPolicies();
+ try {
+ //echo $this->request->isAJAX();die();
+ $result = $this->clientModel->clientsWithPolicies();
- // dd($result);
+ // dd($result);
- // print_r($result);die();
- if (!count($result)) {
- return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'no data found'], 200);
- } else {
-
- return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $result], 200);
+ // print_r($result);die();
+ if (!count($result)) {
+ return $this->respond(['dataStatus' => false, 'code' => 404, 'message' => 'no data found'], 200);
+ } else {
+
+ return $this->respond(['dataStatus' => true, 'code' => 200, 'data' => $result], 200);
+ }
+ } catch (\Throwable $th) {
+ return $this->respond(['dataStatus' => false, 'code' => 500, 'message' => $th->getMessage()], 500);
}
}
@@ -3564,7 +3568,7 @@ class EmployeeController extends AdminController
public function initiateWellnessOnboard($client_policy_id)
{
$r = Jobs::addJob(['job_name' => 'initiateWellnessOnboardJob','payload' => ['client_policy_id' => $client_policy_id]]);
- //$this->initiateWellnessOnboardJob(['client_policy_id' => $client_policy_id]);
+ // $this->initiateWellnessOnboardJob(['client_policy_id' => $client_policy_id]);
return $this->respond(['status' => true, 'code' => 200, 'message' => 'Process started'], 200);
}
@@ -3938,14 +3942,14 @@ class EmployeeController extends AdminController
}
}
- public function getTPADataVariationReport($file_id)
+ public function getTPADataVariationReport($file_id, $type = 'download')
{
$file_info = $this->batchFileModel->where('id', $file_id)->find();
$client_id = $file_info[0]['client_id'];
$client_policy_id = $file_info[0]['client_policy_id'];
$TpaApiDataModel = new TpaApiDataModel();
$emp_data_wo_tpa_id = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id);
-
+
//loop emp data with TPA data for matches
foreach ($emp_data_wo_tpa_id as $db_key => $db_row)
@@ -3965,10 +3969,10 @@ class EmployeeController extends AdminController
// die();
//not_in_tpa
$tpa_emp_codes = $TpaApiDataModel->select('emp_code')
- ->where('file_id', $file_id)
- ->where('is_active', 1)
- ->groupBy('emp_code')
- ->findAll();
+ ->where('file_id', $file_id)
+ ->where('is_active', 1)
+ ->groupBy('emp_code')
+ ->findAll();
$tpa_emp_codes = array_column($tpa_emp_codes, 'emp_code');
$not_in_tpa = $this->employeePolicyModel->getTPADataVariationReport($client_id, $client_policy_id, $file_id,$tpa_emp_codes);
@@ -3982,20 +3986,110 @@ class EmployeeController extends AdminController
->where('is_active',1)
->where('file_id',$file_id)
->whereNotIn('emp_code',$master_emp_codes)
- ->findAll();
+ ->findAll();
// d($not_in_nhance);die();
- if( !empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id) )
- {
- $this->exportVariationReportExcel($not_in_tpa,$not_in_nhance,$emp_data_wo_tpa_id);
- }
- else
- {
- return false;
- }
- // $this->exportVariationReportExcel([],[],[]);
+ if (!empty($not_in_tpa) || !empty($not_in_nhance) || !empty($emp_data_wo_tpa_id)) {
+ if ($type === 'download') {
+ $this->exportVariationReportExcel($not_in_tpa, $not_in_nhance, $emp_data_wo_tpa_id);
+ } else {
+ $response = [
+ 'not_in_tpa' => $not_in_tpa,
+ 'not_in_nhance' => $not_in_nhance,
+ 'mismatch_data' => $emp_data_wo_tpa_id,
+ ];
+ return $this->respond(
+ [
+ 'status' => true,
+ 'code' => 200,
+ 'message' => '',
+ 'data' => $response,
+ ],
+ 200
+ );
+ }
+ } else {
+ if ($type === 'download') {
+ return false;
+ }
+ return $this->respond(
+ [
+ 'status' => false,
+ 'code' => 202,
+ 'message' => 'No data found',
+ 'data' => [],
+ ],
+ 200
+ );
+ }
+ }
+
+ public function proceedTPADataVariationNextStep($file_id)
+ {
+ try {
+ if (empty($file_id)) {
+ return $this->respond(
+ [
+ 'status' => false,
+ 'code' => 400,
+ 'message' => 'Invalid file reference',
+ 'data' => [],
+ ],
+ 200
+ );
+ }
+
+ $file = $this->batchFileModel->find($file_id);
+
+ if (!$file) {
+ return $this->respond(
+ [
+ 'status' => false,
+ 'code' => 404,
+ 'message' => 'File not found',
+ 'data' => [],
+ ],
+ 200
+ );
+ }
+
+ $this->myLogger->logme(
+ 'error',
+ 'TPA variation review completed and proceed to next clicked',
+ [
+ 'file_id' => $file_id,
+ 'user_id' => get_session_userid(),
+ ]
+ );
+
+ return $this->respond(
+ [
+ 'status' => true,
+ 'code' => 200,
+ 'message' => 'Proceed to next step recorded successfully.',
+ 'data' => [],
+ ],
+ 200
+ );
+ } catch (\Throwable $e) {
+ $this->myLogger->logme(
+ 'error',
+ 'Error while processing TPA variation proceed to next: ' . $e->getMessage(),
+ ['file_id' => $file_id]
+ );
+
+ return $this->respond(
+ [
+ 'status' => false,
+ 'code' => 500,
+ 'message' => 'Unable to proceed to the next step at the moment.',
+ 'data' => [],
+ ],
+ 200
+ );
+ }
}
@@ -4577,14 +4671,17 @@ class EmployeeController extends AdminController
$statusCode = $response->getStatusCode();
$rawBody = $response->getBody();
$result = json_decode($rawBody, true);
+ // print_rr($result);
- // 4. Handle based on HTTP Status Code
- if ($statusCode >= 200 && $statusCode < 300) {
+ // 4. Handle based on HTTP Status Code - BUG FIX: Changed = to == for proper comparison
+ if ($statusCode == 200) {
$this->myLogger->logme('error', "VISIT_OFFBOARD API Success (Code $statusCode): Policy deleted.");
- return [
- 'status' => true,
- 'data' => $result
+ $return_data = [
+ 'memberIds' => $params['memberIds'] ?? [],
+ 'api_result' => $result
];
+ $this->updateVisitoffboardStatus($return_data);
+ return $return_data;
}
// Log API-level errors (4xx or 5xx)
@@ -4607,6 +4704,73 @@ class EmployeeController extends AdminController
}
}
+
+ /**
+ * Updates the wellness onboard status in the database for deleted members.
+ *
+ * Marks employee policy records as deleted in the wellness system after
+ * a successful API response from the wellness onboard service.
+ *
+ * @param array $data Contains 'memberIds' array and 'api_result' from API response
+ * @return bool Returns true if update was successful or no action needed, false on error
+ */
+ public function updateVisitoffboardStatus(array $data): bool
+ {
+ try {
+ // Validate input data structure
+ if (empty($data) || !is_array($data)) {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: Invalid data parameter');
+ return false;
+ }
+
+ // Check if API result exists
+ if (empty($data['api_result'])) {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: No API result found in data');
+ return false;
+ }
+
+ $apiResult = $data['api_result'];
+
+ // Verify API success status - BUG FIX: Proper key access and validation
+ if (($apiResult['message'] ?? null) !== 'success') {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: API response not successful - ' . json_encode($apiResult));
+ return false;
+ }
+
+ // Extract member IDs safely - BUG FIX: Corrected key from memberids to memberIds
+ $memberIds = $data['memberIds'] ?? [];
+
+ if (empty($memberIds) || !is_array($memberIds)) {
+ $this->myLogger->logme('warn', 'VISIT_OFFBOARD_STATUS_UPDATE: No valid memberIds provided for update');
+ return true; // Not an error if no members to update
+ }
+
+ if(!empty($apiResult['missingMemberIds']) && is_array($apiResult['missingMemberIds']))
+ {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: missing member IDs found - ' . json_encode($apiResult['missingMemberIds']));
+ }
+ // Update wellness_onboard status for deleted members - Append '_DEL' to existing value
+ $updateResult = $this->employeePolicyModel
+ ->whereIn('id', $memberIds)
+ ->set('wellness_onboard', "CONCAT(wellness_onboard, '_DEL')", false)
+ ->update();
+
+ if ($updateResult !== false) {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: Updated ' . $updateResult . ' employee policy records with wellness_onboard_DEL status');
+ return true;
+ } else {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: Database update operation failed');
+ return false;
+ }
+
+
+
+ } catch (\Exception $e) {
+ $this->myLogger->logme('error', 'VISIT_OFFBOARD_STATUS_UPDATE: Exception occurred - ' . $e->getMessage() . ' - File: ' . $e->getFile() . ' - Line: ' . $e->getLine());
+ return false;
+ }
+ }
+
public function insufficientCdBalanceHrMailSend()
{
$post_data = $this->request->getJson(true);
diff --git a/app/Controllers/ICICILombardController.php b/app/Controllers/ICICILombardController.php
index 4d98bc96..717f8a05 100644
--- a/app/Controllers/ICICILombardController.php
+++ b/app/Controllers/ICICILombardController.php
@@ -121,10 +121,10 @@ class ICICILombardController extends AdminController
$body = [
"PolicyNumber" => "4016/PPN/A/O/53185987/00/000",
"CDBGAccountNumber" => "CD-MUM-0026",
- "CorrelationId" => "550e8400-e29b-41d4-a716-446655440022",
+ "CorrelationId" => "550e8400-e29b-41d4-a716-446655440023",
"MemberDetails" => [
[
- "MemberEmpId" => "EMPID3625565",
+ "MemberEmpId" => "EMPID3625566",
"DOJ" => "21-MAR-2019",
"InsuredName" => "sanjeev",
"DOB" => "7-JUL-1993",
@@ -136,7 +136,7 @@ class ICICILombardController extends AdminController
"FlagStatus" => "A"
],
[
- "MemberEmpId" => "EMPID3625565",
+ "MemberEmpId" => "EMPID3625566",
"DOJ" => "21-MAR-2019",
"InsuredName" => "bhavya",
"DOB" => "8-AUG-1970",
@@ -195,6 +195,7 @@ class ICICILombardController extends AdminController
//fetch token
$tokenResponse = $this->generateAuthToken('esbgpauhid');
+ // dd($tokenResponse);
if (!$tokenResponse || empty($tokenResponse['data']['access_token'])) {
return $this->response->setJSON([
'status' => false,
@@ -213,13 +214,15 @@ class ICICILombardController extends AdminController
];
$body = [
- "PolicyNumber" => "4016/PPN/A/O/53185987/00/000",
+ "PolicyNumber" => "4016/PPN/A/O/53185987/00/001",
"IMID" => "201580517901",
"CorrelationId" => "550e8400-e29b-41d4-a716-446655440022"
];
$response = call_third_party_api($url, 'POST', $headers, $body, true);
+ // dd($response);
+
return $this->response->setJSON($response);
}
diff --git a/app/Controllers/JobWorker.php b/app/Controllers/JobWorker.php
index 9aba4443..5840ac3f 100755
--- a/app/Controllers/JobWorker.php
+++ b/app/Controllers/JobWorker.php
@@ -238,6 +238,10 @@ class JobWorker extends AdminController
'getEmployeeEcardFromTmpFolderAndZipToS3' => [
'type' => 'CC', // Handler Category
'handler' => 'App\Controllers\EmployeeController',
+ ],
+ 'visitOffBoard' => [
+ 'type' => 'CC', // Handler Category
+ 'handler' => 'App\Controllers\EmployeeController',
]
];
diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php
index 41739b6a..fd736c2a 100644
--- a/app/Controllers/LeadsController.php
+++ b/app/Controllers/LeadsController.php
@@ -1,21 +1,18 @@
$type,
'actual_lead_id' => $actual_lead_id,
];
+ $data['tab_name'] = 'Opportunities';
+ $data['page_name'] = 'Opportunities';
if ($actual_lead_id > 0) {
diff --git a/app/Controllers/SalesController.php b/app/Controllers/SalesController.php
index 39a0f672..ce2481d5 100644
--- a/app/Controllers/SalesController.php
+++ b/app/Controllers/SalesController.php
@@ -652,12 +652,16 @@ class SalesController extends BaseController
$data['additional_assigned_ids'] = json_encode($data['additional_assigned_ids']);
}
- if (!$this->activityModel->insert($data)) {
+ $activityId = $this->activityModel->insert($data);
+ if (!$activityId) {
return $this->fail($this->activityModel->errors(), ResponseInterface::HTTP_BAD_REQUEST);
}
+ $data['activity_id'] = $activityId;
+
// add google calender event
$response = $this->addCalenderEvent($data);
+ log_message("error", '[GOOGLE_CALENDER] addCalenderEvent response: ' . json_encode($response));
$activityId = $this->activityModel->getInsertID();
$activity = $this->activityModel->find((int)$activityId);
@@ -1962,6 +1966,23 @@ public function salesManagerLevelDashboard($userId, $current_fin_year = null, $f
];
}
+ $activity_data = $this->activityModel->where('activity_id', $input['activity_id'])->first();
+
+
+ $emails[] = $user_data['email'];
+ if (isset($activity_data['additional_assigned_ids']) && !empty($activity_data['additional_assigned_ids'])) {
+ $additional_assigned_ids = json_decode($activity_data['additional_assigned_ids'], true) ?? [];
+
+ foreach ($additional_assigned_ids as $additional_assigned_id) {
+ $additional_user_data = $this->userModel->where('id', $additional_assigned_id)->first();
+
+ if (!empty($additional_user_data['email'])) {
+ $emails[] = $additional_user_data['email'];
+ }
+ }
+ }
+ log_message('error', '[GOOGLE_CALENDER] User emails: ' . json_encode($emails));
+
/* ---------------- SUMMARY ---------------- */
$activityType = ucfirst($input['activity_type']);
@@ -1988,7 +2009,7 @@ public function salesManagerLevelDashboard($userId, $current_fin_year = null, $f
'summary' => $summary,
'meeting_date' => $input['scheduled_date'],
'description' => $input['notes'] ?? '',
- 'emails' => [$user_data['email']],
+ 'emails' => $emails,
];
log_message('error', '[GOOGLE_CALENDER] Google Calendar Payload: ' . json_encode($eventData));
diff --git a/app/Controllers/TicketController.php b/app/Controllers/TicketController.php
index c3d5e86e..3833e4e0 100644
--- a/app/Controllers/TicketController.php
+++ b/app/Controllers/TicketController.php
@@ -1027,7 +1027,8 @@ class TicketController extends BaseController
$data['claim_status'] = $this->transFormClaimStatus($claim_status_id, $ticket_type);
$data['client_for_motor'] = $this->clientModel->select('id,client_name,phone')->where('client_type', 2)->where('is_active', 1)->findAll();
}
-
+ $data['tab_name'] = "Claims";
+ $data['page_name'] = "Claims";
return $this->loadLayout('ticket_edit_onbording', $data);
}
diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php
index 0eff67a2..d09b90c7 100755
--- a/app/Views/DashBoard.php
+++ b/app/Views/DashBoard.php
@@ -185,7 +185,8 @@
-
+
+
diff --git a/app/Views/UserList.php b/app/Views/UserList.php
index 919e7de1..9659eaf4 100755
--- a/app/Views/UserList.php
+++ b/app/Views/UserList.php
@@ -355,7 +355,7 @@ table.dataTable tbody td {
-
+
-
-
-
-
- | Insurer Name |
- Insurer Branch Name |
- CD Account Number |
- Current Balance |
- Action |
-
-
+ ->
+ -->
+
+
+
+
+ | Insurer Name |
+ Insurer Branch Name |
+ CD Account Number |
+ Current Balance |
+ Action |
+
+
-
-
-
+
+
+ | insurer_name;?> |
+ insurer_branch_name;?> |
+ cd_master_account_no;?> |
- insurer_name;?> |
- insurer_branch_name;?> |
- cd_master_account_no;?> |
-
- ₹
- insurer_id;
- $cd_ac_pk = $value->cd_ac_pk;
- // Check if the balance information exists for the insurer
- if (isset($balances[$insurerId . '-'. $cd_ac_pk])) {
- $balance = $balances[$insurerId . '-'. $cd_ac_pk]->balance;
- echo $balance;
- } else {
- echo "N/A"; // Display "Not Available" if balance information is not present
- }
- ?>
- |
-
- insurer_id}?client_id={$value->client_id}&cd_ac_pk={$value->cd_ac_pk}"); ?>">
- View Deposit
-
- |
-
-
-
-
+
₹
+ insurer_id;
+ $cd_ac_pk = $value->cd_ac_pk;
+ // Check if the balance information exists for the insurer
+ if (isset($balances[$insurerId . '-'. $cd_ac_pk])) {
+ $balance = $balances[$insurerId . '-'. $cd_ac_pk]->balance;
+ echo $balance;
+ } else {
+ echo "N/A"; // Display "Not Available" if balance information is not present
+ }
+ ?>
+ |
+
+ insurer_id}?client_id={$value->client_id}&cd_ac_pk={$value->cd_ac_pk}"); ?>">
+ View Deposit
+
+ |
+
+
+
+
+
@@ -70,7 +75,7 @@ $(document).ready(function() {
$('#tickets-table').DataTable({
// dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
- dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>",
+ dom: "<'row'<'col-12 d-flex justify-content-between align-items-center'<'datatable-search dataTables_filter'f><'datatable-buttons dt-buttons'B>>>" +
"<'row'<'col-sm-12'tr>>" +
"<'row align-items-center'<'col-5 text-start'i><'col-7 d-flex justify-content-end align-items-center'<'me-2'l>p>>",
lengthMenu: [[10, 20, 50, 100], [10, 20, 50, 100]],
diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php
index 928836a0..e7af7f88 100755
--- a/app/Views/client_onboarding.php
+++ b/app/Views/client_onboarding.php
@@ -271,14 +271,18 @@
-
+
+
diff --git a/app/Views/dms_search.php b/app/Views/dms_search.php
index f3e1bad0..ea953fff 100644
--- a/app/Views/dms_search.php
+++ b/app/Views/dms_search.php
@@ -25,83 +25,102 @@
.dataTables_length label {height: 21px !important;}
+ .filter-sidebar {
+ height: 100%;
+ width: 0;
+ position: fixed;
+ z-index: 1001;
+ top: 0;
+ right: 0;
+ background-color: #f8f9fa;
+ overflow-x: hidden;
+ transition: 0.5s;
+ box-shadow: -2px 0 5px rgba(0,0,0,0.1);
+ display: flex;
+ flex-direction: column;
+ }
+
+ .filter-sidebar-header {
+ padding: 15px 20px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ border-bottom: 1px solid #dee2e6;
+ flex-shrink: 0;
+ }
+
+ .filter-sidebar-header .closebtn {
+ font-size: 28px;
+ text-decoration: none;
+ color: #6c757d;
+ }
+
+ .filter-sidebar .closebtn:hover {
+ color: #000;
+ }
+
+ .filter-sidebar-content {
+ padding: 20px;
+ flex-grow: 1;
+ overflow-y: auto;
+ }
+
+ .filter-sidebar-footer {
+ padding: 15px 20px;
+ display: flex;
+ justify-content: flex-end;
+ border-top: 1px solid #dee2e6;
+ flex-shrink: 0;
+ gap: 10px;
+ }
+
-
-
-
-
-
-
- Filter
-
-
-
-
-
-
+
+
+
+
+
+ OR
+
+
+
+
+
+
+
+
+
+
+
+