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',
'completion_date',
'quantity',
'completed',
'issued_by',
'responsible',
]

View File

@ -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(