mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-13 02:25:38 +00:00
Make part variant table columns sortable
This commit is contained in:
@ -710,6 +710,7 @@ function loadPartVariantTable(table, partId, options={}) {
|
|||||||
field: 'name',
|
field: 'name',
|
||||||
title: '{% trans "Name" %}',
|
title: '{% trans "Name" %}',
|
||||||
switchable: false,
|
switchable: false,
|
||||||
|
sortable: true,
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
@ -760,10 +761,12 @@ function loadPartVariantTable(table, partId, options={}) {
|
|||||||
{
|
{
|
||||||
field: 'IPN',
|
field: 'IPN',
|
||||||
title: '{% trans "IPN" %}',
|
title: '{% trans "IPN" %}',
|
||||||
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'revision',
|
field: 'revision',
|
||||||
title: '{% trans "Revision" %}',
|
title: '{% trans "Revision" %}',
|
||||||
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'description',
|
field: 'description',
|
||||||
@ -772,6 +775,7 @@ function loadPartVariantTable(table, partId, options={}) {
|
|||||||
{
|
{
|
||||||
field: 'in_stock',
|
field: 'in_stock',
|
||||||
title: '{% trans "Stock" %}',
|
title: '{% trans "Stock" %}',
|
||||||
|
sortable: true,
|
||||||
formatter: function(value, row) {
|
formatter: function(value, row) {
|
||||||
|
|
||||||
var base_stock = row.in_stock;
|
var base_stock = row.in_stock;
|
||||||
|
Reference in New Issue
Block a user