2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 11:36:44 +00:00

News updates (#6275)

* Set default ordering

* Order table by "most recent entries" by default
This commit is contained in:
Oliver 2024-01-18 17:25:15 +11:00 committed by GitHub
parent b8b3dfc90e
commit 1d3a23ca4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -402,6 +402,8 @@ class NewsFeedEntryList(NewsFeedMixin, BulkDeleteMixin, ListAPI):
filter_backends = ORDER_FILTER
ordering = '-published'
ordering_fields = ['published', 'author', 'read']
filterset_fields = ['read']

View File

@ -25,7 +25,7 @@ function loadNewsFeedTable(table, options={}, enableDelete=false) {
name: 'news',
groupBy: false,
queryParams: {
ordering: 'published',
ordering: '-published',
read: false,
},
paginationVAlign: 'bottom',