MERGE_TEST_LIVE_CRITICAL_ISSUES

This commit is contained in:
Ubuntu 2025-05-22 17:56:29 +05:30
commit 039dd3b47f
4 changed files with 16 additions and 7 deletions

View File

@ -153,7 +153,7 @@ class EmployeeServiceController extends AdminController
'is_mandatory' => ['I', 'A', 'DA'],
'data_type' => 'str',
'format' => null,
'allowed_values' => null,
'allowed_values' => ['Self', 'Spouse', 'Son', 'Daughter', 'Father', 'Mother', 'Father in Law', 'Mother in Law'],
'custom' => 'check_relationship',
'params' => ['row', 'relationship', 'policy_terms']
],

View File

@ -89,9 +89,18 @@ class LoginController extends BaseController
public function logout()
{
// $path = getenv('cookie.Path');
// session()->destroy();
// setcookie('session_data', '', time() - 3600, $path);
// return redirect()->to(base_url('login'));
$path = getenv('cookie.Path');
session()->destroy();
setcookie('session_data', '', time() - 3600, $path);
// setcookie('session_data', '', time() - 3600, $path);
$path = getenv('cookie.Path');
$domain = getenv('cookie.Domain');
$https = getenv('cookie.secure');
setcookie('session_data',null, time() -3600, $path, $domain, $https, true);
return redirect()->to(base_url('login'));
}

View File

@ -1762,10 +1762,10 @@ if(!function_exists('remap_default_age_ratio_into_relationship'))
if(!function_exists('check_dup_mobileno'))
{
function check_dup_mobileno(array $row,array $existing_mobilenos)
{
{
foreach($existing_mobilenos as $k => $value)
{
if ($row['12'] == $value['mobile']) {
if (strtolower($row['5']) == 'self' && $row['12'] == $value['mobile']) {
return array('status' => false,'error' => "Duplicate Mobile No");
// break;
}
@ -1780,7 +1780,7 @@ if(!function_exists('check_dup_email'))
{
foreach($existing_mobilenos as $k => $value)
{
if ($row['13'] == $value['email_corporate']) {
if (strtolower($row['5']) == 'self' && $row['13'] == $value['email_corporate']) {
return array('status' => false,'error' => "Duplicate Email");
// break;
}

View File

@ -1414,8 +1414,8 @@ class EmployeePolicyModel extends Model
->join('employees emp', 'employee_polices.employee_id = emp.id')
->join('client_policy cp', 'employee_polices.client_policy_id = cp.id')
->where('employee_polices.client_policy_id',$client_policy_id)
->whereIn('employee_polices.status', ['Active'])
->whereIn('emp.emp_status', ['Active'])
->whereIn('employee_polices.status', ['draft', 'enrolled'])
->whereIn('emp.emp_status', ['draft', 'enrolled'])
->where('emp.is_active', 1)
->where('emp.relationship', 'Self')
->where('emp.mobile is not null')