diff --git a/InvenTree/templates/InvenTree/notifications/notifications.html b/InvenTree/templates/InvenTree/notifications/notifications.html index cd48584d71..14d9fc49ab 100644 --- a/InvenTree/templates/InvenTree/notifications/notifications.html +++ b/InvenTree/templates/InvenTree/notifications/notifications.html @@ -22,6 +22,11 @@ {% block js_ready %} {{ block.super }} +function updateNotificationTables() { + $("#inbox-table").bootstrapTable('refresh'); + $("#history-table").bootstrapTable('refresh'); +} + function loadNotificationTable(table, options={}) { var params = options.params || {}; @@ -82,7 +87,16 @@ function loadNotificationTable(table, options={}) { }, { formatter: function(value, row, index, field) { - var bRead = ""; + if (row.read) { + var bReadText = '{% trans "Mark as unread" %}'; + var bReadIcon = 'fa-uncheck icon-red'; + var bReadTarget = 'unread'; + } else { + var bReadText = '{% trans "Mark as read" %}'; + var bReadIcon = 'fa-check icon-green'; + var bReadTarget = 'read'; + } + var bRead = ``; var html = "