diff --git a/InvenTree/InvenTree/static/script/inventree/notification.js b/InvenTree/InvenTree/static/script/inventree/notification.js index ad46d1385a..bb40fa3850 100644 --- a/InvenTree/InvenTree/static/script/inventree/notification.js +++ b/InvenTree/InvenTree/static/script/inventree/notification.js @@ -134,17 +134,22 @@ function showMessage(message, options={}) { }, { success: function(response) { - if (response.length == 0) { - $("#notification-alert").addClass("d-none"); - } else { - $("#notification-alert").removeClass("d-none"); - } + updateNotificationIndicator(response.length); } } ); } } +function updateNotificationIndicator(counter) { + if (counter == 0) { + $("#notification-alert").addClass("d-none"); + } else { + $("#notification-alert").removeClass("d-none"); + } + $("#notification-counter").html(counter); +} + /** * Returns the html for a read / unread button diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html index 7f8d17dea1..334c1ebcc7 100644 --- a/InvenTree/templates/navbar.html +++ b/InvenTree/templates/navbar.html @@ -75,8 +75,9 @@