fix onboarding bugs
This commit is contained in:
@@ -17,6 +17,11 @@
|
||||
$answer['output'] = $wh->getWarehouseList($type, $sku, $id);
|
||||
}
|
||||
|
||||
$answer['success'] = 1;
|
||||
if (empty($answer['output'])) {
|
||||
$answer['success'] = 0;
|
||||
$answer['message'] = 'No warehouse found. Please go to <b>Inventory → Warehouse</b> to create your first warehouse before using this page.';
|
||||
} else {
|
||||
$answer['success'] = 1;
|
||||
}
|
||||
exit(json_encode($answer));
|
||||
?>
|
||||
@@ -304,8 +304,7 @@
|
||||
});
|
||||
$('#warehouse').html(option);
|
||||
|
||||
// Auto-select first warehouse on page load
|
||||
if (res.output && res.output.length > 0) {
|
||||
if (res.output.length > 0) {
|
||||
$('#warehouse').val(res.output[0].id);
|
||||
retrieve_overview();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user