mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Simplified stock table view in Part and SupplierPart detail pages
This commit is contained in:
parent
5e0e364b6c
commit
b5a5f5b409
@ -22,7 +22,7 @@
|
||||
params: {
|
||||
supplier_part: {{ part.id }},
|
||||
location_detail: true,
|
||||
part_detail: true,
|
||||
part_detail: false,
|
||||
},
|
||||
groupByField: 'location',
|
||||
buttons: ['#stock-options'],
|
||||
|
@ -40,7 +40,7 @@
|
||||
params: {
|
||||
part: {{ part.id }},
|
||||
location_detail: true,
|
||||
part_detail: true,
|
||||
part_detail: false,
|
||||
},
|
||||
groupByField: 'location',
|
||||
buttons: [
|
||||
|
@ -241,7 +241,7 @@ function loadStockTable(table, options) {
|
||||
|
||||
// List of user-params which override the default filters
|
||||
|
||||
options.params['part_detail'] = true;
|
||||
// options.params['part_detail'] = true;
|
||||
options.params['location_detail'] = true;
|
||||
|
||||
var params = options.params || {};
|
||||
@ -524,7 +524,8 @@ function loadStockTable(table, options) {
|
||||
title: '{% trans "Part" %}',
|
||||
sortName: 'part__name',
|
||||
sortable: true,
|
||||
switchable: false,
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
|
||||
var url = `/stock/item/${row.pk}/`;
|
||||
@ -543,6 +544,8 @@ function loadStockTable(table, options) {
|
||||
title: 'IPN',
|
||||
sortName: 'part__IPN',
|
||||
sortable: true,
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
return row.part_detail.IPN;
|
||||
},
|
||||
@ -550,6 +553,8 @@ function loadStockTable(table, options) {
|
||||
{
|
||||
field: 'part_detail.description',
|
||||
title: '{% trans "Description" %}',
|
||||
visible: params['part_detail'],
|
||||
switchable: params['part_detail'],
|
||||
formatter: function(value, row, index, field) {
|
||||
return row.part_detail.description;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user