Allow sorting of part table by unallocated_stock

This commit is contained in:
Oliver Walters 2022-04-05 00:31:44 +10:00
parent 58003bc2cb
commit 0908aa8c8c
2 changed files with 2 additions and 1 deletions

View File

@ -1348,6 +1348,7 @@ class PartList(generics.ListCreateAPIView):
'creation_date',
'IPN',
'in_stock',
'unallocated_stock',
'category',
]

View File

@ -1384,7 +1384,7 @@ function loadPartTable(table, url, options={}) {
link = '?display=build-orders';
} else {
// There is no available stock
value = `0<span class='badge badge-right rounded-pill bg-warning'>{% trans "Not available" %}</span>`;
value = `0<span class='badge badge-right rounded-pill bg-warning'>{% trans "No stock available" %}</span>`;
}
}
} else {