fix: editBannerNoExpiry load inventory before opening edit modal
currentInventory is empty on dashboard. Fetch inventory_list first (same pattern as editReviewItem and weighBannerItem).
This commit is contained in:
@@ -3941,7 +3941,10 @@ function editBannerNoExpiry() {
|
||||
const entry = _bannerQueue[_bannerIndex];
|
||||
if (!entry || entry.type !== 'no_expiry') return;
|
||||
_bannerEditPending = true;
|
||||
api('inventory_list').then(data => {
|
||||
currentInventory = data.inventory || [];
|
||||
editInventoryItem(entry.data.id);
|
||||
});
|
||||
}
|
||||
|
||||
function editBannerReview() {
|
||||
|
||||
+2
-2
@@ -11,7 +11,7 @@
|
||||
<title>EverShelf</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
<link rel="icon" type="image/png" href="assets/img/logo/logo_icon.png">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=20260511c">
|
||||
<link rel="stylesheet" href="assets/css/style.css?v=20260511d">
|
||||
<!-- QuaggaJS for barcode scanning -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@ericblade/quagga2@1.8.4/dist/quagga.min.js"></script>
|
||||
<!-- @xenova/transformers: ES-module bootstrap that exposes a lazy category-classifier as window._categoryPipelinePromise -->
|
||||
@@ -1469,6 +1469,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="assets/js/app.js?v=20260511c"></script>
|
||||
<script src="assets/js/app.js?v=20260511d"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user