mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-21 02:07:23 -04:00
fix(view): conditionally reload stock locations on success response
- Updated AJAX response handler to reload stock locations only when the operation is successful. Signed-off-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
This commit is contained in:
1 parent
39124e8132
commit
a7f1994404
1 file changed
+6
-4
@@ -120,10 +120,12 @@
|
||||
}, {
|
||||
type: response.success ? 'success' : 'danger'
|
||||
});
|
||||
$("#stock_locations").load('<?= "config/stockLocations" ?>', function() {
|
||||
init_add_remove_locations();
|
||||
init_sortable_locations();
|
||||
});
|
||||
if (response.success) {
|
||||
$("#stock_locations").load('<?= "config/stockLocations" ?>', function() {
|
||||
init_add_remove_locations();
|
||||
init_sortable_locations();
|
||||
});
|
||||
}
|
||||
},
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user