diff --git a/app/Views/editconfig.php b/app/Views/editconfig.php
index 1013c078..4cf8da5b 100755
--- a/app/Views/editconfig.php
+++ b/app/Views/editconfig.php
@@ -157,9 +157,9 @@ if (!empty($master)) {
Config_ID === 'C023'){ ?>
-
+ |
@@ -168,7 +168,7 @@ if (!empty($master)) {
|
- ConfigValue; ?> |
+ ConfigValue; ?> |
@@ -422,8 +422,6 @@ if (!empty($master)) {
},
success: function(data) {
- console.log(data);
-
if (data.length > 0) {
if (data[0]?.isActive == 1) {
@@ -509,15 +507,17 @@ if (!empty($master)) {
var id = $(this).data('id');
var key = $(this).data('key');
var code = $(this).data('code');
- var configValue = $(this).data('configvalue');
+ var configValue = $(this).attr('data-configvalue');
+
+ console.log(configValue);
$('#key').val(key);
$('#Config_ID').val(code);
$('#configValue').val(configValue);
-
$('#EditConfiguration').modal('show');
-
+
});
+
@@ -541,7 +541,25 @@ if (!empty($master)) {
success: function(response) {
if (response.status) {
alert('Config Value updated successfully');
- location.reload();
+
+ let key = $('#key').val();
+
+ let configValue = $("#configValue").val();
+
+ let configId = $('#Config_ID').val();
+ if (configId === "C023") {
+ $(`#configtable tbody tr td.config-value-td a[data-key="${key}"]`).text(configValue);
+ } else {
+ $(`#configtable tbody tr td.config-value-td[data-key="${key}"]`).text(configValue);
+ }
+
+ $(`#configtable tbody tr td a.editConfigurationBtn[data-key="${key}"]`).attr('data-configvalue', configValue);
+
+
+ $("#configValue").val(" ");
+
+ $('#EditConfiguration').modal('hide');
+
} else {
alert('Failed to update Config Value');
}
|