stock changes 21-04-2025
This commit is contained in:
parent
adf9498710
commit
0cb5cb50b3
@ -157,7 +157,7 @@ if (!empty($master)) {
|
|||||||
<?php echo $index; ?>
|
<?php echo $index; ?>
|
||||||
</td>
|
</td>
|
||||||
<?php if($con->Config_ID === 'C023'){ ?>
|
<?php if($con->Config_ID === 'C023'){ ?>
|
||||||
<td>
|
<td class="config-value-td" data-key="<?php echo $con->Key; ?>">
|
||||||
<a
|
<a
|
||||||
class="config-category "
|
class="config-category "
|
||||||
data-value="<?php echo $con->ConfigValue;?>"
|
data-value="<?php echo $con->ConfigValue;?>"
|
||||||
@ -168,7 +168,7 @@ if (!empty($master)) {
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<?php }else{ ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
@ -422,8 +422,6 @@ if (!empty($master)) {
|
|||||||
},
|
},
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
|
|
||||||
if (data[0]?.isActive == 1) {
|
if (data[0]?.isActive == 1) {
|
||||||
@ -509,12 +507,13 @@ if (!empty($master)) {
|
|||||||
var id = $(this).data('id');
|
var id = $(this).data('id');
|
||||||
var key = $(this).data('key');
|
var key = $(this).data('key');
|
||||||
var code = $(this).data('code');
|
var code = $(this).data('code');
|
||||||
var configValue = $(this).data('configvalue');
|
var configValue = $(this).attr('data-configvalue');
|
||||||
|
|
||||||
|
console.log(configValue);
|
||||||
|
|
||||||
$('#key').val(key);
|
$('#key').val(key);
|
||||||
$('#Config_ID').val(code);
|
$('#Config_ID').val(code);
|
||||||
$('#configValue').val(configValue);
|
$('#configValue').val(configValue);
|
||||||
|
|
||||||
$('#EditConfiguration').modal('show');
|
$('#EditConfiguration').modal('show');
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -522,6 +521,7 @@ if (!empty($master)) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// edit config modals update button
|
// edit config modals update button
|
||||||
$('#tempClickUpdate').click(function() {
|
$('#tempClickUpdate').click(function() {
|
||||||
|
|
||||||
@ -541,7 +541,25 @@ if (!empty($master)) {
|
|||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
alert('Config Value updated successfully');
|
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 {
|
} else {
|
||||||
alert('Failed to update Config Value');
|
alert('Failed to update Config Value');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user