From c8627c8724f62eb9a80fa714ad153c9387822206 Mon Sep 17 00:00:00 2001 From: Srinivas-Saravanan Date: Thu, 29 May 2025 10:48:31 +0530 Subject: [PATCH] FEAT_SWAL_FOR_ROW_REMOVE_NONEB --- app/Views/view_rfq_non_eb.php | 37 ++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/app/Views/view_rfq_non_eb.php b/app/Views/view_rfq_non_eb.php index a52458f5..0ab2bbe3 100644 --- a/app/Views/view_rfq_non_eb.php +++ b/app/Views/view_rfq_non_eb.php @@ -1652,7 +1652,7 @@ collapsibleBar.innerHTML = ` ${tableData ? tableData.table_name : "Particulars"} - `; + `; // Create table content wrapper with Bootstrap 4 collapse class const tableContent = document.createElement('div'); @@ -2623,6 +2623,8 @@ if (rfq_or_qcr == 2) { $("#openQCR").hide(); } + } else { + $('#rfq_primaryKey').val(response.id); } // window.location.reload(); } else { @@ -3750,14 +3752,30 @@ } function removeRowQCR(event) { - const button = event.target; - const row = button.closest('tr'); - const table = row.closest('table'); - if (row && row.parentElement.children.length > 1) { - // // console.log("Row Removed"); - row.remove(); - updateVisisbleSNO(table.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 button = event.target; + const row = button.closest('tr'); + const table = row.closest('table'); + if (row && row.parentElement.children.length > 1) { + // // console.log("Row Removed"); + row.remove(); + updateVisisbleSNO(table.id); + } + + isFormDataModified = true; // if any value changeing in the table to set true + } + }) + } function updateVisisbleSNO(tableId) { @@ -5704,6 +5722,7 @@ }); }); } +