CHANGE_ trems data display filter FE content display API and Add image API : GWM
This commit is contained in:
parent
17bc0b9911
commit
a11ff39a33
@ -254,9 +254,7 @@ $routes->group("/api", ["filter" => "authJWT"], function ($routes) {
|
||||
$routes->post("getId", "RestAuthenticationController::getUserIdFromToken");
|
||||
});
|
||||
|
||||
$routes->get("/getEmployeeProfile", "EmployeeRestController::getEmployeeProfile/$1");
|
||||
$routes->post("/editEmployeeProfile", "EmployeeRestController::editEmployeeProfile");
|
||||
$routes->post("/calculatePremium", "EmployeeRestController::calculatePremium");
|
||||
|
||||
|
||||
|
||||
|
||||
@ -288,11 +286,14 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function ($routes) {
|
||||
|
||||
$routes->get("getEmployeeOldPolicy", "EmployeeRestController::getEmployeeOldPolicy");
|
||||
$routes->get("getEmployeeActiveOrInactivePolicy", "EmployeeRestController::getEmployeeActiveOrInactivePolicy");
|
||||
$routes->get("getFEContent", "EmployeeRestController::getFEContent");
|
||||
$routes->get("getAdvertisementImage", "EmployeeRestController::getAdvertisementImage");
|
||||
});
|
||||
|
||||
$routes->post("sendEmail", "EmployeeRestController::send_email");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,9 @@ use App\Models\PolicyPremium2Model;
|
||||
use App\Models\PolicyTypeModel;
|
||||
use App\Models\NotificationModel;
|
||||
use App\Models\UserModel;
|
||||
use App\Models\FEContentModel;
|
||||
use App\Models\AddImgModel;
|
||||
|
||||
|
||||
use App\Controllers\Jobs ;
|
||||
use App\Controllers\JobWorker ;
|
||||
@ -57,6 +60,8 @@ class EmployeeRestController extends AdminController
|
||||
protected $policyTypeModel;
|
||||
protected $notificationModel;
|
||||
protected $userModel;
|
||||
protected $feContentModel;
|
||||
protected $addImgModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@ -76,6 +81,8 @@ class EmployeeRestController extends AdminController
|
||||
$this->policyTypeModel = new PolicyTypeModel();
|
||||
$this->notificationModel = new NotificationModel();
|
||||
$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;
|
||||
if($Gender == 'M'){ return 'F'; }else{ return 'M'; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function convertDateFormatYMD($dateString)
|
||||
{
|
||||
@ -1363,16 +1370,17 @@ public function getAddOnPolicy()
|
||||
->where('client_branch_id',$this->request->getGet('client_branch_id'))
|
||||
->where('is_addon_value',1)->findAll();
|
||||
|
||||
|
||||
|
||||
|
||||
$clientPolicy = $this->clientPolicyModel->where('client_id',$this->request->getGet('client_id'))
|
||||
->where('client_branch_id',$this->request->getGet('client_branch_id'))
|
||||
->where('policy_status', 1)
|
||||
->findAll();
|
||||
|
||||
|
||||
if(count($clientPolicy))
|
||||
{
|
||||
$band = $addOnEmployeeData = $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 = [];
|
||||
foreach ($clientPolicy as $key => $array) {
|
||||
$responce = [];
|
||||
@ -1388,9 +1396,16 @@ public function getAddOnPolicy()
|
||||
$uniqueData[] = $item;
|
||||
}
|
||||
}else{
|
||||
if (!in_array($item['si'], $siValues)) {
|
||||
$uniqueData[] = $item;
|
||||
$siValues[] = $item['si'];
|
||||
if (!in_array($item['si'], $siValues) ) {
|
||||
|
||||
if ($item['policy_grid_id'] == 11 && ($item['max_si'] != 0 || $item['max_si'] != null)) {
|
||||
$uniqueData[] = $item;
|
||||
$siValues[] = $item['si'];
|
||||
}else if($item['policy_grid_id'] != 11){
|
||||
$uniqueData[] = $item;
|
||||
$siValues[] = $item['si'];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -2136,41 +2151,20 @@ function policyTermsFiter($terms , $type)
|
||||
|
||||
$gmc = [
|
||||
"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",
|
||||
"maternitycoverage" => "Maternity Coverage",
|
||||
"babyday1cover" => "Baby Day 1 Cover",
|
||||
"9monthwaitingperiodwaived" => "9-month waiting Period –waived",
|
||||
"coverfromthedateofjoining" => "Cover from the date of Joining",
|
||||
"waiverof1,2,3&4thyearexclusions" => "Waiver of 1, 2, 3 & 4th year Exclusions",
|
||||
"waiverof30dayswaitingperiod" => "Waiver of 30 days waiting period",
|
||||
"prehospitalizationcover" => "Pre Hospitalization Cover",
|
||||
"congenitaldiseasesinternal" => "Congenital Diseases - Internal",
|
||||
"copayzonewisecopay" => "Co-Pay/Zone wise Co Pay",
|
||||
"bioabsorbablestenttoriclensmultifocallens" => "Bio absorbable stent / Toric lens/ Multi Focal lens",
|
||||
"roomrentlimit" => "Room Rent Limit",
|
||||
"proportionatedeductionclause" => "Proportionate Deduction Clause",
|
||||
"nursingallowance" => "Nursing Allowance",
|
||||
"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 = [];
|
||||
if($type == 'gpa'){
|
||||
@ -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