FEAT_SWAL_FOR_ROW_REMOVE_NONEB
This commit is contained in:
parent
193591f482
commit
c8627c8724
@ -1652,7 +1652,7 @@
|
||||
collapsibleBar.innerHTML = `
|
||||
${tableData ? tableData.table_name : "Particulars"}
|
||||
<span class="collapse-icon">▼</span>
|
||||
`;
|
||||
`;
|
||||
|
||||
// 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 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user