2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 04:26: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:
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', 'creation_date',
'IPN', 'IPN',
'in_stock', 'in_stock',
'category',
] ]
# Default ordering # Default ordering

View File

@ -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) {