revert : ps

This commit is contained in:
VE10-Sanjeev 2025-02-14 03:30:18 +00:00
parent 9386566bf4
commit 47d49099ab
2 changed files with 5 additions and 51 deletions

View File

@ -43,6 +43,7 @@ class Configurationctrl extends BaseController
$data['userRecords'] = $this->configmodel->Configlisting();
$this->global['pageTitle'] = 'Config Listing';
$this->loadViews("configlisting", $this->global, $data, NULL);

View File

@ -193,9 +193,7 @@
  
<a onclick="confirmDeleteConfig(event)"
data-key="<?php echo $con->Key; ?>"
data-code="<?php echo $con->Config_ID; ?>"
href="<?php echo base_url() . 'activeInactiveConfigValue?key=' . $con->Key . '&value=0'; ?>"
href="<?php echo base_url() . 'configurationctrl/deleteConfig?ConfigID=' . $record->Config_ID; ?>"
data-toggle="tooltip"
title="<?php echo $record->Config_ID ?> - Click here to Delete Config Details">
<i class="fas fa-trash" data-toggle="tooltip" title="Click here to Delete the Config Value"></i>
@ -347,55 +345,10 @@
});
// function confirmDeleteConfig(event) {
// let result = confirm("Do You want to delete this configuration ?");
// if (result) { return; } else { event.preventDefault(); }
// }
function confirmDeleteConfig(event) {
event.preventDefault(); // Prevent default link action
let key_id = $(event.currentTarget).data('key');
let code_value = $(event.currentTarget).data('code');
if (code_value == 'C023') {
$.ajax({
type: 'POST',
url: "<?php echo base_url('getPONOcreatedBasedOnConfig'); ?>",
data: { key_id: key_id },
dataType: 'json',
success: function(data) {
let content = "Do you want to delete this configuration?";
if (data.length > 0) {
content += "\n\nCreated PONO's are - ";
data.forEach(function(item) {
content += "\n- " + item.PONO;
});
}
let result = confirm(content);
if (result) {
window.location.href = event.currentTarget.href; // Proceed with deletion
}
},
error: function(xhr, status, error) {
console.log("Error occurred: ", error);
},
complete: function() {
console.log('AJAX call completed.');
}
});
} else {
let result = confirm("Do you want to delete this configuration?");
if (result) {
window.location.href = event.currentTarget.href; // Proceed with deletion
}
}
}
let result = confirm("Do You want to delete this configuration ?");
if (result) { return; } else { event.preventDefault(); }
}
function confirmReActivateConfig(event) {
let result = confirm("Do You want to Re activate deleted configuration ?");