2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 03:56:43 +00:00

Table tweaks

This commit is contained in:
Oliver 2022-04-29 13:13:12 +10:00
parent a80465e85c
commit 94fa424440
2 changed files with 6 additions and 5 deletions

View File

@ -96,6 +96,7 @@ class BuildList(generics.ListCreateAPIView):
'target_date', 'target_date',
'completion_date', 'completion_date',
'quantity', 'quantity',
'completed',
'issued_by', 'issued_by',
'responsible', 'responsible',
] ]

View File

@ -1121,7 +1121,7 @@ function loadBuildOutputTable(build_info, options={}) {
{ {
field: 'quantity', field: 'quantity',
title: '{% trans "Build Output" %}', title: '{% trans "Build Output" %}',
switchable: true, switchable: false,
sortable: true, sortable: true,
formatter: function(value, row) { formatter: function(value, row) {
@ -1834,12 +1834,12 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
// Handle the case where both ratios are equal // Handle the case where both ratios are equal
if (progressA == progressB) { if (progressA == progressB) {
return (qA < qB) ? 1 : -1; return (qA > qB) ? 1 : -1;
} }
if (progressA == progressB) return 0; if (progressA == progressB) return 0;
return (progressA < progressB) ? 1 : -1; return (progressA > progressB) ? 1 : -1;
} }
}, },
{ {
@ -2374,8 +2374,8 @@ function loadBuildTable(table, options) {
} }
}, },
{ {
field: 'quantity', field: 'completed',
title: '{% trans "Completed" %}', title: '{% trans "Progress" %}',
sortable: true, sortable: true,
formatter: function(value, row) { formatter: function(value, row) {
return makeProgressBar( return makeProgressBar(