diff --git a/app/Controllers/Chatbot/EcardDownloadConversation.php b/app/Controllers/Chatbot/EcardDownloadConversation.php
index 84617af1..c38d6977 100644
--- a/app/Controllers/Chatbot/EcardDownloadConversation.php
+++ b/app/Controllers/Chatbot/EcardDownloadConversation.php
@@ -23,6 +23,8 @@ class EcardDownloadConversation extends Conversation
$policy_list = ChatbotHelper::getListOfPolicies($chat_session_info);
$buttons = [];
$question = 'Choose Policy to Download Ecard:';
+ log_message('error', ('policy_list : ' . json_encode($policy_list)));
+
if(is_array($policy_list) && count($policy_list))
{
foreach($policy_list as $policy)
diff --git a/app/Controllers/Chatbot/MainMenuConversation.php b/app/Controllers/Chatbot/MainMenuConversation.php
index 875ecba4..f06fd078 100644
--- a/app/Controllers/Chatbot/MainMenuConversation.php
+++ b/app/Controllers/Chatbot/MainMenuConversation.php
@@ -53,6 +53,8 @@ class MainMenuConversation extends Conversation
$user_reponse = null;
}
+ log_message('error', ('user_reponse is interactive: ' . $answer->isInteractiveMessageReply()));
+
// Get just the existing path array
$path = $this->bot->userStorage()->get('path') ?? [];
@@ -65,28 +67,35 @@ class MainMenuConversation extends Conversation
'path' => $path
]);
- log_message('error', ('user_reponse : ' . $user_reponse));
+ log_message('error', ('user_reponse after: ' . $user_reponse));
switch ($user_reponse) {
case "ecard_download":
$this->bot->startConversation(new EcardDownloadConversation());
+ log_message('error', 'ecard_download clicked ');
+
break;
case "network_hospital":
$this->bot->startConversation(new NetworkHospitalConversation());
+ log_message('error', 'network_hospital clicked ');
break;
case "reimbursement_claim":
$this->bot->startConversation(new ReimbursementClaimProcessConversation());
+ log_message('error', 'reimbursement_claim clicked ');
break;
case "reimbursement_status":
$this->bot->startConversation(new ReimbursementClaimStatusConversation());
+ log_message('error', 'reimbursement_status clicked ');
break;
case "new_policy":
case "renew_policy":
$this->bot->startConversation(new policyConversation());
+ log_message('error', 'renew_policy || new_policy clicked ');
break;
default:
+ log_message('error', 'default shown ');
$this->say("Invalid selection. Please choose an option.");
$this->bot->startConversation(new MainMenuConversation());
break;
diff --git a/app/Controllers/ChatbotControllerNew.php b/app/Controllers/ChatbotControllerNew.php
index 2f6ca404..dc38a3c9 100644
--- a/app/Controllers/ChatbotControllerNew.php
+++ b/app/Controllers/ChatbotControllerNew.php
@@ -84,6 +84,7 @@ class ChatbotControllerNew extends BaseController
public function index()
{
+
if($this->session->get('CHATBOT_RANDOM_USER_ID') == '-' || $this->session->get('CHATBOT_RANDOM_USER_ID') == '')
{
@@ -100,6 +101,7 @@ class ChatbotControllerNew extends BaseController
}
$this->botman->hears('.*', function ($bot) {
+ log_message("error","Inside Bot Type Function");
$bot->types(); // Typing indicator for the first message
sleep(0.5); // Delay
diff --git a/app/Controllers/LeadsController.php b/app/Controllers/LeadsController.php
index c432c921..c5854a06 100644
--- a/app/Controllers/LeadsController.php
+++ b/app/Controllers/LeadsController.php
@@ -40,6 +40,7 @@ use Kint\Kint;
use App\Controllers\Jobs;
use App\Controllers\JobWorker;
use Google\Service\FactCheckTools\Resource\Claims;
+use GPBMetadata\Google\Type\Datetime;
class LeadsController extends BaseController
{
@@ -646,6 +647,7 @@ class LeadsController extends BaseController
$data['page_name'] = $type == 2 ? 'QCR' : 'RFQ';
$data['insurer'] = $this->insurerBranchModel->getInsurerBranchesWithInsurerNames();
$data['userList'] = $this->userModel->getUserListForRFQ();
+ $data['exclusiveUserList'] = $this->userModel->getexclusiveUserListForRFQ();
$data['lead_data'] = $lead_data;
$mail_content = "
@@ -654,18 +656,32 @@ class LeadsController extends BaseController
Please find attached the {{RFQ_OR_QCR}} for {{POLICY_TYPE}} policy pertaining to {{CLIENT_NAME}} .
Kindly request you to share the competitive quotes at the earliest.
In case of any query, please feel free to contact us.
- Thank You!
+ Thank You!
+ Best regards,
+
+
+
{{LOGGED_USER_NAME}}
+
Email: {{LOGGED_USER_EMAIL}}
+
Mobile: {{LOGGED_USER_MOBILE}}
+
+
+
+
";
+ if ($data['lead_data']['policy_end_date'] != null){
+ $subject = "{{CLIENT_NAME}} _ {{POLICY_TYPE}} _ {{RFQ_OR_QCR}} _ {{POLICY_YEAR}} {{POLICY_END_DATE}}";
+ }else{
+ $subject = "{{CLIENT_NAME}} _ {{POLICY_TYPE}} _ {{RFQ_OR_QCR}} _ {{POLICY_YEAR}}";
- $subject = "{{CLIENT_NAME}} _ {{POLICY_TYPE}} _ {{RFQ_OR_QCR}} _ {{POLICY_YEAR}}";
+ }
$data['mail_content'] = $this->transformMailContent($lead_data, $mail_content, $data['page_name']);
$data['subject'] = $this->transformMailContent($lead_data, $subject, $data['page_name']);
$data['multi_file_data'] = $this->leadFilesModel->where('lead_id', $id)->where('is_active', 1)->findAll() ?? null;
$data['attachment_html'] = view('rfq/attachment_files', $data) ?? "";
-
+ $data['user_team'] = $this->userModel->select("ut.team_id")->join("user_teams ut","ut.user_id = user_profiles.id and ut.is_active = 1")->where("user_profiles.is_active",1)->first()['team_id'];
// dd($data);
if ($data['lead_data']['lead_form_type'] == 1) {
@@ -880,7 +896,7 @@ class LeadsController extends BaseController
if ($rfq_data['policy_type_id'] == 2) {
$lead_data = [
-
+ 'policy_end_date' => $rfq_data['policy_end_date'],
'Insured' => $rfq_data['client_name'],
'Policy Status' => $rfq_data['status'],
@@ -893,6 +909,7 @@ class LeadsController extends BaseController
];
} else if ($rfq_data['policy_type_id'] == 1) {
$lead_data = [
+ 'policy_end_date' => $rfq_data['policy_end_date'],
'Insured' => $rfq_data['client_name'],
'No of Employees at Inception' => $rfq_data['incept_emp_count'],
'Total Sum Insured at Inception ' => $rfq_data['total_si_at_incept'],
@@ -905,6 +922,7 @@ class LeadsController extends BaseController
} else {
if ($rfq_data['policy_type_id'] == 2) {
$lead_data = [
+ 'policy_end_date' => $rfq_data['policy_end_date'],
'Insured' => $rfq_data['client_name'],
'Policy Status' => $rfq_data['status'],
@@ -933,6 +951,7 @@ class LeadsController extends BaseController
];
} else if ($rfq_data['policy_type_id'] == 1) {
$lead_data = [
+ 'policy_end_date' => $rfq_data['policy_end_date'],
'Insured' => $rfq_data['client_name'],
'No of Employees at Renewal' => $rfq_data['renewal_emp_count'],
'Total Sum Insured at Renewal ' => $rfq_data['total_si_at_renewal'],
@@ -1300,9 +1319,25 @@ class LeadsController extends BaseController
],
]);
+
+
// Set filename
$string = ($type == 2) ? 'QCR' : 'RFQ';
- $filename = "{$string}_{$rfq_data['client_short_name']}_{$rfq_data['policy_type']}_" . date('YmdHis') . '.xlsx';
+ $current_year = date('Y');
+ $next_year = $current_year + 1;
+ $policy_year = "$current_year-$next_year";
+
+ if (!empty($rfq_data['policy_end_date'])){
+ $policy_expiry = strtotime($lead_data['policy_end_date']);
+
+ $formatted_policy = date("d-m-Y",$policy_expiry);
+
+ $filename = "{$rfq_data['client_name']}_{$rfq_data['policy_type']}_{$string}_" .$policy_year.'(Due On '.$formatted_policy . ')' .'.xlsx';
+
+ }else{
+ $filename = "{$rfq_data['client_name']}_{$rfq_data['policy_type']}_{$string}_".$policy_year.'_' . '.xlsx';
+ }
+
// Save to temporary location
$uploadFilePath = WRITEPATH . 'tmp/' . $filename;
@@ -1927,13 +1962,20 @@ class LeadsController extends BaseController
// print_r($recipient_data); die;
} else if ($recipient_type == 'client') {
- $recipient_data = [['name' => $lead_data['contact_person_name'], 'email' => $lead_data['contact_person_email']]];
+
+ $mailIDS = explode(',',$params['contact_mail']);
+ $recipient_data = [];
+ foreach ($mailIDS as $mail){
+ $recipient_data[] = ['name' => $lead_data['contact_person_name'], 'email' => $mail];
+ }
+
} else {
$recipient_data = [['name' => "Team", 'email' => $params['to']]];
}
// print_r($recipient_data); die;
$subject = $file_type == 'rfq' ? 'Request for Quotation from ' . $lead_data['client_name'] . ' for ' . $lead_data['policy_type'] : 'Quotation Comparison Report for ' . $lead_data['policy_type'];
+
$original_message = '
Request for Quotation (RFQ) Dear {{RECIPIENT_NAME}}, We are reaching out to request a quotation for the following insurance coverage. Please review the details below and provide your quote at your earliest convenience.
RFQ Details Client name {{CLIENT_NAME}} Coverage Type {{POLICY_LONG_NAME}} Policy Start Date {{POLICY_START_DATE}} Policy Duration {{DURATION}}
Please note: Additional terms and details are included in the attachment for your reference.
Please feel free to reach out if you require any further information to prepare the quote. We look forward to receiving your proposal.
Best regards,
Nhance India Pvt Ltd
© Nhance India Pvt Ltd. All rights reserved.
';
//for mail content
@@ -1982,7 +2024,9 @@ class LeadsController extends BaseController
'proposel_data' => json_encode($lead_update_data),
'status' => 'won',
'placement_date' => change_date_format($params['placement_date'], 'd/m/Y', 'Y-m-d'),
+ 'payment_date' => change_date_format($params['payment_date'], 'd/m/Y', 'Y-m-d'),
'utr_no' => $params['utr_no'],
+ 'is_cd' => $params['is_cd'],
'premium_amount' => $params['premium_amount'],
'total_amount' => $params['total_amount'],
'cd_amount' => $params['cd_amount'],
@@ -2629,6 +2673,13 @@ class LeadsController extends BaseController
$next_year = $current_year + 1;
$policy_year = "$current_year-$next_year";
+ $policy_expiry = strtotime($lead_data['policy_end_date']);
+
+ $formatted_policy = date("d-m-Y",$policy_expiry);
+ $logged_user_id = get_session_userid();
+
+ $logged_user_data = $this->userModel->where("id",$logged_user_id)->where("is_active",1)->first();
+
if ($lead_data) {
// Replacing placeholders with actual values
@@ -2638,6 +2689,11 @@ class LeadsController extends BaseController
$message = str_replace("{{POLICY_TYPE}}", $lead_data['policy_type'] ?? "Insurance Policy", $message);
$message = str_replace("{{RFQ_OR_QCR}}", $page_name, $message);
$message = str_replace("{{POLICY_YEAR}}", $policy_year, $message);
+ $message = str_replace("{{POLICY_END_DATE}}"," (Due On ".$formatted_policy.")",$message);
+
+ $message = str_replace("{{LOGGED_USER_NAME}}",ucfirst($logged_user_data['first_name'])." ".ucfirst($logged_user_data['last_name']),$message);
+ $message = str_replace("{{LOGGED_USER_EMAIL}}",$logged_user_data['email'],$message);
+ $message = str_replace("{{LOGGED_USER_MOBILE}}",$logged_user_data['mobile'],$message);
return $message;
} else {
@@ -2645,6 +2701,7 @@ class LeadsController extends BaseController
}
}
+
function getLastFiveFinancialYears()
{
$currentYear = date('Y');
diff --git a/app/Models/LeadsModel.php b/app/Models/LeadsModel.php
index 84e9c9bf..c2ae9492 100644
--- a/app/Models/LeadsModel.php
+++ b/app/Models/LeadsModel.php
@@ -87,6 +87,8 @@ class LeadsModel extends Model
'lead_form_type',
'custom_fields',
+ 'payment_date',
+ 'is_cd'
];
diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php
index 49b84400..ed5a8ace 100755
--- a/app/Models/UserModel.php
+++ b/app/Models/UserModel.php
@@ -134,5 +134,20 @@ class UserModel extends Model
->getResultArray();
}
+ public function getexclusiveUserListForRFQ(){
+ $data = $this->db->table('user_profiles')
+ ->select('user_profiles.*,user_teams.team_id')
+ ->select('roles.role as user_role')
+ ->join('roles', 'roles.id = user_profiles.role')
+ ->join('user_teams', 'user_teams.user_id = user_profiles.id')
+ ->get()
+ ->getResultArray();
+
+
+ // dd($data);
+
+ return $data;
+ }
+
}
?>
\ No newline at end of file
diff --git a/app/Views/chatbot.php b/app/Views/chatbot.php
index 94373196..95bf5cde 100644
--- a/app/Views/chatbot.php
+++ b/app/Views/chatbot.php
@@ -41,7 +41,7 @@
origin: "mobile", // origin
emp_code:"HTL-007",
client_id:159,
- client_branch_id:125
+ client_branch_id:126
}
};
diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php
index f7ccabb4..8db290b2 100755
--- a/app/Views/layout/header.php
+++ b/app/Views/layout/header.php
@@ -80,6 +80,9 @@
+
+
+
diff --git a/app/Views/view_rfq.php b/app/Views/view_rfq.php
index 950e9b45..adc432b8 100644
--- a/app/Views/view_rfq.php
+++ b/app/Views/view_rfq.php
@@ -225,12 +225,15 @@
Add New Proposal
Save RFQ
-
+
Procced to QCR
Export Excel
Send Internal Mail
- Send Insurer Mail
+
+ Send Insurer Mail
+
Placement
@@ -421,12 +424,15 @@
CC
-
-
+
+
+
+
= $user['first_name'].' - '.$user['email'];?>
+
@@ -484,30 +490,45 @@
@@ -530,12 +551,15 @@
CC
-
-
+
+
+ >
+
+
= $user['first_name'].' - '.$user['email'];?>
-
+
@@ -797,6 +821,11 @@
allowInput: false,
});
+ var payment_date_datePicker = flatpickr("#payment_date", {
+ dateFormat: "d/m/Y",
+ allowInput: false,
+ });
+
})
@@ -830,6 +859,24 @@ var over_all_column_data = {
'insurers': []
}
};
+document.addEventListener('DOMContentLoaded', function () {
+ const textarea = document.getElementById('placement_mail_content');
+ const textarea2 = document.getElementById("placement_subject");
+
+ if (textarea) {
+ let content = textarea.value;
+ if (content.includes('QCR')) {
+ textarea.value = content.replace(/QCR/g, 'Placement');
+ }
+ }
+
+ if (textarea2){
+ let content = textarea2.value;
+ if (content.includes('QCR')) {
+ textarea2.value = content.replace(/QCR/g, 'Placement');
+ }
+ }
+});
// document.addEventListener("DOMContentLoaded", function () {
const rfqTable = document.getElementById('rfqTable');
@@ -1283,19 +1330,34 @@ function moveAddRowButton() {
rfqTable.addEventListener('click', function(e) {
if (e.target.classList.contains('removeRow')) {
- const row = e.target.closest('tr'); // Get the row to be removed
- const rowKey = row.getAttribute('id');
+ Swal.fire({
+ title: 'Are you sure?',
+ text: "Do you want to remove the row?",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#d33',
+ cancelButtonColor: '#3085d6',
+ confirmButtonText: 'Yes, remove it!',
+ cancelButtonText: 'Cancel'
+ }).then((result) => {
+ if (result.isConfirmed) {
+ const row = e.target.closest('tr'); // Get the row to be removed
+ const rowKey = row.getAttribute('id');
- console.log(suggestionKeys);
- // Remove the key from suggestionKeys
- suggestionKeys = suggestionKeys.filter(key => key !== rowKey);
- row.remove();
- console.log(suggestionKeys);
- updateRowNumbers(); // Update row numbers
- moveAddRowButton(); // Move the add row button to the last row
- realignSpecialConditions();
+ console.log(suggestionKeys);
+ // Remove the key from suggestionKeys
+ suggestionKeys = suggestionKeys.filter(key => key !== rowKey);
+ row.remove();
+ console.log(suggestionKeys);
+ updateRowNumbers(); // Update row numbers
+ moveAddRowButton(); // Move the add row button to the last row
+ realignSpecialConditions();
- isFormDataModified = true; // if any value changeing in the table to set true
+ isFormDataModified = true; // if any value changeing in the table to set true
+ }
+ })
+
+
}
});
@@ -1441,7 +1503,6 @@ function showSuggestions(input) {
// Function to handle answers suggestion box
function showAnswersSuggestions(input) {
-
console.log(input.parentElement.id);
console.log(input);
//return;
@@ -2142,7 +2203,17 @@ function removeProposal(event) {
let rfqTable = document.getElementById('rfqTable');
console.log(rfqTable)
- if (confirm("Are you sure you want to remove this column?")) {
+ Swal.fire({
+ title: 'Are you sure?',
+ text: "Do you want to remove the Proposal?",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#d33',
+ cancelButtonColor: '#3085d6',
+ confirmButtonText: 'Yes, remove it!',
+ cancelButtonText: 'Cancel'
+ }).then((result) => {
+ if (result.isConfirmed) {
const headerRows = rfqTable.querySelectorAll('thead tr');
const parentTh = headerRows[0].children[colIndex];
@@ -2187,69 +2258,83 @@ function removeProposal(event) {
console.log(`${proposal_name} does not exist.`);
}
}
+
+ })
}
function removeInsurer(event) {
- if (confirm("Are you sure you want to remove this column?")) {
- // function removeSubColumnByIndex(tableId, subThIndex) {
- const table = document.getElementById('rfqTable');
- const headerRows = table.querySelectorAll('thead tr');
+ Swal.fire({
+ title: 'Are you sure?',
+ text: "Do you want to remove the insurer?",
+ icon: 'warning',
+ showCancelButton: true,
+ confirmButtonColor: '#d33',
+ cancelButtonColor: '#3085d6',
+ confirmButtonText: 'Yes, remove it!',
+ cancelButtonText: 'Cancel'
+ }).then((result) => {
+ if (result.isConfirmed) {
+ // function removeSubColumnByIndex(tableId, subThIndex) {
+ const table = document.getElementById('rfqTable');
+ const headerRows = table.querySelectorAll('thead tr');
- const closestTh = event.target.closest('th');
- let insurerName = closestTh.innerText.split('⋮')[0]
- // alert(insurerName);return;
- let subThIndex = closestTh.cellIndex;
- console.log('subThIndex', subThIndex);
+ const closestTh = event.target.closest('th');
+ let insurerName = closestTh.innerText.split('⋮')[0]
+ // alert(insurerName);return;
+ let subThIndex = closestTh.cellIndex;
+ console.log('subThIndex', subThIndex);
- // Get the sub TH from the second header row
- const subTh = headerRows[1].children[subThIndex];
- console.log('subTh', subTh);
+ // Get the sub TH from the second header row
+ const subTh = headerRows[1].children[subThIndex];
+ console.log('subTh', subTh);
- let accumulatedColspan = 0;
- let parentTh = null;
- const firstHeaderRow = headerRows[0];
- // Find the parent TH for the specified sub TH index
- for (let i = 0; i < firstHeaderRow.children.length; i++) {
- const currentParentTh = firstHeaderRow.children[i];
- const currentColspan = parseInt(currentParentTh.getAttribute('colspan')) || 1;
+ let accumulatedColspan = 0;
+ let parentTh = null;
+ const firstHeaderRow = headerRows[0];
+ // Find the parent TH for the specified sub TH index
+ for (let i = 0; i < firstHeaderRow.children.length; i++) {
+ const currentParentTh = firstHeaderRow.children[i];
+ const currentColspan = parseInt(currentParentTh.getAttribute('colspan')) || 1;
- accumulatedColspan += currentColspan;
+ accumulatedColspan += currentColspan;
- if (subThIndex < accumulatedColspan) {
- parentTh = currentParentTh;
- break;
+ if (subThIndex < accumulatedColspan) {
+ parentTh = currentParentTh;
+ break;
+ }
+ }
+ console.log('parentth' + parentTh);
+ console.log('sub col indexOf' + subThIndex);
+
+
+ // Get the starting position of the sub TH
+ const startIndex = Array.from(headerRows[1].children).indexOf(subTh);
+
+ // Remove the sub TH
+ headerRows[1].removeChild(subTh);
+
+ // Reduce colspan of parent TH
+ const parentColspan = parseInt(parentTh.getAttribute('colspan')) || 1;
+ console.log('existing colspan' + parentColspan);
+ parentTh.setAttribute('colspan', parentColspan - 1);
+ console.log('new colspan' + (parentColspan - 1));
+
+ // Remove the corresponding TDs from each row
+ table.querySelectorAll('tbody tr').forEach(row => {
+ row.removeChild(row.children[startIndex]);
+ });
+
+ removeInsurerFromPremiumTable(event, subThIndex)
+
+ //remove the insurer from gobal array
+ let proposal_name = parentTh.innerText.split('⋮')[0];
+ popInsurerInArray(proposal_name, insurerName);
+
+ isFormDataModified = true; // if any value changeing in the table to set true
}
- }
- console.log('parentth' + parentTh);
- console.log('sub col indexOf' + subThIndex);
-
-
- // Get the starting position of the sub TH
- const startIndex = Array.from(headerRows[1].children).indexOf(subTh);
-
- // Remove the sub TH
- headerRows[1].removeChild(subTh);
-
- // Reduce colspan of parent TH
- const parentColspan = parseInt(parentTh.getAttribute('colspan')) || 1;
- console.log('existing colspan' + parentColspan);
- parentTh.setAttribute('colspan', parentColspan - 1);
- console.log('new colspan' + (parentColspan - 1));
-
- // Remove the corresponding TDs from each row
- table.querySelectorAll('tbody tr').forEach(row => {
- row.removeChild(row.children[startIndex]);
- });
-
- removeInsurerFromPremiumTable(event, subThIndex)
-
- //remove the insurer from gobal array
- let proposal_name = parentTh.innerText.split('⋮')[0];
- popInsurerInArray(proposal_name, insurerName);
-
- isFormDataModified = true; // if any value changeing in the table to set true
- }
+
+ })
}
function showThreeDottedMenu(event) {
@@ -2739,8 +2824,8 @@ function handleChildQuestions(target) {
let childCell = childRow.cells[currentColumnIndex];
if (childCell) {
- console.log('found cell');
-
+ console.log('found cell',inputValue);
+
if (inputValue.key == disable_at.key) {
childCell.innerHTML = '';
childCell.innerText = '';
@@ -2759,6 +2844,21 @@ function handleChildQuestions(target) {
console.log(child.default_answer.display_value)
childCell.contentEditable = false;
} else {
+ childCell.innerHTML = '';
+ childCell.innerText = '';
+ //hidden text box for store choosed answers object
+ const hiddenInputBox = document.createElement('input');
+ hiddenInputBox.type = 'hidden';
+ hiddenInputBox.value = JSON.stringify(inputValue.display_value);
+
+ childCell.appendChild(hiddenInputBox);
+ // alert(input.innerText);
+ childCell.appendChild(document.createTextNode(inputValue.display_value));
+
+ // Set the default answer in the child cell
+ // childCell.innerHTML = child.default_answer.display_value;
+ // console.log('setting default value');
+ // console.log(child.default_answer.display_value)
childCell.contentEditable = true;
}
}
@@ -3136,7 +3236,7 @@ function ajaxRequestForGetMailData(url) {
function appendInput(data) {
- console.log(data);
+ console.log("append data:",data);
var lead_id = $('#lead_id').val();
$('#input_for_row').empty();
let html = '';
@@ -3146,9 +3246,9 @@ function appendInput(data) {
const url = '= base_url('leads/list') ?>?lead_id=' + lead_id;
html += `
-