diff --git a/InvenTree/templates/js/modals.js b/InvenTree/templates/js/modals.js index f447fdce72..c8ebd90eb4 100644 --- a/InvenTree/templates/js/modals.js +++ b/InvenTree/templates/js/modals.js @@ -978,6 +978,7 @@ function showModalImage(image_url) { // Set image content $('#modal-image').attr('src', image_url); + modal.hide(); modal.show(); modal.animate({ diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index 52f54dfa36..a5b6def921 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -288,7 +288,13 @@ function partGridTile(part) { rows += `{% trans "IPN" %}${part.IPN}`; } - rows += `{% trans "Stock" %}${part.in_stock}`; + var stock = `${part.in_stock}`; + + if (!part.in_stock) { + stock = `{% trans "No Stock" %}`; + } + + rows += `{% trans "Stock" %}${stock}`; if (part.on_order) { rows += `{$ trans "On Order" %}${part.on_order}`; @@ -313,7 +319,7 @@ function partGridTile(part) {
- +