mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix read flag
This commit is contained in:
parent
e01f2e202e
commit
bb1c01635e
@ -24,6 +24,9 @@
|
|||||||
|
|
||||||
function loadNotificationTable(table, options={}) {
|
function loadNotificationTable(table, options={}) {
|
||||||
|
|
||||||
|
var params = options.params || {};
|
||||||
|
var read = typeof(params.read) === 'undefined' ? true : params.read;
|
||||||
|
|
||||||
$(table).inventreeTable({
|
$(table).inventreeTable({
|
||||||
url: options.url,
|
url: options.url,
|
||||||
name: options.name,
|
name: options.name,
|
||||||
@ -31,9 +34,9 @@ function loadNotificationTable(table, options={}) {
|
|||||||
search: true,
|
search: true,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
ordering: 'age',
|
ordering: 'age',
|
||||||
|
read: read,
|
||||||
},
|
},
|
||||||
paginationVAlign: 'bottom',
|
paginationVAlign: 'bottom',
|
||||||
original: options.params,
|
|
||||||
formatNoMatches: options.no_matches,
|
formatNoMatches: options.no_matches,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -87,6 +90,9 @@ function loadNotificationTable(table, options={}) {
|
|||||||
loadNotificationTable("#inbox-table", {
|
loadNotificationTable("#inbox-table", {
|
||||||
name: 'inbox',
|
name: 'inbox',
|
||||||
url: '{% url 'api-notifications-list' %}',
|
url: '{% url 'api-notifications-list' %}',
|
||||||
|
params: {
|
||||||
|
read: false,
|
||||||
|
},
|
||||||
no_matches: function() { return '{% trans "No unread notifications found" %}'; },
|
no_matches: function() { return '{% trans "No unread notifications found" %}'; },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user