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

add read all endpoint

This commit is contained in:
Matthias
2022-03-20 02:05:18 +01:00
parent 0fa8af6cd8
commit a4c9dfdd6f
3 changed files with 34 additions and 0 deletions

View File

@ -13,6 +13,9 @@
<div class='btn btn-secondary' type='button' id='inbox-refresh' title='{% trans "Refresh Pending Notifications" %}'>
<span class='fa fa-sync'></span> {% trans "Refresh Pending Notifications" %}
</div>
<div class='btn btn-secondary' type='button' id='mark-all' title='{% trans "Mark all as read" %}'>
<span class='fa fa-sync'></span> {% trans "Mark all as read" %}
</div>
{% endblock %}
{% block content %}

View File

@ -120,6 +120,15 @@ $("#inbox-refresh").on('click', function() {
$("#inbox-table").bootstrapTable('refresh');
});
$("#mark-all").on('click', function() {
inventreeGet(
'{% url "api-notifications-readall" %}',
{
read: false,
},
);
updateNotificationTables();
});
loadNotificationTable("#history-table", {
name: 'history',