2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Load and display build order allocation items via AJAX

This commit is contained in:
Oliver
2021-06-18 19:18:35 +10:00
parent 245c9bfd28
commit 778aa0314d
5 changed files with 33 additions and 42 deletions

View File

@ -177,6 +177,8 @@ function loadBuildOrderAllocationTable(table, options={}) {
queryParams: filters,
name: 'buildorderallocation',
groupBy: false,
search: false,
paginationVAlign: 'bottom',
original: options.params,
formatNoMatches: function() {
return '{% trans "No build order allocations found" %}'
@ -189,6 +191,7 @@ function loadBuildOrderAllocationTable(table, options={}) {
},
{
field: 'build',
switchable: false,
title: '{% trans "Build Order" %}',
formatter: function(value, row) {
var prefix = "{% settings_value 'BUILDORDER_REFERENCE_PREFIX' %}";

View File

@ -337,6 +337,8 @@ function loadSalesOrderAllocationTable(table, options={}) {
queryParams: filters,
name: 'salesorderallocation',
groupBy: false,
search: false,
paginationVAlign: 'bottom',
original: options.params,
formatNoMatches: function() { return '{% trans "No sales order allocations found" %}'; },
columns: [
@ -347,6 +349,7 @@ function loadSalesOrderAllocationTable(table, options={}) {
},
{
field: 'order',
switchable: false,
title: '{% trans "Order" %}',
switchable: false,
formatter: function(value, row) {

View File

@ -135,7 +135,7 @@ $.fn.inventreeTable = function(options) {
// Pagingation options (can be server-side or client-side as specified by the caller)
options.pagination = true;
options.paginationVAlign = 'both';
options.paginationVAlign = options.paginationVAlign || 'both';
options.pageSize = inventreeLoad(varName, 25);
options.pageList = [25, 50, 100, 250, 'all'];
options.totalField = 'count';