From 8c4eba72a1b5812706cce78f06d69d7fa10e6d20 Mon Sep 17 00:00:00 2001 From: venba-Inspriron-3558 Date: Mon, 1 Sep 2025 11:23:29 +0530 Subject: [PATCH] FIX_Lead History --- app/Views/leads_list.php | 293 ++++++++++++++++++++------------------- 1 file changed, 152 insertions(+), 141 deletions(-) diff --git a/app/Views/leads_list.php b/app/Views/leads_list.php index f15c18b0..23ac3bdf 100644 --- a/app/Views/leads_list.php +++ b/app/Views/leads_list.php @@ -215,8 +215,7 @@ table.dataTable tbody td { - Email History @@ -344,6 +343,7 @@ document.addEventListener("DOMContentLoaded", function () { // Handle clicks on dropdown items customDropdown.querySelectorAll('.dropdown-item').forEach(item => { item.addEventListener('click', function(e) { + console.log("##############"); e.preventDefault(); e.stopPropagation(); @@ -358,7 +358,13 @@ document.addEventListener("DOMContentLoaded", function () { if (id) { getLeadsDataForEdit(id, lead_form_type); } - }else{ + }else if (this.classList.contains('btnHistory')) { + let lead_id = this.getAttribute('data-id'); + if(lead_id){ console.log("******** Clicked from td lead_id-", lead_id); getLeadsDataForMailHistory(lead_id); } + else{ console.log("******** Clicked from td but i don`t have lead_id"); } + + } + else{ const onclickAttr = this.getAttribute('onclick'); if (onclickAttr) { eval(onclickAttr); @@ -387,6 +393,16 @@ document.addEventListener("DOMContentLoaded", function () { activeDropdown = null; } }); + + document.addEventListener("click", function(e) { + if (e.target.closest(".btnHistory")) { + let lead_id = e.target.closest(".btnHistory").dataset.id; + console.log("******** in triple dot id available - " + lead_id); + getLeadsDataForMailHistory(lead_id); + } + else{ console.log("******** in triple dot but id not available"); } + }); + }); @@ -462,146 +478,141 @@ document.addEventListener("DOMContentLoaded", function () { window.location.href = url; } - -