mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Merge pull request #1692 from matmair/part-table-cat-sort
Support sorting by category in part-table
This commit is contained in:
commit
637033cf7d
@ -706,6 +706,7 @@ class PartList(generics.ListCreateAPIView):
|
|||||||
'creation_date',
|
'creation_date',
|
||||||
'IPN',
|
'IPN',
|
||||||
'in_stock',
|
'in_stock',
|
||||||
|
'category',
|
||||||
]
|
]
|
||||||
|
|
||||||
# Default ordering
|
# Default ordering
|
||||||
|
@ -447,6 +447,7 @@ function loadPartTable(table, url, options={}) {
|
|||||||
|
|
||||||
columns.push({
|
columns.push({
|
||||||
sortable: true,
|
sortable: true,
|
||||||
|
sortName: 'category',
|
||||||
field: 'category_detail',
|
field: 'category_detail',
|
||||||
title: '{% trans "Category" %}',
|
title: '{% trans "Category" %}',
|
||||||
formatter: function(value, row, index, field) {
|
formatter: function(value, row, index, field) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user