diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 9d3f9ad8..71967e7a 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -207,6 +207,7 @@ $routes->group("/util", ["filter" => "authMVC"], function($routes){ $routes->get("policy-premium", "ClientController::getpolicyGridData/$1"); $routes->get("update-policy-status", "ClientController::updateClientPolicyStatus/$1"); $routes->get("download-excel/(:any)", "EmployeeController::downloadSampleExcelFile/$1"); + $routes->get("get-emp-endorsement/(:any)", "EmployeeController::getEmpEndoresmentEntry/$1"); $routes->post("import-export", "EmployeeController::importExport"); }); diff --git a/app/Controllers/EmpDataServiceController.php b/app/Controllers/EmpDataServiceController.php index aca39351..4a2581f1 100644 --- a/app/Controllers/EmpDataServiceController.php +++ b/app/Controllers/EmpDataServiceController.php @@ -1002,5 +1002,120 @@ class EmpDataServiceController extends BaseController ->where('client_policy.id', $client_policy_id) ->first(); } + + public function convertRowTColumnForSIEnhancement($data){ + + $result = array(); + + foreach ($data as $obj) { + + $pro_rata_premium = round(($obj->difference_premium * $obj->no_of_days / 365), 2); + $gst = round(($pro_rata_premium * 18 / 100), 2); + $total = round(($pro_rata_premium + $gst), 2); + + $old_total = round(($obj->old_rata + $obj->old_gst), 2); + + + $result[] = array( + "field_name" => 'Basic Cover SI', + "old_value" => $obj->old_basic_cover_si, + "new_value" => $obj->new_basic_cover_si + ); + + $result[] = array( + "field_name" => 'Premium', + "old_value" => $obj->old_si_premium, + "new_value" => $obj->new_si_premium + ); + + $result[] = array( + "field_name" => 'SI Enhancement Date', + "old_value" => change_date_format($obj->old_date, 'Y-m-d', 'd-M-Y'), + "new_value" => change_date_format($obj->date_of_coverage, 'Y-m-d', 'd-M-Y') + ); + + $result[] = array( + "field_name" => 'Difference Premium', + "old_value" => ' --- ', + "new_value" => $obj->difference_premium + ); + + $result[] = array( + "field_name" => 'No of Days', + "old_value" => $obj->old_days, + "new_value" => $obj->no_of_days + ); + + $result[] = array( + "field_name" => 'Pro Rata Premium', + "old_value" => $obj->old_rata, + "new_value" => $pro_rata_premium + ); + + $result[] = array( + "field_name" => 'GST(18%)', + "old_value" => $obj->old_gst, + "new_value" => $gst + ); + + $result[] = array( + "field_name" => 'Total', + "old_value" => $old_total, + "new_value" => $total + ); + + } + + return $result; + } + + public function convertRowTColumnForDeletion($data){ + + $result = array(); + + foreach ($data as $obj) { + + $old_total = round(($obj->old_rata + $obj->old_gst), 2); + + $result[] = array( + "field_name" => 'Date of Leaving', + "old_value" => change_date_format($obj->end_date, 'Y-m-d', 'd-M-Y'), + "new_value" => change_date_format($obj->date_of_leaving, 'Y-m-d', 'd-M-Y') + ); + + $result[] = array( + "field_name" => 'Exit Reason', + "old_value" => ' --- ', + "new_value" => $obj->exist_reason + ); + + $result[] = array( + "field_name" => 'No of Days', + "old_value" => $obj->old_days, + "new_value" => $obj->no_of_days + ); + + $result[] = array( + "field_name" => 'Pro Rata Premium', + "old_value" => $obj->old_rata, + "new_value" => $obj->pro_rata_premium + ); + + $result[] = array( + "field_name" => 'GST(18%)', + "old_value" => $obj->old_gst, + "new_value" => $obj->gst + ); + + $result[] = array( + "field_name" => 'Total', + "old_value" => $old_total, + "new_value" => $obj->total + ); + + } + + return $result; + } // ----------------------------------------------------------------------------------- } diff --git a/app/Controllers/EmployeeController.php b/app/Controllers/EmployeeController.php index 1c1e0214..3232e4ac 100644 --- a/app/Controllers/EmployeeController.php +++ b/app/Controllers/EmployeeController.php @@ -61,10 +61,12 @@ class EmployeeController extends AdminController { // $model = new UserModel(); $data = []; + $data['status'] = ['draft' => 'Draft', 'active' => 'Active', 'inactive' => 'In-Active', 'expired' => 'Expired']; if(count($this->request->getGet())) { $filterData = $this->request->getGet(); - $data['employees'] = $this->employeePolicyModel->getEmployeePolicy(client_id: $filterData['client_id'],policy_id: $filterData['policy_id']); + $data['employees'] = $this->employeePolicyModel->getEmployeePolicy(client_id: $filterData['client_id'],policy_id: $filterData['policy_id'], status: $filterData['status']); + $data['getData'] = $filterData; } $this->myLogger->logme('error','list called'); @@ -453,15 +455,66 @@ class EmployeeController extends AdminController // ------------------------------------------------------------------------------------------- public function endorsementList(){ + // $empDataServiceController = new EmpDataServiceController(); + // $group_key = $this->empEndorsementModel->select('group_key, actions')->where('id', 4)->first(); + // $data = $this->empEndorsementModel->getDataForEnodrsementListinSIEnhancement($group_key['group_key']); + // $formatedData = $empDataServiceController->convertRowTColumnForSIEnhancement($data); + + // $ee_entry = $this->empEndorsementModel->where('group_key', 107)->findAll(); + // $ee_entry[0]['field_name'] = remove_underscore_capitalize_first_letter($ee_entry[0]['field_name']); + // echo "
";
+ // print_r($formatedData); die;
+
$data = [];
+ $data['status'] = ['pending' => 'Pending', 'inprogress' => 'In-Progress', 'complete'=>'Complete'];
if(count($this->request->getGet()))
{
$filterData = $this->request->getGet();
- $data['employees'] = $this->employeePolicyModel->getEmployeeEndorsementList(client_id: $filterData['client_id'],policy_id: $filterData['policy_id']);
+ $data['employees'] = $this->employeePolicyModel->getEmployeeEndorsementList(client_id: $filterData['client_id'],policy_id: $filterData['policy_id'], status: $filterData['status']);
$data['getData'] = $filterData;
+ // echo "";
+ // print_r($data); die;
}
-
+
$this->myLogger->logme('error','list called');
$this->loadLayout('endorsement_list',$data);
}
+
+ public function getEmpEndoresmentEntry($id = null){
+
+ $empDataServiceController = new EmpDataServiceController();
+ if($id)
+ {
+ $group_key = $this->empEndorsementModel->select('group_key, actions')->where('id', $id)->first();
+ $nor_data = $this->empEndorsementModel->where('group_key', $group_key['group_key'])->findAll();
+
+ $ee_entry = '';
+ if($group_key['actions'] == 'si'){
+
+ $data = $this->empEndorsementModel->getDataForEnodrsementListinSIEnhancement($group_key['group_key']);
+ $formatedData = $empDataServiceController->convertRowTColumnForSIEnhancement($data);
+ $ee_entry = $formatedData;
+
+ }else if($group_key['actions'] == 'd'){
+
+ $data = $this->empEndorsementModel->getDataForEnodrsementListinDeletion($group_key['group_key']);
+ $formatedData = $empDataServiceController->convertRowTColumnForDeletion($data);
+ $ee_entry = $formatedData;
+
+ }else{
+ $ee_entry = $this->empEndorsementModel->where('group_key', $group_key['group_key'])->findAll();
+ $ee_entry[0]['field_name'] = remove_underscore_capitalize_first_letter($ee_entry[0]['field_name']);
+ $ee_entry[0]['old_value'] = formatDateOrReturn($ee_entry[0]['old_value']);
+ $ee_entry[0]['new_value'] = formatDateOrReturn($ee_entry[0]['new_value']);
+ }
+
+ return $this->respond(['dataStatus' => true,'code' => 200, 'data' => $ee_entry, 'data2' => $nor_data], 200);
+ }
+ else
+ {
+ return $this->respond(['dataStatus' => false,'code' => 404,'message' => 'no data found'], 200);
+ }
+ }
+
+
}
\ No newline at end of file
diff --git a/app/Helpers/excel_import_export_helper.php b/app/Helpers/excel_import_export_helper.php
index b6bf615a..465745a9 100644
--- a/app/Helpers/excel_import_export_helper.php
+++ b/app/Helpers/excel_import_export_helper.php
@@ -397,4 +397,19 @@ if (!function_exists('remove_underscore_capitalize_first_letter')) {
$formattedEvent = ucwords(str_replace('_', ' ', $word));
return $formattedEvent;
}
+}
+
+if (!function_exists('formatDateOrReturn')) {
+ function formatDateOrReturn($value)
+ {
+ // Check if the value is a valid date
+ $timestamp = strtotime($value);
+ if ($timestamp !== false) {
+ // Format the date
+ return date('d-M-Y', $timestamp);
+ } else {
+ // Return the original value
+ return $value;
+ }
+ }
}
\ No newline at end of file
diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php
index 26c7aa08..435b926e 100644
--- a/app/Helpers/utility_helper.php
+++ b/app/Helpers/utility_helper.php
@@ -129,3 +129,5 @@ if(!function_exists('check_string_date'))
+
+
diff --git a/app/Models/EmpEndorsementModel.php b/app/Models/EmpEndorsementModel.php
index b6956259..bd015b71 100644
--- a/app/Models/EmpEndorsementModel.php
+++ b/app/Models/EmpEndorsementModel.php
@@ -11,6 +11,7 @@ class EmpEndorsementModel extends Model
protected $allowedFields = [
'id',
'pk',
+ 'group_key',
'endorsement_id',
'emp_code',
'table_name',
@@ -27,4 +28,170 @@ class EmpEndorsementModel extends Model
"remarks"
];
+ // Callbacks
+ protected $allowCallbacks = true;
+ protected $beforeInsert = [];
+ protected $afterInsert = [];
+ protected $beforeUpdate = [];
+ protected $afterUpdate = [];
+ protected $beforeFind = [];
+ protected $afterFind = [];
+ protected $beforeDelete = [];
+ protected $afterDelete = [];
+
+
+ // protected function afterFind(array $data)
+ // {
+ // foreach ($data as &$row) {
+ // // Format date_of_coverage field to Indian date format
+ // if (isset($row['field_name'])) {
+ // $row['field_name'] = remove_underscore_capitalize_first_letter($row['field_name']);
+ // }
+ // }
+
+ // return $data;
+ // }
+
+
+ public function getDataForEnodrsementListinSIEnhancement($group_key){
+ $query = "
+ SELECT
+ employee_polices.days as old_days,
+ employee_polices.rata_premimum as old_rata,
+ employee_polices.gst as old_gst,
+ client_policy.policy_start_date as old_date,
+
+ MAX(CASE WHEN emp_endorsement.field_name = 'basic_cover_si' THEN emp_endorsement.new_value ELSE NULL END) AS new_basic_cover_si,
+ MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value ELSE NULL END) AS new_si_premium,
+ MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value ELSE NULL END) AS date_of_coverage,
+ MAX(CASE WHEN emp_endorsement.field_name = 'basic_cover_si' THEN emp_endorsement.old_value ELSE NULL END) AS old_basic_cover_si,
+ MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value ELSE NULL END) AS old_si_premium,
+
+ (MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value ELSE NULL END) - MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value ELSE NULL END)) AS difference_premium,
+
+ DATEDIFF(employee_polices.policy_end_date, MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value END)) + 1 AS no_of_days,
+
+ ROUND(
+ (
+ (
+ MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value END) -
+ MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value END)
+ ) *
+ DATEDIFF(
+ employee_polices.policy_end_date,
+ MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value END)
+ ) / 365
+ ),
+ 2
+ ) AS pro_rata_premimum,
+
+ ROUND(((MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value ELSE NULL END) - MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value ELSE NULL END)) * DATEDIFF(employee_polices.policy_end_date, MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value ELSE NULL END)) / 365) * 0.18, 2) AS gst,
+ ROUND(((MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value ELSE NULL END) - MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value ELSE NULL END)) * DATEDIFF(employee_polices.policy_end_date, MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value ELSE NULL END)) / 365), 2) +
+ ROUND(((MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.new_value ELSE NULL END) - MAX(CASE WHEN emp_endorsement.field_name = 'premium' THEN emp_endorsement.old_value ELSE NULL END)) * DATEDIFF(employee_polices.policy_end_date, MAX(CASE WHEN emp_endorsement.field_name = 'si_enhancement_date' THEN emp_endorsement.new_value ELSE NULL END)) / 365) * 0.18, 2) AS total
+
+ FROM emp_endorsement
+ JOIN employee_polices ON employee_polices.id = emp_endorsement.pk
+ JOIN client_policy ON client_policy.id = employee_polices.client_policy_id
+ WHERE group_key = '{$group_key}'
+ ";
+
+ $results = $this->db->query($query)->getResult();
+ return $results;
+
+ }
+
+
+ public function getDataForEnodrsementListinDeletion($group_key){
+ $query = "
+ SELECT
+
+ employee_polices.days as old_days,
+ employee_polices.rata_premimum as old_rata,
+ employee_polices.gst as old_gst,
+ employee_polices.policy_end_date as end_date,
+
+ MAX(CASE WHEN a.field_name = 'date_of_exit' THEN a.new_value ELSE NULL END) AS date_of_leaving,
+ MAX(CASE WHEN a.field_name = 'reason_for_exit' THEN a.new_value ELSE NULL END) AS exist_reason,
+ DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit) AS no_of_days,
+ ROUND((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365, 2) AS pro_rata_premium,
+ ROUND(((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18, 2) AS gst,
+ ROUND(((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) + (((employee_polices.rata_premimum * DATEDIFF(employee_polices.policy_end_date, deletiondata.dateofexit)) / 365) * 0.18), 2) AS total
+ FROM
+ emp_endorsement a
+ LEFT JOIN
+ employees ON a.emp_code = employees.emp_code
+ LEFT JOIN
+ employee_polices ON employees.id = employee_polices.employee_id
+ LEFT JOIN (
+ SELECT
+ aa.emp_code,
+ aa.new_value AS 'empstatus',
+ bb.new_value AS 'changeevent',
+ cc.new_value AS 'dateofexit',
+ dd.new_value AS 'reasonforexit',
+ ee.new_value AS 'status'
+ FROM
+ (
+ SELECT
+ a1.emp_code,
+ a1.field_name,
+ a1.new_value
+ FROM
+ emp_endorsement AS a1
+ WHERE
+ a1.field_name = 'emp_status'
+ ) aa
+ LEFT JOIN
+ (
+ SELECT
+ b1.emp_code,
+ b1.field_name,
+ b1.new_value
+ FROM
+ emp_endorsement AS b1
+ WHERE
+ b1.field_name = 'change_event'
+ ) bb ON aa.emp_code = bb.emp_code
+ LEFT JOIN
+ (
+ SELECT
+ c1.emp_code,
+ c1.field_name,
+ c1.new_value
+ FROM
+ emp_endorsement AS c1
+ WHERE
+ c1.field_name = 'date_of_exit'
+ ) cc ON aa.emp_code = cc.emp_code
+ LEFT JOIN
+ (
+ SELECT
+ d1.emp_code,
+ d1.field_name,
+ d1.new_value
+ FROM
+ emp_endorsement AS d1
+ WHERE
+ d1.field_name = 'reason_for_exit'
+ ) dd ON aa.emp_code = dd.emp_code
+ LEFT JOIN
+ (
+ SELECT
+ e1.emp_code,
+ e1.field_name,
+ e1.new_value
+ FROM
+ emp_endorsement AS e1
+ WHERE
+ e1.field_name = 'status'
+ ) ee ON aa.emp_code = ee.emp_code
+ ) AS deletiondata ON a.emp_code = deletiondata.emp_code
+ WHERE group_key = '{$group_key}';
+ ";
+
+ $results = $this->db->query($query)->getResult();
+ return $results;
+
+ }
+
}
diff --git a/app/Models/EmployeePolicyModel.php b/app/Models/EmployeePolicyModel.php
index ca0418b5..a54e91c3 100644
--- a/app/Models/EmployeePolicyModel.php
+++ b/app/Models/EmployeePolicyModel.php
@@ -67,7 +67,7 @@ class EmployeePolicyModel extends Model
}
// -----------------------------------------------------------------------------------------------------
- public function getEmployeePolicy($client_id,$policy_id)
+ public function getEmployeePolicy($client_id,$policy_id,$status)
{
$result = $this->select(['employee_polices.*','pm.name as policy_name','im.short_name as insurer_short_name','ib.branch_name as insurer_branch_name','ib.branch_code as insurer_branch_code','tpam.name as tpa_name','tpam.short_name as tpa_short_name','tpab.branch_code as tpa_branch_code','cm.client_name','cm.short_name as client_short_name','emp.relationship','emp.relationship_code','emp.change_event','emp.emp_code','emp.name','emp.email_corporate','emp.dob','emp.gender','emp.emp_status','emp.is_active as emp_is_active'])
->join('employees emp', 'employee_polices.employee_id = emp.id')
@@ -79,8 +79,13 @@ class EmployeePolicyModel extends Model
->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id') //tpab - tpa brach
->join('clients cm', 'cp.client_id = cm.id') //cm - client master
->where('emp.client_id',$client_id)
- ->where('employee_polices.client_policy_id',$policy_id)
- ->findAll();
+ ->where('employee_polices.client_policy_id',$policy_id);
+
+ if($status != 0 && !empty($status)){
+ $result->where('employee_polices.status', $status);
+ }
+
+ $result = $result->findAll();
return ($result);
}
@@ -561,22 +566,78 @@ class EmployeePolicyModel extends Model
}
- public function getEmployeeEndorsementList($client_id,$policy_id)
- {
- $result = $this->select(['employee_polices.*','pm.name as policy_name','im.short_name as insurer_short_name','ib.branch_name as insurer_branch_name','ib.branch_code as insurer_branch_code','tpam.name as tpa_name','tpam.short_name as tpa_short_name','tpab.branch_code as tpa_branch_code','cm.client_name','cm.short_name as client_short_name','emp.relationship','emp.relationship_code','emp.change_event','emp.emp_code','emp.name','emp.email_corporate','emp.dob','emp.gender','emp.emp_status','emp.is_active as emp_is_active'])
- ->join('employees emp', 'employee_polices.employee_id = emp.id')
- ->join('client_policy cp', 'employee_polices.client_policy_id = cp.id') //cp - client policy
- ->join('policies pm', 'cp.policy_id = pm.id') //pm - policy master
- ->join('insurers im', 'cp.insurer_id = im.id') //im - insurar master
- ->join('insurer_branch ib', 'cp.insurer_branch_id = ib.id') //ib - insurar branch
- ->join('tpa tpam', 'cp.tpa_id = tpam.id') //tpam - tpa master
- ->join('tpa_branch tpab', 'cp.tpa_branch_id = tpab.id') //tpab - tpa brach
- ->join('clients cm', 'cp.client_id = cm.id') //cm - client master
- ->where('emp.client_id',$client_id)
- ->where('employee_polices.client_policy_id',$policy_id)
- ->findAll();
- return ($result);
- }
- //------------------------------------------------------------------
+ public function getEmployeeEndorsementList($client_id, $policy_id, $status)
+ {
+ $query1 = $this->db->table('emp_endorsement e');
+ $query1->select('
+ e.id,
+ e.pk,
+ e.emp_code,
+ e.name,
+ e.actions,
+ e.status,
+ e.remarks,
+ e.endorsement_id,
+ ep.client_policy_id,
+ policies.name as policy_name,
+ insurers.short_name as insurer_short_name
+ ');
+ $query1->distinct();
+ $query1->join('employee_polices ep', 'ep.id = e.pk', 'left');
+ $query1->join('employees', 'employees.id = ep.employee_id', 'left');
+ $query1->join('client_policy', 'client_policy.id = ep.client_policy_id', 'left');
+ $query1->join('policies', 'policies.id = client_policy.policy_id', 'left');
+ $query1->join('insurers', 'insurers.id = policies.insurer_id', 'left');
+ $query1->whereIn('e.actions', ['c']);
+ $query1->where('ep.client_policy_id', $client_id);
+ $query1->where('employees.client_id', $policy_id);
+ if($status != 0 && !empty($status)){
-}
+ $query1->where('e.status', $status);
+ }
+ $query1->orderBy('e.id', 'desc');
+
+ $results1 = $query1->get()->getResultArray();
+
+ $query2 = $this->db->table('emp_endorsement e');
+
+ $query2->select('
+ e.id,
+ e.pk,
+ e.emp_code,
+ e.name,
+ e.actions,
+ e.status,
+ e.endorsement_id,
+ e.remarks,
+ ep.client_policy_id,
+ policies.name as policy_name,
+ insurers.short_name as insurer_short_name
+ ');
+ $query2->join('employee_polices ep', 'ep.id = e.pk', 'left');
+ $query2->join('employees', 'employees.id = ep.employee_id', 'left');
+ $query2->join('client_policy', 'client_policy.id = ep.client_policy_id', 'left');
+ $query2->join('policies', 'policies.id = client_policy.policy_id', 'left');
+ $query2->join('insurers', 'insurers.id = policies.insurer_id', 'left');
+ $query2->whereIn('e.actions', ['si', 'd']);
+ $query2->where('ep.client_policy_id', $client_id);
+ $query2->where('employees.client_id', $policy_id);
+ if($status != 0 && !empty($status)){
+
+ $query2->where('e.status', $status);
+ }
+ $query2->groupBy('e.emp_code, e.name, e.actions');
+ $query2->orderBy('e.id', 'desc');
+
+ $results2 = $query2->get()->getResultArray();
+
+ $results = array_merge($results1, $results2);
+
+ return $results;
+
+
+ }
+
+ //----------------------------------------------------------------------------------------------
+
+}
\ No newline at end of file
diff --git a/app/Views/UserList.php b/app/Views/UserList.php
index bb36986f..a4d5afdc 100644
--- a/app/Views/UserList.php
+++ b/app/Views/UserList.php
@@ -1,5 +1,4 @@
diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php
index d624a7ab..704b827c 100644
--- a/app/Views/client_policy.php
+++ b/app/Views/client_policy.php
@@ -323,7 +323,7 @@
policyTable += `
${item.insurer_short} - ${item.insurer_branch_name}
- ${item.policy_name}
+ ${item.policy_name} (${item.policy_type_name})
${item.tpa_short} - ${item.tpa_branch_code}
${rearrangeDateFormat(item.policy_start_date)} - ${rearrangeDateFormat(item.policy_end_date)}
${checkDateStatus(item.policy_end_date, 1)}
diff --git a/app/Views/employee_list.php b/app/Views/employee_list.php
index db203bcd..02b28c13 100644
--- a/app/Views/employee_list.php
+++ b/app/Views/employee_list.php
@@ -22,23 +22,34 @@ table.dataTable tbody td {
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -98,7 +109,19 @@ table.dataTable tbody td {
- active
+
+ ' . $employee['status'] . '';
+ } elseif ($employee['status'] == 'active') {
+ echo '' . $employee['status'] . '';
+ } elseif ($employee['status'] == 'inactive') {
+ echo '' . $employee['status'] . '';
+ }elseif ($employee['status'] == 'expired') {
+ echo '' . $employee['status'] . '';
+ }
+ ?>
+
@@ -134,6 +157,8 @@ table.dataTable tbody td {
\ No newline at end of file
diff --git a/app/Views/endorsement_list.php b/app/Views/endorsement_list.php
index 75e5509c..8a9e6c6c 100644
--- a/app/Views/endorsement_list.php
+++ b/app/Views/endorsement_list.php
@@ -1,12 +1,12 @@
@@ -22,23 +22,34 @@
-
-
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -74,11 +85,11 @@
SNO
Name/code
Policy name
- Insurar name
- TPA ID
- UHID ID
- Policy status
- Premium
+ Endorsement ID
+ Insurer name
+ Remarks
+ Endorsement Type
+ Status
Action
@@ -91,32 +102,37 @@
-
( )
-
-
-
-
- active
-
+
+
+
+
+
-
+
+
+
+ ' . $employee['status'] . '';
+ } elseif ($employee['status'] == 'inprogress') {
+ echo '' . $employee['status'] . '';
+ } elseif ($employee['status'] == 'complete') {
+ echo '' . $employee['status'] . '';
+ }
+ ?>
+
+
@@ -127,27 +143,52 @@
-
-
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/file_list.php b/app/Views/file_list.php
index d4a4cd28..508cf00e 100644
--- a/app/Views/file_list.php
+++ b/app/Views/file_list.php
@@ -14,6 +14,7 @@
File name
Client
policy
+ Event
User/Time
Status
@@ -34,6 +35,7 @@
+
'.$file['first_name'].''?>
nHANCE
-
-
+
+
/assets/images/favicon.ico">