From 94fa424440b033fc306c6bbc1db64fb0606b7ff6 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 29 Apr 2022 13:13:12 +1000 Subject: [PATCH] Table tweaks --- InvenTree/build/api.py | 1 + InvenTree/templates/js/translated/build.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/InvenTree/build/api.py b/InvenTree/build/api.py index 22dd6473ab..a720f7cbe0 100644 --- a/InvenTree/build/api.py +++ b/InvenTree/build/api.py @@ -96,6 +96,7 @@ class BuildList(generics.ListCreateAPIView): 'target_date', 'completion_date', 'quantity', + 'completed', 'issued_by', 'responsible', ] diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index 719df6ba5c..c9ebbe0e22 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -1121,7 +1121,7 @@ function loadBuildOutputTable(build_info, options={}) { { field: 'quantity', title: '{% trans "Build Output" %}', - switchable: true, + switchable: false, sortable: true, formatter: function(value, row) { @@ -1834,12 +1834,12 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) { // Handle the case where both ratios are equal if (progressA == progressB) { - return (qA < qB) ? 1 : -1; + return (qA > qB) ? 1 : -1; } 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', - title: '{% trans "Completed" %}', + field: 'completed', + title: '{% trans "Progress" %}', sortable: true, formatter: function(value, row) { return makeProgressBar(