mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-01 21:16:46 +00:00
Add option to stock table to disable grouping at run-time
This commit is contained in:
parent
791b14920a
commit
66e1b180e4
@ -319,6 +319,12 @@ function loadStockTable(table, options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var grouping = true;
|
||||||
|
|
||||||
|
if ('grouping' in options) {
|
||||||
|
grouping = options.grouping;
|
||||||
|
}
|
||||||
|
|
||||||
table.inventreeTable({
|
table.inventreeTable({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
formatNoMatches: function() {
|
formatNoMatches: function() {
|
||||||
@ -333,7 +339,7 @@ function loadStockTable(table, options) {
|
|||||||
{% settings_value 'STOCK_GROUP_BY_PART' as group_by_part %}
|
{% settings_value 'STOCK_GROUP_BY_PART' as group_by_part %}
|
||||||
{% if group_by_part %}
|
{% if group_by_part %}
|
||||||
groupByField: options.groupByField || 'part',
|
groupByField: options.groupByField || 'part',
|
||||||
groupBy: true,
|
groupBy: grouping,
|
||||||
groupByFormatter: function(field, id, data) {
|
groupByFormatter: function(field, id, data) {
|
||||||
|
|
||||||
var row = data[0];
|
var row = data[0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user