Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
fd762e0d61
@ -254,9 +254,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
|||||||
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->get("/getEmployeeProfile", "EmployeeRestController::getEmployeeProfile/$1");
|
|
||||||
$routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfile");
|
|
||||||
$routes->post("/calculatePremium", "EmployeeRestController::calculatePremium");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -288,6 +286,8 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
|||||||
|
|
||||||
$routes->get("getEmployeeOldPolicy", "EmployeeRestController::getEmployeeOldPolicy");
|
$routes->get("getEmployeeOldPolicy", "EmployeeRestController::getEmployeeOldPolicy");
|
||||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||||
|
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
||||||
|
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
||||||
});
|
});
|
||||||
|
|
||||||
$routes->post("sendEmail", "EmployeeRestController::send_email");
|
$routes->post("sendEmail", "EmployeeRestController::send_email");
|
||||||
@ -296,6 +296,7 @@ $routes->post("sendEmail", "EmployeeRestController::send_email");
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Ticketing System
|
// Ticketing System
|
||||||
|
|
||||||
// Ticketing System End's
|
// Ticketing System End's
|
||||||
|
|||||||
@ -25,6 +25,9 @@ use App\Models\PolicyPremium2Model;
|
|||||||
use App\Models\PolicyTypeModel;
|
use App\Models\PolicyTypeModel;
|
||||||
use App\Models\NotificationModel;
|
use App\Models\NotificationModel;
|
||||||
use App\Models\UserModel;
|
use App\Models\UserModel;
|
||||||
|
use App\Models\FEContentModel;
|
||||||
|
use App\Models\AddImgModel;
|
||||||
|
|
||||||
|
|
||||||
use App\Controllers\Jobs ;
|
use App\Controllers\Jobs ;
|
||||||
use App\Controllers\JobWorker ;
|
use App\Controllers\JobWorker ;
|
||||||
@ -57,6 +60,8 @@ class EmployeeRestController extends AdminController
|
|||||||
protected $policyTypeModel;
|
protected $policyTypeModel;
|
||||||
protected $notificationModel;
|
protected $notificationModel;
|
||||||
protected $userModel;
|
protected $userModel;
|
||||||
|
protected $feContentModel;
|
||||||
|
protected $addImgModel;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@ -76,6 +81,8 @@ class EmployeeRestController extends AdminController
|
|||||||
$this->policyTypeModel = new PolicyTypeModel();
|
$this->policyTypeModel = new PolicyTypeModel();
|
||||||
$this->notificationModel = new NotificationModel();
|
$this->notificationModel = new NotificationModel();
|
||||||
$this->userModel = new UserModel();
|
$this->userModel = new UserModel();
|
||||||
|
$this->feContentModel = new FEContentModel();
|
||||||
|
$this->addImgModel = new AddImgModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -355,7 +362,7 @@ class EmployeeRestController extends AdminController
|
|||||||
$Gender = $this->employeeModel->where('emp_code',$empCode)->where('relationship','Self')->get()->getRow()->gender;
|
$Gender = $this->employeeModel->where('emp_code',$empCode)->where('relationship','Self')->get()->getRow()->gender;
|
||||||
if($Gender == 'M'){ return 'F'; }else{ return 'M'; }
|
if($Gender == 'M'){ return 'F'; }else{ return 'M'; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function convertDateFormatYMD($dateString)
|
private function convertDateFormatYMD($dateString)
|
||||||
{
|
{
|
||||||
@ -1373,6 +1380,7 @@ public function getAddOnPolicy()
|
|||||||
if(count($clientPolicy))
|
if(count($clientPolicy))
|
||||||
{
|
{
|
||||||
$band = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('client_branch_id',$this->request->getGet('client_branch_id'))->where('family_floater_key','self')->get()->getRow()->band;
|
$band = $this->employeeModel->where('is_active', 1 )->where('emp_code',$this->request->getGet('emp_code'))->where('client_id',$this->request->getGet('client_id'))->where('client_branch_id',$this->request->getGet('client_branch_id'))->where('family_floater_key','self')->get()->getRow()->band;
|
||||||
|
|
||||||
$PolicyData = [];
|
$PolicyData = [];
|
||||||
foreach ($clientPolicy as $key => $array) {
|
foreach ($clientPolicy as $key => $array) {
|
||||||
$responce = [];
|
$responce = [];
|
||||||
@ -1388,9 +1396,16 @@ public function getAddOnPolicy()
|
|||||||
$uniqueData[] = $item;
|
$uniqueData[] = $item;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
if (!in_array($item['si'], $siValues)) {
|
if (!in_array($item['si'], $siValues) ) {
|
||||||
|
|
||||||
|
if ($item['policy_grid_id'] == 11 && ($item['max_si'] != 0 || $item['max_si'] != null)) {
|
||||||
$uniqueData[] = $item;
|
$uniqueData[] = $item;
|
||||||
$siValues[] = $item['si'];
|
$siValues[] = $item['si'];
|
||||||
|
}else if($item['policy_grid_id'] != 11){
|
||||||
|
$uniqueData[] = $item;
|
||||||
|
$siValues[] = $item['si'];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2136,42 +2151,21 @@ function policyTermsFiter($terms , $type)
|
|||||||
|
|
||||||
$gmc = [
|
$gmc = [
|
||||||
"sum_insured" => "Sum Insured",
|
"sum_insured" => "Sum Insured",
|
||||||
"member_count" => "Elders Count:",
|
|
||||||
"other_member_min_age" => "Min Age:",
|
|
||||||
"other_member_max_age" => "Min Age:",
|
|
||||||
"waiverofpreexistingdiseases" => "Waiver of Pre-existing Diseases",
|
"waiverofpreexistingdiseases" => "Waiver of Pre-existing Diseases",
|
||||||
|
"maternitycoverage" => "Maternity Coverage",
|
||||||
|
"babyday1cover" => "Baby Day 1 Cover",
|
||||||
"9monthwaitingperiodwaived" => "9-month waiting Period –waived",
|
"9monthwaitingperiodwaived" => "9-month waiting Period –waived",
|
||||||
"coverfromthedateofjoining" => "Cover from the date of Joining",
|
"coverfromthedateofjoining" => "Cover from the date of Joining",
|
||||||
"waiverof1,2,3&4thyearexclusions" => "Waiver of 1, 2, 3 & 4th year Exclusions",
|
"waiverof1,2,3&4thyearexclusions" => "Waiver of 1, 2, 3 & 4th year Exclusions",
|
||||||
"waiverof30dayswaitingperiod" => "Waiver of 30 days waiting period",
|
"waiverof30dayswaitingperiod" => "Waiver of 30 days waiting period",
|
||||||
"prehospitalizationcover" => "Pre Hospitalization Cover",
|
"prehospitalizationcover" => "Pre Hospitalization Cover",
|
||||||
"congenitaldiseasesinternal" => "Congenital Diseases - Internal",
|
|
||||||
"copayzonewisecopay" => "Co-Pay/Zone wise Co Pay",
|
"copayzonewisecopay" => "Co-Pay/Zone wise Co Pay",
|
||||||
"bioabsorbablestenttoriclensmultifocallens" => "Bio absorbable stent / Toric lens/ Multi Focal lens",
|
|
||||||
"roomrentlimit" => "Room Rent Limit",
|
"roomrentlimit" => "Room Rent Limit",
|
||||||
"proportionatedeductionclause" => "Proportionate Deduction Clause",
|
|
||||||
"nursingallowance" => "Nursing Allowance",
|
|
||||||
"ailmentcapping" => "Ailment capping",
|
"ailmentcapping" => "Ailment capping",
|
||||||
"ambulancecharges" => "Ambulance Charges",
|
|
||||||
"airambulance" => "Air Ambulance",
|
|
||||||
"familytransportationbenefit" => "Family Transportation Benefit",
|
|
||||||
"reasonableandcustomarycharges" => "Reasonable and Customary Charges",
|
|
||||||
"daycaretreatment" => "Day Care Treatment",
|
|
||||||
"ayudhtreatmentcover" => "AYUSH treatment cover",
|
|
||||||
"armdcovered" => "ARMD Covered",
|
|
||||||
"suminsuredenhancement" => "Sum Insured enhancement",
|
|
||||||
"automaticsuminsuredreinstatement" => "Automatic Sum Insured reinstatement",
|
|
||||||
"additionalsicknessbenefit" => "Additional Sickness Benefit",
|
|
||||||
"lasiksurgery" => "Lasik Surgery",
|
|
||||||
"midterminclusion" => "Mid Term inclusion",
|
|
||||||
"capd" => "CAPD",
|
|
||||||
"organdonorexpenses" => "Organ donor expenses",
|
|
||||||
"moderntreatmentsasperirdai" => "Modern treatments as per IRDAI",
|
|
||||||
"days_of_discharge" => "Claim Intimation Clause",
|
|
||||||
"days_from_dod" => "Claim Submission",
|
|
||||||
"cataract" => "Cataract"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$finalarray = [];
|
$finalarray = [];
|
||||||
if($type == 'gpa'){
|
if($type == 'gpa'){
|
||||||
foreach ($gpa as $key => $value) {
|
foreach ($gpa as $key => $value) {
|
||||||
@ -2203,4 +2197,46 @@ private function convertDateFormatDisplay($dateString)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getFEContent()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$feContentData = $this->feContentModel->findAll();
|
||||||
|
if (count($feContentData) > 0) {
|
||||||
|
|
||||||
|
return $this->respond(['status' => 'success','code' => 200,'data' => $feContentData ],200);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return $this->respond(['status' => 'failed','code' => 404,'data' => 'No Data'],404);
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAdvertisementImage()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$img = $this->addImgModel->where('is_active',1)->findAll();
|
||||||
|
|
||||||
|
if (count($img) > 0) {
|
||||||
|
$data=[];
|
||||||
|
foreach ($img as $key => $value) {
|
||||||
|
$url = base_url('public/uploads/add_image_upload/').$value['name'];
|
||||||
|
array_push($data,$url);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->respond(['status' => 'success','code' => 200,'data' => $data ],200);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return $this->respond(['status' => 'failed','code' => 404,'data' => 'No Data'],404);
|
||||||
|
}
|
||||||
|
} catch (\Throwable $th) {
|
||||||
|
return $this->respond(['status' => 'failed','code' => 500,'data' => $th],500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
21
app/Models/AddImgModel.php
Normal file
21
app/Models/AddImgModel.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class AddImgModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'advertisement_images';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $allowedFields = [
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"created_by",
|
||||||
|
"updated_by",
|
||||||
|
"is_active",
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
25
app/Models/FEContentModel.php
Normal file
25
app/Models/FEContentModel.php
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<?php
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
|
class FEContentModel extends Model
|
||||||
|
{
|
||||||
|
protected $table = 'fe_content';
|
||||||
|
protected $primaryKey = 'id';
|
||||||
|
protected $allowedFields = [
|
||||||
|
"id",
|
||||||
|
"type",
|
||||||
|
"content_section",
|
||||||
|
"heading",
|
||||||
|
"content",
|
||||||
|
"notes",
|
||||||
|
"created_by",
|
||||||
|
"updated_by",
|
||||||
|
"is_active",
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user