diff --git a/InvenTree/templates/InvenTree/notifications/notifications.html b/InvenTree/templates/InvenTree/notifications/notifications.html index e6b15a9ff0..4b34f8f30b 100644 --- a/InvenTree/templates/InvenTree/notifications/notifications.html +++ b/InvenTree/templates/InvenTree/notifications/notifications.html @@ -90,7 +90,8 @@ function loadNotificationTable(table, options={}) { { formatter: function(value, row, index, field) { var bRead = getReadEditButton(row.pk, row.read) - var html = "
" + bRead + "
"; + var bDel = ""; + var html = "
" + bRead + bDel + "
"; return html; } } @@ -126,5 +127,15 @@ $("#history-refresh").on('click', function() { $("#history-table").bootstrapTable('refresh'); }); +$("#history-table").on('click', '.notification-delete', function() { + constructForm(`/api/notifications/${$(this).attr('pk')}/`, { + method: 'DELETE', + title: '{% trans "Delete Notification" %}', + onSuccess: function(data) { + updateNotificationTables(); + } + }); +}); + enableSidebar('notifications'); {% endblock %}