2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 05:25:42 +00:00

update indicator when table is updated

This commit is contained in:
Matthias
2021-11-30 17:00:02 +01:00
parent c8efc26f58
commit 93f9fe9684

View File

@ -102,7 +102,19 @@ function loadNotificationTable(table, options={}) {
inventreePut(url, {}, { inventreePut(url, {}, {
method: 'POST', method: 'POST',
success: function() { updateNotificationTables(); } success: function() {
updateNotificationTables();
// update current notification count
var count = parseInt($("#notification-counter").html());
if ($(this).attr('target') == 'read') {
count = count - 1;
} else {
count = count + 1;
}
// update notification indicator now
updateNotificationIndicator(count);
}
}); });
}); });
} }