2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-03 20:20:58 +00:00

Merge pull request #1350 from SchrodingersGat/recently-updated

Adds "Recently Updated Stock" to index page
This commit is contained in:
Oliver
2021-02-23 14:47:24 +11:00
committed by GitHub
7 changed files with 92 additions and 25 deletions

View File

@ -319,6 +319,12 @@ function loadStockTable(table, options) {
}
}
var grouping = true;
if ('grouping' in options) {
grouping = options.grouping;
}
table.inventreeTable({
method: 'get',
formatNoMatches: function() {
@ -333,7 +339,7 @@ function loadStockTable(table, options) {
{% settings_value 'STOCK_GROUP_BY_PART' as group_by_part %}
{% if group_by_part %}
groupByField: options.groupByField || 'part',
groupBy: true,
groupBy: grouping,
groupByFormatter: function(field, id, data) {
var row = data[0];