diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index 0ab2bbe3..96312b91 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -1997,12 +1997,16 @@ // Initialize the parent table document.addEventListener('DOMContentLoaded', () => { // // // console.log("bjnglfkrg ", rfq_data.length); - const url = window.location.pathname; // Get the path (e.g., "/nhance/rfq/list/75/1") - const segments = url.split("/"); // Split by "/" - segments[segments.length - 1] = "1"; // Change the last segment - const newUrl = segments.join("/"); // Rebuild the URL - rfq_or_qcr = 1; - history.pushState(null, "", newUrl); // Change the URL without reloading + // const url = window.location.pathname; // Get the path (e.g., "/nhance/rfq/list/75/1") + // const segments = url.split("/"); // Split by "/" + // segments[segments.length - 1] = "1"; // Change the last segment + // const newUrl = segments.join("/"); // Rebuild the URL + const path = window.location.pathname; // Get the current URL path + const segments = path.split('/'); // Split the path into segments + const lead_id = segments[segments.length - 2]; // Get the second last segment (15) + const type = segments[segments.length - 1]; + rfq_or_qcr = type; + // history.pushState(null, "", newUrl); // Change the URL without reloading if (rfq_data.length) { // // console.log("inside if conditoon");