stock changes 21-04-2025
This commit is contained in:
parent
adf9498710
commit
0cb5cb50b3
@ -157,9 +157,9 @@ if (!empty($master)) {
|
||||
<?php echo $index; ?>
|
||||
</td>
|
||||
<?php if($con->Config_ID === 'C023'){ ?>
|
||||
<td>
|
||||
<td class="config-value-td" data-key="<?php echo $con->Key; ?>">
|
||||
<a
|
||||
class="config-category"
|
||||
class="config-category "
|
||||
data-value="<?php echo $con->ConfigValue;?>"
|
||||
data-key="<?php echo $con->Key; ?>"
|
||||
style="cursor: pointer;">
|
||||
@ -168,7 +168,7 @@ if (!empty($master)) {
|
||||
</a>
|
||||
</td>
|
||||
<?php }else{ ?>
|
||||
<td><?php echo $con->ConfigValue; ?></td>
|
||||
<td class="config-value-td" data-key="<?php echo $con->Key; ?>"><?php echo $con->ConfigValue; ?></td>
|
||||
<?php } ?>
|
||||
|
||||
<td>
|
||||
@ -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');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user