From 45eeef869b5622b34cc2c9cd407874e20e757366 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Wed, 19 Mar 2025 14:17:39 +0530 Subject: [PATCH] FIX_INSURER_ALIGNMENT_SRI --- app/Controllers/LeadsController.php | 42 +- app/Views/policyRegisterModel.php | 13 + app/Views/view_rfq_non_eb.php | 942 ++-------------------------- 3 files changed, 75 insertions(+), 922 deletions(-) diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php index 6a958c71..3205553c 100644 --- a/app/Controllers/LeadsController.php +++ b/app/Controllers/LeadsController.php @@ -557,7 +557,7 @@ class LeadsController extends BaseController $data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames(); $data['userList'] = $this->userModel->getUserListForRFQ(); $data['lead_data'] = $lead_data; - + $mail_content = "

Dear Sir,

Greetings From Nhance India!

@@ -575,46 +575,22 @@ class LeadsController extends BaseController // dd($data); - if ($data['lead_id'] != 75){ + if ($data['lead_data']['lead_form_type'] == 1){ $this->loadLayout('view_rfq.php', $data); - }else{ + + }else if ($data['lead_data']['lead_form_type'] == 2){ - $this->viewNonEBRFQ($id); + $data['policies'] = json_decode($data['question_json'], true)['policies']; + $data["child_table_data"] = json_decode($data['question_json'], true)['child_table_data']; + // dd($data); + $data['client_type'] = $this->clientType; + $this->loadLayout('view_rfq_non_eb', $data); } } - public function viewNonEBRFQ($id){ - - $data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames(); - $lead_data = $this->leadsModel - ->select(' - leads.*, - policy_type.question_json, - policy_type.policy_type, - policy_type.long_name, - user_profiles.email as created_person_email - ') - ->join('policy_type', 'leads.policy_type_id = policy_type.id') - ->join('user_profiles', 'leads.created_by = user_profiles.id', 'left') - ->where('leads.id', $id) - ->where('leads.is_active', 1) - ->first(); - $data['lead_data'] = $lead_data; - $data['client_type'] = $this->clientType; - - $data['rfq_data'] = $this->RFQModel - ->where('lead_id', $id) - // ->where('type', $type) - ->where('is_active', 1) - ->orderBy('id', 'desc') - ->first(); - - // dd($data); - $this->loadLayout('view_rfq_non_eb', $data); - } public function createRFQ() { diff --git a/app/Views/policyRegisterModel.php b/app/Views/policyRegisterModel.php index 98ab888b..9e440904 100644 --- a/app/Views/policyRegisterModel.php +++ b/app/Views/policyRegisterModel.php @@ -32,6 +32,11 @@
+
+
+ +
+
@@ -1157,4 +1162,12 @@ //showRequiredFieldsBasedOnLocation(); } + + function assignLeadData(){ + const lead_data = ''; + + if (lead_data){ + console.log("Lead Data : ",lead_data); + } + } \ No newline at end of file diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index 55243f88..b89cefeb 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -183,7 +183,9 @@