Merge pull request #1692 from matmair/part-table-cat-sort

Support sorting by category in part-table
This commit is contained in:
Oliver 2021-06-21 08:33:09 +10:00 committed by GitHub
commit 637033cf7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -706,6 +706,7 @@ class PartList(generics.ListCreateAPIView):
'creation_date',
'IPN',
'in_stock',
'category',
]
# Default ordering

View File

@ -447,6 +447,7 @@ function loadPartTable(table, url, options={}) {
columns.push({
sortable: true,
sortName: 'category',
field: 'category_detail',
title: '{% trans "Category" %}',
formatter: function(value, row, index, field) {