Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
ecbadbe5f2
2
.gitignore
vendored
2
.gitignore
vendored
@ -25,6 +25,8 @@ writable/**/*.sqlite
|
||||
writable/e_card_template/*
|
||||
!writable/e_card_template/.gitkeep
|
||||
|
||||
writable/tmp/*
|
||||
!writable/tmp/.gitkeep
|
||||
|
||||
vendor/
|
||||
build/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -165,8 +165,9 @@ class DashboardController extends AdminController
|
||||
$data['financeTeamCount'] = count($financeTeamData) ?? 0;
|
||||
// print_r($data);die;
|
||||
|
||||
$data['page_name'] = 'Dashboard';
|
||||
|
||||
echo view('layout/header');
|
||||
echo view('layout/header', $data);
|
||||
echo view('DashBoard', $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
@ -201,59 +202,71 @@ class DashboardController extends AdminController
|
||||
|
||||
public function updatePolicyEnrollmentStatus()
|
||||
{
|
||||
$clientModel = new ClientModel();
|
||||
$clientPolicyModel = new ClientPolicyModel();
|
||||
$notificationModel = new NotificationModel();
|
||||
$employeePolicyModel = new EmployeePolicyModel();
|
||||
$myLogger = \Config\Services::mylogger();
|
||||
|
||||
// $myLogger->logme('error', 'enrollment_status function called');
|
||||
|
||||
$client_policy_data = $clientPolicyModel->getPolicyDetailsForRemainder();
|
||||
$myLogger->logme('error', 'Fetched client policy data');
|
||||
|
||||
$client_policy_data = $clientPolicyModel->getPolicyDetailsForEnrollment();
|
||||
$myLogger->logme('error', 'Fetched client policy data for Enrollment Status update');
|
||||
|
||||
// dd($client_policy_data);
|
||||
|
||||
$currentDate = date('d');
|
||||
// $myLogger->logme('error', 'Current date: ' . $currentDate);
|
||||
$currentDate = date('d-m-Y');
|
||||
$openEnrollment = [];
|
||||
$closeEnrollment = [];
|
||||
|
||||
// Update policy status based on start and end dates
|
||||
foreach ($client_policy_data as $client_policy) {
|
||||
|
||||
$id = $client_policy['id'];
|
||||
$openDate = date('d', strtotime($client_policy['open_date']));
|
||||
$closeDate = date('d', strtotime($client_policy['close_date']));
|
||||
|
||||
// $myLogger->logme('error', 'Processing client policy ID: ' . $id);
|
||||
// $myLogger->logme('error', 'Open date: ' . $openDate . ', Close date: ' . $closeDate);
|
||||
|
||||
$openDate = date('d-m-Y', strtotime($client_policy['open_date']));
|
||||
$closeDate = date('d-m-Y', strtotime($client_policy['close_date']));
|
||||
|
||||
if ($currentDate == $openDate) {
|
||||
$clientPolicyModel->update($id, ['open_for_enrollment' => 1]);
|
||||
$openEnrollment[] = $id;
|
||||
$myLogger->logme('error', 'Updated policy ID ' . $id . ' to open for enrollment.');
|
||||
}
|
||||
|
||||
if ($closeDate < $currentDate) {
|
||||
$clientPolicyModel->update($id, ['open_for_enrollment' => 0]);
|
||||
$closeEnrollment[] = $id;
|
||||
$myLogger->logme('error', 'Updated policy ID ' . $id . ' to close for enrollment.');
|
||||
}
|
||||
}
|
||||
|
||||
$myLogger->logme('error', 'enrollment_status function completed');
|
||||
return $this->respond([
|
||||
'status' => true,
|
||||
'message' => 'updated Policy Enrollment Status',
|
||||
'open_policy_count' => count($openEnrollment),
|
||||
'close_policy_count' => count($closeEnrollment),
|
||||
'open_policy_ids' => $openEnrollment,
|
||||
'close_policy_ids' => $closeEnrollment,
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
public function sendCroneRemainderMail()
|
||||
{
|
||||
$clientPolicyModel = new ClientPolicyModel();
|
||||
$myLogger = \Config\Services::mylogger();
|
||||
|
||||
|
||||
$client_policy_data = $clientPolicyModel->getPolicyDetailsForRemainder();
|
||||
$myLogger->logme('error', 'Fetched client policy data');
|
||||
// dd($client_policy_data);
|
||||
|
||||
// Mail send function
|
||||
// $myLogger->logme('error', 'Calling sendRemainderMail function');
|
||||
if( $currentDate == date('d', strtotime($client_policy['reminder_date']))){
|
||||
$result = $this->sendRemainderMail($client_policy_data);
|
||||
}else{
|
||||
$result = false;
|
||||
}
|
||||
|
||||
// $myLogger->logme('error', 'enrollment_status function completed');
|
||||
$result = $this->sendRemainderMail($client_policy_data, 'crone');
|
||||
|
||||
$myLogger->logme('error', 'sendCroneRemainderMail function completed');
|
||||
|
||||
if($result){
|
||||
return json_encode(['status' => true, 'message' => 'Mail send successfully']);
|
||||
}else{
|
||||
return json_encode(['status' => false, 'message' => 'There is no data to send']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function featch_dashboard_data($type)
|
||||
{
|
||||
@ -291,65 +304,133 @@ class DashboardController extends AdminController
|
||||
return $this->respond(['status' => true, 'data' => $data], 200);
|
||||
}
|
||||
|
||||
|
||||
public function sendRemainderMail($client_policy_data)
|
||||
public function sendRemainderMail($client_policy_data, $send_mail_for_manual_or_crone = null)
|
||||
{
|
||||
// $this->myLogger->logme('error', 'sendRemainderMail function called');
|
||||
|
||||
// dd($client_policy_data, $send_mail_for_manual_or_crone);
|
||||
|
||||
$reminder_whole_mail = [];
|
||||
|
||||
foreach ($client_policy_data as $client_policy) {
|
||||
|
||||
// Fetch client data
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
->where('template_name', 'member_reminder_mail')
|
||||
->first();
|
||||
|
||||
// $this->myLogger->logme('error', 'Notification data fetched: ' . json_encode($notification_data));
|
||||
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||
->where('employees.emp_status', 'draft')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.status', 'draft')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
$reminder_whole_mail[] = $mail_result;
|
||||
if(empty($send_mail_for_manual_or_crone)){
|
||||
|
||||
// echo '1';
|
||||
|
||||
// Fetch client data
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
->where('template_name', 'member_reminder_mail')
|
||||
->first();
|
||||
|
||||
// $this->myLogger->logme('error', 'Notification data fetched: ' . json_encode($notification_data));
|
||||
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||
->where('employees.emp_status', 'draft')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.status', 'draft')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
$reminder_whole_mail[] = $mail_result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// echo '2';
|
||||
|
||||
$currentDate = date('d-m-Y');
|
||||
|
||||
if($currentDate == date('d-m-Y', strtotime($client_policy['reminder_date']))){
|
||||
|
||||
// echo '3';
|
||||
|
||||
$client_data = $this->clientModel->find($client_policy['client_id']);
|
||||
|
||||
// Fetch notification settings
|
||||
$notification_data = $this->notificationModel
|
||||
->where('client_id', $client_policy['client_id'])
|
||||
->where('template_name', 'member_reminder_mail')
|
||||
->first();
|
||||
|
||||
// Check if notification should be sent
|
||||
if ($notification_data && $notification_data['enabled'] == 1 && !empty($notification_data['mail_content'])) {
|
||||
|
||||
// echo '4';
|
||||
|
||||
$this->myLogger->logme('error', 'Notification should be sent for client policy ID: ' . $client_policy['id']);
|
||||
|
||||
// Fetch all employees related to the client policy
|
||||
$employees = $this->employeePolicyModel
|
||||
->select('employees.*')
|
||||
->join('employees', 'employee_polices.employee_id = employees.id', 'left')
|
||||
->where('employee_polices.client_policy_id', $client_policy['id'])
|
||||
->where('employees.emp_status', 'draft')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employee_polices.status', 'draft')
|
||||
->where('employee_polices.is_active', 1)
|
||||
->where('employees.relationship', 'Self')
|
||||
->findAll();
|
||||
|
||||
// Process each employee
|
||||
foreach ($employees as $employee) {
|
||||
|
||||
if ($employee['emp_status'] == 'draft' && $employee['relationship'] == 'Self') {
|
||||
$this->myLogger->logme('error', 'Employee status and relationship check passed for employee ID: ' . $employee['id']);
|
||||
|
||||
// Mail params
|
||||
$params['emp_data'] = $employee;
|
||||
$params['client_data'] = $client_data;
|
||||
$params['notification_data'] = $notification_data;
|
||||
|
||||
// Send the mail notification
|
||||
$mail_result = sendMailNotification::sendMailNotification('member_reminder_mail', $params);
|
||||
// $this->myLogger->logme('error', 'Mail sent result: ' . json_encode($mail_result));
|
||||
$reminder_whole_mail[] = $mail_result;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// echo '5';
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->myLogger->logme('error', 'Notification not sent for client policy ID: ' . $client_policy['id']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->myLogger->logme('error', 'Whole email, count: ' . $reminder_whole_mail);
|
||||
// dd($reminder_whole_mail);
|
||||
|
||||
// $this->myLogger->logme('error', 'Whole email, count: ' . $reminder_whole_mail);
|
||||
|
||||
// Process and queue bulk emails
|
||||
$temp_whole_data = [];
|
||||
@ -386,7 +467,6 @@ class DashboardController extends AdminController
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function sendManualRemainder($client_id, $client_branch_id)
|
||||
{
|
||||
$this->myLogger->logme('error', "sendManualRemainder called with client_id: {$client_id}, client_branch_id: {$client_branch_id}");
|
||||
@ -413,7 +493,6 @@ class DashboardController extends AdminController
|
||||
return $this->respond(['status' => false, 'code' => 200, 'message' => 'There is no data to send', 'message2' => 'No policy data found to send'], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1811,6 +1811,7 @@ class EmpDataServiceController extends BaseController
|
||||
$file_data = $this->getDataByFileId($file_id, 'success');
|
||||
$this->setPullNotification($file_data);
|
||||
|
||||
//import file to upload Google Drive
|
||||
// if(excelFileGDriveUpload($file_id, 'batch_file')){
|
||||
// $this->myLogger->logme('error', 'Inception Update Google Drive File Upload -- File Uploaded Successfully');
|
||||
// }else{
|
||||
@ -2233,6 +2234,13 @@ class EmpDataServiceController extends BaseController
|
||||
$this->setPullNotification($file_data);
|
||||
|
||||
|
||||
//import file to upload Google Drive
|
||||
// if(excelFileGDriveUpload($file_id, 'batch_file')){
|
||||
// $this->myLogger->logme('error', 'Correction File Update Google Drive File Upload -- File Uploaded Successfully');
|
||||
// }else{
|
||||
// $this->myLogger->logme('error', 'Correction File Update Google Drive File Upload -- File Uploaded Field');
|
||||
// }
|
||||
|
||||
return 'Import Correction Updated '. $status_val . '- Updated Count : ' . $emp_count;
|
||||
|
||||
}
|
||||
@ -2847,6 +2855,13 @@ class EmpDataServiceController extends BaseController
|
||||
'user_id' => $user_id,
|
||||
]]);
|
||||
|
||||
//import file to upload Google Drive
|
||||
// if(excelFileGDriveUpload($file_id, 'batch_file')){
|
||||
// $this->myLogger->logme('error', 'SI Enhancement File Update Google Drive File Upload -- File Uploaded Successfully');
|
||||
// }else{
|
||||
// $this->myLogger->logme('error', 'SI Enhancement File Update Google Drive File Upload -- File Uploaded Field');
|
||||
// }
|
||||
|
||||
return 'SI Enhancement Update Endorsement ID -- ' . $status_val . '-- Updated Count : ' . $emp_count;
|
||||
}
|
||||
|
||||
@ -3368,6 +3383,13 @@ class EmpDataServiceController extends BaseController
|
||||
'user_id' => $user_id,
|
||||
]]);
|
||||
|
||||
//import file to upload Google Drive
|
||||
// if(excelFileGDriveUpload($file_id, 'batch_file')){
|
||||
// $this->myLogger->logme('error', 'Deletion File Update Google Drive File Upload -- File Uploaded Successfully');
|
||||
// }else{
|
||||
// $this->myLogger->logme('error', 'Deletion File Update Google Drive File Upload -- File Uploaded Field');
|
||||
// }
|
||||
|
||||
return 'Deletion Update Endorsement ID -- ' . $status_val . '-- Updated Count : ' . $emp_count;
|
||||
}
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
public function addEmployeeAndDependence()
|
||||
{
|
||||
// try {
|
||||
try {
|
||||
$data = $this->request->getJSON();
|
||||
|
||||
|
||||
@ -254,20 +254,13 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
if(isset($data[0]->id))
|
||||
{
|
||||
if(!isset($data[0]->is_addon_value))
|
||||
{
|
||||
$this->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id);
|
||||
}else{
|
||||
|
||||
$this->createEmployeePolicyData($data[0]->id , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si);
|
||||
}
|
||||
|
||||
|
||||
}else{
|
||||
if(!isset($data[0]->is_addon_value))
|
||||
{
|
||||
$this->createEmployeePolicyData($employee , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id);
|
||||
}else{
|
||||
|
||||
$this->createEmployeePolicyData($employee , $data[0]->emp_code , $data[0]->client_id , $data[0]->client_policy_id , $data[0]->basic_cover_si);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -283,9 +276,9 @@ class EmployeeRestController extends AdminController
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => $result], 404);
|
||||
}
|
||||
}
|
||||
// } catch (\Exception $e) {
|
||||
// return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500);
|
||||
// }
|
||||
} catch (\Exception $e) {
|
||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -446,6 +439,29 @@ class EmployeeRestController extends AdminController
|
||||
try {
|
||||
|
||||
$requestData = $this->request->getJSON();
|
||||
foreach ($requestData as $key => $value)
|
||||
{
|
||||
|
||||
$checkIfExist = $this->employeePolicyModel->where('employee_id', $value->employee_id)
|
||||
->where('client_policy_id', $value->client_policy_id)
|
||||
->where('is_active', 1 )
|
||||
->findAll();
|
||||
|
||||
|
||||
if ($checkIfExist) {
|
||||
|
||||
$empPolicy = $this->employeePolicyModel->updateSiAndPremium($value->client_policy_id, $value->employee_id, $value->basic_cover_si);
|
||||
|
||||
}else{
|
||||
|
||||
$data['employee_id']= $value->employee_id;
|
||||
$data['client_policy_id']= $value->client_policy_id;
|
||||
$data['basic_cover_si']= $value->basic_cover_si;
|
||||
$data['status'] = 'draft';
|
||||
|
||||
$this->employeePolicyModel->insert($data);
|
||||
}
|
||||
}
|
||||
if(count($requestData))
|
||||
{
|
||||
$this->updatePremiumAmount($requestData[0]->client_policy_id , $requestData[0]->emp_code , $requestData[0]->client_branch_id);
|
||||
@ -1006,7 +1022,7 @@ class EmployeeRestController extends AdminController
|
||||
$self['data']['dob'] = $this->convertDateFormatDMY($selfData[0]['dob']);
|
||||
$self['data']['mobile'] = $selfData[0]['mobile'];
|
||||
$self['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$self['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$self['data']['basic_cover_si'] = isset($employee_policy->basic_cover_si) ? $employee_policy->basic_cover_si : 0;
|
||||
|
||||
$array->mapped_family_floaters = $self;
|
||||
$array->type = 'GPA';
|
||||
@ -1063,6 +1079,7 @@ class EmployeeRestController extends AdminController
|
||||
foreach ($empData as $key => $value) {
|
||||
if ($value['family_floater_key'] === $dependent) {
|
||||
$employee_policy = $this->employeePolicyModel->where('employee_id',$value['id'])->where('client_policy_id',$array->ClientPolicyId)->where('is_active', 1 )->get()->getRow();
|
||||
|
||||
$temp['is_value_exist'] = true;
|
||||
$temp['data']['family_floater_key'] = $familyFloatesValue;
|
||||
$temp['data']['employee_id'] = $value['id'];
|
||||
@ -1071,7 +1088,7 @@ class EmployeeRestController extends AdminController
|
||||
$temp['data']['dob'] = $this->convertDateFormatDMY($value['dob']);
|
||||
$temp['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp['data']['form_type'] = $dependent;
|
||||
$temp['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$temp['data']['basic_cover_si'] = isset($employee_policy->basic_cover_si) ? $employee_policy->basic_cover_si : 0;
|
||||
|
||||
|
||||
$temp['data']['age_validation'] = $this->getAgeRange($decodedArray,$familyFloatesValue);
|
||||
@ -1171,7 +1188,7 @@ class EmployeeRestController extends AdminController
|
||||
return $this->respond(['status' => 'failed','code' => 404,'data' => []], 200);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()], 500);
|
||||
return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getLine()], 500);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1267,7 +1284,7 @@ class EmployeeRestController extends AdminController
|
||||
$temp['data']['dob'] = $this->convertDateFormatDMY($value['dob']);
|
||||
$temp['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$temp['data']['form_type'] = $dependent;
|
||||
$temp['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$temp['data']['basic_cover_si'] = isset($employee_policy->basic_cover_si) ? $employee_policy->basic_cover_si : 0;
|
||||
$temp['data']['age_validation'] = $this->getAgeRange($array->Policy_Terms,$familyFloatesValue);
|
||||
|
||||
|
||||
@ -1374,7 +1391,7 @@ class EmployeeRestController extends AdminController
|
||||
$self['data']['dob'] = $this->convertDateFormatDMY($selfData[0]['dob']);
|
||||
$self['data']['mobile'] = $selfData[0]['mobile'];
|
||||
$self['data']['client_policy_id'] = $array->ClientPolicyId;
|
||||
$self['data']['basic_cover_si'] = $employee_policy->basic_cover_si;
|
||||
$self['data']['basic_cover_si'] = isset($employee_policy->basic_cover_si) ? $employee_policy->basic_cover_si : 0;
|
||||
$array->mapped_family_floaters = $self;
|
||||
|
||||
if($array->enrolment_visibility == 1)
|
||||
@ -1507,9 +1524,7 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
if(count($clientPolicy))
|
||||
{
|
||||
$self = $this->employeeModel
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
||||
->where('employees.is_active', 1)
|
||||
$self = $this->employeeModel->where('employees.is_active', 1)
|
||||
->where('employees.emp_code', $this->request->getGet('emp_code'))
|
||||
->where('employees.client_id', $this->request->getGet('client_id'))
|
||||
->where('employees.client_branch_id', $this->request->getGet('client_branch_id'))
|
||||
@ -1560,6 +1575,7 @@ class EmployeeRestController extends AdminController
|
||||
$responce['OpenForEnrollment'] = $array['open_for_enrollment'];
|
||||
$responce['policy_terms'] = $decodedArray;
|
||||
$responce['policy_type_id'] = $array['policy_type_id'];
|
||||
$responce['disclaimer'] = $array['disclaimer'];
|
||||
|
||||
$tpaArray = $this->employeeModel->select('employees.name as name , employee_polices.tpa_id as tpa_id , employee_polices.rand_string as rand_string')
|
||||
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
||||
@ -1593,8 +1609,18 @@ class EmployeeRestController extends AdminController
|
||||
|
||||
if($array['is_addon'] == 3 && $array['policy_type_id'] == 3)//dependent add on policy
|
||||
{
|
||||
|
||||
$selfSi = $self->basic_cover_si;
|
||||
$selfGMC = $this->employeeModel->select('employees.name , employee_polices.basic_cover_si')
|
||||
->join('employee_polices', 'employees.id = employee_polices.employee_id')
|
||||
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id AND client_policy.policy_type_id = 2')
|
||||
->where('employees.is_active', 1)
|
||||
->where('employees.emp_code', $this->request->getGet('emp_code'))
|
||||
->where('employees.client_id', $this->request->getGet('client_id'))
|
||||
->where('employees.client_branch_id', $this->request->getGet('client_branch_id'))
|
||||
->where('employees.family_floater_key', 'self')
|
||||
->get()
|
||||
->getRow();
|
||||
|
||||
$selfSi = $selfGMC->basic_cover_si;
|
||||
$filteredSlabRates = array_filter($responce['SlabRates'], function ($rate) use ($selfSi) {
|
||||
return $rate['si'] === $selfSi;
|
||||
});
|
||||
@ -1889,6 +1915,8 @@ class EmployeeRestController extends AdminController
|
||||
$mail_send_return1 = MailHelper::send_email($value);
|
||||
$this->myLogger->logme("info", $mail_send_return1);
|
||||
}
|
||||
}else{
|
||||
$this->myLogger->logme("error", 'Account Manager Mail Configuration not Enable for this client');
|
||||
}
|
||||
|
||||
$client_hr_wholeData =sendMailNotification::sendMailNotification('client_hr_summary_mail', $params);
|
||||
@ -1899,8 +1927,12 @@ class EmployeeRestController extends AdminController
|
||||
$mail_send_return2 = MailHelper::send_email($value);
|
||||
$this->myLogger->logme("info", $mail_send_return2);
|
||||
}
|
||||
}else{
|
||||
$this->myLogger->logme("error", 'Client HR Mail Configuration not Enable for this client');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$this->myLogger->logme("error", 'Member Review Mail Configuration not Enable for this client');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ class GoogleDriveController extends BaseController
|
||||
'fields' => 'id' // Specify fields to return
|
||||
]);
|
||||
|
||||
if($createdFile->id)
|
||||
if($createdFile->id && $doc_type !== 'UPLOADS')
|
||||
{
|
||||
unlink($file_path);
|
||||
}
|
||||
|
||||
@ -18,18 +18,20 @@ use App\Models\EmployeeModel;
|
||||
use App\Models\UserModel;
|
||||
|
||||
use App\Helpers\sendMailNotification;
|
||||
|
||||
use App\Helpers\MailHelper;
|
||||
|
||||
class NotificationController extends AdminController
|
||||
{
|
||||
use ResponseTrait;
|
||||
protected $myLogger;
|
||||
protected $notificationModel;
|
||||
protected $clientModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->myLogger = \Config\Services::mylogger();
|
||||
$this->notificationModel = new NotificationModel();
|
||||
$this->clientModel = new ClientModel();
|
||||
}
|
||||
|
||||
// This is for Template Name Camel Case to Snake Case for store in DB
|
||||
@ -88,6 +90,8 @@ class NotificationController extends AdminController
|
||||
$id =$this->request->getPost('client_id');
|
||||
$clientData['common_mails'] = $this->request->getPost('nhance_team_mail_ids');
|
||||
$clientData['hr_mails'] = $this->request->getPost('hr_mail_id');
|
||||
$clientData['reply_to'] = $this->request->getPost('reply_to');
|
||||
$clientData['mail_domain'] = $this->request->getPost('mail_domain');
|
||||
$clientModel->update($id,$clientData);
|
||||
|
||||
foreach ($data as $key => $value)
|
||||
@ -159,4 +163,39 @@ class NotificationController extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// This function for sent a mail for testing
|
||||
public function sentTestMail($template_id, $test_mail)
|
||||
{
|
||||
$notification_data = $this->notificationModel->where('id', $template_id)->where('enabled', 1)->first();
|
||||
$client_data = $this->clientModel->where('id', $notification_data['client_id'])->where('is_active', 1)->first();
|
||||
|
||||
if(!empty($notification_data)){
|
||||
|
||||
$params = [
|
||||
'client_data' => $client_data,
|
||||
'notification_data' => $notification_data,
|
||||
'test_mail' => $test_mail
|
||||
];
|
||||
|
||||
$testMailData = sendMailNotification::sendMailNotificationForTesting($notification_data['template_name'], $params);
|
||||
// print_r($testMailData); die;
|
||||
if (!empty($testMailData)) {
|
||||
|
||||
$mail_send_return1 = MailHelper::send_email($testMailData);
|
||||
$this->myLogger->logme("info", $mail_send_return1);
|
||||
$this->myLogger->logme("info", $mail_send_return1);
|
||||
|
||||
return $this->respond(['status' => true,'code' => 200, 'respond' => json_decode($mail_send_return1)]);
|
||||
|
||||
}else{
|
||||
|
||||
return $this->respond(['status' => false,'code' => 200, 'message' => 'Test Mail Data Does Not Exist']);
|
||||
}
|
||||
}else{
|
||||
|
||||
return $this->respond(['status' => false,'code' => 200, 'message' => 'Notification Template not enabled']);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -29,6 +29,8 @@ use App\Models\UserModel;
|
||||
use App\Models\EmployeePolicyModel;
|
||||
use App\Models\InsurerStatements;
|
||||
use App\Models\InvPaymentDetailsModel;
|
||||
use App\Models\BatchFileModel;
|
||||
use App\Models\FileModel;
|
||||
use Kint;
|
||||
|
||||
class PolicyTransactionController extends BaseController
|
||||
@ -58,6 +60,8 @@ class PolicyTransactionController extends BaseController
|
||||
protected $insurerStatements;
|
||||
protected $invoiceStatus;
|
||||
protected $invPaymentDetailsModel;
|
||||
protected $batchFileModel;
|
||||
protected $filesModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -85,6 +89,8 @@ class PolicyTransactionController extends BaseController
|
||||
$this->employeePolicyModel = new EmployeePolicyModel();
|
||||
$this->insurerStatements = new InsurerStatements();
|
||||
$this->invPaymentDetailsModel = new InvPaymentDetailsModel();
|
||||
$this->batchFileModel = new BatchFileModel();
|
||||
$this->filesModel = new FileModel();
|
||||
$this->invoiceStatus = [
|
||||
'pending' => 'Pending',
|
||||
'generated' => 'Generated',
|
||||
@ -1498,6 +1504,8 @@ class PolicyTransactionController extends BaseController
|
||||
->findAll();
|
||||
|
||||
// dd( $this->insurerStatements->getLastQuery());
|
||||
$data['page_name'] = 'Statement Upload';
|
||||
|
||||
$this->loadLayout('insurer_statement_list', $data);
|
||||
}
|
||||
|
||||
@ -1969,12 +1977,17 @@ class PolicyTransactionController extends BaseController
|
||||
$policy_doc_name = $this->request->getPost('policy_doc_name');
|
||||
$pt_files = [];
|
||||
$kyc_files = [];
|
||||
$batch_files = [];
|
||||
$files = [];
|
||||
// print_r($jsonData);die();
|
||||
if($policy_id != "")
|
||||
{
|
||||
//get policy docs from policy transation related tables
|
||||
$pt_files = $this->PTFileModel->getPolicyDriveFilesIndex($policy_id,$policy_doc_name);
|
||||
// ~dd($this->PTFileModel->getLastQuery());
|
||||
$batch_files = $this->batchFileModel->getBatchFilesDataForDocumentSearch($policy_id,$policy_doc_name);
|
||||
$files = $this->filesModel->getFilesDataForDocumentSearch($policy_id,$policy_doc_name);
|
||||
// dd($files);
|
||||
// dd($this->PTFileModel->getLastQuery());
|
||||
// ~dd($pt_files);
|
||||
}
|
||||
if($customer_id != "")
|
||||
@ -1984,11 +1997,12 @@ class PolicyTransactionController extends BaseController
|
||||
// !dd($kyc_files);
|
||||
}
|
||||
|
||||
$data['files'] = array_merge($pt_files,$kyc_files);
|
||||
// dd($data['files']);
|
||||
$data['files'] = array_merge($pt_files,$kyc_files,$batch_files,$files);
|
||||
// dd($data['files']);
|
||||
}
|
||||
|
||||
|
||||
$data['page_name'] = 'Documents Search';
|
||||
|
||||
$data['customers'] = $this->clientModel->select('id,client_name,short_name as display_value')->where('is_active',1)->get()->getResultarray();
|
||||
$data['policies'] = $this->clientPolicyModel->select("client_policy.id,client_policy.policy_no,policy_type.policy_type,concat(policy_type.policy_type,' - ',client_policy.policy_no) as display_value")
|
||||
->join('policy_type','client_policy.policy_type_id = policy_type.id')
|
||||
@ -1999,5 +2013,4 @@ class PolicyTransactionController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -93,6 +93,8 @@ class MailHelper
|
||||
$emaill = $params['mail'];
|
||||
$subject = $params['subject'];
|
||||
$message = $params['message'];
|
||||
|
||||
//check BCC mail
|
||||
if (isset($params['bcc'])) {
|
||||
$bcc = $params['bcc'];
|
||||
$bcc = explode(',', $bcc);
|
||||
@ -100,16 +102,23 @@ class MailHelper
|
||||
$bcc = [];
|
||||
}
|
||||
|
||||
//check CC mail
|
||||
if (isset($params['cc'])) {
|
||||
$cc = $params['cc'];
|
||||
$cc = explode(',', $cc);
|
||||
}else{
|
||||
$cc = [];
|
||||
}
|
||||
|
||||
//check REPLY TO mail
|
||||
$reply_to = "";
|
||||
if(isset($params['reply_to']) && !empty($params['reply_to'])){
|
||||
$reply_to = $params['reply_to'];
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
|
||||
$res = $gmailapi->sendMessage($emaill, $subject, $message, 'info@nhanceindia.in', 'info@nhanceindia.in', $cc, $bcc);
|
||||
$res = $gmailapi->sendMessage($emaill, $subject, $message, 'info@nhanceindia.in', $reply_to, $cc, $bcc);
|
||||
|
||||
if($res['status'])
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -59,5 +59,25 @@ class BatchFileModel extends Model
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getBatchFilesDataForDocumentSearch($policy_id, $policy_doc_name)
|
||||
{
|
||||
$this->select('
|
||||
"Imported Insurer or TPA Files" as doc_name,
|
||||
batch_files.file_name,
|
||||
batch_files.client_id,
|
||||
batch_files.client_policy_id,
|
||||
"uploads" as file_type
|
||||
')
|
||||
->where('batch_files.client_policy_id', $policy_id)
|
||||
->where('batch_files.is_active', 1);
|
||||
|
||||
if (!empty($policy_doc_name)) {
|
||||
$this->like('batch_files.file_name', $policy_doc_name);
|
||||
}
|
||||
|
||||
return $this->get()->getResultArray();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -37,6 +37,8 @@ class ClientModel extends Model
|
||||
"reference",
|
||||
"phone",
|
||||
"email",
|
||||
"reply_to",
|
||||
"mail_domain",
|
||||
];
|
||||
|
||||
|
||||
|
||||
@ -49,6 +49,7 @@ class ClientPolicyModel extends Model
|
||||
"cd_ac_no",
|
||||
"gst",
|
||||
"enrolment_visibility",
|
||||
"disclaimer",
|
||||
"is_active",
|
||||
];
|
||||
|
||||
@ -404,9 +405,24 @@ public function getPolicyDetailsForRemainder($client_id = null, $branch_id = nul
|
||||
}
|
||||
|
||||
return $builder->get()->getResultArray();
|
||||
}
|
||||
|
||||
//for this using in CRONE JOB
|
||||
public function getPolicyDetailsForEnrollment($client_id = null, $branch_id = null)
|
||||
{
|
||||
$builder = $this->table('client_policy')
|
||||
->where('client_policy.is_active', 1)
|
||||
->where('client_policy.policy_status', 1)
|
||||
->where('client_policy.open_date IS NOT NULL')
|
||||
->where('client_policy.close_date IS NOT NULL');
|
||||
|
||||
if ($client_id && $branch_id) {
|
||||
$builder->where('client_policy.client_id', $client_id)
|
||||
->where('client_policy.client_branch_id', $branch_id);
|
||||
}
|
||||
|
||||
return $builder->get()->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -106,10 +106,10 @@ class EmployeeModel extends Model
|
||||
|
||||
public function getEmpFamilybyEmpCode(string $client_policy_id = null,string $emp_code = null,string $client_id = null,array $emp_status = [],array $policy_status = [],array $relationship = [],array $client_branch_id = [])
|
||||
{
|
||||
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policies.name as policy_name','client_policy.is_addon'])
|
||||
$result = $this->select(['employees.id as emp_id', 'employees.client_id','employees.client_branch_id', 'employees.relationship', 'employees.relationship_code', 'employees.change_event', 'employees.emp_code', 'employees.name', 'employees.email_personal', 'employees.email_corporate', 'employees.mobile', 'employees.gender', 'employees.dob', 'employees.doj', 'employees.basic_pay', 'employees.band', 'employees.designation', 'employees.emp_status','employees.unit','employee_polices.id as emp_policy_id', 'employee_polices.employee_id', 'employee_polices.client_policy_id', 'employee_polices.tpa_id', 'employee_polices.uhid', 'employee_polices.batch_code', 'employee_polices.status', 'employee_polices.pre_existing_alignments', 'employee_polices.basic_cover_si', 'employee_polices.date_coverage', 'employee_polices.policy_end_date', 'employee_polices.days', 'employee_polices.premium', 'employee_polices.rata_premimum', 'employee_polices.gst', 'employee_polices.date_of_exit', 'employee_polices.reason_for_exit','policy_type.long_name as policy_name','client_policy.is_addon'])
|
||||
->join('employee_polices', 'employee_polices.employee_id = employees.id')
|
||||
->join('client_policy', 'client_policy.id = employee_polices.client_policy_id')
|
||||
->join('policies', 'policies.id = client_policy.policy_id','left')
|
||||
->join('policy_type', 'policy_type.id = client_policy.policy_type_id','left')
|
||||
->where('employees.is_active',1)
|
||||
->when($client_policy_id, function($query) use ($client_policy_id){
|
||||
return $query->where('employee_polices.client_policy_id',$client_policy_id);
|
||||
|
||||
@ -23,4 +23,24 @@ class FileModel extends Model
|
||||
];
|
||||
|
||||
|
||||
|
||||
public function getFilesDataForDocumentSearch($policy_id, $policy_doc_name)
|
||||
{
|
||||
$this->select('
|
||||
files.action as doc_name,
|
||||
files.file_name,
|
||||
files.client_id,
|
||||
files.policy_id as client_policy_id,
|
||||
"uploads" as file_type
|
||||
')
|
||||
->where('files.policy_id', $policy_id)
|
||||
->where('files.is_active', 1);
|
||||
|
||||
if (!empty($policy_doc_name)) {
|
||||
$this->like('files.action', $policy_doc_name);
|
||||
}
|
||||
|
||||
return $this->get()->getResultArray();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,3 +1,142 @@
|
||||
<!-- Bootstrap CSS -->
|
||||
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" rel="stylesheet"> -->
|
||||
|
||||
<!-- jQuery -->
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"></script> -->
|
||||
|
||||
<!-- Bootstrap JS (ensure this is included) -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
|
||||
<!-- Remove one of these -->
|
||||
|
||||
|
||||
<style>
|
||||
.carousel-control-next {
|
||||
right: -18px;
|
||||
}
|
||||
.carousel-control-prev {
|
||||
left: -24px;
|
||||
}
|
||||
|
||||
.status-option {
|
||||
padding: 0.5rem !important;
|
||||
background-color: darkgrey;
|
||||
}
|
||||
|
||||
.emp-count-view-click {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.emp-status .col-6 {
|
||||
padding-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
.emp-status label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.client-branch-label {
|
||||
padding: 0.2rem;
|
||||
border-radius: 0.2rem;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.scroll-item {
|
||||
flex: 0 0 auto;
|
||||
width: 30%; /* Adjust based on the number of items you want to show */
|
||||
box-sizing: border-box;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.col-xl-3 {
|
||||
max-width: 30% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.center_text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.number_css {
|
||||
font-family: Roboto, sans-serif;
|
||||
color: #343a40;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.label_bottom_reduce {
|
||||
margin-bottom: .0rem;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #ced4da;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.carousel-inner {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
height: auto; /* Adjust if needed */
|
||||
margin-left: 57px;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 0 auto; /* Center card in carousel item */
|
||||
}
|
||||
|
||||
.carousel-control-prev, .carousel-control-next {
|
||||
width: 5%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* .carousel-control-prev-icon, .carousel-control-next-icon {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
} */
|
||||
|
||||
.carousel-control-prev-icon {
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M2.5 0L4 1.5 1.5 4 4 6.5 2.5 8 0 4 2.5 0z"/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
.carousel-control-next-icon {
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M5.5 8L4 6.5 6.5 4 4 1.5 5.5 0l4 4-4 4z"/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
.show-item {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.hide-item {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.content-page {
|
||||
background-color: #e8eff5;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: #e8eff5;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
@ -62,7 +201,7 @@ body {
|
||||
<span class="d-none d-sm-inline-block">Enrolment</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!--
|
||||
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
|
||||
|
||||
<li class="nav-item">
|
||||
@ -72,13 +211,13 @@ body {
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?> -->
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<?php include('enrollment_dash.php'); ?>
|
||||
<?php include('endorsement_dash.php'); ?>
|
||||
<?php include('bds_dash.php'); ?>
|
||||
<!-- <?php include('bds_dash.php'); ?> -->
|
||||
<?php include('enrollment_dash.php'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
|
||||
@ -140,7 +140,7 @@ body{
|
||||
|
||||
</style>
|
||||
|
||||
<div class="tab-pane fade" id="bds-dash-tab" style="/*padding-left: 35px;*/padding-right: 35px;">
|
||||
<div class="tab-pane fade" id="bds-dash-tab" style="padding-right: 35px;">
|
||||
<div class="row">
|
||||
<?php if (in_array(BUSINESS_TEAM_ID, user_team())) { ?>
|
||||
|
||||
|
||||
@ -174,13 +174,13 @@
|
||||
$('#name_'+item.kyc_doc_type_id).html(item.file_name);
|
||||
$('#form_'+item.kyc_doc_type_id).hide();
|
||||
|
||||
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
"?client_id=" + item.client_id +
|
||||
"&file_type=kyc" +
|
||||
"&file_name=" + item.file_name +
|
||||
"&client_policy_id=client_policy_id";
|
||||
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
// "?client_id=" + item.client_id +
|
||||
// "&file_type=kyc" +
|
||||
// "&file_name=" + item.file_name +
|
||||
// "&client_policy_id=client_policy_id";
|
||||
|
||||
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
|
||||
// console.log('step 1')
|
||||
|
||||
@ -293,14 +293,14 @@
|
||||
other_docs_count++;
|
||||
}
|
||||
|
||||
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
"?client_id=" + item.client_id +
|
||||
"&file_type=kyc" +
|
||||
"&file_name=" + item.file_name +
|
||||
"&client_policy_id=client_policy_id";
|
||||
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
// "?client_id=" + item.client_id +
|
||||
// "&file_type=kyc" +
|
||||
// "&file_name=" + item.file_name +
|
||||
// "&client_policy_id=client_policy_id";
|
||||
|
||||
|
||||
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
|
||||
// console.log("Current item:", item);
|
||||
if (item.kyc_doc_type_id == '0') {
|
||||
@ -465,13 +465,13 @@
|
||||
}
|
||||
|
||||
|
||||
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
"?client_id=" + item.client_id +
|
||||
"&file_type=kyc" +
|
||||
"&file_name=" + item.file_name +
|
||||
"&client_policy_id=client_policy_id";
|
||||
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
// "?client_id=" + item.client_id +
|
||||
// "&file_type=kyc" +
|
||||
// "&file_name=" + item.file_name +
|
||||
// "&client_policy_id=client_policy_id";
|
||||
|
||||
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
|
||||
|
||||
if(item.kyc_doc_type_id == '0'){
|
||||
@ -508,13 +508,13 @@
|
||||
|
||||
// console.log('step 1')
|
||||
|
||||
var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
"?client_id=" + item.client_id +
|
||||
"&file_type=kyc" +
|
||||
"&file_name=" + item.file_name +
|
||||
"&client_policy_id=client_policy_id";
|
||||
// var url = "<?= base_url('/downloadGdriveFile'); ?>" +
|
||||
// "?client_id=" + item.client_id +
|
||||
// "&file_type=kyc" +
|
||||
// "&file_name=" + item.file_name +
|
||||
// "&client_policy_id=client_policy_id";
|
||||
|
||||
// var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
var url = '<?= base_url('download-kyc-docs/') ?>' + item.file_name;
|
||||
|
||||
|
||||
if(item.file_name != null && item.file_name != ""){
|
||||
|
||||
@ -128,7 +128,6 @@
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="mobile">GST ( % )<span id="tpa_danger" class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" placeholder="GST (%)" id="gst_no" name="gst" required>
|
||||
@ -143,18 +142,27 @@
|
||||
<label for="inception_type" style="position: relative;bottom: 5px;left: 85px;">Enable
|
||||
Employee Enrolment Process</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="open_date">Open Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Open Date " name="open_date" id="open_date" >
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="close_date">Close Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Close Date " name="close_date" id="close_date" >
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label for="reminder_date">Reminder Date<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control dateofdata" placeholder="Enter Reminder Date " name="reminder_date" id="reminder_date" >
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="disclaimer">Disclaimer<span class="text-danger">*</span></label>
|
||||
<textarea class="form-control" placeholder="Enter Disclaimer" name="disclaimer" id="disclaimer" ></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-4">
|
||||
<label class="switch" style="position: relative;top: 43px;left: 20px;">
|
||||
<input id="policy_visibility" type="checkbox" name="enrolment_visibility" checked>
|
||||
@ -242,12 +250,6 @@
|
||||
dateFormat: "d-m-Y",
|
||||
defaultDate: today,
|
||||
allowInput: false,
|
||||
onChange: function(selectedDates, dateStr, instance) {
|
||||
var closeDate = new Date(selectedDates[0]);
|
||||
closeDate.setFullYear(closeDate.getFullYear() + 1);
|
||||
closeDate.setDate(closeDate.getDate() - 1); // Set end date to last day of selected year
|
||||
closeDatePicker.setDate(closeDate);
|
||||
}
|
||||
});
|
||||
|
||||
// Calculate the end date (today + 1 year)
|
||||
@ -264,13 +266,13 @@
|
||||
// Initialize Flatpickr for the end date with the calculated end date
|
||||
var closeDatePicker = flatpickr("#close_date", {
|
||||
dateFormat: "d-m-Y",
|
||||
defaultDate: closeDate,
|
||||
defaultDate: today,
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
var reminderDatePicker = flatpickr("#reminder_date", {
|
||||
dateFormat: "d-m-Y",
|
||||
defaultDate: closeDate,
|
||||
defaultDate: today,
|
||||
allowInput: false
|
||||
});
|
||||
|
||||
@ -749,6 +751,7 @@
|
||||
$('#end_date').val(rearrangeDateFormat(res.data.policy_end_date));
|
||||
$('#close_date').val(rearrangeDateFormat(res.data.close_date));
|
||||
$('#reminder_date').val(rearrangeDateFormat(res.data.reminder_date));
|
||||
$('#disclaimer').val(res.data.disclaimer);
|
||||
$('#gst_no').val(gst);
|
||||
$('#policy_status').val(checkDateStatus(res.data.policy_end_date));
|
||||
$('#policy_status_field').show();
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style="overflow-x: auto;">
|
||||
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
|
||||
<table id="scroll-horizontal-datatable" class="table w-100">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th>S.No</th>
|
||||
@ -152,6 +152,26 @@ $(document).ready(function() {
|
||||
|
||||
})
|
||||
|
||||
// Datatable document ready
|
||||
$(document).ready(function() {
|
||||
|
||||
var ticketsTable = $('#scroll-horizontal-datatable');
|
||||
|
||||
if (ticketsTable.length) {
|
||||
ticketsTable.DataTable({
|
||||
scrollX: true,
|
||||
language: {
|
||||
search: "_INPUT_",
|
||||
searchPlaceholder: "Search..."
|
||||
},
|
||||
paging: true, // Enable pagination
|
||||
pageLength: 25, // Set default number of rows per page (optional)
|
||||
});
|
||||
} else {
|
||||
console.error("Table not found.");
|
||||
}
|
||||
});
|
||||
|
||||
function showSuggestions(inputID, suggestionBoxID,hiddenInputID,suggestions) {
|
||||
|
||||
// console.log('showSuggestions');
|
||||
|
||||
@ -1,143 +1,3 @@
|
||||
<!-- Bootstrap CSS -->
|
||||
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/css/bootstrap.min.css" rel="stylesheet"> -->
|
||||
|
||||
<!-- jQuery -->
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||
|
||||
<!-- Bootstrap JS -->
|
||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.bundle.min.js"></script> -->
|
||||
|
||||
<!-- Bootstrap JS (ensure this is included) -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
|
||||
<!-- Remove one of these -->
|
||||
|
||||
|
||||
<style>
|
||||
.carousel-control-next {
|
||||
right: -18px;
|
||||
}
|
||||
.carousel-control-prev {
|
||||
left: -24px;
|
||||
}
|
||||
|
||||
.status-option {
|
||||
padding: 0.5rem !important;
|
||||
background-color: darkgrey;
|
||||
}
|
||||
|
||||
.emp-count-view-click {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.emp-status .col-6 {
|
||||
padding-bottom: 0.3rem;
|
||||
}
|
||||
|
||||
.emp-status label {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.client-branch-label {
|
||||
padding: 0.2rem;
|
||||
border-radius: 0.2rem;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.scroll-container {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.scroll-item {
|
||||
flex: 0 0 auto;
|
||||
width: 30%; /* Adjust based on the number of items you want to show */
|
||||
box-sizing: border-box;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.col-xl-3 {
|
||||
max-width: 30% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.center_text {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.number_css {
|
||||
font-family: Roboto, sans-serif;
|
||||
color: #343a40;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.label_bottom_reduce {
|
||||
margin-bottom: .0rem;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
margin-bottom: 1rem;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid #ced4da;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.carousel-inner {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
height: auto; /* Adjust if needed */
|
||||
margin-left: 57px;
|
||||
}
|
||||
|
||||
.card {
|
||||
margin: 0 auto; /* Center card in carousel item */
|
||||
}
|
||||
|
||||
.carousel-control-prev, .carousel-control-next {
|
||||
width: 5%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* .carousel-control-prev-icon, .carousel-control-next-icon {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
} */
|
||||
|
||||
.carousel-control-prev-icon {
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M2.5 0L4 1.5 1.5 4 4 6.5 2.5 8 0 4 2.5 0z"/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
.carousel-control-next-icon {
|
||||
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns%3D"http://www.w3.org/2000/svg" fill%3D"%23000000" viewBox%3D"0 0 8 8"%3E%3Cpath d%3D"M5.5 8L4 6.5 6.5 4 4 1.5 5.5 0l4 4-4 4z"/%3E%3C/svg%3E');
|
||||
}
|
||||
|
||||
.show-item {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.hide-item {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.content-page {
|
||||
background-color: #e8eff5;
|
||||
}
|
||||
|
||||
html {
|
||||
background-color: #e8eff5;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="enrollment-dash-tab">
|
||||
<div class="row visa_status_count_view">
|
||||
|
||||
@ -655,7 +655,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
|
||||
<!-- <?php if(get_role_id() == 1 || get_role_id() == 5) { ?>
|
||||
|
||||
<li>
|
||||
<a href="#sidebarDashboards" data-toggle="collapse" class="waves-effect">
|
||||
@ -710,7 +710,7 @@
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<?php } ?>
|
||||
<?php } ?> -->
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -5,6 +5,10 @@
|
||||
.preview_button{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.scrollb {
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
</style>
|
||||
<div class="tab-pane fade" id="notification-tab">
|
||||
<input type="hidden" id="client_id_for_client_branch" value="<?= isset($notification['id']) ? $notification['id'] : '' ?>"/>
|
||||
@ -56,16 +60,29 @@
|
||||
?></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Team mail ID<span class="text-danger">*</span></label>
|
||||
<label for="branch_name">Team mail ID<span class="text-danger"></span></label>
|
||||
<textarea name="" id="nhance_team_mail_ids" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['common_mails']) ? $client['common_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">HR mail ID<span class="text-danger">*</span></label>
|
||||
<label for="branch_name">HR mail ID<span class="text-danger"></span></label>
|
||||
<textarea name="" id="hr_mail_id" class="form-control" placeholder="Example: jhon@gmail.com, dave@gmail.com"><?php echo isset($client['hr_mails']) ? $client['hr_mails'] : ''; ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mail_domain">Mail Domain<span class="text-danger"></span></label>
|
||||
<input type="text" name="" id="mail_domain" class="form-control" placeholder="Only one Domain Name. Example: nhance.com" value="<?php echo isset($client['mail_domain']) ? $client['mail_domain'] : ''; ?>">
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="reply_to">Reply To Mail<span class="text-danger"></span></label>
|
||||
<input type="text" name="" id="reply_to" class="form-control" placeholder="Only one Reply-to mail. Example: jhon@gmail.com" value="<?php echo isset($client['reply_to']) ? $client['reply_to'] : ''; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="branch_name">Member welcome mail</label>
|
||||
@ -156,6 +173,7 @@
|
||||
<textarea style="display:none;" name="" id="" class="form-control "></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
</div>
|
||||
@ -176,7 +194,7 @@
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="member_welcome_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
<div class="modal-dialog modal-full-width scrollb" >
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">Member welcome mail <span id="nameOfThePolicy"></span></h4>
|
||||
@ -206,6 +224,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row" id="rac_rate_dropdown">
|
||||
@ -226,15 +247,11 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<input type="file" id="Question_title_fileInput" style="display: none;">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right m-b-0">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 preview_button"
|
||||
data-toggle="modal" data-target="#preview_modal" >Preview</a>
|
||||
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
|
||||
id="btnGridSubmit_2">Submit</button>
|
||||
</div>
|
||||
@ -244,10 +261,8 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="member_reminder_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal fade" id="member_reminder_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="false" aria-modal="true">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -278,6 +293,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-row" id="rac_rate_dropdown">
|
||||
@ -329,8 +347,6 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="member_ecard_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
@ -364,6 +380,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row" id="rac_rate_dropdown">
|
||||
<div class="form-group col-md-12">
|
||||
@ -404,7 +423,6 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="member_review_and_summary_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
@ -438,6 +456,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-row" id="rac_rate_dropdown">
|
||||
@ -489,7 +510,6 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="account_maneger_summary_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
@ -523,6 +543,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-row" id="rac_rate_dropdown">
|
||||
@ -574,7 +597,6 @@
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<!-- Modal content for the Large example -->
|
||||
<div class="modal fade" id="client_hr_summary_mail_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
@ -608,6 +630,9 @@
|
||||
<div class="form-group col-md-5">
|
||||
<input type="text" id="subject" name="subject" class="form-control" placeholder="Subject">
|
||||
</div>
|
||||
<div class="form-group col-md-2 testmail" style="display: none;">
|
||||
<a class="btn btn-primary waves-effect waves-light mr-1 setid" onclick="testMailSend(this)">Test Mail</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-row" id="rac_rate_dropdown">
|
||||
@ -661,18 +686,16 @@
|
||||
|
||||
|
||||
|
||||
<div class="modal fade" id="preview_modal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
|
||||
aria-hidden="true" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-full-width">
|
||||
<div class="modal fade" id="preview_modal" tabindex="-1" role="dialog" aria-hidden="false" aria-modal="true" data-backdrop="static">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="myLargeModalLabel">Member Review and summary mail <span id="nameOfThePolicy"></span></h4>
|
||||
<h4 class="modal-title" id="myLargeModalLabel">Testing Mail Data<span id="nameOfThePolicy"></span></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="text-center" id="no_data"></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
@ -681,12 +704,51 @@
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
// document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
// console.log('DOMContentLoaded start');
|
||||
|
||||
// var memberWelcomeMailModal = new bootstrap.Modal(document.getElementById('member_welcome_mail_modal'));
|
||||
// var previewModal = new bootstrap.Modal(document.getElementById('preview_modal'));
|
||||
|
||||
|
||||
// document.getElementById('preview_modal').addEventListener('hidden.bs.modal', function () {
|
||||
// console.log('testing modal');
|
||||
// memberWelcomeMailModal.show();
|
||||
// console.log('testing modal end');
|
||||
// });
|
||||
|
||||
// console.log('DOMContentLoaded end');
|
||||
|
||||
// });
|
||||
|
||||
$(document).on('hide.bs.modal', '.modal', function () {
|
||||
console.log("Modal is hidden");
|
||||
});
|
||||
|
||||
$(document).on('show.bs.modal', '.modal', function () {
|
||||
console.log("Modal is hidden");
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
console.log('document ready start');
|
||||
|
||||
var memberWelcomeMailModal = new bootstrap.Modal(document.getElementById('member_welcome_mail_modal'));
|
||||
var previewModal = new bootstrap.Modal(document.getElementById('preview_modal'));
|
||||
|
||||
|
||||
document.getElementById('preview_modal').addEventListener('hidden.bs.modal', function () {
|
||||
console.log('testing modal');
|
||||
memberWelcomeMailModal.show();
|
||||
console.log('testing modal end');
|
||||
});
|
||||
|
||||
console.log('document ready end');
|
||||
|
||||
|
||||
|
||||
var toolbar = "bold,italic,strikethrough,|,superscript,subscript,|,align,";
|
||||
const editorConfig = {
|
||||
buttons: toolbar,
|
||||
@ -770,6 +832,7 @@
|
||||
})
|
||||
|
||||
const fileInput = document.getElementById("Question_title_fileInput");
|
||||
|
||||
fileInput.addEventListener("change", () => {
|
||||
const file = fileInput.files[0];
|
||||
if (file)
|
||||
@ -958,7 +1021,6 @@
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
$('#account_maneger_summary_mail_form').submit(function (event)
|
||||
{
|
||||
event.preventDefault();
|
||||
@ -1055,6 +1117,8 @@
|
||||
formData.push({name:'client_id', value: $('#general_PrimaryKey').val()})
|
||||
formData.push({ name: 'nhance_team_mail_ids', value: $('#nhance_team_mail_ids').val() });
|
||||
formData.push({ name: 'hr_mail_id', value: $('#hr_mail_id').val() });
|
||||
formData.push({ name: 'mail_domain', value: $('#mail_domain').val() });
|
||||
formData.push({ name: 'reply_to', value: $('#reply_to').val() });
|
||||
formData.push({ name: 'member_welcome_mail_btn', value: $('#member_welcome_mail_btn').prop('checked') });
|
||||
formData.push({ name: 'member_reminder_mail_btn', value: $('#member_reminder_mail_btn').prop('checked') });
|
||||
formData.push({ name: 'member_ecard_mail_btn', value: $('#member_ecard_mail_btn').prop('checked') });
|
||||
@ -1095,7 +1159,6 @@
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
if ($('#myDropdown')[0]) {
|
||||
document.getElementById("myDropdown").addEventListener("click", function(event)
|
||||
{
|
||||
@ -1120,23 +1183,41 @@
|
||||
function getMailTemplateData(element)
|
||||
{
|
||||
var template_name = $(element).attr('id');
|
||||
|
||||
if (template_name == "member_welcome_mail" || template_name == "member_reminder_mail" || template_name == "member_ecard_mail" || template_name == "member_review_and_summary_mail" || template_name == "account_maneger_summary_mail" || template_name == "client_hr_summary_mail")
|
||||
{
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
var form_action = '<?= base_url("client/notification/getMailTemplateData/") ?>'+template_name+ '/' + $('#general_PrimaryKey').val();
|
||||
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
console.log('get Mail Template Data', res);
|
||||
if (res)
|
||||
{
|
||||
$(`#${template_name}_form`).find('#template_name').val(snakeCaseToCamelCase(res.template_name));
|
||||
$(`#${template_name}_form`).find('#subject').val(res.subject);
|
||||
$(`#${template_name}_form`).find('.jodit-wysiwyg').html(res.mail_content);
|
||||
|
||||
console.log(res.id)
|
||||
|
||||
if(res.id){
|
||||
$('.testmail').show();
|
||||
$('.setid').attr('data-id', res.id);
|
||||
}else{
|
||||
$('.testmail').hide();
|
||||
$('.setid').attr('data-id', '');
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
$('.testmail').hide();
|
||||
$('.setid').attr('data-id', '');
|
||||
|
||||
}
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
@ -1154,5 +1235,109 @@
|
||||
}
|
||||
}
|
||||
|
||||
function testMailSend(input){
|
||||
|
||||
// var memberWelcomeMailModal = new bootstrap.Modal(document.getElementById('member_welcome_mail_modal'));
|
||||
// var previewModal = new bootstrap.Modal(document.getElementById('preview_modal'));
|
||||
// previewModal.show();
|
||||
// $('.close').click();
|
||||
|
||||
// Swal.fire({
|
||||
// title: "Enter Testing mail",
|
||||
// input: "text",
|
||||
// inputPlaceholder: "Enter your email",
|
||||
// showCancelButton: true,
|
||||
// confirmButtonText: "Submit",
|
||||
// backdrop: 'static', // Prevent focus issue by disallowing clicking outside
|
||||
// preConfirm: (inputValue) => {
|
||||
// if (!inputValue) {
|
||||
// Swal.showValidationMessage('Please enter a valid email');
|
||||
// }
|
||||
// return inputValue;
|
||||
// }
|
||||
// }).then((result) => {
|
||||
// if (result.isConfirmed) {
|
||||
// Swal.fire({
|
||||
// title: `Entered Email: ${result.value}`,
|
||||
// text: 'This is the email you entered.',
|
||||
// icon: 'success'
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// return false;
|
||||
|
||||
let test_mail = prompt("Please enter test mail:");
|
||||
console.log('mail address:', test_mail);
|
||||
|
||||
if (test_mail !== null || test_mail !== "") {
|
||||
|
||||
if(isValidEmail(test_mail)){
|
||||
|
||||
var template_id = $(input).data('id');
|
||||
console.log('templte id', template_id);
|
||||
|
||||
if(template_id){
|
||||
let url = '<?= base_url('util/sentTestMail/') ?>' + template_id + '/' + test_mail;
|
||||
console.log('testing mail url:', url);
|
||||
|
||||
$('.loader').fadeIn();
|
||||
$('.loader-mask').fadeIn();
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
success: function (res) {
|
||||
|
||||
console.log('Test mail send function response', res)
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
if(res.status == true){
|
||||
|
||||
let respond = res.respond;
|
||||
console.log('Parsed respond', respond)
|
||||
|
||||
if(respond.status == 'success'){
|
||||
toastr.success(respond.message, 'SUCCESS')
|
||||
}else{
|
||||
toastr.warning(respond.message, 'WARNING')
|
||||
}
|
||||
|
||||
}else{
|
||||
toastr.warning('Failed to sent mail', 'WARNING')
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
}
|
||||
});
|
||||
|
||||
}else{
|
||||
let alert_msg = 'Template ID not exist'
|
||||
toastr.warning(alert_msg, 'WARNING');
|
||||
}
|
||||
|
||||
}else{
|
||||
toastr.warning('Please enter the valid mail', 'WARNING');
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
toastr.warning('Please enter the valid mail', 'WARNING');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function isValidEmail(email) {
|
||||
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
||||
return emailPattern.test(email);
|
||||
}
|
||||
|
||||
</script>
|
||||
11
writable/tmp/.gitkeep
Executable file
11
writable/tmp/.gitkeep
Executable file
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 219 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 207 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 167 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 113 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 328 KiB |
Loading…
Reference in New Issue
Block a user